body { margin: 0; }
[hidden] { display: none !important; }
.web-onboarding { min-height: 100dvh; display: grid; place-items: center; padding: 32px 20px; overflow: auto; background: var(--surface-1); }
.web-card { width: min(100%, 520px); padding: 40px; border-radius: var(--r-dialog); background: var(--surface-0); }
.web-brand { display: inline-flex; gap: 10px; align-items: center; font-size: 22px; font-weight: 650; text-decoration: none; color: var(--ink); margin-bottom: 48px; }
.web-mark { display: grid; place-items: center; border-radius: 6px; width: 30px; height: 30px; background: var(--ink-block); color: var(--signal); }
.web-eyebrow, .web-divider, .web-footnote { font-family: var(--font-mono); font-size: 11px; line-height: 1.6; color: var(--ink-mute); }
.web-eyebrow { letter-spacing: .08em; margin: 0 0 12px; }
.web-card h1 { font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -.025em; margin: 0 0 16px; }
.web-description { font-size: 16px; line-height: 1.6; color: var(--ink-mute); margin: 0 0 28px; }
.web-form, .web-field { display: grid; gap: 10px; }
.web-form { gap: 20px; }
.web-field { font-size: 13px; font-weight: 500; }
.web-field input { border: 0; border-left: 2px solid transparent; border-radius: var(--r-field); background: var(--surface-2); color: var(--ink); font: 15px var(--font-sans); padding: 14px; min-width: 0; width: 100%; box-sizing: border-box; }
.web-field input:focus { outline: none; border-left-color: var(--ink); }
.web-card .btn { min-height: 44px; width: 100%; margin-bottom: 10px; justify-content: center; }
.web-card .btn-primary { background: var(--ink-block); color: var(--signal); }
.web-divider { margin: 24px 0 12px; text-align: center; }
.web-help { font-size: 13px; line-height: 1.6; color: var(--ink-mute); }
.web-footnote { padding-top: 20px; margin: 12px 0 0; }
#web-error { color: var(--danger); font-size: 14px; line-height: 1.5; }
#web-error:empty { display: none; }
#account-bar { box-sizing: border-box; position: sticky; top: 0; z-index: 30; height: 48px; display: flex; align-items: center; padding: 6px 16px; gap: 14px; background: var(--surface-2); font: 11px var(--font-mono); }
#account-bar .btn { padding: 8px 12px; }
#account-bar .web-status { margin-left: auto; color: var(--ink-mute); }
body:has(#account-bar:not([hidden])) #app { height: calc(100dvh - 48px); }
.titlebar { display: none; }
.sidebar { top: 48px; }
.shell, .main { min-height: calc(100dvh - 48px); }
.detail-drawer { top: 48px; height: calc(100dvh - 48px); }
.web-nav-toggle { display: none; }
.web-security { border: none; border-radius: var(--r-dialog); padding: 32px; width: min(90vw, 520px); background: var(--surface-0); color: var(--ink); }
.web-security::backdrop { background: #0008; }
.web-security .btn { width: 100%; margin-top: 12px; }
.web-security p { font-size: 14px; line-height: 1.6; }
@media (max-width: 600px) {
  .web-onboarding { padding: 0; background: var(--surface-0); }
  .web-card { padding: 32px 24px; border-radius: 0; }
  .web-brand { margin-bottom: 36px; }
  #account-bar { gap: 8px; padding: 6px 10px; }
  .web-status { display: none; }
  #account-bar .web-destination { margin-right: auto; max-width: 35vw; overflow: hidden; text-overflow: ellipsis; }
  .web-nav-toggle { display: inline-flex; }
  .sidebar { width: 240px; transform: translateX(-100%); z-index: 40; }
  .web-nav-open .sidebar { transform: translateX(0); }
  .main { margin-left: 0; width: 100%; padding: 24px 20px; }
  .key-hints { display: none; }
  .notice-stack { left: 12px; max-width: calc(100vw - 24px); }
  #account-bar .web-destination { max-width: 22vw; }
}
@media (prefers-reduced-motion: reduce) { .web-card * { transition: none; } }
