html.auth-pending .skills-section,
html.auth-pending #main-view, html.auth-guest #main-view,
html.auth-pending #btn-run-skill, html.auth-guest #btn-run-skill,
html.auth-pending #btn-screener-scan, html.auth-guest #btn-screener-scan,
html.auth-pending #company-library-add-memo-btn, html.auth-guest #company-library-add-memo-btn,
html.auth-pending #stock-window-report-generate, html.auth-guest #stock-window-report-generate,
html.auth-pending #stock-window-report-run-btn, html.auth-guest #stock-window-report-run-btn,
html.auth-pending #stock-window-new-earnings, html.auth-guest #stock-window-new-earnings,
html.auth-pending #surge-watch-add-form, html.auth-guest #surge-watch-add-form,
html.auth-pending #surge-watch-remove-all, html.auth-guest #surge-watch-remove-all,
html.auth-pending #btn-open-history, html.auth-guest #btn-open-history { display:none !important; }
#accounts-nav-section[hidden] { display:none !important; }

/* 0720 — colors come from the app's own tokens; the dark theme swaps the same names. */
.auth-dialog, .auth-menu, .auth-button, .accounts-view, .access-view, .acct-menu, .sw-guest {
  --a-bg: rgb(var(--white)); --a-panel: rgb(var(--gray-50)); --a-sunken: rgb(var(--gray-100));
  --a-line: rgb(var(--gray-200)); --a-line-strong: rgb(var(--gray-300));
  --a-fg: rgb(var(--gray-700)); --a-strong: rgb(var(--gray-900)); --a-muted: rgb(var(--gray-500));
  --a-accent: rgb(var(--brand-600)); --a-accent-ink: rgb(var(--brand-700)); --a-accent-soft: rgb(var(--brand-50)); --a-accent-line: rgb(var(--brand-100));
  --a-avatar-bg: rgb(var(--brand-600)); --a-avatar-fg: rgb(var(--white));
  --a-ok: rgb(var(--success-700)); --a-ok-soft: rgb(var(--success-50));
  --a-bad: rgb(var(--error-700)); --a-bad-soft: rgb(var(--error-50)); --a-bad-solid: rgb(var(--error)); --a-bad-line: rgb(var(--error)/.45);
  --a-warn: rgb(var(--warning-700)); --a-warn-soft: rgb(var(--warning-50)); --a-warn-line: rgb(var(--warning)/.4);
}
.dark .auth-dialog, .dark .auth-menu, .dark .auth-button, .dark .accounts-view, .dark .access-view, .dark .acct-menu, .dark .sw-guest {
  --a-bg: rgb(var(--dark-card)); --a-panel: rgb(var(--dark-bg)); --a-sunken: rgb(var(--dark-border));
  --a-line: rgb(var(--dark-border)); --a-line-strong: rgb(var(--gray-500));
  --a-fg: rgb(var(--gray-300)); --a-strong: rgb(var(--gray-25)); --a-muted: rgb(var(--gray-400));
  --a-accent: rgb(var(--brand-300)); --a-accent-ink: rgb(var(--brand-300)); --a-accent-soft: rgb(var(--brand-500)/.16); --a-accent-line: rgb(var(--brand-300)/.32);
  --a-avatar-bg: rgb(var(--brand-500)); --a-avatar-fg: rgb(var(--white));
  --a-ok: rgb(var(--success)); --a-ok-soft: rgb(var(--success)/.16);
  --a-bad: rgb(var(--error-50)); --a-bad-soft: rgb(var(--error)/.18); --a-bad-solid: rgb(var(--error)); --a-bad-line: rgb(var(--error)/.6);
  --a-warn: rgb(var(--warning-50)); --a-warn-soft: rgb(var(--warning-700)/.2); --a-warn-line: rgb(var(--warning)/.5);
}

/* --- header button ------------------------------------------------------------------------------------------ */
.auth-button { position:relative; display:inline-flex; flex:none; align-items:center; gap:8px; height:36px; box-sizing:border-box; border:1px solid var(--a-line-strong); border-radius:999px; padding:3px 10px 3px 3px; background:transparent; color:inherit; white-space:nowrap; max-width:220px; font-size:13px; line-height:1; cursor:pointer; }
.auth-button:focus-visible { outline:2px solid var(--a-accent); outline-offset:2px; }
.auth-button.is-guest { padding:0 14px 0 11px; border-color: var(--a-accent-line); background: var(--a-accent-soft); color: var(--a-accent-ink); font-weight:600; }
.auth-button.is-checking, .auth-button.is-error { padding:0 12px; color: var(--a-muted); }
.auth-button-text { min-width:0; max-width:130px; overflow:hidden; text-overflow:ellipsis; }
.auth-button .ic { width:16px; height:16px; flex:none; }
.auth-caret { opacity:.65; width:14px !important; height:14px !important; }
@media (hover:hover) { .auth-button.is-member:hover { background: var(--a-accent-soft); } .auth-button.is-guest:hover { border-color: var(--a-accent); } }
.auth-avatar-wrap { position:relative; display:inline-flex; flex:none; }
.auth-avatar { display:inline-grid; flex:none; place-items:center; width:28px; height:28px; border-radius:50%; background: var(--a-avatar-bg); color: var(--a-avatar-fg); font-size:13px; font-weight:700; line-height:1; }
.auth-avatar.is-lg { width:36px; height:36px; font-size:15px; }
.auth-avatar.is-xl { width:44px; height:44px; font-size:17px; }
.auth-badge { position:absolute; top:-6px; right:-7px; display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; min-width:17px; height:17px; padding:0 4px; border-radius:9px; background: var(--a-bad-solid); color: rgb(var(--white)); font-size:10.5px; font-weight:700; line-height:1; box-shadow:0 0 0 2px var(--a-bg); }

