/* Shared chrome overrides legacy workspace/page headers at every width. */
#nexus-shared-header{--ns-bg:#fff;--ns-ink:#192538;--ns-muted:#516078;--ns-line:#e0e6ee;--ns-active:#eaedff;position:sticky;top:0;z-index:100;display:block;height:auto;min-height:0;padding:0;background:var(--ns-bg);border:0;border-bottom:1px solid var(--ns-line);box-shadow:none;font-family:Inter,"Noto Sans KR",system-ui,sans-serif;letter-spacing:normal;color:var(--ns-ink)}
html[data-theme=dark] #nexus-shared-header{--ns-bg:#121b2b;--ns-ink:#eaedff;--ns-muted:#bdcbe0;--ns-line:#304059;--ns-active:#243758;background:var(--ns-bg);border-color:var(--ns-line);box-shadow:none}
#nexus-shared-header .ns-header-inner{max-width:1440px;margin:0 auto;padding:0 28px;min-height:78px;display:flex;align-items:center;gap:24px;flex-wrap:wrap}
#nexus-shared-header .ns-brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--ns-ink);font-size:15px;letter-spacing:.045em;font-weight:800;white-space:nowrap;flex-shrink:0;min-height:52px}
#nexus-shared-header .ns-brand img{display:block;width:34px;height:34px;object-fit:contain}
#nexus-shared-header .ns-navigation{display:flex;align-items:center;gap:3px;flex:1;flex-wrap:wrap;min-width:0}
#nexus-shared-header .ns-navigation a{display:flex;align-items:center;justify-content:center;padding:10px 11px;min-height:44px;border-radius:8px;font-size:13px;font-weight:600;text-decoration:none;color:var(--ns-muted);white-space:nowrap;box-sizing:border-box}
#nexus-shared-header .ns-navigation a:hover,#nexus-shared-header .ns-navigation a[aria-current=page]{color:var(--ns-ink);background:var(--ns-active)}
#nexus-shared-header .ns-header-actions{display:flex;align-items:center;gap:12px;flex-shrink:0;margin-left:auto}
#nexus-shared-header .ns-theme,#nexus-shared-header .ns-account-link,#nexus-shared-header .nexus-account-menu>summary{display:flex;align-items:center;gap:7px;min-height:44px;padding:9px 10px;border:1px solid var(--ns-line);border-radius:8px;background:var(--ns-bg);color:var(--ns-ink)!important;line-height:1.3;font-family:inherit;font-size:12px;font-weight:600;white-space:nowrap;text-decoration:none;cursor:pointer;box-sizing:border-box}
#nexus-shared-header .nexus-account-menu{margin:0;height:auto;order:0;position:relative}
#nexus-shared-header .nexus-account-menu>.nexus-nav-popover{top:calc(100% + 8px);right:0;left:auto;max-height:70vh;overflow:auto}
#nexus-shared-header .account-navigation [hidden]{display:none!important}
#nexus-shared-header :is(a,button,summary):focus-visible{outline:3px solid #7898e4;outline-offset:2px}
.ns-page-links{display:flex;justify-content:flex-end;gap:24px;max-width:1136px;margin:0 auto;padding:16px 0;font-size:13px;color:var(--muted,#516078)}
.ns-page-links a{text-decoration:none;color:inherit;padding:6px 0}
[data-access-locked=true]>:not(.ns-access-notice){display:none!important}
.ns-access-notice{max-width:840px;margin:30px auto;padding:54px 40px;background:#f7f9fc;border:1px solid #dbe3ef;border-radius:18px;color:#192538;line-height:1.7;grid-column:1/-1;text-align:center}
.ns-access-notice[hidden]{display:none!important}
.ns-access-kicker{font-size:11px;letter-spacing:.14em;color:#556984;font-weight:700}
.ns-access-notice h2{font-size:clamp(24px,4vw,32px)!important;letter-spacing:-.04em;margin:16px 0!important;color:inherit!important}
.ns-access-notice p{font-size:15px;color:#526079!important;margin:12px 0}
.ns-access-notice .ns-access-detail{font-size:13px}
.ns-access-notice>div{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin-top:26px}
.ns-access-notice a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:9px 18px;border-radius:8px;border:1px solid #d4deef;color:#3346d3;background:white;font-size:14px;font-weight:700;text-decoration:none}
html[data-theme=dark] .ns-access-notice{background:#172236;border-color:#34455f;color:#eaedff}
html[data-theme=dark] .ns-access-notice :is(p,.ns-access-kicker){color:#bdcbe0!important}
html[data-theme=dark] .ns-access-notice a{background:#243758;border-color:#3b5277;color:#eaedff}
@media(max-width:980px){#nexus-shared-header .ns-header-inner{gap:8px 20px;padding:10px 24px}#nexus-shared-header .ns-brand{order:0}#nexus-shared-header .ns-header-actions{order:1}#nexus-shared-header .ns-navigation{order:2;flex-basis:100%;width:100%;padding-bottom:4px}}
@media(max-width:650px){#nexus-shared-header .ns-header-inner{padding:8px 16px;gap:4px 12px}#nexus-shared-header .ns-brand{font-size:12px;gap:7px}#nexus-shared-header .ns-brand img{width:28px;height:28px}#nexus-shared-header .ns-header-actions{gap:6px}#nexus-shared-header .ns-theme,#nexus-shared-header .ns-account-link,#nexus-shared-header .nexus-account-menu>summary{font-size:11px;padding:8px}#nexus-shared-header .ns-navigation{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px}#nexus-shared-header .ns-navigation a{font-size:11px;padding:9px 2px}.ns-page-links{padding:12px 22px}.ns-access-notice{margin:20px 0;padding:35px 18px}.ns-access-notice p br{display:none}}
@media(max-width:370px){#nexus-shared-header .ns-brand span{font-size:10px}#nexus-shared-header .ns-theme>span:first-child{display:none}#nexus-shared-header .ns-header-inner{padding:8px 10px;gap:4px 6px}}
/* Trend headlines use dedicated surface/text colors in both themes. */
#trends{--trend-surface:#fff;--trend-ink:#203047;--trend-muted:#52647a;--trend-line:#dbe3ee;--trend-chip:#eaedff;--trend-accent:#3346d3;--trend-button:#3346d3;--trend-button-text:#fff;}
html[data-theme=dark] #trends{--trend-surface:#192438;--trend-ink:#eaedff;--trend-muted:#bdcbe0;--trend-line:#3b4c66;--trend-chip:#293d5d;--trend-accent:#d1e2ff;--trend-button:#cbdfff;--trend-button-text:#142949;}
#trends #trend-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;align-items:start;}
body #trends .trend-card{padding:26px!important;border:1px solid var(--trend-line)!important;border-radius:16px!important;background:var(--trend-surface)!important;color:var(--trend-ink)!important;display:flex;flex-direction:column;gap:0;min-width:0;box-sizing:border-box;}
body #trends .trend-card-top{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;}
body #trends :is(.trend-time,.trend-category-tag,.trend-articles small){color:var(--trend-muted)!important;font-size:13px!important;line-height:1.65;}
body #trends .trend-volume{background:var(--trend-chip)!important;color:var(--trend-accent)!important;font-size:13px!important;font-weight:650;padding:6px 10px;border-radius:7px;}
body #trends .trend-category-tags{display:flex;gap:8px;flex-wrap:wrap;margin-top:18px;}
body #trends .trend-category-tag{background:var(--trend-chip)!important;padding:4px 9px;border-radius:6px;}
body #trends .trend-card h2{color:var(--trend-ink)!important;font:700 clamp(24px,2.2vw,30px)/1.45 Inter,"Noto Sans KR",system-ui,sans-serif!important;margin:16px 0 20px!important;letter-spacing:-.025em;word-break:keep-all;overflow-wrap:anywhere;}
body #trends .trend-articles{flex:1;}
body #trends .trend-articles a{display:block;color:var(--trend-ink)!important;border-top:1px solid var(--trend-line)!important;padding:16px 0!important;font-size:16px!important;line-height:1.8;font-weight:500;text-decoration:none;word-break:keep-all;overflow-wrap:anywhere;}
body #trends .trend-articles a:hover{text-decoration:underline;text-underline-offset:4px;}
body #trends .trend-articles small{display:block;margin-top:7px;}
body #trends .trend-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;border-top:1px solid var(--trend-line)!important;padding-top:20px;margin-top:8px;}
body #trends .trend-actions :is(a,button){display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 14px!important;border:1px solid var(--trend-line)!important;border-radius:8px!important;background:var(--trend-chip)!important;color:var(--trend-accent)!important;font-size:14px!important;font-weight:650;line-height:1.5;text-decoration:none;}
body #trends .trend-actions .trend-use{background:var(--trend-button)!important;color:var(--trend-button-text)!important;border-color:var(--trend-button)!important;}
body #trends :is(.trend-articles a,.trend-actions a,.trend-actions button):focus-visible{outline:3px solid var(--trend-accent);outline-offset:4px;}
@media(max-width:760px){#trends #trend-list{grid-template-columns:1fr;gap:18px;}body #trends .trend-card{padding:22px 20px!important;}body #trends .trend-time{font-size:12px!important;}body #trends .trend-actions>*{flex:1;}}
/* Four work tools share one keyboard-accessible disclosure. */
#nexus-shared-header .ns-tool-menu{position:relative;min-width:0;margin:0}
#nexus-shared-header .ns-tool-menu>summary{list-style:none;display:flex;align-items:center;justify-content:center;gap:8px;padding:10px 12px;min-height:44px;border-radius:8px;color:var(--ns-muted);font-family:inherit;font-weight:600;font-size:13px;line-height:1.5;cursor:pointer;white-space:nowrap}
#nexus-shared-header .ns-tool-menu>summary::-webkit-details-marker{display:none}
#nexus-shared-header .ns-tool-menu>summary svg{flex-shrink:0;transition:transform .15s}
#nexus-shared-header .ns-tool-menu[open]>summary svg{transform:rotate(180deg)}
#nexus-shared-header .ns-tool-menu[data-current=true]>summary,#nexus-shared-header .ns-tool-menu[open]>summary,#nexus-shared-header .ns-tool-menu>summary:hover{color:var(--ns-ink);background:var(--ns-active)}
#nexus-shared-header .ns-tool-popover{position:absolute;top:calc(100% + 8px);left:0;z-index:120;width:216px;max-width:calc(100vw - 32px);padding:8px;border:1px solid var(--ns-line);border-radius:10px;background:var(--ns-bg);box-shadow:0 12px 28px #00000014;display:grid;gap:3px}
#nexus-shared-header .ns-tool-popover a{justify-content:flex-start;padding:11px 12px;min-height:44px;font-size:13px}
@media(max-width:650px){#nexus-shared-header .ns-tool-menu>summary{font-size:11px;gap:6px;padding:9px 2px;width:100%}#nexus-shared-header .ns-tool-popover{width:220px}#nexus-shared-header .ns-navigation>a{min-width:0}}
@media(prefers-reduced-motion:reduce){#nexus-shared-header .ns-tool-menu>summary svg{transition:none}}
/* Service information sits beside the account control in the utility area. */
#nexus-shared-header .ns-service-link{display:flex;align-items:center;justify-content:center;min-height:44px;padding:9px 10px;border-radius:8px;font-size:12px;font-weight:600;color:var(--ns-muted);text-decoration:none;white-space:nowrap}
#nexus-shared-header .ns-service-link:hover,#nexus-shared-header .ns-service-link[aria-current=page]{color:var(--ns-ink);background:var(--ns-active)}
@media(max-width:650px){#nexus-shared-header .ns-service-link{font-size:11px;padding:8px}#nexus-shared-header .ns-theme{min-width:38px;justify-content:center;padding:8px}#nexus-shared-header .ns-theme [data-theme-label]{display:none}#nexus-shared-header .ns-theme>span:first-child{display:inline}#nexus-shared-header .ns-navigation{display:flex;gap:6px}#nexus-shared-header .ns-navigation>.ns-tool-menu,#nexus-shared-header .ns-navigation>a{flex:1}}

/* Shared announcement strip above the main navigation. */
:root{--ns-announcement-height:48px}
#nexus-shared-header .ns-announcement{display:flex;align-items:center;justify-content:center;gap:10px;min-height:48px;padding:12px 20px;background:#24231f;box-shadow:inset 0 -1px 0 #bca56533;color:#f5f2eb!important;text-decoration:none;font:650 14px/24px Inter,"Noto Sans KR",system-ui,sans-serif;text-align:center;box-sizing:border-box}
#nexus-shared-header .ns-announcement strong{color:#e0c57d;font-weight:800}
#nexus-shared-header .ns-announcement:hover strong{text-decoration:underline;text-underline-offset:4px}
#nexus-shared-header .ns-announcement:focus-visible{outline:3px solid #e0c57d;outline-offset:-5px}
@media(max-width:650px){:root{--ns-announcement-height:60px}#nexus-shared-header .ns-announcement{flex-direction:column;gap:0;min-height:60px;padding:10px 16px;font-size:12px;line-height:20px}#nexus-shared-header .ns-announcement-divider{display:none}}

/* Account menu on public and magazine pages. */
#nexus-shared-header .ns-account-dropdown{position:relative;margin:0}
#nexus-shared-header .ns-account-dropdown>summary{list-style:none}
#nexus-shared-header .ns-account-dropdown>summary::-webkit-details-marker{display:none}
#nexus-shared-header .ns-account-dropdown[open]>summary svg{transform:rotate(180deg)}
#nexus-shared-header .ns-account-popover{position:absolute;right:0;top:calc(100% + 8px);z-index:130;width:264px;max-width:calc(100vw - 32px);max-height:70vh;overflow:auto;box-sizing:border-box;padding:8px;background:var(--ns-bg);border:1px solid var(--ns-line);border-radius:10px;box-shadow:0 12px 30px #0002;display:grid;gap:3px}
#nexus-shared-header .ns-account-popover :is(a,button){display:block;box-sizing:border-box;width:100%;min-height:44px;padding:12px 14px;text-align:left;text-decoration:none;border:0;border-radius:7px;background:transparent;color:var(--ns-ink);font-family:inherit;font-size:13px;font-weight:600;line-height:1.5;cursor:pointer}
#nexus-shared-header .ns-account-popover :is(a,button):hover{background:var(--ns-active)}
#nexus-shared-header .ns-account-popover p{margin:4px 14px 10px;color:var(--ns-muted);font-size:12px;line-height:1.6}
#nexus-shared-header .ns-account-popover [hidden]{display:none!important}
#nexus-shared-header [data-account-error]:empty{display:none}
/* KakaoTalk channel chat button (public pages). */
#nexus-kakao-chat{position:fixed;right:max(20px,env(safe-area-inset-right));bottom:max(20px,env(safe-area-inset-bottom));z-index:90;display:inline-flex;align-items:center;gap:8px;min-height:48px;padding:0 18px 0 15px;border-radius:999px;background:#FEE500;color:#191919;font-family:inherit;font-size:14px;font-weight:700;line-height:1;letter-spacing:0;text-decoration:none;box-shadow:0 6px 20px rgba(25,37,56,.18);transition:transform .15s ease,box-shadow .15s ease}
#nexus-kakao-chat:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(25,37,56,.24)}
#nexus-kakao-chat:focus-visible{outline:3px solid #7898e4;outline-offset:3px}
#nexus-kakao-chat svg{display:block;flex-shrink:0}
@media(max-width:600px){#nexus-kakao-chat{width:52px;min-height:52px;padding:0;justify-content:center}#nexus-kakao-chat span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}}
@media(prefers-reduced-motion:reduce){#nexus-kakao-chat{transition:none}#nexus-kakao-chat:hover{transform:none}}
@media print{#nexus-kakao-chat{display:none}}

/* 서비스 소개 lives in the tools menu where the header has no room for its own link */
#nexus-shared-header .ns-tool-popover .ns-tool-about{display:none;border-top:1px solid var(--ns-line,#e3e7ef);margin-top:4px}
@media(max-width:650px){#nexus-shared-header .ns-tool-popover .ns-tool-about{display:flex}}
/* KakaoTalk chat steps aside instead of covering a button, a field, a dialog or video controls */
#nexus-kakao-chat{transition:transform .2s ease,opacity .2s ease}
#nexus-kakao-chat[data-aside=true]{opacity:0;transform:translateY(16px) scale(.9);pointer-events:none}
@media(max-width:600px){#nexus-kakao-chat{width:46px;min-height:46px}}
/* Comfortable touch targets for small links and arrows */
.nx-gallery-arrows button{width:44px!important;height:44px!important}
.nx-example-link{min-height:44px;align-items:center}
.info-breadcrumb a{display:inline-flex;align-items:center;min-height:44px;min-width:44px;justify-content:center;margin:-10px 0}
a[data-category]{min-width:44px;justify-content:center;padding-left:6px;padding-right:6px}
@media(max-width:650px){#nexus-shared-header .ns-navigation{justify-content:space-between}#nexus-shared-header .ns-navigation a,#nexus-shared-header .ns-tool-menu>summary{padding:8px 7px!important;font-size:13px}}
.ns-access-notice p{word-break:keep-all}
.ns-access-notice .ns-access-bonus{color:var(--b-blue,#3346d3)!important;font-weight:700}
/* How-to video player (shared by home and the writing desk) */
html.ns-howto-open{overflow:hidden}
.ns-howto{padding:0;border:0;background:transparent;max-width:none;max-height:none;width:100%;height:100%;margin:0;display:none;align-items:center;justify-content:center;overflow:auto}
.ns-howto[open]{display:flex}
dialog.ns-howto::backdrop{background:rgba(8,11,22,.86)}
.ns-howto-panel{width:min(960px,calc(100vw - 32px),calc((100dvh - 96px) * 16 / 9));margin:16px auto;display:flex;flex-direction:column;gap:10px}
.ns-howto[data-variant=mobile] .ns-howto-panel{width:min(calc(100vw - 32px),calc((100dvh - 96px) * 9 / 16))}
.ns-howto-head{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#fff;font-family:var(--b-font,inherit)}
.ns-howto-head strong{font-size:15px;font-weight:650;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ns-howto-close{flex:none;white-space:nowrap;min-height:44px;padding:0 16px;border:1px solid rgba(255,255,255,.4);border-radius:999px;background:rgba(255,255,255,.12);color:#fff;font:inherit;font-size:14px;font-weight:600;cursor:pointer}
.ns-howto-close:hover,.ns-howto-close:focus-visible{background:rgba(255,255,255,.24)}
.ns-howto-close span{font-size:18px;line-height:1;margin-left:2px}
.ns-howto-stage{position:relative;border-radius:14px;overflow:hidden;background:#000}
.ns-howto-stage video{display:block;width:100%;height:auto;aspect-ratio:16/9;max-height:calc(100dvh - 96px);background:#000}
.ns-howto[data-variant=mobile] .ns-howto-stage video{aspect-ratio:9/16}
.ns-howto-status,.ns-howto-error{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);margin:0;padding:12px 18px;border-radius:12px;background:rgba(0,0,0,.72);color:#fff;font-size:14px;text-align:center;pointer-events:none}
.ns-howto-error{pointer-events:auto;display:grid;gap:10px;justify-items:center}
.ns-howto-error p{margin:0}
.ns-howto-error button{min-height:44px;padding:0 18px;border:0;border-radius:999px;background:#fff;color:#111;font:inherit;font-weight:650;cursor:pointer}
.ns-howto-status[hidden],.ns-howto-error[hidden]{display:none}
@media(max-height:520px){.ns-howto-head{position:fixed;top:10px;right:12px;z-index:1}.ns-howto-head strong{display:none}.ns-howto-panel{width:min(960px,calc(100vw - 120px),calc((100dvh - 24px) * 16 / 9));margin:12px auto}.ns-howto[data-variant=mobile] .ns-howto-panel{width:min(calc(100vw - 120px),calc((100dvh - 24px) * 9 / 16))}.ns-howto-stage video{max-height:calc(100dvh - 24px)}}
/* Phones: one-row header with a ☰ menu panel (applied once site-navigation.js is ready) */
#nexus-shared-header .ns-menu-toggle{display:none}
@media(max-width:650px){
#nexus-shared-header[data-mobile-menu] .ns-header-inner{position:relative;flex-wrap:nowrap;min-height:56px;padding:6px 12px 6px 16px;gap:8px}
#nexus-shared-header[data-mobile-menu] .ns-brand{min-height:44px;min-width:0}
#nexus-shared-header[data-mobile-menu] .ns-header-actions{gap:6px}
#nexus-shared-header[data-mobile-menu] .ns-menu-toggle{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:1px solid var(--ns-line);border-radius:8px;background:var(--ns-bg);color:var(--ns-ink);cursor:pointer}
#nexus-shared-header[data-mobile-menu] .ns-menu-close-icon,#nexus-shared-header[data-mobile-menu][data-menu-open=true] .ns-menu-open-icon{display:none}
#nexus-shared-header[data-mobile-menu][data-menu-open=true] .ns-menu-close-icon{display:block}
#nexus-shared-header[data-mobile-menu] .ns-navigation{display:none!important}
#nexus-shared-header[data-mobile-menu][data-menu-open=true] .ns-navigation{display:flex!important;flex-direction:column;align-items:stretch;gap:2px;position:absolute;left:0;right:0;top:100%;z-index:130;padding:8px 12px 14px;background:var(--b-surface,#fff)!important;border-bottom:1px solid var(--ns-line);box-shadow:0 18px 32px #0000001f;max-height:calc(100dvh - 56px);overflow:auto;box-sizing:border-box}
#nexus-shared-header[data-mobile-menu][data-menu-open=true] .ns-navigation>*{flex:none}
#nexus-shared-header[data-mobile-menu][data-menu-open=true] .ns-navigation a{justify-content:flex-start;min-height:48px;padding:12px!important;font-size:15px;color:var(--ns-ink)}
#nexus-shared-header[data-mobile-menu][data-menu-open=true] .ns-tool-menu>summary{width:auto;min-height:0;padding:10px 12px 4px!important;font-size:12px;font-weight:700;color:var(--ns-muted);background:none;cursor:default;justify-content:flex-start}
#nexus-shared-header[data-mobile-menu][data-menu-open=true] .ns-tool-menu>summary svg{display:none}
#nexus-shared-header[data-mobile-menu][data-menu-open=true] .ns-tool-popover{position:static;width:auto;max-width:none;padding:0 0 8px;border:0;border-bottom:1px solid var(--ns-line);border-radius:0;box-shadow:none;background:none}
#nexus-shared-header[data-mobile-menu][data-menu-open=true] .ns-tool-popover .ns-tool-about{border-top:0;margin-top:0}
/* The page title already says where you are; the path line only costs height on phones */
main>header .header-path{display:none}
body>main>header:has(>.header-account[hidden]){display:none!important}
}
@media(max-width:370px){#nexus-shared-header[data-mobile-menu] .ns-brand span{display:none}#nexus-shared-header[data-mobile-menu] .ns-header-inner{padding-left:12px}}
/* With the credit chip the logged-in header row is ~40px wider: drop the wordmark a little earlier so nothing spills past the screen. */
@media(max-width:420px){#nexus-shared-header[data-mobile-menu]:has(.ns-credit-chip:not([hidden])) .ns-brand span{display:none}#nexus-shared-header[data-mobile-menu]:has(.ns-credit-chip:not([hidden])) .ns-header-inner{padding-left:12px}}
