/* Theme control is available in both modes. Original brand artwork stays unchanged. */
.phil-theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;flex:0 0 auto;align-self:center;min-height:36px;padding:7px 10px;border:1px solid #d1e3e9;border-radius:9px;background:#f1f8fa;color:#315c6c;font:600 13px/1.3 -apple-system,BlinkMacSystemFont,"Segoe UI","Malgun Gothic",sans-serif;white-space:nowrap;cursor:pointer}
.phil-theme-toggle svg{display:block;flex-shrink:0}.phil-theme-toggle svg[hidden]{display:none}.phil-theme-toggle:hover{background:#e3f3f7;color:#006d84}.phil-theme-toggle:focus-visible{outline:3px solid #0087a3;outline-offset:3px}
.phil-auth-heading{position:relative}.phil-auth-heading>.phil-theme-toggle{position:absolute;right:0;top:0}.phil-theme-floating{position:fixed;right:20px;bottom:105px;z-index:1300;box-shadow:0 6px 22px #0003}
@media(max-width:760px){.nav-shell>.phil-theme-toggle,.phil-nav-shell>.phil-theme-toggle{padding:6px;min-height:34px;width:34px;margin-left:0}.nav-shell>.phil-theme-toggle span,.phil-nav-shell>.phil-theme-toggle span{display:none}.nav-shell,.phil-nav-shell{column-gap:12px!important}.phil-auth-heading>.phil-theme-toggle{padding:6px;width:34px;min-height:34px;top:-7px}.phil-auth-heading>.phil-theme-toggle span{display:none}}
html[data-phil-theme="dark"]{color-scheme:dark;--phil-theme-bg:#101a20;--phil-theme-panel:#17262e;--phil-theme-ink:#e1edf2;--phil-theme-muted:#adbec8;--phil-theme-border:#354b57;--phil-theme-link:#7bd6e7;background:#101a20}
html[data-phil-theme="dark"] body{background:#101a20!important;color:#e1edf2}
html[data-phil-theme="dark"] .phil-site{--phil-ink:#e1edf2;--phil-muted:#adbec8;--phil-line:#354b57;--phil-accent:#3cbfd7;--phil-dark:#7bd6e7;--phil-wash:#17343e;background:#101a20;color:#e1edf2}
html[data-phil-theme="dark"] .phil-home-page{--ink:#e1edf2;--muted:#adbec8;--line:#354b57;--paper:#14232b;--cyan-dark:#7bd6e7;--cyan:#3cbfd7}
html[data-phil-theme="dark"] .phil-theme-toggle{background:#233c47;color:#d3f1f7;border-color:#47616e}
html[data-phil-theme="dark"] .phil-theme-toggle:hover{background:#2e4f5d;color:#fff}
html[data-phil-theme="dark"] :is(.brand-logo,.phil-brand img,.footer-brand img){background:#fff;border-radius:6px;padding:4px}
html[data-phil-theme="dark"] .phil-theme-toggle:focus-visible,html[data-phil-theme="dark"] :is(a,button,input,select,textarea,summary):focus-visible{outline-color:#7bd6e7}
html[data-phil-theme="dark"] :is(input,textarea,select){color-scheme:dark;caret-color:#9ae6f2}
html[data-phil-theme="dark"] input:-webkit-autofill{ -webkit-box-shadow:0 0 0 1000px #203640 inset!important;-webkit-text-fill-color:#e1edf2!important;caret-color:#e1edf2}
html[data-phil-theme="dark"] input::placeholder,html[data-phil-theme="dark"] textarea::placeholder{color:#a4b8c3!important;opacity:1}
html[data-phil-theme="dark"] .view-content{color:#e1edf2}
html[data-phil-theme="dark"] .view-content .phil-theme-article-ink{color:#e1edf2!important}
html[data-phil-theme="dark"] .view-content a .phil-theme-article-ink{color:#7bd6e7!important}
html[data-phil-theme="dark"] .view-content .phil-theme-article-paper{background-color:#1a2d36!important}
html[data-phil-theme="dark"] .view-content table,html[data-phil-theme="dark"] .view-content td,html[data-phil-theme="dark"] .view-content th{border-color:#3b515d!important}
/* Editor chrome and presentation only: no changes to submitted HTML or chosen font colors. */
html[data-phil-theme="dark"] :is(.jodit-container,.jodit-popup,.jodit-dialog){--jd-color-background-default:#17262e;--jd-color-panel:#223640;--jd-color-text:#e1edf2;--jd-color-text-icons:#d3e3eb;--jd-color-icon:#d3e3eb;--jd-color-border:#405762;--jd-color-white:#17262e;--jd-color-label:#becfd7;--jd-color-dark:#e1edf2;--jd-color-gray:#a7bbc6;--jd-color-background-gray:#223640;--jd-color-background-button-hover:#345664;--jd-color-button-background-hover:#345664;--jd-color-background-selection:#284f5e}
html[data-phil-theme="dark"] .phil-editor :is(.jodit-workplace,.jodit-wysiwyg,.jodit-source__mirror,.jodit-source__textarea){background:#17262e!important;color:#e1edf2!important}
html[data-phil-theme="dark"] .phil-editor :is(.jodit-toolbar__box,.jodit-status-bar){background:#223640!important;color:#becfd7!important;border-color:#405762!important}
html[data-phil-theme="dark"] .phil-editor .jodit-icon{fill:#d3e3eb}
html[data-phil-theme="dark"] .phil-editor .jodit-placeholder{color:#a4b8c3!important}
/* Native fallback forms and dialogs also remain readable. */
html[data-phil-theme="dark"] :is(.modal-content,.popover,.dropdown-menu,.panel,.well){background-color:#17262e;color:#e1edf2;border-color:#354b57}
html[data-phil-theme="dark"] :is(.modal-header,.modal-footer,.panel-heading,.panel-footer){background-color:#223640;border-color:#354b57;color:#e1edf2}
html[data-phil-theme="dark"] :is(.list-group-item,.form-control){background-color:#17262e;color:#e1edf2;border-color:#405762}
html[data-phil-theme="dark"] :is(.account-primary,.phil-account-primary){background:#28434f!important;color:#f0f7fa!important}
html[data-phil-theme="dark"] .phil-auth-social-kakao,html[data-phil-theme="dark"] .phil-auth-social-kakao *{color:#292100!important}
html[data-phil-theme="dark"] .phil-mobile-dialog::backdrop,html[data-phil-theme="dark"] .phil-home-add-dialog::backdrop{background:#000a}
html[data-phil-theme="dark"] .phil-auth-content .sns-wrap .sns-kakao{background:#fee500!important;border-color:#fee500!important;color:#302a19!important}
html[data-phil-theme="dark"] .phil-auth-content :is(.form-box,.form-body,#mb_login,#fregister){background-color:#17262e!important;color:#e1edf2;border-color:#405762}
html[data-phil-theme="dark"] .phil-site :is(h1,h2,h3,h4,h5,h6){color:#e1edf2}
html[data-phil-theme="dark"] :is(.phil-site .text-muted,.phil-site .view-info,.phil-site .view-info .hidden-xs){color:#b6c8d1!important}
html[data-phil-theme="dark"] .phil-auth-content .article-title{color:#7bd6e7!important}
html[data-phil-theme="dark"] .phil-mobile-category-options a small{color:#f2f8fb!important}
html[data-phil-theme="dark"] .phil-home-page .cta a{background-color:#08748a;color:#f2f8fb}
html[data-phil-theme="dark"] body:not(.phil-home-page):not(.phil-category):not(.phil-auth) :is(.at-body,.at-main,.at-side,.at-content,.at-container){background-color:#17262e!important;color:#e1edf2}
html[data-phil-theme="dark"] :is(select,select option,select optgroup),html[data-phil-theme="dark"] .phil-site input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="color"]),html[data-phil-theme="dark"] .phil-site textarea{background-color:#17262e!important;color:#e1edf2!important}
html[data-phil-theme="dark"] .view-content font[color]{color:#e1edf2!important}
html[data-phil-theme="dark"] .view-content [bgcolor]{background-color:#1a2d36!important}
html[data-phil-theme="dark"] body:not(.phil-home-page):not(.phil-category):not(.phil-auth) .widget-main-box{background-color:#17262e!important;color:#e1edf2;border-color:#405762}
html[data-phil-theme="dark"] body:not(.phil-home-page):not(.phil-category):not(.phil-auth) .at-side .more{color:#7bd6e7!important}