/* --- dialog ------------------------------------------------------------------------------------------------- */
.auth-dialog { position:fixed; inset:0; z-index:120; display:flex; align-items:center; justify-content:center; background: rgb(var(--brand-700)/.55); padding:16px; }
.auth-dialog[hidden] { display:none; }
.auth-card { position:relative; box-sizing:border-box; width:min(100%,420px); max-height:calc(100vh - 32px); max-height:calc(100dvh - 32px); overflow:auto; padding:22px 22px 20px; border-radius:1rem; background: var(--a-bg); color: var(--a-fg); box-shadow: 0 24px 48px -12px rgb(var(--brand-700)/.25); }
.auth-card:focus { outline:none; }
.auth-card h2 { margin:0 28px 14px 0; font-size:18px; font-weight:600; line-height:1.4; color: var(--a-strong); }
.auth-cancel { position:absolute; right:12px; top:12px; z-index:1; width:32px; height:32px; border:0; border-radius:8px; background:transparent; font-size:22px; line-height:1; color: var(--a-muted); cursor:pointer; }
@media (hover:hover) { .auth-cancel:hover { background: var(--a-sunken); color: var(--a-strong); } }

.auth-brand { display:flex; flex-direction:column; align-items:center; margin-bottom:16px; text-align:center; }
.auth-brand-icon { width:48px; height:48px; border-radius:12px; }
.auth-card .auth-brand h2 { margin:10px 0 4px; font-family:'Gowun Dodum','IBM Plex Sans KR',sans-serif; font-size:22px; font-weight:400; text-align:center; }
.auth-sub { margin:0; font-size:13px; line-height:1.55; color: var(--a-muted); word-break:keep-all; }

