:root {
  color-scheme: light;
  --paper: #fafafa; --surface: #fff; --ink: #15171b; --muted: #5d626c;
  --accent: #315ddc; --line: #d9dce1;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink); background: var(--paper); font-synthesis: none;
  text-rendering: optimizeLegibility; letter-spacing: 0; font-size: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 0; min-height: 100dvh; display: flex; flex-direction: column; font-size: 1rem; line-height: 1.6; }
[hidden] { display: none !important; }
button, input { font: inherit; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: 4px; }
a, button, h1, h2, p, dd { overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
p { margin: 0; }
h1 { font-size: 1.875rem; line-height: 1.2; font-weight: 740; margin: 0; }
h2 { font-size: 1.25rem; line-height: 1.35; margin: 0 0 16px; }
.skip-link { position: fixed; z-index: 10; top: 8px; left: 16px; padding: 12px 18px; border: 2px solid var(--accent); background: var(--surface); transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.site-header { min-height: 72px; padding: 8px max(16px, 5%); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.wordmark { display: inline-flex; align-items: center; width: 168px; max-width: 100%; min-height: 44px; }
.wordmark img { display: block; width: 100%; height: auto; }
.navigation { position: relative; }
.navigation-toggle { display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.navigation-toggle:hover, .navigation-toggle[aria-expanded="true"] { background: #eceef2; }
.navigation-bars { display: grid; gap: 4px; width: 20px; }
.navigation-bars > span { display: block; height: 2px; border-radius: 1px; background: currentColor; }
#account-nav { position: absolute; z-index: 5; top: calc(100% + 10px); right: 0; width: min(220px, calc(100vw - 32px)); max-height: calc(100dvh - 112px); overflow-y: auto; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 8px 24px rgb(21 23 27 / 12%); }
#account-nav a, #account-nav button { display: flex; width: 100%; min-height: 44px; align-items: center; padding: 10px 12px; border: 0; border-radius: 5px; background: transparent; color: var(--ink); font-size: .9375rem; font-weight: 600; text-align: left; text-decoration: none; }
#account-nav a:hover, #account-nav button:hover { background: #f0f1f3; }
#account-nav button:disabled { color: var(--muted); cursor: wait; }
#account-main { width: min(1040px, calc(100% - 64px)); margin: 0 auto; padding: 40px 0; flex: 1; }
#account-main:focus { outline: none; }
.auth-view { max-width: 400px; margin: 0 auto; }
.subtitle { margin: 12px 0 24px; color: var(--muted); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; max-width: 100%; padding: 11px 20px; border: 1px solid var(--ink); border-radius: 8px; background: var(--ink); color: #fff; font-size: .9375rem; font-weight: 650; line-height: 1.4; }
.button:hover { background: #2b2e34; }
.button:disabled { cursor: wait; background: #515761; border-color: #515761; color: #fff; }
.secondary { background: var(--surface); border-color: #a6acb6; color: var(--ink); }
.secondary:hover { background: #eceef2; }
.text-button { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; max-width: 100%; padding: 10px 0; border: 0; background: transparent; color: #2853c7; font-size: .9375rem; font-weight: 550; text-decoration: underline; text-underline-offset: 4px; }
.text-button:hover { color: #15388f; }
.text-button:disabled { color: var(--muted); cursor: wait; }
.full-width { width: 100%; }
.entry-actions { display: grid; justify-items: start; gap: 4px; }
.auth-switch { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; flex-wrap: wrap; gap: 0 8px; font-size: .9375rem; }
.service-note { margin-top: 20px; color: var(--muted); font-size: .875rem; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.field label { font-size: .9375rem; font-weight: 600; }
.field input { width: 100%; min-width: 0; min-height: 48px; padding: 11px 14px; border: 1px solid #969eab; border-radius: 6px; background: white; color: var(--ink); }
.field input[aria-invalid="true"] { border: 2px solid #a93030; }
.field-help { color: var(--muted); font-size: .875rem; }
.field-error { color: #9b2929; font-size: .875rem; }
.notice { padding: 12px 16px; border: 1px solid #ccd6ed; border-radius: 8px; background: #f0f4fd; color: #344975; margin-bottom: 20px; font-size: .9375rem; }
.account-settings { max-width: 880px; margin: 0 auto; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 40px; margin-top: 28px; }
.settings-section { padding: 24px 0 0; border-top: 1px solid var(--line); min-width: 0; }
.settings-section > p { margin: 0 0 16px; color: var(--muted); }
.settings-section .current-value { color: var(--ink); margin-bottom: 12px; }
.settings-section h2 { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.setting-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.setting-heading h2 { margin: 0; }
.edit-button { flex: 0 0 auto; min-width: 52px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: .875rem; font-weight: 600; }
.edit-button:hover { background: #eceef2; }
.edit-button:disabled { color: var(--muted); cursor: not-allowed; }
.settings-section .field-help:empty { display: none; }
.settings-section .field-help { font-size: .875rem; margin: 12px 0; }
.settings-form { margin-top: 20px; }
.settings-form .field { margin-bottom: 14px; }
.settings-form .field-help, .settings-form .field-error { margin: 0; }
.field input:disabled { background: #f0f1f3; color: var(--muted); }
.danger { background: #a62424; border-color: #a62424; color: white; }
.danger:hover { background: #871b1b; border-color: #871b1b; }
.danger-section { border-color: #deb6b6; }
.danger-section h2 { color: #942020; }
#settings-message { margin-top: 20px; margin-bottom: 0; }
.operation-panel { margin-top: 24px; padding: 24px; border: 1px solid #b6c8ed; border-radius: 10px; background: #f1f5fc; }
.eyebrow { margin: 0 0 8px; color: #2b4c8f; font-size: .875rem; font-weight: 650; }
.operation-panel h2 { margin-bottom: 12px; }
.operation-target { margin: 12px 0; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow-wrap: anywhere; font-weight: 600; }
.operation-actions { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-top: 20px; }
.operation-panel form { margin-top: 20px; max-width: 500px; }
.operation-panel .field-help { margin-top: 12px; }
.operation-panel input { background: white; }
.recovery-view { max-width: 540px; }
.recovery-deadlines { display: grid; gap: 18px; margin: 24px 0; padding: 20px 0; border-block: 1px solid var(--line); }
.recovery-view .notice { margin-top: 20px; }
dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; margin: auto; padding: 28px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: 0 20px 70px rgb(0 0 0 / 25%); }
dialog::backdrop { background: rgb(12 18 30 / 55%); }
dialog h2 { margin-bottom: 12px; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.account-details { display: grid; gap: 24px; margin: 0; }
dt { color: var(--muted); font-size: .875rem; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
dd { margin: 4px 0 0; font-size: 1rem; }
.badge { display: inline-flex; border-radius: 5px; padding: 2px 8px; color: #316047; background: #edf5f0; font-size: .875rem; font-weight: 550; }
.site-footer { width: min(1040px, calc(100% - 64px)); margin: 0 auto; padding: 12px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 760px) { #account-main { width: calc(100% - 40px); padding: 28px 0; } .site-footer { width: calc(100% - 40px); } .settings-grid { grid-template-columns: 1fr; gap: 24px; margin-top: 24px; } }
@media (max-width: 400px) { #account-main, .site-footer { width: calc(100% - 32px); } }
@media (max-width: 520px) { .operation-panel { padding: 18px; } dialog { padding: 22px; } .dialog-actions .button { flex: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
