:root {
  --day-top: #d5e6f1;
  --day-bot: #f1f6f9;
  --day-ink: #1b2a33;
  --day-muted: #536570;
  --day-line: rgba(27, 42, 51, 0.13);
  --day-field: rgba(255, 255, 255, 0.62);
  --day-accent: #29698f;
  --day-danger: #ad3a2f;
  --day-scheme: light;
  --sun: #f0b13f;
  --sun-core: #fff3d6;
  --sun-glow: rgba(240, 177, 63, 0.34);

  --night-top: #0a1120;
  --night-bot: #18223a;
  --night-ink: #e1e8f2;
  --night-muted: #94a2b8;
  --night-line: rgba(225, 232, 242, 0.13);
  --night-field: rgba(255, 255, 255, 0.06);
  --night-accent: #a9c1ea;
  --night-danger: #ff9b8f;
  --moon: #f2e8cc;
  --moon-glow: rgba(242, 232, 204, 0.35);
  --star: rgba(242, 232, 204, 0.8);

  --pill-bg: rgba(255, 255, 255, 0.94);
  --pill-ink: #1b2a33;
  --pill-line: rgba(27, 42, 51, 0.12);
  --pill-shadow: rgba(10, 17, 32, 0.16);
  --page: #0a1120;
  --top-bg: var(--night-top);
  --bottom-bg: var(--day-bot);

  --font-serif: "Songti SC", "STSong", "Source Han Serif SC", serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-md: 0.9375rem;
  --fs-clock: 2.75rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --day-top: #1c2f42;
    --day-bot: #24384b;
    --day-ink: #d8e2eb;
    --day-muted: #9aabba;
    --day-line: rgba(216, 226, 235, 0.12);
    --day-field: rgba(255, 255, 255, 0.05);
    --day-accent: #9cc8ec;
    --day-danger: #ff9b8f;
    --day-scheme: dark;
    --sun: #d39c48;
    --sun-core: #ecc98a;
    --sun-glow: rgba(211, 156, 72, 0.18);
    --night-top: #060a12;
    --night-bot: #0e1524;
    --night-ink: #c8d2e0;
    --night-muted: #8591a5;
    --night-line: rgba(200, 210, 224, 0.1);
    --night-field: rgba(255, 255, 255, 0.04);
    --night-accent: #8fa9d6;
    --moon: #d6cdb2;
    --moon-glow: rgba(214, 205, 178, 0.18);
    --star: rgba(214, 205, 178, 0.5);
    --pill-bg: rgba(15, 22, 35, 0.94);
    --pill-ink: #d0d9e4;
    --pill-line: rgba(208, 217, 228, 0.12);
    --pill-shadow: rgba(0, 0, 0, 0.4);
    --page: #060a12;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  height: 100%;
  box-sizing: border-box;
  background: linear-gradient(to bottom, var(--top-bg) 50%, var(--bottom-bg) 50%);
}
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--page);
  color: var(--night-ink);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

.app-view {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Each half is one person's sky. */
.half {
  flex: 1 1 0;
  min-height: 210px;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: var(--ink);
}
.half.day {
  --sky-top: var(--day-top);
  --sky-bot: var(--day-bot);
  --ink: var(--day-ink);
  --muted: var(--day-muted);
  --line: var(--day-line);
  --field: var(--day-field);
  --accent: var(--day-accent);
  --danger: var(--day-danger);
  color-scheme: var(--day-scheme);
  background: linear-gradient(180deg, var(--sky-top), var(--sky-bot));
}
.half.night {
  --sky-top: var(--night-top);
  --sky-bot: var(--night-bot);
  --ink: var(--night-ink);
  --muted: var(--night-muted);
  --line: var(--night-line);
  --field: var(--night-field);
  --accent: var(--night-accent);
  --danger: var(--night-danger);
  color-scheme: dark;
  background:
    radial-gradient(circle 1.3px at 58% 18px, var(--star) 98%, transparent 100%),
    radial-gradient(circle 1px at 66% 44px, var(--star) 98%, transparent 100%),
    radial-gradient(circle 1.5px at 73% 12px, var(--star) 98%, transparent 100%),
    radial-gradient(circle 1px at 80% 62px, var(--star) 98%, transparent 100%),
    radial-gradient(circle 1.2px at 69% 74px, var(--star) 98%, transparent 100%),
    radial-gradient(circle 1px at 52% 52px, var(--star) 98%, transparent 100%),
    linear-gradient(180deg, var(--sky-top), var(--sky-bot));
}
.half-in {
  max-width: 540px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
  display: grid;
  gap: 16px;
}
#top .half-in { padding-block: 64px 34px; }
#bottom .half-in { padding-block: 32px 24px; }

.hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.hd-main { min-width: 0; display: grid; gap: 6px; }
.clock {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: var(--fs-clock);
  line-height: 1;
  letter-spacing: 0.01em;
  font-variant-numeric: lining-nums tabular-nums;
}
.who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; background: var(--line); flex: none; display: block; }
.name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--fs-md);
  letter-spacing: 0.02em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.me { flex: none; font-size: var(--fs-xs); color: var(--muted); }
