.app-shell { min-height: 100vh; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--header-line);
  background: var(--header-bg);
  backdrop-filter: blur(18px);
}
.site-header-inner {
  width: min(var(--content-max), calc(100% - 64px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; width: max-content; flex-shrink:0; white-space:nowrap; }
.brand-mark { display:grid; place-items:center; width:34px; height:34px; border-radius:10px; background:var(--brand-mark-bg); overflow:hidden; box-shadow:var(--shadow-brand); }
.brand-mark img { width:100%; height:100%; object-fit:contain; display:block; }
.brand-text { display:grid; gap:1px; }
.brand-text strong { font:700 13px var(--font-brand); letter-spacing:.01em; }
.brand-text span { color:var(--text-faint); font-size:10px; letter-spacing:.08em; text-transform:uppercase; }
.topnav { display:flex; align-items:center; justify-content:center; gap:4px; flex-shrink:0; }
.nav-button { min-height:44px; padding:0 15px; border:1px solid transparent; border-radius:8px; background:transparent; color:var(--text-muted); font-weight:600; white-space:nowrap; transition:background var(--fast),color var(--fast),border-color var(--fast); }
.nav-button:hover { color:var(--text); border-color:var(--line-strong); background:var(--surface-3); }
.nav-button.is-active { color:var(--on-color); border-color:transparent; background:var(--accent-gradient); box-shadow:var(--shadow-nav-active); }
.header-status { margin-left:auto; display:flex; align-items:center; justify-content:flex-end; gap:12px; min-width:0; }
.header-status .status-pill { flex-shrink:0; border:0; background:transparent; padding:0; color:var(--success); }
.last-updated { color:var(--text-muted); font-size:11px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.header-feedback-button { min-height: 36px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.header-feedback-button:hover:not(:disabled) { border-color: var(--line-strong); background: var(--surface-3); color: var(--text); }
.header-feedback-button:disabled { opacity: .55; cursor: not-allowed; }
.account { position:relative; min-width:0; }
.account-trigger { display:flex; align-items:center; gap:9px; min-width:44px; min-height:44px; padding:5px 8px; border:1px solid transparent; border-radius:8px; background:transparent; color:var(--text); white-space:nowrap; }
.account-trigger:hover,.account-trigger[aria-expanded="true"] { background:var(--surface-3); border-color:var(--line); }
.account-avatar { display:grid; place-items:center; width:30px; height:30px; flex-shrink:0; border:1px solid var(--line); border-radius:50%; background:var(--surface-3); color:var(--accent-text); font-size:12px; font-weight:700; }
.account-name { max-width:210px; overflow:hidden; text-overflow:ellipsis; font-size:13px; }
.account-chevron { width:7px; height:7px; margin:0 3px 4px; border-right:1.5px solid var(--text-muted); border-bottom:1.5px solid var(--text-muted); transform:rotate(45deg); flex-shrink:0; }
.account-menu { position:absolute; top:calc(100% + 10px); right:0; width:280px; max-width:calc(100vw - 32px); max-height:calc(100dvh - 90px); overflow-y:auto; padding:6px; border:1px solid var(--line); border-radius:12px; background:var(--surface-1); box-shadow:var(--shadow-panel); }
.account-identity { padding:12px; overflow-wrap:anywhere; }
.account-identity strong { display:block; font-size:14px; }
.account-identity small { display:block; margin-top:3px; color:var(--text-muted); font-size:12px; }
.account-divider { height:1px; margin:3px 6px; background:var(--line); }
.account-action { display:flex; align-items:center; gap:11px; width:100%; min-height:44px; padding:10px 12px; border:0; border-radius:7px; background:transparent; color:var(--text); text-align:left; font-size:13px; }
.account-action:hover { background:var(--surface-3); }
.account-action:disabled { opacity: .55; cursor: not-allowed; }
#accountFeedback { display: none; }
.account-icon { display:flex; width:17px; height:17px; flex-shrink:0; color:var(--text-muted); }
.account-icon svg { width:100%; height:100%; }
.site-header :focus-visible { outline:2px solid var(--accent-text); outline-offset:3px; }
.auth-cancel { margin-top:12px; min-height:44px; }
/* 테마 토글: 다크에서는 해(라이트로 전환), 라이트에서는 달(다크로 전환) 아이콘을 보인다. */
.theme-toggle { display:grid; flex:0 0 auto; width:34px; height:34px; padding:0; place-items:center; border:1px solid var(--line); border-radius:10px; background:var(--surface-1); color:var(--text-muted); transition:color var(--fast),border-color var(--fast),background var(--fast); }
.theme-toggle:hover { color:var(--text); border-color:var(--line-strong); }
.theme-toggle svg { width:18px; height:18px; }
.theme-toggle .theme-toggle-moon { display:none; }
:root[data-theme="light"] .theme-toggle .theme-toggle-sun { display:none; }
:root[data-theme="light"] .theme-toggle .theme-toggle-moon { display:block; }
.workspace { width:min(var(--content-max),calc(100% - 64px)); margin:0 auto; padding:48px 0 72px; }
.workspace.is-loading { opacity:.58; pointer-events:none; }
.page-hero { text-align:center; margin:0 0 18px; }
.eyebrow { margin:0 0 8px; color:var(--accent-text); font-size:11px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.page-hero h1 { margin:0; font:700 clamp(26px,3vw,34px)/1.25 var(--font-brand); letter-spacing:-.025em; }
#pageTitle.is-visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.page-description { max-width:720px; margin:10px auto 0; color:var(--text-muted); font-size:14px; }
.view { display:none; }
.view.is-active { display:block; }
.view > .mon-page > .mon-head { display:none; }
@media (max-width:1024px) {
  .site-header-inner { width:min(100% - 40px,var(--content-max)); flex-wrap:wrap; padding:10px 0 8px; gap:8px; }
  .topnav { order:3; width:100%; }
  .account-name { display:none; }
  .workspace { width:min(100% - 40px,var(--content-max)); padding-top:36px; }
}
@media (max-width:768px) {
  .site-header { position:relative; }
  .site-header-inner { width:calc(100% - 32px); }
  .brand-text span, .last-updated { display:none; }
  .topnav { width:100%; gap:6px; }
  .nav-button { min-width:0; flex:1; min-height:44px; padding:0 6px; font-size:12px; }
  .workspace { width:calc(100% - 32px); padding:30px 0 48px; }
  .page-hero { margin-bottom:16px; }
  .page-description { font-size:13px; }
  .header-feedback-button { display: none; }
  #accountFeedback { display: flex; }
}
@media (min-width:1025px) and (max-width:1350px) {
  .site-header-inner { gap:16px; }
  .account-name { max-width:155px; }
  .nav-button { padding-inline:12px; }
  .last-updated { font-size:10px; }
}
@media (max-width:390px) {
  .header-status { gap:5px; }
  .brand { gap:7px; }
  .account-trigger { padding-inline:5px; gap:5px; }
}
