:root {
  color-scheme: light;
  --canvas: #f4f6fa;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --ink: #182230;
  --muted: #66758a;
  --line: #e6ebf2;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --on-accent: #ffffff;
  --focus: #93b4ff;
  --selected: #edf3ff;
  --selected-ink: #245bca;
  --success: #18836a;
  --danger: #d13d50;
  --danger-soft: #fff0f2;
  --shadow: 0 4px 24px rgb(26 46 84 / 4%);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #0b1018;
  --surface: #131b28;
  --surface-soft: #182232;
  --ink: #e7eef9;
  --muted: #97a7bd;
  --line: #253246;
  --accent: #4f87ff;
  --accent-hover: #75a0ff;
  --on-accent: #ffffff;
  --focus: #7da6ff;
  --selected: #1c3155;
  --selected-ink: #9abbff;
  --success: #55d5ac;
  --danger: #ff8d9b;
  --danger-soft: #38212b;
  --shadow: 0 4px 24px rgb(0 0 0 / 12%);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); line-height: 1.6; }
button, input, textarea { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
button, a { touch-action: manipulation; }
a { color: inherit; }
svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
#main:focus { outline: none; }
input:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
input, textarea { color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; min-width: 0; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .85; }
input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
input { min-height: 44px; }
textarea { width: 100%; resize: vertical; line-height: 1.8; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
button, .button, a { transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 30; padding: 12px; background: var(--surface); }
.skip-link:focus { top: 10px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; font-size: 19px; font-weight: 700; padding: 0 5px; letter-spacing: .02em; }
.brand small { display: block; font-size: 8px; color: var(--muted); font-weight: 600; letter-spacing: .12em; margin-top: 1px; }
.brand-mark { display: grid; place-items: center; width: 37px; height: 39px; flex: none; border-radius: 11px; background: linear-gradient(140deg, #387dff, #2056d6); color: #fff; font: 700 23px "Segoe UI", sans-serif; box-shadow: 0 4px 10px #2563eb24; }
.brand-mark svg { width: 23px; height: 23px; }
.main-nav { display: flex; align-items: center; gap: 8px; justify-content: center; }
.main-nav a { position: relative; display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: 8px; text-decoration: none; font-size: 13px; font-weight: 550; color: var(--muted); white-space: nowrap; }
.main-nav a:hover { background: var(--surface-soft); color: var(--ink); }
.main-nav a[aria-current="page"] { background: var(--selected); color: var(--selected-ink); }
.main-nav a[aria-current="page"] .nav-indicator { width: 5px; height: 5px; margin-left: auto; border-radius: 50%; background: var(--accent); }
.main-nav a svg { width: 19px; height: 19px; }
.site-header { min-height: 76px; padding: 14px 32px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; border-bottom: 1px solid var(--line); background: var(--surface); }
.header-end { display: flex; align-items: center; justify-content: flex-end; gap: 17px; }
.workspace-label { font-size: 11px; color: var(--muted); }
.profile-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--selected); color: var(--selected-ink); font-size: 12px; font-weight: 650; }
.icon-button { border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted); width: 36px; height: 36px; padding: 0; display: inline-grid; place-items: center; flex: none; }
.icon-button:hover { background: var(--surface-soft); color: var(--ink); }
.icon-button.small { width: 30px; height: 30px; border-color: transparent; }
.icon-button.small svg { width: 16px; height: 16px; }
#main { min-width: 0; }
.page { max-width: 1500px; margin: 0 auto; padding: 30px 32px 18px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.title-row { display: flex; align-items: center; gap: 12px; }
.page-icon { display: grid; place-items: center; width: 37px; height: 37px; border: 1px solid var(--line); background: var(--surface); color: var(--selected-ink); border-radius: 10px; box-shadow: 0 2px 4px #18223005; }
.title-tag { padding: 1px 7px; border: 1px solid var(--line); border-radius: 5px; font-size: 10px; color: var(--muted); font-weight: 500; background: var(--surface); }
.eyebrow { font-size: 10px; font-weight: 600; letter-spacing: .1em; color: var(--muted); }
h1 { font-size: 25px; font-weight: 650; letter-spacing: -.03em; line-height: 1.5; }
.page-description { color: var(--muted); font-size: 12px; margin-top: 9px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 17px; border: 1px solid transparent; border-radius: 8px; text-decoration: none; font-weight: 550; font-size: 13px; white-space: nowrap; }
.button svg { width: 17px; height: 17px; }
.primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 3px 7px #2563eb1a, inset 0 1px 0 #ffffff20; }
.primary:not(:disabled):hover { background: var(--accent-hover); box-shadow: 0 4px 12px #2563eb30; }
.secondary { border-color: var(--line); color: var(--ink); background: var(--surface); box-shadow: 0 1px 2px #18223005; }
.secondary:not(:disabled):hover, .ghost:hover { background: var(--surface-soft); }
.ghost { color: var(--ink); background: transparent; }
.compact { min-height: 34px; padding: 6px 11px; font-size: 12px; }
.danger { background: var(--danger); color: var(--surface); }
.text-button { padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 11px; }
.text-button:hover { text-decoration: underline; }
.danger-text { color: var(--danger); }
.mail-workspace { --account-width: 300px; display: grid; grid-template-columns: var(--account-width) 1px minmax(0, 1fr); height: max(500px, calc(100dvh - 236px)); max-height: 1000px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.accounts-pane { padding: 19px 12px 0; display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--surface-soft); }
.pane-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 5px; margin-bottom: 14px; }
.pane-heading h2 { font-size: 13px; font-weight: 600; }
.count { font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 5px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); margin-left: 6px; }
.search-field { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 7px; padding: 0 9px; color: var(--muted); background: var(--surface); }
.search-field:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.search-field svg { width: 15px; height: 15px; }
.search-field input { flex: 1; background: transparent; outline: 0; border: 0; padding: 7px 0; min-height: 35px; font-size: 12px; width: 100%; }
kbd { font: 10px monospace; border: 1px solid var(--line); padding: 0 5px; border-radius: 3px; }
.account-list { overflow: auto; flex: 1; padding: 12px 0; scrollbar-width: thin; }
.account-empty { padding: 40px 14px; text-align: center; font-size: 12px; color: var(--muted); }
.account-empty svg { display: block; margin: 0 auto 12px; opacity: .6; }
.account-item { position: relative; border: 1px solid transparent; border-radius: 9px; padding: 10px; margin: 4px 0; }
.account-item:hover { background: var(--surface); }
.account-item.active { background: var(--surface); border-color: var(--line); box-shadow: 0 2px 6px #18223006; }
.account-item.active::before { content: ""; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 3px; background: var(--accent); border-radius: 2px; }
.account-select { border: 0; background: transparent; padding: 0; display: flex; gap: 9px; align-items: center; color: var(--ink); width: 100%; text-align: left; min-height: 36px; }
.account-avatar { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--selected); color: var(--selected-ink); font-size: 11px; font-weight: 650; text-transform: uppercase; }
.account-item:nth-child(3n+2) .account-avatar { background: #e7f5f0; color: #217b64; }
.account-item:nth-child(3n) .account-avatar { background: #fff1dc; color: #9a6516; }
:root[data-theme="dark"] .account-item:nth-child(3n+2) .account-avatar { background: #183a35; color: #79c9b3; }
:root[data-theme="dark"] .account-item:nth-child(3n) .account-avatar { background: #3b3021; color: #e6bd7d; }
.account-label { min-width: 0; flex: 1; }
.account-email { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 550; }
.account-label small { font-size: 10px; color: var(--muted); }
.account-actions { display: flex; gap: 4px; justify-content: flex-end; padding-top: 3px; }
.account-actions .icon-button { width: 26px; height: 24px; border: 0; }
.account-actions svg { width: 13px; height: 13px; }
.account-actions [data-action="delete"]:hover { color: var(--danger); }
.accounts-footer { margin-top: auto; border-top: 1px solid var(--line); padding: 13px 1px; display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.accounts-footer span { font-size: 10px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.accounts-footer svg { width: 13px; height: 13px; }
.account-resizer { position: relative; background: var(--line); z-index: 1; cursor: col-resize; touch-action: none; }
.account-resizer::after { content: ""; position: absolute; inset: 0 -3px; }
.account-resizer:hover, .account-resizer:focus { background: var(--accent); }
.mail-content { min-width: 0; overflow: hidden; }
.welcome-state { height: 100%; min-height: 420px; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 32px 20px; text-align: center; }
.welcome-state h2 { font-size: 25px; font-weight: 650; letter-spacing: -.03em; margin: 13px 0 9px; }
.welcome-state > p { font-size: 13px; color: var(--muted); }
.welcome-state .button { margin-top: 23px; }
.empty-badge { border: 1px solid var(--line); background: var(--surface-soft); padding: 3px 10px; border-radius: 20px; font-size: 10px; color: var(--muted); }
.welcome-features { display: flex; gap: 24px; color: var(--muted); font-size: 11px; margin-top: 30px; }
.welcome-features span { display: flex; align-items: center; gap: 6px; }
.welcome-features svg { width: 14px; height: 14px; }
.inbox-illustration { position: relative; width: 310px; height: 185px; margin-bottom: 24px; }
.illustration-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 22px 22px; mask-image: radial-gradient(ellipse, black 25%, transparent 70%); }
.preview-mail { position: absolute; display: flex; align-items: center; gap: 14px; padding: 18px; width: 220px; height: 74px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px #163b7010; }
.preview-back { top: 30px; left: 52px; transform: rotate(-9deg); opacity: .6; }
.preview-front { top: 80px; left: 27px; transform: rotate(5deg); }
.preview-mail > span:not(.preview-icon) { flex: 1; }
.preview-mail i { display: block; width: 90%; height: 6px; border-radius: 4px; background: var(--line); margin: 8px 0; }
.preview-mail i:last-child { width: 65%; height: 4px; }
.preview-icon { width: 37px; height: 37px; flex: none; display: grid; place-items: center; color: var(--accent); background: var(--selected); border-radius: 9px; }
.preview-mail b { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); align-self: flex-start; }
.illustration-plus { position: absolute; right: 18px; top: 95px; width: 32px; height: 32px; display: grid; place-items: center; color: white; background: var(--accent); border: 4px solid var(--surface); border-radius: 50%; font-size: 20px; line-height: 1; }
.mail-view { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.content-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 23px 25px 18px; }
.toolbar-title { min-width: 0; display: flex; align-items: center; gap: 10px; }
.toolbar-title > div { min-width: 0; }
.toolbar-title h2 { font-size: 18px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.mobile-back { display: none; }
.mail-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; padding: 0 25px 14px; border-bottom: 1px solid var(--line); }
.mail-meta > span:first-child { color: var(--selected-ink); }
.mail-meta b { padding: 2px 6px; margin-left: 5px; border-radius: 4px; background: var(--selected); font-weight: 550; }
.mail-list { flex: 1; overflow: auto; scrollbar-width: thin; }
.mail-row { border: 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 13px; padding: 18px 25px; width: 100%; text-align: left; background: transparent; color: var(--ink); }
.mail-row:hover { background: var(--surface-soft); }
.mail-row.unread { background: color-mix(in srgb, var(--selected) 25%, var(--surface)); }
.sender-avatar { width: 35px; height: 35px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; display: grid; place-items: center; flex: none; color: var(--muted); font-size: 12px; font-weight: 550; text-transform: uppercase; }
.mail-row-content { flex: 1; min-width: 0; }
.mail-row-heading { display: flex; align-items: center; gap: 8px; justify-content: space-between; font-size: 12px; }
.mail-row-heading strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-row.unread .mail-row-heading strong { font-weight: 650; }
.mail-row time { color: var(--muted); font-size: 10px; flex: none; }
.mail-subject, .mail-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.mail-subject { font-size: 13px; margin-top: 3px; }
.mail-preview { color: var(--muted); font-size: 11px; margin-top: 3px; }
.mail-row.unread .sender-avatar { position: relative; color: var(--selected-ink); background: var(--selected); border-color: transparent; }
.mail-row.unread .sender-avatar::after { content: ""; position: absolute; right: -3px; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
.inline-state { padding: 60px 22px; text-align: center; color: var(--muted); font-size: 13px; }
.inline-state .button { margin-top: 16px; }
.spinner { width: 24px; height: 24px; margin: 0 auto 16px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.detail-toolbar { border-bottom: 1px solid var(--line); padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; font-size: 11px; }
.mail-detail { padding: 30px; overflow: auto; overflow-wrap: anywhere; }
.mail-detail h2 { font-size: 23px; font-weight: 600; line-height: 1.5; }
.sender-line { display: flex; gap: 12px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); margin-bottom: 26px; font-size: 12px; }
.sender-line > div { min-width: 0; flex: 1; }
.sender-line small { display: block; color: var(--muted); margin-top: 3px; }
.sender-line time { color: var(--muted); font-size: 11px; }
.mail-body { line-height: 1.9; font-size: 14px; }
.mail-body p { margin: 0 0 14px; }
.mail-body h1, .mail-body h2, .mail-body h3 { margin: 20px 0 12px; }
.mail-body img { max-width: 100%; height: auto; }
.mail-body a { color: var(--selected-ink); text-decoration: underline; }
.mail-body table { display: block; max-width: 100%; overflow: auto; border-collapse: collapse; }
.mail-body td, .mail-body th { border: 1px solid var(--line); padding: 8px; }
.mail-body pre { white-space: pre-wrap; }
.mail-body blockquote { border-left: 2px solid var(--accent); padding-left: 16px; margin-left: 0; color: var(--muted); }
.page-footnote { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 15px; font-size: 10px; color: var(--muted); }
.page-footnote > span:first-child { display: flex; align-items: center; gap: 7px; }
.tiny-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--success); display: inline-block; }
.heading-badge { color: var(--muted); font-size: 11px; display: flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; }
.heading-badge svg { width: 14px; height: 14px; }
.code-page { max-width: 1260px; }
.code-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; align-items: start; }
.code-card { min-width: 0; padding: 26px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.card-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 25px; }
.card-heading-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; background: var(--selected); color: var(--accent); }
.card-heading h2 { font-size: 15px; font-weight: 600; }
.card-heading p { color: var(--muted); font-size: 11px; margin-top: 2px; }
.code-form label { display: block; font-size: 12px; font-weight: 550; margin-bottom: 9px; }
.code-input-row { display: flex; position: relative; gap: 8px; }
.input-icon { position: absolute; top: 13px; left: 12px; color: var(--muted); pointer-events: none; }
.input-icon svg { width: 17px; height: 17px; }
.code-input-row input { width: 100%; flex: 1; font-size: 12px; padding-left: 37px; background: var(--surface-soft); }
.code-input-row .button { padding: 10px 14px; font-size: 12px; }
.code-tabs { display: flex; border-bottom: 1px solid var(--line); gap: 24px; margin-top: 22px; }
.code-tabs button { position: relative; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 13px 0; background: transparent; color: var(--muted); border: 0; font-size: 12px; font-weight: 500; }
.code-tabs button svg { width: 16px; height: 16px; }
.code-tabs button[aria-selected="true"] { color: var(--accent); }
.code-tabs button[aria-selected="true"]::after { content: ""; height: 2px; position: absolute; left: 0; right: 0; bottom: -1px; background: var(--accent); }
.code-result { margin-top: 24px; padding: 22px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; }
.code-result[data-state="success"] { background: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--selected) 75%, transparent), transparent 70%), var(--surface-soft); }
.result-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; min-height: 24px; font-size: 11px; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); border: 1px solid var(--line); background: var(--surface); padding: 3px 9px; border-radius: 20px; font-size: 10px; }
.status-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
[data-state="success"] .status-badge { color: var(--success); }
[data-state="error"] .status-badge { color: var(--danger); }
.code-display-wrap { text-align: center; padding: 30px 0 27px; }
.result-label { font-size: 10px; color: var(--muted); letter-spacing: .1em; }
.code-value { font-family: "SFMono-Regular", Consolas, monospace; font-size: 48px; font-weight: 500; letter-spacing: .12em; color: var(--ink); margin: 20px 0 16px; line-height: 1.3; overflow-wrap: anywhere; user-select: all; }
.code-value.placeholder { color: var(--muted); font-family: inherit; font-size: 26px; letter-spacing: .04em; padding: 12px 0; }
.code-value.digit-code { display: flex; justify-content: center; gap: 8px; letter-spacing: 0; }
.code-digit { display: inline-grid; place-items: center; width: clamp(30px, 3.8vw, 56px); height: 72px; background: var(--surface); border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 9px; box-shadow: 0 3px 9px #172f5c05; font-size: clamp(26px, 3vw, 42px); min-width: 0; }
[data-state="success"] .code-value { cursor: copy; }
#codeMessage { font-size: 11px; color: var(--muted); }
.code-actions { display: flex; justify-content: center; gap: 10px; }
.code-actions .button { min-width: 126px; }
.code-updated { color: var(--muted); font-size: 10px; text-align: center; margin-top: 18px; }
.code-guide { padding: 24px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.guide-heading { display: flex; align-items: center; gap: 8px; }
.guide-icon { color: var(--muted); display: inline-flex; }
.guide-icon svg { width: 17px; height: 17px; }
.code-guide h2 { font-size: 14px; font-weight: 600; }
.code-guide ol { padding: 0; margin: 25px 0; list-style: none; display: grid; gap: 23px; }
.code-guide li { display: flex; gap: 11px; position: relative; }
.code-guide li > span { flex: none; display: grid; place-items: center; height: 23px; width: 23px; border: 1px solid var(--line); background: var(--surface-soft); border-radius: 50%; color: var(--muted); font-size: 11px; font-weight: 600; }
.code-guide li:not(:last-child)::after { content: ""; position: absolute; width: 1px; background: var(--line); top: 30px; bottom: -16px; left: 11px; }
.code-guide h3 { font-size: 12px; font-weight: 600; }
.code-guide li p { margin-top: 6px; font-size: 11px; color: var(--muted); line-height: 1.8; }
.guide-note { display: flex; gap: 9px; padding: 14px 11px; background: var(--selected); border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line)); border-radius: 9px; font-size: 11px; color: var(--selected-ink); }
.guide-note svg { width: 16px; height: 16px; margin-top: 2px; }
.guide-note p { margin-top: 4px; line-height: 1.8; }
.guide-link { display: flex; align-items: center; gap: 8px; margin-top: 20px; font-size: 11px; text-decoration: none; min-height: 36px; }
.guide-link:hover { color: var(--accent); }
.guide-link svg { width: 14px; height: 14px; }
.guide-link svg:last-child { margin-left: auto; }
.muted { color: var(--muted); }
.modal { width: min(600px, calc(100% - 32px)); padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 100px #001b4538; max-height: calc(100dvh - 40px); overflow: auto; }
.modal::backdrop { background: #0b142c80; backdrop-filter: blur(4px); }
.small-modal { max-width: 440px; }
.modal-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.modal h2 { font-size: 23px; font-weight: 600; margin-top: 4px; }
.modal .muted { font-size: 12px; }
.format-examples { margin-top: 13px; display: grid; gap: 10px; background: var(--selected); padding: 14px; border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); border-left: 3px solid var(--accent); border-radius: 8px; }
.format-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--selected-ink); font-size: 12px; }
.format-heading svg { width: 15px; height: 15px; }
.format-heading > span { color: var(--muted); font-size: 11px; }
.format-example { display: grid; gap: 4px; }
.format-label { color: var(--muted); font-size: 11px; }
.format-examples code { min-width: 0; font-family: inherit; font-size: 13px; line-height: 1.65; white-space: normal; overflow-wrap: anywhere; color: var(--ink); }
.format-separator { color: var(--selected-ink); font-weight: 700; }
.format-tip { border-top: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line)); padding-top: 9px; color: var(--selected-ink); font-size: 11px; }
.field-label { display: block; margin: 18px 0 8px; font-size: 12px; font-weight: 550; }
.modal input { width: 100%; }
.modal textarea { font-size: 12px; }
.field-note { font-size: 11px; color: var(--muted); margin-top: 9px; }
.form-error { color: var(--danger); font-size: 12px; white-space: pre-line; }
.form-error:not(:empty) { margin-top: 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }
.confirm-message { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); padding: 12px 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); box-shadow: 0 8px 32px #001b4526; font-size: 13px; z-index: 20; max-width: calc(100vw - 32px); width: max-content; }
.error-page { min-height: calc(100dvh - 68px); display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; gap: 18px; padding: 32px; }
.error-page > strong { font: 700 90px "Segoe UI", sans-serif; color: var(--accent); }
@media (max-width: 1200px) {
  .brand { gap: 8px; font-size: 17px; padding: 0 2px; }
  .brand small { font-size: 7px; }
  .page { padding-left: 24px; padding-right: 24px; }
  .code-layout { grid-template-columns: minmax(0, 1fr) 220px; gap: 16px; }
  .code-card { padding: 22px; }
  .code-guide { padding: 22px 16px; }
  .code-input-row { flex-wrap: wrap; }
  .code-input-row input { flex-basis: 100%; }
  .code-input-row .button { width: 100%; }
  .code-result { padding: 18px 12px; }
  .code-value.digit-code { gap: 5px; }
  .code-digit { height: 58px; }
}
@media (min-width: 768px) and (max-width: 1000px) {
  .brand { padding: 0; }
  .site-header { padding-left: 24px; padding-right: 24px; gap: 16px; }
  .workspace-label { display: none; }
  .nav-indicator { display: none; }
  .code-layout { grid-template-columns: minmax(0, 1fr); }
  .code-guide ol { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .code-guide li:not(:last-child)::after { display: none; }
  .guide-note { max-width: 100%; }
  .code-input-row { flex-wrap: nowrap; }
  .code-input-row input { flex-basis: auto; }
  .code-input-row .button { width: auto; }
  .code-digit { width: 54px; height: 66px; font-size: 38px; }
}
@media (max-width: 767px) {
  .brand { font-size: 17px; padding: 0; gap: 10px; }
  .brand small { font-size: 8px; }
  .brand-mark { width: 34px; height: 35px; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; gap: 8px; width: 100%; }
  .main-nav a { flex: 1; justify-content: center; padding: 10px 8px; font-size: 12px; min-height: 44px; }
  .nav-indicator { display: none; }
  .site-header { padding: 16px 16px 11px; grid-template-columns: 1fr auto; gap: 17px 12px; }
  .workspace-label, .profile-avatar { display: none; }
  .header-end { grid-column: 2; grid-row: 1; gap: 0; }
  #themeToggle { height: 38px; width: 38px; }
  .page { padding: 24px 14px 18px; }
  .page-heading { margin-bottom: 20px; gap: 10px; }
  .title-row { gap: 8px; }
  .page-icon { width: 30px; height: 30px; border-radius: 8px; }
  .page-icon svg { width: 17px; height: 17px; }
  h1 { font-size: 23px; }
  .title-tag { display: none; }
  .page-description { font-size: 11px; margin-top: 8px; }
  .page-heading > .button { padding: 10px 11px; font-size: 12px; }
  .mail-workspace { display: block; height: max(460px, calc(100dvh - 280px)); max-height: none; }
  .account-resizer { display: none; }
  .accounts-pane, .mail-content { height: 100%; }
  .mail-workspace[data-view="accounts"] .mail-content { display: none; }
  .mail-workspace:not([data-view="accounts"]) .accounts-pane { display: none; }
  .accounts-pane { padding-top: 16px; }
  .account-item { display: flex; align-items: center; gap: 6px; padding: 10px 8px; }
  .account-select { min-width: 0; flex: 1; }
  .account-actions { padding: 0; gap: 0; }
  .account-actions .icon-button { width: 35px; height: 44px; }
  .account-actions svg { width: 15px; height: 15px; }
  .accounts-footer { padding: 16px 2px; }
  .accounts-footer span, .accounts-footer .text-button { font-size: 10px; }
  .account-empty { padding-top: 80px; }
  .account-empty svg { width: 32px; height: 32px; margin-bottom: 16px; }
  .mobile-back { display: inline-grid; }
  .content-toolbar { padding: 17px 14px; }
  .toolbar-title h2 { font-size: 15px; }
  .content-toolbar .compact { min-height: 40px; }
  .mail-meta { padding: 0 16px 13px; font-size: 10px; }
  .mail-row { padding: 17px 14px; gap: 10px; }
  .sender-avatar { width: 30px; height: 30px; }
  .mail-detail { padding: 20px; }
  .mail-detail h2 { font-size: 20px; }
  .sender-line { flex-wrap: wrap; }
  .sender-line time { width: 100%; padding-left: 42px; }
  .detail-toolbar { padding: 12px; }
  .detail-toolbar .button { min-height: 44px; }
  .page-footnote { font-size: 9px; gap: 8px; }
  .heading-badge { display: none; }
  .code-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .code-card { padding: 18px; }
  .card-heading { margin-bottom: 22px; }
  .code-tabs { gap: 20px; }
  .code-tabs button { font-size: 12px; min-height: 44px; padding: 12px 0; }
  .code-result { margin-top: 18px; padding: 16px 12px; }
  .code-value { font-size: 36px; }
  .code-value.placeholder { font-size: 23px; }
  .code-value.digit-code { gap: 5px; }
  .code-digit { width: 38px; height: 52px; font-size: 28px; border-radius: 6px; }
  .code-display-wrap { padding: 26px 0; }
  .code-actions .button { flex: 1; min-width: 0; padding: 10px 9px; font-size: 12px; }
  .code-guide { padding: 22px; }
  .code-guide li p { font-size: 12px; }
  .guide-link { min-height: 44px; margin-top: 10px; }
  .modal { padding: 22px; }
  .modal h2 { font-size: 21px; }
  .toast { bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