.sub { font-size: var(--fs-xs); color: var(--muted); letter-spacing: 0.03em; }
.orb { flex: none; width: 40px; height: 40px; border-radius: 50%; margin-top: 4px; }
.orb.sun {
  background: radial-gradient(circle at 50% 50%, var(--sun-core) 0%, var(--sun) 62%);
  box-shadow: 0 0 0 7px var(--sun-glow), 0 0 34px 12px var(--sun-glow);
}
.orb.moon {
  background: transparent;
  box-shadow: inset 11px -5px 0 0 var(--moon);
  transform: rotate(-14deg);
  filter: drop-shadow(0 0 8px var(--moon-glow));
}

.group { display: grid; gap: 6px; }
.cap { font-size: var(--fs-xs); color: var(--muted); letter-spacing: 0.05em; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.it {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto auto;
  column-gap: 10px;
  align-items: baseline;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); transform: translateY(-0.2em); }
.dot.ring { background: transparent; box-shadow: inset 0 0 0 1.5px var(--accent); }
.txt { min-width: 0; overflow-wrap: anywhere; }
.meta { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.empty { margin: 0; color: var(--muted); font-size: var(--fs-sm); }

.notes { display: grid; gap: 7px; padding-top: 12px; border-top: 1px solid var(--line); }
.note { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; align-items: baseline; font-size: var(--fs-sm); }
.note-main { min-width: 0; display: grid; gap: 4px; }
.note-body { margin: 0; min-width: 0; overflow-wrap: anywhere; line-height: 1.55; }
.note-body b { color: var(--accent); font-weight: 600; margin-right: 6px; }
.note-side { display: inline-flex; align-items: center; gap: 2px; }
.note-quote, .reply-original {
  border-left: 3px solid var(--day-accent);
  border-radius: 0 10px 10px 0;
  background: rgba(127, 127, 127, 0.1);
  color: color-mix(in srgb, var(--pill-ink) 74%, transparent);
  overflow-wrap: anywhere;
}
.note-quote {
  display: grid;
  gap: 2px;
  padding: 5px 8px;
  font-size: var(--fs-xs);
  line-height: 1.45;
}
.note-quote b { color: var(--accent); font-weight: 600; }
.note-unread {
  color: var(--accent);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.note-reply { font-size: var(--fs-xs); color: var(--accent); opacity: 1; }

.compose {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--field);
  border-radius: 999px;
  padding: 3px 3px 3px 16px;
}
.compose:focus-within { border-color: var(--accent); }
.compose input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  padding: 6px 0;
}
.compose input::placeholder { color: var(--muted); opacity: 1; }
.send {
  flex: none;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  min-height: 44px;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.send:disabled { opacity: 0.45; cursor: wait; }
.send:focus-visible, .x:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.x {
  appearance: none;
  background: none;
  border: 1px solid transparent;
  color: var(--muted);
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 5px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  opacity: 0.7;
  align-self: center;
}
.x:hover { color: var(--danger); opacity: 1; }
.x.armed { font-size: var(--fs-xs); color: var(--danger); border-color: currentColor; padding: 2px 6px; opacity: 1; }

.seam { flex: none; height: 0; position: relative; z-index: 5; }
.pill {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  padding: 2px;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--pill-ink);
  border: 1px solid var(--pill-line);
  box-shadow: 0 4px 16px var(--pill-shadow);
  white-space: nowrap;
}
.pill button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: var(--fs-sm);
  line-height: 1.4;
  min-height: 44px;
  padding: 3px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.pill .arrow { font-size: 1rem; padding: 2px 10px; }
.pill .when { min-width: 4.6em; letter-spacing: 0.08em; }
.pill button:disabled { opacity: 0.28; cursor: default; }
.pill .when:disabled { opacity: 1; }
.pill button:focus-visible { outline: 2px solid var(--pill-ink); outline-offset: -2px; }