.auth-form { display:flex; flex-direction:column; gap:12px; }
.auth-field { display:flex; flex-direction:column; gap:5px; }
.auth-field label { font-size:13px; font-weight:600; color: var(--a-strong); }
.auth-label-sub { font-weight:400; color: var(--a-muted); }
.auth-field input[type] { box-sizing:border-box; width:100%; height:40px; padding:0 14px; border:1px solid var(--a-line-strong); border-radius:10px; background: var(--a-panel); color: var(--a-strong); font-size:14px; }
.auth-field input[type]:focus { outline:2px solid var(--a-accent); outline-offset:1px; border-color: transparent; }
.auth-input-wrap { position:relative; }
.auth-field .auth-input-wrap input[type] { padding-right:44px; }
.auth-eye { position:absolute; right:3px; top:50%; display:grid; place-items:center; width:36px; height:34px; transform:translateY(-50%); border:0; border-radius:8px; background:transparent; color: var(--a-muted); cursor:pointer; }
.auth-eye .ic { width:18px; height:18px; }
.auth-eye[aria-pressed=true] { color: var(--a-accent-ink); }
.auth-eye:focus-visible { outline:2px solid var(--a-accent); }
@media (hover:hover) { .auth-eye:hover { background: var(--a-sunken); color: var(--a-strong); } }
.auth-hint { font-size:12px; line-height:1.4; color: var(--a-muted); }
.auth-hint:empty { display:none; }
/* 0730 — username box: n/20 count beside the hint, a pill inside the box, one suggestion button under it. */
.auth-field-foot { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.auth-field-foot .auth-hint { flex:1 1 auto; min-width:0; }
.auth-count { flex:none; margin-left:auto; font-size:12px; line-height:1.4; color: var(--a-muted); font-variant-numeric:tabular-nums; }
.auth-count.is-over { color: var(--a-bad); font-weight:700; }
.auth-field .auth-input-wrap.has-pill input[type] { padding-right:112px; }
.auth-input-pill { position:absolute; right:10px; top:50%; transform:translateY(-50%); padding:1px 8px; border-radius:999px; background: var(--a-accent-soft); color: var(--a-accent-ink); font-size:11.5px; font-weight:500; line-height:1.6; white-space:nowrap; pointer-events:none; }
.auth-input-pill[hidden] { display:none; }
.auth-suggest:empty { display:none; }
.auth-suggest-btn { align-self:flex-start; max-width:100%; padding:5px 12px; border:1px solid var(--a-accent-line); border-radius:999px; background: var(--a-accent-soft); color: var(--a-accent-ink); font-size:12.5px; font-weight:600; line-height:1.4; cursor:pointer; overflow-wrap:anywhere; text-align:left; }
.auth-suggest-btn:focus-visible { outline:2px solid var(--a-accent); outline-offset:1px; }
@media (hover:hover) { .auth-suggest-btn:hover { border-color: var(--a-accent); } }
/* Guests get the sign-in box instead of the watchlist; the alert hint above it is about a list they do not have yet. */
html.auth-guest #surge-watch-help, html.auth-pending #surge-watch-help { display:none !important; }
.auth-field[data-state=bad] input[type] { border-color: var(--a-bad-solid); }
.auth-field[data-state=bad] .auth-hint { color: var(--a-bad); }
.auth-field[data-state=ok] .auth-hint { color: var(--a-ok); }
.auth-checklist { display:flex; flex-wrap:wrap; gap:4px 14px; margin:-4px 0 0; padding:0; list-style:none; font-size:12px; color: var(--a-muted); }
.auth-checklist li { display:inline-flex; align-items:center; gap:4px; }
.auth-checklist .ic { width:13px; height:13px; }
.auth-checklist .is-ok { color: var(--a-ok); }
.auth-check { display:flex; align-items:flex-start; gap:8px; font-size:13px; line-height:1.5; color: var(--a-fg); cursor:pointer; }
.auth-check input { flex:none; width:16px; height:16px; margin-top:2px; accent-color: rgb(var(--brand-600)); }
.auth-consent { display:flex; flex-direction:column; gap:9px; padding:12px; border:1px solid var(--a-line); border-radius:12px; background: var(--a-panel); }
.auth-consent > .auth-check:first-child { font-weight:600; color: var(--a-strong); }
.auth-consent-sep { height:1px; background: var(--a-line); }
.auth-consent-row { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.auth-consent-view { flex:none; font-size:12.5px; line-height:1.5; color: var(--a-muted); text-decoration:underline; }

.auth-note { margin:0 0 12px; font-size:13px; line-height:1.55; color: var(--a-fg); }
.auth-form .auth-note { margin:0; }
.auth-note[hidden] { display:none; }
.auth-note-bad { padding:9px 12px; border-radius:10px; background: var(--a-bad-soft); color: var(--a-bad); }
.auth-note-ok { padding:9px 12px; border-radius:10px; background: var(--a-ok-soft); color: var(--a-ok); }
.auth-note-warn { padding:9px 12px; border:1px solid var(--a-warn-line); border-radius:10px; background: var(--a-warn-soft); color: var(--a-warn); }
.auth-submit { width:100%; min-height:42px; margin-top:4px; }
.auth-card > .auth-submit { margin-top:8px; }
.auth-danger.btn-primary, .auth-danger.btn-primary:hover { background: var(--a-bad-solid); }
.auth-outline { display:inline-flex; align-items:center; justify-content:center; gap:6px; box-sizing:border-box; min-height:42px; padding:0 14px; border:1px solid var(--a-line-strong); border-radius:10px; background:transparent; color: var(--a-fg); font-size:13.5px; font-weight:500; cursor:pointer; }
.auth-outline .ic { width:16px; height:16px; }
.auth-outline:disabled { opacity:.55; cursor:not-allowed; }
@media (hover:hover) { .auth-outline:not(:disabled):hover { background: var(--a-sunken); } }
.auth-block-button { width:100%; }
.auth-links { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:4px 10px; margin-top:14px; }
.auth-dot { color: var(--a-muted); }
.auth-link { padding:4px 2px; border:0; background:transparent; color: var(--a-accent); font-size:13px; cursor:pointer; }
.auth-link-strong { margin-left:6px; font-weight:700; }
@media (hover:hover) { .auth-link:hover { text-decoration:underline; } }
.auth-signup-line { margin-top:14px; padding-top:14px; border-top:1px solid var(--a-line); text-align:center; font-size:13px; color: var(--a-muted); }
.auth-resend { margin-top:10px; text-align:center; }
.auth-resend:empty { display:none; }
.auth-resend .auth-note { margin:0; }
.auth-resend-btn { width:100%; }
.auth-waiting { display:flex; flex-direction:column; gap:10px; margin-bottom:12px; }
.auth-waiting:empty { display:none; }
.auth-waiting .auth-steps { margin:0; }
.auth-waiting .auth-note { margin:0; }
.auth-waiting-actions { display:flex; flex-direction:column; gap:8px; }
.auth-waiting-actions .auth-resend { margin-top:0; }

/* steps line: 1 가입 신청 · 2 메일 인증 · 3 관리자 승인 */
.auth-steps { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin:0 0 14px; padding:0; list-style:none; }
.auth-step { display:flex; flex-direction:column; gap:6px; min-width:0; color: var(--a-muted); font-size:12px; line-height:1.3; }
.auth-step-bar { display:block; height:4px; border-radius:2px; background: var(--a-sunken); }
.auth-step-label { display:inline-flex; align-items:center; gap:4px; white-space:nowrap; }
.auth-step-check { width:13px; height:13px; flex:none; }
.auth-step.is-done { color: var(--a-ok); }
.auth-step.is-done .auth-step-bar { background: var(--a-ok); }
.auth-step.is-now { color: var(--a-accent-ink); font-weight:700; }
.auth-step.is-now .auth-step-bar { background: var(--a-accent); }

/* result screens: icon circle + title + description + buttons */
.auth-result { display:flex; flex-direction:column; align-items:center; gap:10px; margin-bottom:12px; text-align:center; }
.auth-result .auth-steps { align-self:stretch; margin:24px 0 6px; } /* below the × button */
.auth-result-icon { display:grid; place-items:center; width:56px; height:56px; border-radius:50%; background: var(--a-sunken); color: var(--a-fg); }
.auth-result-icon .ic { width:26px; height:26px; }
.auth-result-icon.is-ok { background: var(--a-ok-soft); color: var(--a-ok); }
.auth-result-icon.is-brand { background: var(--a-accent-soft); color: var(--a-accent-ink); }
.auth-result-icon.is-warn { background: var(--a-warn-soft); color: var(--a-warn); }
.auth-result-icon.is-bad { background: var(--a-bad-soft); color: var(--a-bad); }
.auth-card .auth-result h2 { margin:0; font-size:19px; text-align:center; }
.auth-result-desc { margin:0 0 12px; font-size:13.5px; line-height:1.65; text-align:center; word-break:keep-all; overflow-wrap:anywhere; }
.auth-result-desc strong { color: var(--a-strong); }
.auth-infobox { margin-bottom:12px; padding:10px 12px; border:1px solid var(--a-line); border-radius:10px; background: var(--a-panel); }
.auth-infobox p { margin:0; font-size:12.5px; line-height:1.65; color: var(--a-muted); }
.auth-small { margin:12px 0 0; font-size:12px; line-height:1.55; color: var(--a-muted); text-align:center; word-break:keep-all; }

/* own account window */
.auth-kv { display:flex; flex-direction:column; margin-bottom:12px; border:1px solid var(--a-line); border-radius:12px; overflow:hidden; }
.auth-kv-row { display:flex; align-items:center; gap:12px; padding:11px 14px; border-top:1px solid var(--a-line); font-size:13.5px; }
.auth-kv-row:first-child { border-top:0; }
.auth-kv-k { flex:none; width:52px; font-size:12.5px; color: var(--a-muted); }
.auth-kv-v { display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; min-width:0; color: var(--a-strong); overflow-wrap:anywhere; }
.auth-danger-zone { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:18px; padding-top:14px; border-top:1px solid var(--a-line); }
.auth-danger-text { font-size:12px; color: var(--a-muted); }
.auth-danger-link { flex:none; padding:4px 2px; border:0; background:transparent; color: var(--a-bad); font-size:12px; text-decoration:underline; cursor:pointer; }

.auth-pill { display:inline-flex; align-items:center; flex:none; padding:1px 8px; border-radius:999px; background: var(--a-sunken); color: var(--a-fg); font-size:11.5px; font-weight:500; line-height:1.6; white-space:nowrap; }
.auth-pill.is-ok { background: var(--a-ok-soft); color: var(--a-ok); }
.auth-pill.is-warn { background: var(--a-warn-soft); color: var(--a-warn); }
.auth-pill.is-bad { background: var(--a-bad-soft); color: var(--a-bad); }
.auth-pill.is-brand { background: var(--a-accent-soft); color: var(--a-accent-ink); }

/* --- account menu (dropdown) and bottom sheet ------------------------------------------------------------- */
.auth-menu { position:fixed; z-index:121; box-sizing:border-box; min-width:240px; max-width:min(320px,calc(100vw - 16px)); display:flex; flex-direction:column; padding:6px; border:1px solid var(--a-line); border-radius:14px; background: var(--a-bg); color: var(--a-fg); box-shadow: 0 8px 24px -6px rgb(var(--brand-700)/.2), 0 2px 6px -2px rgb(var(--brand-700)/.1); }
.auth-menu-head { display:flex; align-items:center; gap:10px; padding:8px 8px 12px; margin-bottom:4px; border-bottom:1px solid var(--a-line); }
.auth-menu-who { display:flex; flex:1 1 auto; flex-direction:column; gap:2px; min-width:0; }
.auth-menu-who strong { font-size:14px; line-height:1.3; color: var(--a-strong); overflow-wrap:anywhere; }
.auth-menu-email { font-size:12px; line-height:1.3; color: var(--a-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.auth-menu-item { display:flex; align-items:center; gap:10px; width:100%; box-sizing:border-box; padding:9px 10px; border:0; border-radius:9px; background:transparent; color: var(--a-fg); font-size:13.5px; text-align:left; cursor:pointer; }
.auth-menu-icon { width:17px; height:17px; flex:none; color: var(--a-muted); }
.auth-menu-item:focus-visible { background: var(--a-accent-soft); outline:none; }
@media (hover:hover) { .auth-menu-item:hover { background: var(--a-accent-soft); } }
.auth-menu-pending { color: var(--a-accent-ink); font-weight:600; background: var(--a-accent-soft); }
.auth-menu-pending .auth-menu-icon { color: var(--a-accent-ink); }
.auth-menu-sep { height:1px; margin:4px 2px; background: var(--a-line); }

.auth-sheet-backdrop { position:fixed; inset:0; z-index:120; background: rgb(var(--brand-700)/.45); }
.auth-menu.is-sheet { top:auto; right:0; bottom:0; left:0; min-width:0; max-width:none; max-height:88vh; max-height:88dvh; overflow:auto; padding:8px 16px calc(16px + env(safe-area-inset-bottom, 0px)); border-width:1px 0 0; border-radius:20px 20px 0 0; animation: auth-sheet-up calc(220ms * var(--motion-k, 1)) var(--ease-out, ease-out); }
@keyframes auth-sheet-up { from { transform:translateY(100%); } }
.auth-sheet-handle { align-self:center; width:40px; height:4px; margin:2px 0 12px; border-radius:2px; background: var(--a-line-strong); }
.auth-menu.is-sheet .auth-menu-head { padding:4px 4px 14px; gap:12px; }
.auth-menu.is-sheet .auth-menu-who strong { font-size:16px; }
.auth-menu.is-sheet .auth-menu-item { min-height:48px; padding:0 8px; font-size:15px; }
.auth-menu.is-sheet .auth-menu-icon { width:19px; height:19px; }
.auth-sheet-pair { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:10px 0 8px; }
.auth-sheet-pair .auth-outline, .auth-sheet-logout { min-height:48px; font-size:14.5px; }
.auth-sheet-logout { width:100%; }

/* --- 계정 관리 화면 (왼쪽 메뉴) ------------------------------------------------------------------------------- */
.accounts-view { flex-direction:column; gap:.75rem; min-width:0; grid-column:1/-1; }
.accounts-head-line { align-items:center; }
.accounts-search { position:relative; display:flex; align-items:center; margin-left:auto; }
.accounts-search .ic { position:absolute; left:11px; width:16px; height:16px; color: var(--a-muted); pointer-events:none; }
.accounts-search input[type=search] { box-sizing:border-box; width:250px; height:36px; padding:0 12px 0 34px; border:1px solid var(--a-line-strong); border-radius:10px; background: var(--a-panel); color: var(--a-strong); font-size:13.5px; }
.accounts-search input[type=search]:focus { outline:2px solid var(--a-accent); outline-offset:1px; border-color: transparent; }
.accounts-tab-short { display:none; }
.accounts-message { margin:0; padding:9px 12px; border-radius:10px; background: var(--a-sunken); color: var(--a-fg); font-size:13px; line-height:1.5; }
.accounts-message[hidden] { display:none; }
.accounts-message.is-ok { background: var(--a-ok-soft); color: var(--a-ok); }
.accounts-message.is-bad { background: var(--a-bad-soft); color: var(--a-bad); }
.accounts-body { display:flex; flex-direction:column; gap:8px; min-width:0; }
.accounts-body[aria-busy=true] { opacity:.6; }
.accounts-more { align-self:center; min-height:38px; padding:0 22px; border:1px solid var(--a-line-strong); border-radius:10px; background:transparent; color: var(--a-fg); font-size:13.5px; cursor:pointer; }
.accounts-more[hidden] { display:none; }
@media (hover:hover) { .accounts-more:hover { background: var(--a-sunken); } }
.acct-empty { padding:32px 16px; border:1px dashed var(--a-line-strong); border-radius:12px; color: var(--a-muted); font-size:13.5px; text-align:center; }

.acct-row { display:flex; align-items:center; gap:12px; box-sizing:border-box; padding:12px 14px; border:1px solid var(--a-line); border-radius:12px; background: var(--a-bg); }
.acct-main { display:flex; flex:1 1 auto; flex-direction:column; gap:3px; min-width:0; }
.acct-line { display:flex; flex-wrap:wrap; align-items:center; gap:2px 8px; min-width:0; }
.acct-name { font-size:14.5px; font-weight:700; line-height:1.4; color: var(--a-strong); overflow-wrap:anywhere; }
.acct-me { font-size:12.5px; color: var(--a-muted); }
.acct-sub { font-size:13px; line-height:1.45; color: var(--a-muted); overflow-wrap:anywhere; }
.acct-sub-note { color: var(--a-warn); }
.acct-actions { display:flex; flex:none; align-items:center; gap:8px; margin-left:auto; }
.acct-reject, .acct-approve { box-sizing:border-box; height:36px; padding:0 16px; border-radius:9px; font-size:13.5px; cursor:pointer; }
.acct-reject { border:1px solid var(--a-bad-line); background:transparent; color: var(--a-bad); font-weight:500; }
.acct-approve { border:0; padding:0 20px; font-weight:600; }
@media (hover:hover) { .acct-reject:hover { background: var(--a-bad-soft); } }
.acct-hint { font-size:12.5px; font-weight:500; line-height:1.4; color: var(--a-warn); text-align:right; }

.acct-table { display:flex; flex-direction:column; border:1px solid var(--a-line); border-radius:12px; background: var(--a-bg); }
.acct-head, .acct-member { display:grid; grid-template-columns:minmax(0,2.6fr) 96px 80px minmax(110px,1fr) 44px; align-items:center; column-gap:12px; padding:10px 14px; }
.acct-head { border-radius:12px 12px 0 0; background: var(--a-panel); color: var(--a-muted); font-size:12px; font-weight:600; }
.acct-member { border:0; border-top:1px solid var(--a-line); border-radius:0; }
.acct-member:last-child { border-radius:0 0 12px 12px; }
.acct-account { display:flex; align-items:center; gap:10px; min-width:0; }
.acct-login { font-size:13px; color: var(--a-muted); }
.acct-meta { display:contents; }
.acct-more-cell { justify-self:end; }
.acct-more { display:grid; place-items:center; width:36px; height:36px; border:0; border-radius:9px; background:transparent; color: var(--a-muted); cursor:pointer; }
.acct-more .ic { width:20px; height:20px; }
.acct-more[aria-expanded=true] { background: var(--a-sunken); color: var(--a-strong); }
@media (hover:hover) { .acct-more:hover { background: var(--a-sunken); color: var(--a-strong); } }
.acct-menu { position:fixed; z-index:121; box-sizing:border-box; display:flex; flex-direction:column; min-width:210px; padding:6px; border:1px solid var(--a-line); border-radius:12px; background: var(--a-bg); color: var(--a-fg); box-shadow: 0 8px 24px -6px rgb(var(--brand-700)/.2), 0 2px 6px -2px rgb(var(--brand-700)/.1); }
.acct-menu-item { display:block; width:100%; box-sizing:border-box; padding:9px 12px; border:0; border-radius:8px; background:transparent; color: var(--a-fg); font-size:13.5px; text-align:left; cursor:pointer; }
.acct-menu-item.is-danger { color: var(--a-bad); }
.acct-menu { max-width: min(290px, calc(100vw - 16px)); }
.acct-menu-item.is-blocked { display:flex; flex-direction:column; gap:2px; color: var(--a-muted); cursor:not-allowed; }
.acct-menu-note { font-size:11.5px; line-height:1.45; color: var(--a-muted); white-space:normal; }
@media (hover:hover) { .acct-menu-item.is-blocked:hover { background:transparent; } }
.acct-menu-item:focus-visible { background: var(--a-accent-soft); outline:none; }
@media (hover:hover) { .acct-menu-item:hover { background: var(--a-accent-soft); } }
.acct-menu-sep { height:1px; margin:4px 2px; background: var(--a-line); }

/* --- 손님의 관심 종목 안내 상자 ---------------------------------------------------------------------------- */
.sw-guest { display:flex; flex-direction:column; align-items:center; gap:14px; padding:12px 0 4px; }
.sw-guest-card { display:flex; flex-direction:column; align-items:center; gap:10px; box-sizing:border-box; width:min(100%,480px); padding:28px 24px; border:1px solid var(--a-line); border-radius:16px; background: var(--a-bg); text-align:center; }
.sw-guest-icon { display:grid; place-items:center; width:52px; height:52px; border-radius:50%; background: var(--a-accent-soft); color: var(--a-accent-ink); }
.sw-guest-icon .ic { width:24px; height:24px; }
.sw-guest-title { font-family:'Gowun Dodum','IBM Plex Sans KR',sans-serif; font-size:17px; font-weight:400; line-height:1.45; color: var(--a-strong); word-break:keep-all; }
.sw-guest-text { margin:0; font-size:13.5px; line-height:1.65; color: var(--a-fg); word-break:keep-all; }
.sw-guest-actions { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin-top:6px; }
.sw-guest-actions button { min-height:42px; padding:0 24px; }
.sw-guest-primary { display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; border:0; border-radius:.625rem; background: var(--a-accent); color: rgb(var(--white)); font-size:.875rem; font-weight:600; cursor:pointer; }
.dark .sw-guest-primary { background: rgb(var(--brand-500)); }
@media (hover:hover) { .sw-guest-primary:hover { background: var(--a-accent-ink); } .dark .sw-guest-primary:hover { background: rgb(var(--brand-600)); } }
.sw-guest-outline { display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; border:1px solid var(--a-accent); border-radius:.625rem; background:transparent; color: var(--a-accent-ink); font-size:.875rem; font-weight:600; cursor:pointer; }
@media (hover:hover) { .sw-guest-outline:hover { background: var(--a-accent-soft); } }
/* 0733 — 사이드바 「새로 만들기」·실행 기록 서랍의 손님 안내: 같은 상자를 좁은 폭에 맞게 줄인다. */
.skills-guest { padding:2px 0 0; gap:0; }
.skills-guest .sw-guest-card { width:100%; gap:10px; padding:14px 12px; border-radius:12px; }
.skills-guest .sw-guest-title { font-size:14px; line-height:1.5; }
.skills-guest .skills-guest-login { min-height:36px; padding:0 20px; }
.sw-guest-foot { margin:0; padding:9px 16px; border:1px dashed var(--a-line-strong); border-radius:10px; color: var(--a-muted); font-size:12.5px; line-height:1.5; text-align:center; word-break:keep-all; }

/* --- 폰 (≤640px) --------------------------------------------------------------------------------------------- */
@media (max-width:640px) {
  html.auth-member #btn-theme-toggle, html.auth-member #btn-open-history { display:none !important; }
  /* a round account button: 38px when signed in, 36px for the guest's person icon; the name and caret move into the sheet */
  .auth-button.is-member { width:38px; height:38px; padding:3px; gap:0; justify-content:center; }
  .auth-button.is-member .auth-avatar { width:30px; height:30px; }
  .auth-button.is-guest { width:36px; padding:0; gap:0; justify-content:center; }
  .auth-button.is-member .auth-button-text, .auth-button.is-member .auth-caret, .auth-button.is-guest .auth-button-text { display:none; }
  .auth-button.is-checking { width:36px; padding:0; }
  .auth-button.is-checking .auth-button-text { display:none; }
  .auth-button.is-error { max-width:92px; padding:0 10px; font-size:11px; }
  .auth-button.is-error .auth-button-text { max-width:72px; }
  .auth-card { padding:18px 16px 16px; }
  .auth-menu { max-width:calc(100vw - 16px); }
  .accounts-head-line { gap:.5rem; }
  .accounts-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); width:100%; }
  .accounts-tabs .sseg-btn { padding-left:6px; padding-right:6px; }
  .accounts-tab-long { display:none; }
  .accounts-tab-short { display:inline; }
  .accounts-search { width:100%; margin-left:0; }
  .accounts-search input[type=search] { width:100%; }
  .acct-pending { display:grid; grid-template-columns:auto minmax(0,1fr); grid-template-areas:"avatar main" "actions actions"; align-items:start; gap:10px 12px; }
  .acct-pending > .auth-avatar { grid-area:avatar; }
  .acct-pending > .acct-main { grid-area:main; }
  .acct-pending > .acct-actions { grid-area:actions; display:grid; grid-template-columns:1fr 2fr; gap:8px; margin:0; }
  .acct-reject, .acct-approve { height:44px; }
  .acct-hint { display:grid; place-items:center; height:44px; text-align:center; }
  .acct-head { display:none; }
  .acct-table { gap:8px; border:0; background:transparent; }
  .acct-member, .acct-member:last-child { display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"account more" "meta meta"; row-gap:10px; column-gap:8px; padding:12px; border:1px solid var(--a-line); border-radius:12px; background: var(--a-bg); }
  .acct-account { grid-area:account; }
  .acct-more-cell { grid-area:more; align-self:start; }
  .acct-meta { grid-area:meta; display:flex; align-items:center; gap:8px; }
  .acct-login { margin-left:auto; }
}
@media (prefers-reduced-motion:reduce) { .auth-menu.is-sheet { animation:none; } }

/* --- 접속 현황 화면 (0727, 관리자 전용) --------------------------------------------------------------------------- */
.access-view { --x-member: rgb(var(--brand-500)); --x-guest: rgb(var(--brand-300)); --x-mono: "IBM Plex Mono", ui-monospace, monospace; flex-direction:column; gap:.75rem; min-width:0; grid-column:1/-1; }
.dark .access-view { --x-member: rgb(var(--brand-300)); --x-guest: rgb(var(--brand-500)/.55); }
.access-head-line { align-items:center; }
.access-retry { min-height:32px; padding:0 4px; border:0; background:transparent; color: var(--a-bad); font-size:12.5px; font-weight:600; cursor:pointer; }
.access-retry[hidden], #access-stamp[hidden] { display:none; }
@media (hover:hover) { .access-retry:hover { text-decoration:underline; } }
.access-body { display:flex; flex-direction:column; gap:12px; min-width:0; }
.access-view[aria-busy=true] .access-body { opacity:.7; }
.access-loading { margin:0; padding:36px 16px; text-align:center; color: var(--a-muted); font-size:13.5px; }

.access-cards { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.access-card { display:flex; flex-direction:column; gap:6px; box-sizing:border-box; min-width:0; padding:14px 16px; border:1px solid var(--a-line); border-radius:14px; background: var(--a-bg); }
.access-card-title { display:flex; align-items:center; gap:8px; margin:0; font-size:13px; font-weight:600; line-height:1.4; color: var(--a-fg); }
.access-live-dot { flex:none; width:8px; height:8px; border-radius:50%; background: var(--a-ok); box-shadow:0 0 0 3px var(--a-ok-soft); }
.access-big { display:flex; align-items:baseline; gap:3px; font-variant-numeric:tabular-nums; color: var(--a-strong); }
.access-big-n { font-family: var(--x-mono); font-size:28px; font-weight:500; line-height:1.15; }
.access-big-unit { font-size:15px; color: var(--a-fg); }
.access-big.is-bad .access-big-n { color: var(--a-bad); }
.access-sub { font-size:12.5px; line-height:1.5; color: var(--a-muted); overflow-wrap:anywhere; }
.access-sub.is-delta { color: var(--a-accent-ink); }
.access-fine { font-size:11px; line-height:1.4; color: var(--a-muted); }
.access-pills { display:flex; flex-wrap:wrap; gap:4px; margin-top:2px; }
.access-pill { max-width:100%; box-sizing:border-box; padding:1px 8px; border-radius:999px; background: var(--a-sunken); color: var(--a-fg); font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.access-pill.is-muted { color: var(--a-muted); }

.access-split { display:grid; grid-template-columns:minmax(0,2fr) minmax(0,1fr); gap:12px; }
.access-panel { box-sizing:border-box; min-width:0; padding:14px 16px 12px; border:1px solid var(--a-line); border-radius:14px; background: var(--a-bg); }
.access-panel-head { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 14px; margin-bottom:10px; }
.access-panel-title { flex:1 1 auto; margin:0; font-size:15px; font-weight:600; line-height:1.4; color: var(--a-strong); }
.access-hint { font-size:12px; color: var(--a-muted); }
.access-legend { display:inline-flex; align-items:center; gap:5px; font-size:12px; color: var(--a-fg); }
.access-key { display:inline-block; width:10px; height:10px; border-radius:3px; }
.access-key.is-member { background: var(--x-member); }
.access-key.is-guest { background: var(--x-guest); }
.access-key.is-prev { width:12px; height:0; border-radius:0; border-top:2px dashed var(--a-muted); }

.access-plot { position:relative; height:170px; border-bottom:1px solid var(--a-line-strong); }
.access-plot::before, .access-plot::after { content:""; position:absolute; left:0; right:0; border-top:1px dashed var(--a-line); }
.access-plot::before { top:0; }
.access-plot::after { top:50%; }
.access-max { position:absolute; right:0; top:-2px; z-index:2; padding-left:4px; background: var(--a-bg); color: var(--a-muted); font-family: var(--x-mono); font-size:11px; }
.access-bars { position:relative; z-index:1; display:flex; align-items:flex-end; gap:4px; height:100%; }
.access-bars.is-dense { gap:3px; }
.access-bar { position:relative; flex:1 1 0; min-width:0; height:100%; display:flex; flex-direction:column; justify-content:flex-end; }
.access-seg { display:block; min-height:2px; }
.access-seg.is-member { background: var(--x-member); }
.access-seg.is-guest { background: var(--x-guest); }
.access-bar > .access-seg:first-child { border-radius:2px 2px 0 0; }
.access-prev { position:absolute; left:-1px; right:-1px; border-top:2px dashed var(--a-muted); pointer-events:none; }
.access-axis { display:flex; gap:4px; margin-top:4px; }
.access-axis.is-dense { gap:3px; }
.access-axis-label { flex:1 1 0; min-width:0; text-align:center; color: var(--a-muted); font-family: var(--x-mono); font-size:10.5px; white-space:nowrap; }
.access-caption { margin:10px 0 0; font-size:12px; color: var(--a-muted); }

.access-incident-panel { display:flex; flex-direction:column; }
.access-incidents { display:flex; flex-direction:column; gap:9px; min-width:0; }
.access-incident { display:flex; align-items:flex-start; gap:10px; padding-bottom:9px; border-bottom:1px solid var(--a-line); }
.access-incident:last-of-type { border-bottom:0; padding-bottom:0; }
.access-tag { flex:none; padding:2px 7px; border-radius:6px; background: var(--a-sunken); color: var(--a-fg); font-size:11px; font-weight:600; line-height:1.5; white-space:nowrap; }
.access-tag.is-bad { background: var(--a-bad-soft); color: var(--a-bad); }
.access-tag.is-warn { background: var(--a-warn-soft); color: var(--a-warn); }
.access-incident-text { flex:1 1 auto; min-width:0; }
.access-incident-what { font-size:13px; line-height:1.5; color: var(--a-strong); overflow-wrap:anywhere; }
.access-incident-when { font-size:12px; line-height:1.5; color: var(--a-muted); overflow-wrap:anywhere; }
.access-more { align-self:flex-start; min-height:36px; padding:0 2px; border:0; background:transparent; color: var(--a-accent-ink); font-size:12.5px; cursor:pointer; }
@media (hover:hover) { .access-more:hover { text-decoration:underline; } }

.access-scroll { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.access-table { display:flex; flex-direction:column; min-width:720px; }
.access-row { display:grid; grid-template-columns:minmax(150px,2fr) 84px minmax(170px,2.4fr) 78px 78px 88px 72px; align-items:center; column-gap:12px; box-sizing:border-box; padding:8px 6px; border-bottom:1px solid var(--a-line); font-size:13px; color: var(--a-fg); }
.access-row:last-child { border-bottom:0; }
.access-head { padding-top:4px; padding-bottom:6px; border-bottom:1px solid var(--a-line-strong); color: var(--a-muted); font-size:12px; font-weight:600; }
.access-table:not(.is-members) .access-head > span:nth-child(2), .access-table:not(.is-members) .access-head > span:nth-child(n+4) { text-align:right; }
.access-table:not(.is-members) .access-head > span:nth-child(3) { padding-left:6px; }
.access-name { display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 6px; min-width:0; }
.access-route-name { color: var(--a-strong); overflow-wrap:anywhere; }
.access-route-path { color: var(--a-muted); font-family: var(--x-mono); font-size:11px; overflow-wrap:anywhere; }
.access-num { text-align:right; font-family: var(--x-mono); font-variant-numeric:tabular-nums; color: var(--a-fg); }
.access-bytes-cell { display:flex; align-items:center; gap:8px; min-width:0; padding-left:6px; }
.access-share { flex:1 1 auto; height:8px; border-radius:4px; background: var(--a-sunken); overflow:hidden; }
.access-share > i { display:block; height:100%; border-radius:4px; background: var(--x-member); }
.access-bytes-text { min-width:62px; text-align:right; font-family: var(--x-mono); font-variant-numeric:tabular-nums; color: var(--a-strong); }
.access-err.is-bad { color: var(--a-bad); }

.access-table.is-members .access-row { grid-template-columns:minmax(150px,2fr) minmax(130px,1.4fr) 90px minmax(170px,1.6fr) minmax(90px,1fr); }
a.access-member { min-height:44px; text-decoration:none; cursor:pointer; }
a.access-member:focus-visible { outline:2px solid var(--a-accent); outline-offset:-2px; border-radius:8px; }
@media (hover:hover) { a.access-member:hover { background: var(--a-accent-soft); } }
.access-who { display:flex; align-items:center; gap:8px; min-width:0; }
.access-who .auth-avatar { width:26px; height:26px; font-size:12px; }
.access-who-name { color: var(--a-strong); font-weight:600; overflow-wrap:anywhere; }
.access-admin-pill { flex:none; padding:0 6px; border:1px solid var(--a-accent-line); border-radius:999px; color: var(--a-accent-ink); font-size:11px; line-height:1.6; }
.access-seen { display:inline-flex; align-items:center; gap:6px; }
.access-dot { flex:none; width:7px; height:7px; border-radius:50%; background: var(--a-line-strong); }
.access-dot.is-on { background: var(--a-ok); }
.access-req { padding-right:6px; }
.access-days { display:inline-flex; align-items:center; gap:3px; }
.access-day { display:inline-block; width:8px; height:8px; border-radius:2px; background: var(--a-sunken); box-shadow: inset 0 0 0 1px var(--a-line); }
.access-day.is-on { background: var(--x-member); box-shadow:none; }
.access-day-count { margin-left:8px; color: var(--a-muted); font-family: var(--x-mono); font-size:12px; }
.access-devices { color: var(--a-fg); }
.access-guests { display:flex; flex-wrap:wrap; align-items:center; gap:6px 16px; margin-top:10px; padding:10px 12px; border-radius:10px; background: var(--a-panel); color: var(--a-fg); font-size:12.5px; }
.access-guests strong { color: var(--a-strong); }
.access-guests-note { color: var(--a-muted); }

@media (max-width:1024px) {
  .access-split { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:640px) {
  .access-cards { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .access-card { padding:11px 12px; border-radius:12px; }
  .access-big-n { font-size:24px; }
  .access-big-unit { font-size:13px; }
  .access-panel { padding:12px; border-radius:12px; }
  .access-plot { height:120px; }
  .access-scroll { overflow:visible; }
  .access-table { min-width:0; }
  .access-head { display:none; }
  .access-route { display:flex; flex-wrap:wrap; align-items:baseline; column-gap:10px; row-gap:3px; padding:9px 0; }
  .access-route .access-name { order:1; flex:1 1 0; }
  .access-route-path { display:none; }
  .access-route .access-bytes-cell { display:contents; }
  .access-route .access-bytes-text { order:2; flex:none; min-width:0; }
  .access-route .access-share { order:3; flex:0 0 100%; height:6px; }
  .access-route .access-req, .access-route .access-per, .access-route .access-skip, .access-route .access-avg, .access-route .access-err { order:4; flex:none; font-size:11.5px; color: var(--a-muted); }
  .access-route .access-req::before, .access-route .access-per::before, .access-route .access-skip::before, .access-route .access-avg::before, .access-route .access-err::before { content:attr(data-label) " "; }
  .access-route .access-err.is-bad { color: var(--a-bad); }
  .access-table.is-members a.access-member { display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"who req" "seen week" "devices week"; row-gap:3px; column-gap:10px; padding:9px 0; }
  .access-member .access-who { grid-area:who; }
  .access-member .access-req { grid-area:req; justify-self:end; padding-right:0; }
  .access-member .access-seen { grid-area:seen; font-size:12px; color: var(--a-muted); }
  .access-member .access-week { grid-area:week; justify-self:end; align-self:center; }
  .access-member .access-devices { grid-area:devices; font-size:12px; color: var(--a-muted); }
  .access-guests { flex-direction:column; align-items:flex-start; }
}
.access-incident-panel > .access-panel-title { flex:none; margin-bottom:10px; }