.toast, .notice {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(500px, calc(100% - 32px));
  background: var(--pill-bg);
  color: var(--pill-ink);
  border: 1px solid var(--pill-line);
  box-shadow: 0 4px 16px var(--pill-shadow);
  padding: 9px 14px;
  border-radius: 12px;
  font-size: var(--fs-sm);
  z-index: 40;
  margin: 0;
}
.toast { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
.notice {
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.toast:not([hidden]) ~ .notice { display: none; }
.notice button {
  min-height: 44px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 4px 12px;
  cursor: pointer;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.it.fresh { animation: rise 420ms ease both; }
@media (prefers-reduced-motion: reduce) {
  .it.fresh { animation: none; }
}

.top-actions {
  position: fixed;
  z-index: 35;
  top: max(8px, env(safe-area-inset-top, 0px));
  right: max(10px, env(safe-area-inset-right, 0px));
  display: flex;
  gap: 6px;
}
.account-button {
  min-width: 58px;
  min-height: 44px;
  border: 1px solid var(--pill-line);
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--pill-ink);
  box-shadow: 0 4px 16px var(--pill-shadow);
  font: inherit;
  font-size: var(--fs-sm);
  padding: 6px 14px;
  cursor: pointer;
}
.account-button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.auth-view {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: max(20px, env(safe-area-inset-top, 0px)) 16px max(20px, env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(circle at 78% 18%, var(--sun-glow), transparent 24%),
    linear-gradient(165deg, var(--night-top), var(--night-bot) 56%, var(--day-top));
}
.auth-card {
  width: min(392px, 100%);
  margin: auto;
  padding: 30px 26px;
  border-radius: 26px;
  background: var(--pill-bg);
  color: var(--pill-ink);
  border: 1px solid var(--pill-line);
  box-shadow: 0 24px 80px var(--pill-shadow);
}
.auth-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; }
.auth-mark {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  box-shadow: 0 8px 22px var(--pill-shadow);
  flex: none;
}
.auth-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  font-weight: 600;
  color: color-mix(in srgb, var(--pill-ink) 58%, transparent);
}
.auth-card h1, .auth-card h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0.06em;
}
.auth-card h1 { font-size: 2.15rem; line-height: 1.2; }
.auth-card h2 { font-size: 1.55rem; }
.auth-intro { margin: 7px 0 22px; color: color-mix(in srgb, var(--pill-ink) 65%, transparent); font-size: var(--fs-sm); }
.auth-card form { display: grid; gap: 15px; }
.user-choice { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.user-choice legend, .field > span { font-size: var(--fs-xs); letter-spacing: 0.05em; color: color-mix(in srgb, var(--pill-ink) 65%, transparent); margin-bottom: 6px; }
.user-choice label { position: relative; display: block; min-width: 0; cursor: pointer; }
.user-choice input { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.user-card {
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--pill-line);
  border-radius: 14px;
  background: rgba(127, 127, 127, 0.08);
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.user-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  background: color-mix(in srgb, var(--day-accent) 16%, transparent);
  color: var(--day-accent);
  font-family: var(--font-serif);
  font-size: 1rem;
}
.user-copy { display: grid; min-width: 0; line-height: 1.2; text-align: left; }
.user-copy strong { font-family: var(--font-serif); font-size: 1rem; }
.user-copy small { color: color-mix(in srgb, var(--pill-ink) 58%, transparent); font-size: 0.68rem; }
.user-choice input:checked + .user-card { background: var(--pill-ink); color: var(--pill-bg); border-color: var(--pill-ink); }
.user-choice input:checked + .user-card .user-avatar {
  background: color-mix(in srgb, var(--pill-bg) 18%, transparent);
  color: var(--pill-bg);
}
.user-choice input:checked + .user-card .user-copy small { color: color-mix(in srgb, var(--pill-bg) 68%, transparent); }
.user-choice input:checked + .user-card::after {
  content: "✓";
  position: absolute;
  top: 5px;
  right: 7px;
  font-size: 0.72rem;
  font-weight: 700;
}
.user-choice input:focus-visible + .user-card { outline: 2px solid var(--pill-ink); outline-offset: 2px; }
.field { display: grid; gap: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--pill-line);
  border-radius: 10px;
  background: rgba(127, 127, 127, 0.12);
  color: var(--pill-ink);
  font: inherit;
  font-size: 16px;
  padding: 9px 12px;
}
.field textarea { min-height: 82px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--pill-ink); outline-offset: 1px; }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 66px; }
.password-toggle {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 58px;
  min-height: 44px;
  border: 0;
  border-radius: 0 10px 10px 0;
  background: transparent;
  color: color-mix(in srgb, var(--pill-ink) 70%, transparent);
  font: inherit;
  font-size: var(--fs-xs);
  cursor: pointer;
}
.password-toggle:focus-visible { outline: 2px solid var(--pill-ink); outline-offset: -3px; }
.auth-hint { margin: -6px 0 0; color: color-mix(in srgb, var(--pill-ink) 56%, transparent); font-size: var(--fs-xs); }
.primary-button, .secondary-button, .danger-button, .link-button {
  min-height: 44px;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
}
.primary-button {
  border: 1px solid var(--pill-ink);
  background: var(--pill-ink);
  color: var(--pill-bg);
  font-weight: 600;
  padding: 9px 16px;
}
.secondary-button {
  border: 1px solid var(--pill-line);
  background: transparent;
  color: var(--pill-ink);
  padding: 9px 14px;
}
.danger-button {
  border: 1px solid currentColor;
  background: transparent;
  color: var(--day-danger);
  padding: 9px 14px;
}
.link-button {
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 6px;
}
.primary-button:disabled, .secondary-button:disabled, .danger-button:disabled { opacity: 0.5; cursor: wait; }
.auth-error { margin: 0; color: var(--day-danger); font-size: var(--fs-sm); }
.auth-switch { margin: 0; font-size: var(--fs-sm); color: color-mix(in srgb, var(--pill-ink) 65%, transparent); }
.password-note { margin: -8px 0 0; font-size: var(--fs-sm); color: color-mix(in srgb, var(--pill-ink) 65%, transparent); }
.auth-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; }
.auth-footer-center { justify-content: center; gap: 22px; margin-top: 18px; }

#account-dialog, .guide-dialog, .reply-dialog, .notifications-dialog {
  max-height: 88dvh;
  padding: 0;
  border: 1px solid var(--pill-line);
  border-radius: 22px;
  background: var(--pill-bg);
  color: var(--pill-ink);
  box-shadow: 0 24px 80px var(--pill-shadow);
  overflow: hidden;
}
#account-dialog { width: min(420px, calc(100vw - 32px)); }
.guide-dialog { width: min(640px, calc(100vw - 32px)); }
.reply-dialog, .notifications-dialog { width: min(440px, calc(100vw - 32px)); }
#account-dialog::backdrop, .guide-dialog::backdrop, .reply-dialog::backdrop, .notifications-dialog::backdrop { background: rgba(4, 8, 16, 0.52); backdrop-filter: blur(4px); }
#account-dialog[open], .guide-dialog[open], .reply-dialog[open], .notifications-dialog[open] { display: flex; flex-direction: column; }
.dialog-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--pill-line);
}
.dialog-head h2 { margin: 0; font-family: var(--font-serif); font-size: 1.15rem; }
.dialog-body { overflow-y: auto; overscroll-behavior: contain; padding: 6px 18px 20px; }
.dialog-section { display: grid; gap: 10px; padding: 16px 0; border-bottom: 1px solid var(--pill-line); }
.dialog-section:last-child { border-bottom: 0; }
.dialog-section h3 { margin: 0; font-size: var(--fs-sm); letter-spacing: 0.04em; }
.dialog-section form { display: grid; gap: 10px; }
.dialog-section .field > span { color: color-mix(in srgb, var(--pill-ink) 65%, transparent); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-heading .link-button { font-size: var(--fs-xs); }
.guide-steps { margin: 0; padding-left: 1.25em; display: grid; gap: 6px; color: color-mix(in srgb, var(--pill-ink) 78%, transparent); font-size: var(--fs-sm); }
.guide-steps.compact { gap: 3px; font-size: var(--fs-xs); }
.guide-steps li::marker { color: var(--day-accent); font-weight: 700; }
.tool-list { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; color: color-mix(in srgb, var(--pill-ink) 78%, transparent); font-size: var(--fs-sm); }
.tool-list li::marker { color: var(--day-accent); }
.tool-list strong { color: var(--pill-ink); font-weight: 600; }
.tool-list code, .muted-copy code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; }
.guide-details { border: 1px solid var(--pill-line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 9px; }
.guide-details summary { cursor: pointer; font-size: var(--fs-sm); font-weight: 600; }
.guide-details[open] summary { margin-bottom: 8px; }
.guide-toc {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 9px 18px 10px;
  background: var(--pill-bg);
  border-bottom: 1px solid var(--pill-line);
}
.guide-toc button {
  min-height: 44px;
  border: 1px solid var(--pill-line);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: var(--fs-xs);
  padding: 4px 12px;
  cursor: pointer;
}
.guide-toc button:hover { background: color-mix(in srgb, var(--pill-ink) 7%, transparent); }
.guide-section { display: grid; gap: 10px; padding: 18px 0; border-bottom: 1px solid var(--pill-line); scroll-margin-top: 8px; }
.guide-section:last-child { border-bottom: 0; }
.guide-section h3 { margin: 0; font-family: var(--font-serif); font-size: 1.12rem; letter-spacing: 0.03em; }
.guide-section p { margin: 0; font-size: var(--fs-sm); color: color-mix(in srgb, var(--pill-ink) 78%, transparent); }
.reply-form { display: grid; gap: 12px; margin-top: 14px; }
.reply-original {
  margin: 14px 0 0;
  padding: 10px 12px;
  font-size: var(--fs-sm);
  line-height: 1.55;
}
.guide-code {
  margin: 0;
  padding: 12px;
  overflow-x: auto;
  border-radius: 10px;
  background: color-mix(in srgb, var(--pill-ink) 7%, transparent);
  color: var(--pill-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--fs-xs);
  line-height: 1.5;
}
.mono-inline {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.94em;
  overflow-wrap: anywhere;
}
.notification-button { position: relative; }
.unread-badge {
  position: absolute;
  top: -5px;
  right: -4px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 2px solid var(--pill-bg);
  border-radius: 999px;
  background: var(--day-accent);
  color: var(--pill-bg);
  font-size: 0.64rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.notification-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 12px 0 6px;
}
.notification-toolbar .secondary-button { flex: none; font-size: var(--fs-xs); padding: 6px 12px; }
.notification-list { list-style: none; padding: 0; margin: 0; display: grid; }
.notification-item { display: grid; gap: 7px; padding: 13px 0; border-bottom: 1px solid var(--pill-line); }
.notification-item:last-child { border-bottom: 0; }
.notification-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.notification-author { font-family: var(--font-serif); font-weight: 600; font-size: var(--fs-sm); }
.notification-text { margin: 0; font-size: var(--fs-sm); line-height: 1.55; overflow-wrap: anywhere; color: color-mix(in srgb, var(--pill-ink) 82%, transparent); }
.notification-actions { display: flex; justify-content: flex-end; }
.notification-actions .secondary-button { font-size: var(--fs-xs); }
.notifications-dialog .empty { padding: 18px 0; text-align: center; }
.inline-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-row > input { flex: 1 1 150px; }
.muted-copy { margin: 0; color: color-mix(in srgb, var(--pill-ink) 65%, transparent); font-size: var(--fs-sm); }
.mono {
  display: block;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--fs-xs);
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  padding: 8px 10px;
}
.token-output, .mcp-config {
  width: 100%;
  border: 1px solid var(--pill-line);
  border-radius: 10px;
  background: rgba(127, 127, 127, 0.12);
  color: var(--pill-ink);
  padding: 9px 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--fs-xs);
  line-height: 1.45;
  resize: vertical;
}
.mcp-config { min-height: 132px; }
.token-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.token-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: var(--fs-sm); }
.token-list button { min-height: 44px; }
.install-list { margin: 0; padding-left: 1.2em; color: color-mix(in srgb, var(--pill-ink) 65%, transparent); font-size: var(--fs-sm); }
.install-list li + li { margin-top: 6px; }
.section-error { margin: 0; color: var(--day-danger); font-size: var(--fs-sm); }
.section-status { margin: 0; color: var(--day-accent); font-size: var(--fs-sm); }
.danger-zone { display: flex; justify-content: flex-end; }

@media (max-height: 560px) {
  :root { --fs-clock: 2rem; }
  .half { min-height: 0; }
  .half-in { gap: 8px; }
  #top .half-in { padding-block: 54px 16px; }
  #bottom .half-in { padding-block: 20px 14px; }
}

@media (max-width: 360px) {
  .auth-card { padding: 22px 18px; }
  .auth-card h1 { font-size: 1.7rem; }
  .user-choice { grid-template-columns: 1fr; }
}
