/* AllWake for the web. Calm system type, one soft blue accent, plenty of space. */
:root {
  --bg: #f5f5f7; --sidebar: #eeeef1; --card: #ffffff; --text: #1c1c1e; --muted: #6e6e73; --faint: #8a8a8e;
  --line: rgba(60, 60, 67, 0.14); --accent: #2f7cf6; --accent-soft: rgba(47, 124, 246, 0.12); --danger: #e5484d; --ok: #30a46c;
  --hover: rgba(60, 60, 67, 0.07); --select: rgba(47, 124, 246, 0.14); --shadow: 0 8px 30px rgba(0, 0, 0, 0.14);
  --yellow: #f5c518; --red: #f2554d; --teal: #2bb3c0; --green: #4cc38a; --purple: #a05fe0; --orange: #f29a3e; --brown: #b08968;
  --r-yellow: #f0be1b; --r-orange: #f08a24; --r-coral: #ee5a48; --r-pink: #de4f8c; --r-violet: #7b5bd9; --r-blue: #3a7bea; --r-cyan: #22b0d8; --r-teal: #12a08f; --r-green: #48a64a; --r-slate: #6e7b91;
  --cover-dusk: #d9e1f1; --cover-sage: #dae8de; --cover-rose: #ebdadf; --cover-mist: #d6e7eb; --cover-lilac: #e4dff3; --cover-sand: #e8e4d6;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #000000; --sidebar: #161618; --card: #1c1c1e; --text: #f5f5f7; --muted: #a1a1a6; --faint: #8e8e93; --line: rgba(235, 235, 245, 0.16);
    --accent: #4d94ff; --accent-soft: rgba(77, 148, 255, 0.18); --hover: rgba(235, 235, 245, 0.08); --select: rgba(77, 148, 255, 0.22); --shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  --cover-dusk: #2b3659; --cover-sage: #26392f; --cover-rose: #402e38; --cover-mist: #243a41; --cover-lilac: #34315b; --cover-sand: #3b392a;
  }
}
:root[data-theme='dark'] {
  --bg: #000000; --sidebar: #161618; --card: #1c1c1e; --text: #f5f5f7; --muted: #a1a1a6; --faint: #8e8e93; --line: rgba(235, 235, 245, 0.16);
  --accent: #4d94ff; --accent-soft: rgba(77, 148, 255, 0.18); --hover: rgba(235, 235, 245, 0.08); --select: rgba(77, 148, 255, 0.22); --shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  --cover-dusk: #2b3659; --cover-sage: #26392f; --cover-rose: #402e38; --cover-mist: #243a41; --cover-lilac: #34315b; --cover-sand: #3b392a;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--font); font-size: 16px; line-height: 1.4; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: 0.4; cursor: default; }
input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.icon { flex: none; vertical-align: middle; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Layout: sidebar | list | detail, like the iPad app. */
.app { display: grid; height: 100%; height: 100dvh; grid-template-columns: 280px minmax(300px, 380px) 1fr; background: var(--bg); }
.app.span2 { grid-template-columns: 280px 1fr; }
.app.span2 > .list-pane { display: none; }
.pane { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.sidebar { background: var(--sidebar); border-right: 1px solid var(--line); padding-top: var(--safe-top); }
.list-pane { border-right: 1px solid var(--line); padding-top: var(--safe-top); }
.detail-pane { background: var(--bg); padding-top: var(--safe-top); }
.scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.pane-header { display: flex; align-items: center; gap: 4px; padding: 10px 12px 4px; min-height: 52px; }
.brand-logo { width: 34px; height: 34px; border-radius: 8px; margin-right: 10px; flex: none; }
.pane-header h1 { font-size: 28px; font-weight: 700; margin: 0; letter-spacing: -0.02em; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; border-radius: 10px; color: var(--accent); }
.icon-button:hover { background: var(--hover); }
.text-button { color: var(--accent); padding: 8px 10px; border-radius: 8px; min-height: 40px; }
.text-button:hover { background: var(--hover); }
.text-button.strong { font-weight: 600; }

.file-card { display: flex; align-items: center; gap: 12px; width: min(100%, 440px); min-height: 68px; margin-block: 4px; padding: 8px; text-align: left; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.file-card:hover { background: var(--hover); }
.file-card-thumb { display: grid; flex: 0 0 55px; width: 55px; height: 50px; place-items: center; overflow: hidden; border-radius: 8px; color: var(--accent); background: var(--accent-soft); }
.file-card-thumb canvas { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.file-card-snippet { white-space: pre-line; overflow: hidden; padding: 3px; color: var(--text); font-size: 7px; line-height: 1.1; overflow-wrap: anywhere; }
.file-card-caption { display: grid; gap: 2px; flex: 1; min-width: 0; }
.file-card-title { font-size: 0.94rem; font-weight: 650; overflow-wrap: anywhere; }
.file-card-meta, .speech-caption span { color: var(--muted); font-size: 0.78rem; }
.file-card > .icon { color: var(--muted); }
.read-aloud-player { position: fixed; z-index: 40; inset-inline: max(10px, (100vw - 620px) / 2); bottom: calc(10px + var(--safe-bottom)); display: flex; flex-wrap: wrap; align-items: center; gap: 3px; min-height: 56px; padding: 5px 8px 5px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.speech-caption { display: grid; flex: 1 0 115px; min-width: 0; overflow-wrap: anywhere; }
.read-aloud-player select { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 4px; }
.text-button.danger { color: var(--danger); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.back { display: none; }

@media (max-width: 1099px) {
  .app { grid-template-columns: 1fr; }
  .app.span2 { grid-template-columns: 1fr; }
  .app > .pane { display: none; }
  .app[data-pane='sidebar'] > .sidebar, .app[data-pane='list'] > .list-pane, .app[data-pane='detail'] > .detail-pane { display: flex; }
  .sidebar, .list-pane { border-right: 0; }
  .back { display: inline-flex; }
}
@media (min-width: 700px) and (max-width: 1099px) {
  .app { grid-template-columns: minmax(300px, 360px) 1fr; }
  .app > .sidebar { display: none; position: fixed; inset: 0 auto 0 0; width: min(320px, 86vw); z-index: 30; box-shadow: var(--shadow); }
  .app.sidebar-open > .sidebar { display: flex; }
  .app > .list-pane, .app > .detail-pane { display: flex; }
  .app.span2 { grid-template-columns: 1fr; }
  .app.span2 > .list-pane { display: none; }
  .back-sidebar { display: inline-flex; }
}
.back-sidebar { display: none; }
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.3); z-index: 25; }

/* Sidebar */
.side-title { padding: 14px 16px 6px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: none; }
.side-group { padding: 0 8px; }
.side-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border-radius: 10px; text-align: left; min-height: 40px; }
.side-item:hover { background: var(--hover); }
.side-item.active { background: var(--select); }
.side-item .icon { color: var(--accent); }
.side-item .count { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 14px; }
.side-item .badge { margin-left: auto; font-size: 12px; font-weight: 600; background: var(--red); color: #fff; padding: 2px 8px; border-radius: 99px; }
.side-sep { height: 12px; }
.c-yellow { color: var(--yellow) !important; } .c-red { color: var(--red) !important; } .c-teal { color: var(--teal) !important; } .c-green { color: var(--green) !important; }
.c-purple { color: var(--purple) !important; } .c-orange { color: var(--orange) !important; } .c-brown { color: var(--brown) !important; } .c-faint { color: var(--faint) !important; } .c-blue { color: var(--accent) !important; }

/* List */
.search { margin: 4px 12px 8px; display: flex; align-items: center; gap: 8px; background: var(--hover); border-radius: 10px; padding: 0 10px; min-height: 38px; color: var(--muted); }
.search input { flex: 1; background: none; border: 0; outline: 0; min-width: 0; min-height: 38px; }
.section-title { padding: 14px 16px 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.list-card { background: var(--card); margin: 0 12px; border-radius: 14px; overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; width: 100%; text-align: left; min-height: 52px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--hover); }
.row.active { background: var(--select); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .progress { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.row .snippet mark { background: var(--accent-soft); color: inherit; border-radius: 3px; }
.empty { text-align: center; color: var(--muted); padding: 60px 30px; }
.empty .icon { color: var(--faint); margin-bottom: 8px; }
.empty h2 { font-size: 18px; margin: 4px 0; color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; background: var(--hover); color: var(--muted); border-radius: 99px; padding: 3px 10px; min-height: 28px; }
.chip.accent { background: var(--accent-soft); color: var(--accent); }
.chip.suggest { background: transparent; border: 1px dashed var(--accent); color: var(--accent); }
.chip.warn { background: rgba(242, 85, 77, 0.14); color: var(--red); }
.agenda-chips { margin-top: 4px; gap: 4px; }
.agenda-chip { min-height: 20px; padding: 2px 6px; font-size: 11px; }
.agenda-chip.project { background: color-mix(in srgb, var(--orange) 16%, transparent); }
.agenda-chip.context { background: color-mix(in srgb, var(--purple) 16%, transparent); }
button.chip:hover { filter: brightness(0.96); }

/* Switch */
.switch { position: relative; width: 51px; height: 31px; flex: none; border-radius: 99px; background: rgba(120, 120, 128, 0.32); transition: background 0.18s; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.18s; }
.switch[aria-checked='true'] { background: var(--ok); }
.switch[aria-checked='true']::after { transform: translateX(20px); }

/* Detail: the note */
.detail-top { display: flex; align-items: center; gap: 4px; padding: 8px 12px; min-height: 52px; }
.detail-top .spacer { flex: 1; }
.note-wrap { max-width: 760px; margin: 0 auto; padding: 8px 24px 140px; width: 100%; }
.note-title { width: 100%; font-size: 32px; font-weight: 700; letter-spacing: -0.02em; background: none; border: 0; outline: 0; padding: 6px 0; margin: 0; }
.note-title::placeholder { color: var(--faint); }
.tagbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 16px; align-items: center; }
.blocks { position: relative; }
.block { position: relative; border-radius: 8px; }
.block .grip { position: absolute; left: -30px; top: 6px; opacity: 0; width: 24px; height: 28px; display: flex; align-items: center; justify-content: center; color: var(--faint); cursor: grab; border-radius: 6px; }
.block:hover .grip, .block:focus-within .grip { opacity: 1; }
.block .grip:hover { background: var(--hover); }
.block.drop-before::before { content: ''; position: absolute; left: 0; right: 0; top: -2px; height: 3px; background: var(--accent); border-radius: 2px; }
.block.dragging { opacity: 0.4; }
.block-body { min-height: 28px; }
.line { display: flex; align-items: flex-start; gap: 6px; padding: 3px 0; }
.line .text { flex: 1; min-width: 0; padding: 4px 0; overflow-wrap: anywhere; cursor: text; }
.line.heading .text { font-weight: 700; }
.h1 .text { font-size: 28px; line-height: 1.2; margin-top: 10px; } .h2 .text { font-size: 22px; margin-top: 8px; } .h3 .text { font-size: 18px; margin-top: 6px; }
.h4 .text, .h5 .text, .h6 .text { font-size: 16px; }
.check { width: 34px; height: 34px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--faint); border-radius: 50%; }
.check:hover { color: var(--accent); }
.check.on { color: var(--accent); }
.done-text { text-decoration: line-through; color: var(--muted); }
.bullet-mark { width: 24px; flex: none; text-align: center; color: var(--muted); padding-top: 4px; }
.sub-count { font-size: 12px; color: var(--muted); padding: 7px 4px 0; font-variant-numeric: tabular-nums; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.wl { text-decoration: none; border-radius: 4px; }
.wl::before { content: ''; display: inline-block; width: 0.9em; height: 0.9em; margin-right: 0.25em; vertical-align: -0.1em; background: currentColor; mask: var(--wl-icon) center / contain no-repeat; -webkit-mask: var(--wl-icon) center / contain no-repeat; }
.wl-note { --wl-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3C/svg%3E"); }
.wl-newnote { --wl-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
.wl-heading { --wl-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M4 9h16M4 15h16M10 3L8 21M16 3l-2 18'/%3E%3C/svg%3E"); }
.wl-alarm { --wl-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='13' r='8'/%3E%3Cpath d='M12 9v4l2 2M5 3L2 6M22 6l-3-3'/%3E%3C/svg%3E"); }
.wl-timer { --wl-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M10 2h4M12 14l3-3'/%3E%3Ccircle cx='12' cy='14' r='8'/%3E%3C/svg%3E"); }
.wl-event { --wl-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E"); }
.wl-file { --wl-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='m21.4 11-9.2 9.2a6 6 0 0 1-8.5-8.5l9.2-9.2a4 4 0 0 1 5.7 5.7l-9.2 9.2a2 2 0 0 1-2.8-2.8l8.5-8.5'/%3E%3C/svg%3E"); }
code, .code { font-family: var(--mono); font-size: 0.9em; background: var(--hover); padding: 1px 5px; border-radius: 5px; }
.line-input { flex: 1; width: 100%; resize: none; border: 0; outline: 0; background: none; padding: 4px 0; overflow: hidden; display: block; line-height: inherit; font-size: inherit; font-weight: inherit; font-family: inherit; }
.media-card { margin: 6px 0; border-radius: 14px; overflow: hidden; }
.media-card img, .media-card video { display: block; max-width: 100%; max-height: 420px; border-radius: 14px; }
.media-card .caption { font-size: 13px; color: var(--muted); padding: 4px 2px; }
.audio-row { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 14px; padding: 8px 14px 8px 8px; margin: 4px 0; }
.audio-row audio { flex: 1; min-width: 0; height: 36px; }
.map-card { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 14px; padding: 12px 14px; margin: 6px 0; }
.map-card .pin { color: var(--red); }
.map-card .links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.add-row { display: flex; align-items: center; gap: 8px; color: var(--muted); padding: 10px 4px; min-height: 44px; }
.add-row:hover { color: var(--accent); }
.tail-click { min-height: 80px; cursor: text; }
.comment-dot { position: absolute; right: 0; top: 4px; }

/* Tables */
.table-block { margin: 10px 0; }
.table-scroll { overflow: auto; max-height: 440px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
table.sheet-table { border-collapse: separate; border-spacing: 0; font-size: 15px; min-width: 100%; }
.sheet-table th { position: sticky; top: 0; z-index: 2; background: var(--hover); color: var(--muted); font-weight: 600; font-size: 12.5px; height: 28px; padding: 0 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); user-select: none; cursor: context-menu; background-clip: padding-box; }
.sheet-table thead th { background: color-mix(in srgb, var(--card) 80%, var(--muted) 20%); }
.sheet-table th.rowhead { position: sticky; left: 0; z-index: 1; width: 34px; min-width: 34px; top: auto; background: color-mix(in srgb, var(--card) 80%, var(--muted) 20%); }
.sheet-table thead th.rowhead { z-index: 3; top: 0; }
.sheet-table td { min-width: 96px; height: 44px; padding: 0 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--card); white-space: nowrap; }
.sheet-table tr:last-child td, .sheet-table tr:last-child th { border-bottom: 0; }
.sheet-table tbody tr:first-child td { background: color-mix(in srgb, var(--card) 92%, var(--muted) 8%); font-weight: 600; }
.sheet-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.sheet-table td.formula { color: var(--accent); }
.sheet-table td.err { color: var(--red); text-align: center; }
.sheet-table td.sel { outline: 2px solid var(--accent); outline-offset: -2px; }
.sheet-table td input.cell { width: 100%; min-width: 80px; height: 100%; border: 0; background: none; outline: 0; padding: 0; text-align: inherit; }
.sheet-table td .check { width: 32px; height: 32px; }
.sheet-table td img { height: 36px; width: 36px; object-fit: cover; border-radius: 6px; vertical-align: middle; }
.table-foot { display: flex; align-items: center; gap: 14px; padding: 4px 2px; font-size: 14px; color: var(--accent); }
.table-foot button { display: inline-flex; align-items: center; gap: 4px; padding: 8px 4px; min-height: 36px; }
.table-foot .grow { flex: 1; }

/* Toolbars that float above the keyboard while typing */
.edit-toolbar { position: fixed; left: 50%; bottom: calc(14px + var(--safe-bottom)); transform: translateX(-50%); z-index: 40; max-width: calc(100vw - 20px); display: flex; align-items: center; gap: 2px; background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 22px; padding: 4px 6px; overflow-x: auto; }
.edit-toolbar button { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; min-height: 38px; border-radius: 12px; color: var(--text); font-weight: 600; flex: none; }
.edit-toolbar button:hover { background: var(--hover); }
.edit-toolbar button.on { background: var(--accent-soft); color: var(--accent); }
.edit-toolbar .sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; flex: none; }
.edit-toolbar .preview { color: var(--accent); font-size: 13px; font-weight: 600; padding: 0 8px; white-space: nowrap; }
.suggest-chip { display: inline-flex !important; gap: 6px; padding: 0 12px; background: var(--accent-soft); color: var(--accent) !important; max-width: 260px; }
.suggest-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Menus and sheets */
.popover { position: fixed; z-index: 60; }
.menu { background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 5px; min-width: 210px; max-width: 320px; max-height: 80vh; overflow-y: auto; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 9px; text-align: left; min-height: 40px; }
.menu-item:hover, .menu-item:focus-visible { background: var(--hover); outline: 0; }
.menu-item.destructive { color: var(--danger); }
.menu-item .menu-label { flex: 1; }
.menu-item .icon-space { width: 17px; flex: none; }
.menu-item .icon { color: var(--muted); }
.menu-item.destructive .icon { color: var(--danger); }
.menu-divider { height: 1px; background: var(--line); margin: 4px 6px; }
.menu-header { font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px 2px; }
.menu-sub-wrap { position: relative; }
.menu-sub-wrap > .submenu { display: none; position: absolute; left: calc(100% - 6px); top: -6px; }
@media (min-width: 701px) { .submenu.popover { display: block; z-index: 61; } }
@media (max-width: 700px) { .menu-sub-wrap > .submenu { position: static; display: block; box-shadow: none; border: 0; padding: 0 0 0 16px; background: none; backdrop-filter: none; } }
.backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.35); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.sheet { background: var(--bg); color: var(--text); border-radius: 18px; width: min(520px, 100%); max-height: min(88vh, 900px); display: flex; flex-direction: column; box-shadow: var(--shadow); overflow: hidden; }
.sheet.wide { width: min(760px, 100%); }
.sheet-header { display: flex; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); gap: 6px; background: var(--card); }
.sheet-title { flex: 1; text-align: center; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-side { min-width: 40px; }
.sheet-body { overflow-y: auto; padding: 14px; flex: 1; }
@media (max-width: 600px) { .backdrop { align-items: flex-end; padding: 0; } .sheet { width: 100%; border-radius: 18px 18px 0 0; max-height: 92vh; } }
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-bottom)); transform: translateX(-50%); z-index: 80; background: #2c2c2e; color: #fff; border-radius: 99px; padding: 10px 18px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 24px); }
.toast .text-button { color: #8ab4ff; padding: 4px 8px; min-height: 32px; }

/* Forms */
.form-group { background: var(--card); border-radius: 14px; margin: 0 0 16px; overflow: hidden; }
.form-title { font-size: 13px; color: var(--muted); padding: 0 14px 6px; font-weight: 600; }
.form-foot { font-size: 13px; color: var(--muted); padding: 6px 14px 0; }
.form-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 48px; border-bottom: 1px solid var(--line); }
.form-row[hidden] { display: none; }
.form-row:last-child { border-bottom: 0; }
.form-row label { flex: 1; }
.form-row input[type='text'], .form-row input[type='number'], .form-row input[type='time'], .form-row input[type='date'], .form-row select, .form-row input[type='search'], .form-row input[type='email'] { background: var(--hover); border: 0; border-radius: 8px; padding: 7px 10px; min-height: 34px; outline: 0; max-width: 60%; }
.form-row input.wide { flex: 1; max-width: none; }
.alarm-music-row { display: block; }
.alarm-music-field { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.alarm-music-field input { min-width: 0; min-height: 36px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--hover); }
.alarm-music-field .text-button { flex-shrink: 0; }
.form-row textarea { width: 100%; background: var(--hover); border: 0; border-radius: 8px; padding: 8px 10px; min-height: 90px; outline: 0; resize: vertical; font-family: var(--mono); font-size: 14px; }
.seg { display: inline-flex; background: var(--hover); border-radius: 9px; padding: 2px; gap: 2px; }
.seg button { padding: 6px 12px; border-radius: 7px; min-height: 30px; font-size: 14px; }
.seg button.on { background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); font-weight: 600; }
.day-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.day-picker button { width: 38px; height: 38px; border-radius: 50%; background: var(--hover); font-size: 13px; font-weight: 600; }
.day-picker button.on { background: var(--accent); color: #fff; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 16px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: #fff; font-weight: 600; border-radius: 12px; padding: 10px 18px; min-height: 44px; }
.button.secondary { background: var(--hover); color: var(--accent); }
.button.danger { background: rgba(229, 72, 77, 0.12); color: var(--danger); }

/* Alarms */
.alarm-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 76px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.alarm-row:last-child { border-bottom: 0; }
.alarm-row.off { opacity: 0.5; }
.alarm-time { font-size: 34px; font-weight: 300; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.alarm-label { font-size: 16px; color: var(--muted); margin-left: 6px; }
.alarm-meta { display: flex; gap: 12px; font-size: 13px; color: var(--muted); flex-wrap: wrap; margin-top: 2px; }
.alarm-meta span { display: inline-flex; align-items: center; gap: 4px; }
.notice { background: var(--accent-soft); color: var(--text); border-radius: 12px; padding: 10px 14px; margin: 4px 12px 10px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.notice .icon { color: var(--accent); margin-top: 2px; }

/* Timers */
.timer-stage { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 20px 16px 120px; }
.rings { position: relative; width: min(360px, 82vw); aspect-ratio: 1; }
.rings svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rings circle { fill: none; stroke-linecap: round; transition: stroke-dashoffset 0.25s linear; }
.rings .track { stroke: var(--hover); }
.rings-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; pointer-events: none; }
.rings-center .big { font-size: 46px; font-weight: 300; letter-spacing: -0.02em; }
.timer-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.timer-row:last-child { border-bottom: 0; }
.dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; width: 100%; max-width: 520px; }
.preset { background: var(--card); border-radius: 14px; padding: 14px 8px; text-align: center; font-weight: 600; }
.preset:hover { background: var(--accent-soft); color: var(--accent); }

/* Calendar */
.cal { padding: 8px 16px 40px; max-width: 1100px; margin: 0 auto; width: 100%; }
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.cal-head h2 { margin: 0 8px 0 0; font-size: 22px; flex: 1; min-width: 120px; }
.month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.month .dow { background: var(--card); text-align: center; font-size: 12px; color: var(--muted); padding: 6px 0; font-weight: 600; }
.month .day { background: var(--card); min-height: 92px; padding: 4px; text-align: left; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.month .day.other { background: color-mix(in srgb, var(--card) 70%, var(--bg) 30%); color: var(--faint); }
.month .day:hover { background: var(--accent-soft); }
.month .day .n { font-size: 13px; font-weight: 600; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.month .day.today .n { background: var(--accent); color: #fff; }
.pill { font-size: 11.5px; line-height: 1.3; border-radius: 5px; padding: 1px 5px; background: var(--accent-soft); color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.pill.alarm { background: rgba(242, 154, 62, 0.18); color: var(--orange); }
.pill.note { background: rgba(76, 195, 138, 0.18); color: var(--green); }
.week { display: grid; grid-template-columns: 52px repeat(7, 1fr); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); }
.week .col { border-left: 1px solid var(--line); position: relative; min-height: 960px; }
.week .head { text-align: center; padding: 6px 0; font-size: 13px; background: var(--card); border-bottom: 1px solid var(--line); }
.week .head.today { color: var(--accent); font-weight: 700; }
.week .hours { font-size: 11px; color: var(--muted); }
.week .hours div { height: 40px; padding: 0 6px; text-align: right; }
.week .slot { position: absolute; left: 2px; right: 2px; border-radius: 6px; padding: 2px 5px; font-size: 11.5px; overflow: hidden; background: var(--accent-soft); color: var(--accent); border-left: 3px solid var(--accent); }
.week .slot.alarm { background: rgba(242, 154, 62, 0.18); color: var(--orange); border-left-color: var(--orange); }
.agenda-day { margin: 10px 0 4px; font-weight: 600; }

/* Settings and help */
.page { max-width: 720px; margin: 0 auto; padding: 8px 20px 100px; width: 100%; }
.page h1 { font-size: 30px; margin: 8px 0 14px; letter-spacing: -0.02em; }
.help-topic { text-align: left; width: 100%; display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); min-height: 56px; }
.help-topic:last-child { border-bottom: 0; }
.help-topic:hover { background: var(--hover); }
.help-body h2 { margin: 22px 0 6px; font-size: 20px; }
.help-body .example { background: var(--card); border-radius: 12px; padding: 12px; margin: 8px 0; }
.help-view-snapshot { display: block; width: 100%; height: auto; margin: 0 0 12px; border-radius: 8px; border: 1px solid var(--line); }
.help-snapshot-link { display: block; width: fit-content; max-width: 100%; border-radius: 8px; }
.help-snapshot-link > img { width: auto; max-width: 100%; }
.help-body pre { font-family: var(--mono); font-size: 13px; background: var(--hover); border-radius: 8px; padding: 8px 10px; margin: 0 0 8px; overflow-x: auto; white-space: pre-wrap; }
.kbd { font-family: var(--mono); font-size: 12px; background: var(--hover); border-radius: 5px; padding: 1px 6px; }

/* Ringing */
.ring { position: fixed; inset: 0; z-index: 100; background: linear-gradient(180deg, #17203a, #05070f); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px; text-align: center; }
.ring .time { font-size: 86px; font-weight: 200; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ring .label { font-size: 22px; opacity: 0.85; }
.ring img.ring-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.45; z-index: -1; }
.ring .buttons { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.ring .big-button { min-width: 150px; min-height: 58px; border-radius: 99px; font-size: 18px; font-weight: 600; background: rgba(255, 255, 255, 0.16); color: #fff; padding: 0 26px; }
.ring .big-button.primary { background: #fff; color: #111; }
.ring .mission { background: rgba(255, 255, 255, 0.1); border-radius: 20px; padding: 18px 22px; display: flex; flex-direction: column; gap: 12px; align-items: center; min-width: min(420px, 86vw); }
.ring .mission .sum { font-size: 38px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ring .mission input { text-align: center; font-size: 26px; border-radius: 12px; border: 0; padding: 10px; width: 100%; background: rgba(255, 255, 255, 0.92); color: #111; outline: 0; }
.ring .progress-line { font-size: 14px; opacity: 0.75; }
.ring:has(.ring-music) { overflow-y: auto; justify-content: safe center; gap: 12px; }
.ring-music { width: min(100%, 420px); flex-shrink: 0; }
.ring-music iframe { display: block; width: 100%; height: 220px; border: 0; }
.ring-music a { color: inherit; display: inline-block; padding: 6px; }
.ring-music-status { font-size: 14px; }

/* Welcome and setup */
.hero { text-align: center; padding: 20px 10px; }
.hero .icon-big { width: 84px; height: 84px; border-radius: 20px; box-shadow: var(--shadow); margin-bottom: 10px; }
.review-step { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; width: 100%; min-height: 56px; }
.review-step:last-child { border-bottom: 0; }
.diff { font-family: var(--mono); font-size: 13px; white-space: pre-wrap; border-radius: 8px; padding: 6px 8px; margin: 4px 0; background: var(--hover); }
.diff.del { background: rgba(229, 72, 77, 0.12); } .diff.add { background: rgba(48, 164, 108, 0.14); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .app > .sidebar, .app > .list-pane, .detail-top, .edit-toolbar { display: none !important; } .app { display: block; height: auto; } }

/* Areas, projects and contexts */
.chip .chip-main { display: inline-flex; gap: 5px; align-items: center; color: inherit; }
.chip .chip-x { display: inline-flex; align-items: center; margin-left: 2px; padding: 2px; border-radius: 99px; color: inherit; opacity: 0.7; }
.chip .chip-x:hover { opacity: 1; background: var(--hover); }
.form-row select { max-width: 60%; margin-left: auto; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; }
.form-row.muted { color: var(--muted); }
.page .note-title { width: 100%; border: 0; outline: 0; background: transparent; font-size: 30px; font-weight: 700; padding: 4px 0 10px; letter-spacing: -0.02em; }

/* Table queries */
.query-block { margin: 8px 0; }
.q-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); padding: 2px 4px; }
.q-head .q-source { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 12px; }
.q-body { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.q-input { width: 100%; border: 0; outline: 0; background: transparent; font-family: var(--mono); font-size: 14px; line-height: 1.5; padding: 12px 14px; resize: vertical; color: var(--text); }
.q-scroll { overflow: auto; max-width: 100%; }
.q-table { border-collapse: collapse; font-size: 14px; min-width: 100%; }
.q-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.q-table td { padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.q-table tr:last-child td { border-bottom: 0; }
.q-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.q-scalar { font-size: 28px; font-weight: 700; padding: 6px 4px; font-variant-numeric: tabular-nums; }
.q-foot { color: var(--muted); font-size: 12px; padding: 6px 4px 0; }
.q-empty { color: var(--muted); padding: 8px 4px; }
.q-error { display: flex; gap: 8px; align-items: flex-start; color: var(--danger); padding: 6px 4px; }
.q-warn { display: flex; gap: 6px; align-items: flex-start; color: var(--orange, #b8860b); font-size: 13px; padding: 2px 4px 6px; }
.table-name { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); background: var(--hover); border-radius: 99px; padding: 2px 9px; cursor: text; }
.q-plan-head { display: flex; align-items: center; gap: 8px; padding: 4px 4px 2px; }
.q-plan-totals { padding: 2px 4px 6px; color: var(--muted); }
.q-plan-notes { list-style: none; margin: 0; padding: 4px 4px 8px; }
.q-plan-notes li { padding: 3px 0; }
.q-confirm { display: flex; align-items: center; gap: 8px; padding: 6px 4px; font-size: 14px; }

/* The guided tour */
.tour-head { margin: 6px 0 4px; display: flex; flex-direction: column; gap: 6px; }
.tour-card { margin: 0 0 6px; }
.tour-step { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.tour-step:last-child { border-bottom: 0; }
.tour-check { flex: none; width: 40px; height: 40px; display: grid; place-items: center; color: var(--faint); border-radius: 99px; }
.tour-check.on { color: var(--accent); }
.tour-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.tour-title { font-weight: 600; }
.tour-title.done { text-decoration: line-through; color: var(--muted); }
.query-button { margin: 6px 0; }
.query-button .button { display: inline-flex; gap: 8px; }
.sample-card { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.sample-card:last-child { border-bottom: 0; }
.sample-card .sample-body { flex: 1; min-width: 0; }
.sample-card .sample-title { font-weight: 600; }
.sample-card .sample-meta { color: var(--muted); font-size: 13px; }

.compass-page { max-width: 1180px; margin: 0 auto; padding: clamp(16px, 4vw, 44px); }
.compass-help { margin-left: auto; }
.compass-scroll { overflow: auto; }
.compass-controls, .compass-legend, .compass-goals { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 16px; }
.compass-views button[aria-current="page"] { border-bottom: 2px solid var(--accent); font-weight: 650; }
.compass-workspace { display: grid; grid-template-columns: minmax(135px, 19%) minmax(0, 1fr); gap: clamp(14px, 3vw, 34px); }
.compass-views { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 9px; }
.compass-views button { text-align: left; }
.compass-home { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr)); gap: 16px; }
.compass-card, .compass-lock, .compass-trial { padding: 14px; border: 1px solid var(--line); border-radius: 12px; margin: 10px 0; }
.compass-lock { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.compass-lock svg { vertical-align: middle; }
.compass-trial { color: var(--muted); }
.compass-chart { width: 100%; overflow: visible; display: block; margin: 10px 0; }
.compass-axis { font: 11px system-ui, sans-serif; fill: currentColor; }
.compass-chart [role="button"] { cursor: pointer; }
.compass-chart [role="button"]:focus-visible { outline: 2px solid currentColor; }
.compass-legend { list-style: none; padding: 0; font-size: 0.85rem; }
.compass-table { overflow-x: auto; margin: 10px 0; }
.compass-table table { width: 100%; border-collapse: collapse; }
.compass-table th, .compass-table td { padding: 8px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.compass-table th:first-child { min-width: 120px; }
.compass-tree details { padding: 7px 0 7px 16px; border-inline-start: 1px solid var(--line); }
.compass-dialog { display: grid; gap: 12px; padding: 10px; min-width: min(320px, 70vw); }
.compass-dialog label { display: grid; gap: 4px; }
.compass-controls select { max-width: 100%; }
@media (max-width: 700px) {
  .compass-workspace { display: block; }
  .compass-views { flex-direction: row; flex-wrap: wrap; padding-top: 0; margin-bottom: 16px; }
}
@media print {
  body:has(.compass-detail) #app { display: block; }
  body:has(.compass-detail) .sidebar, body:has(.compass-detail) .list-pane, body:has(.compass-detail) .detail-top,
  .compass-views, .compass-controls, .compass-detail button { display: none !important; }
  .compass-workspace { display: block; }
  .compass-scroll { overflow: visible; }
}
.compass-matrix { display: grid; grid-template-columns: repeat(5, minmax(98px, 1fr)); gap: 7px; overflow-x: auto; }
.compass-matrix[data-priority="true"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.compass-matrix-cell { padding: 10px; min-height: 90px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); }
.compass-matrix-cell h2 { font-size: .85rem; margin: 0 0 8px; }
.compass-matrix-item { display: block; max-width: 100%; border: 0; border-radius: 5px; padding: 4px; margin: 4px 0; background: var(--selection); color: inherit; text-align: start; }
.compass-matrix-item[draggable="true"] { cursor: grab; }

.compass-workspace { grid-template-columns: minmax(200px, 25%) minmax(0, 1fr); }
.compass-preview-list { display: grid; gap: 4px; }
.compass-preview {
  appearance: none; border: 0; border-radius: 9px; background: transparent; color: inherit; width: 100%;
  display: grid; grid-template-columns: 57px minmax(0, 1fr); gap: 8px; align-items: center; padding: 5px;
  font: inherit; text-align: start; cursor: pointer;
}
.compass-preview:hover, .compass-preview[aria-current="page"] { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.compass-preview[aria-current="page"] { border: 0; }
.compass-preview-image { display: block; width: 100%; aspect-ratio: 68 / 44; color: var(--accent); background: color-mix(in srgb, var(--accent) 11%, transparent); border-radius: 7px; }
.capture-chip { display: inline-flex; gap: 6px; align-items: center; padding: 6px 10px; }
.capture-fields { flex-wrap: wrap; }
.capture-actions { margin: 10px 24px; }
.assistant-source { display: flex; flex-direction: column; align-items: start; gap: 4px; width: 100%; text-align: start; }
.compass-preview-text { display: grid; gap: 2px; min-width: 0; }
.compass-preview-title { font-size: .9rem; font-weight: 650; }
.compass-preview-use { color: var(--muted); font-size: .75rem; line-height: 1.28; }
@media (max-width: 700px) {
  .compass-views { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 5px; }
  .compass-views .compass-preview { grid-template-columns: 40px minmax(0, 1fr); }
}
.compass-links { display: grid; gap: 6px; padding-block: 14px; border-top: 1px solid var(--line); margin-top: 12px; }
.compass-links > button { justify-self: start; }
.compass-chart .compass-date-handle { cursor: ew-resize; }

.compass-source-target { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Touch screens: larger targets, and the block handle is always visible because there is no hover. */
@media (pointer: coarse) {
  .icon-button, .text-button, .side-item, .menu-item, .table-foot button { min-height: 44px; }
  .icon-button { min-width: 44px; }
  .chip { min-height: 36px; }
  .seg button { min-height: 40px; }
  .blocks { padding-left: 22px; }
  .block .grip { opacity: 0.6; left: -24px; top: 0; width: 24px; height: 40px; }
}

/* First paint, before the app's code has loaded. */
.boot { grid-column: 1 / -1; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; background: var(--bg); color: var(--text); }
.boot img { border-radius: 14px; }
.boot-title { font-size: 20px; font-weight: 600; }
.boot-note { color: var(--muted); font-size: 14px; max-width: 320px; }
.boot-bar { width: 180px; height: 4px; border-radius: 2px; background: var(--hover); overflow: hidden; }
.boot-bar span { display: block; width: 40%; height: 100%; background: var(--accent); border-radius: 2px; animation: boot 1.2s ease-in-out infinite; }
@keyframes boot { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .boot-bar span { animation: none; width: 100%; opacity: 0.5; } }

/* Views in notes: Gantt, Kanban, calendar, mind map, dashboard. */
.nv { background: var(--hover); border-radius: 14px; padding: 10px 12px; margin: 8px 0; }
.nv .q-head { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.nv-body { margin-top: 6px; }
.nv-scroll { overflow: auto; max-width: 100%; }
.nv-gantt { display: flex; align-items: flex-start; }
.nv-gantt-labels { flex: none; width: 130px; font-size: 13px; }
.nv-gantt-label { display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 8px; }
.nv-gantt-chart { position: relative; }
.nv-tick { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.nv-tick span { position: absolute; left: 3px; top: 2px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.nv-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--red); opacity: 0.7; }
.nv-bar { position: absolute; border-radius: 6px; background: var(--accent-soft); outline: 1px solid var(--accent); outline-offset: -1px; overflow: hidden; }
.nv-bar-done { height: 100%; background: var(--accent); }
.nv-milestone { position: absolute; width: 14px; height: 14px; background: var(--accent); transform: rotate(45deg); border-radius: 2px; }
.nv-board { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.nv-col { flex: none; width: 220px; background: var(--card); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.nv-col.drop { outline: 2px dashed var(--accent); }
.nv-col-head { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 4px; }
.nv-card { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 14px; cursor: grab; }
.nv-card .nv-move { margin-top: 6px; width: 100%; font-size: 12px; min-height: 32px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--text); }
.nv-empty { text-align: center; padding: 10px 0; }
.nv-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.nv-cal-head strong { flex: 1; text-align: center; }
.nv-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.nv-cal-wd { font-size: 11px; color: var(--muted); text-align: center; padding: 2px 0; }
.nv-cal-day { background: var(--card); border-radius: 4px; min-height: 64px; padding: 2px 3px; font-size: 11px; overflow: hidden; }
.nv-cal-day.out { background: transparent; color: var(--muted); }
.nv-cal-day.today .nv-cal-n { background: var(--accent); color: #fff; border-radius: 99px; padding: 0 5px; }
.nv-cal-item { background: var(--accent-soft); border-radius: 3px; padding: 0 3px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nv-cal-item.cont { opacity: 0.6; }
.nv-mindmap { max-height: 440px; }
.nv-link { fill: none; stroke: var(--muted); stroke-opacity: 0.5; stroke-width: 1.5; }
.nv-node { fill: var(--card); stroke: var(--accent); stroke-opacity: 0.3; }
.nv-node.first { stroke-opacity: 0.7; }
.nv-node.root { fill: var(--accent-soft); stroke-opacity: 0.8; }
.nv-text { font-size: 12.5px; fill: var(--text); font-family: var(--font); }
.nv-text.root { font-weight: 700; font-size: 13.5px; }
.nv-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.nv-tile { background: var(--card); border-radius: 10px; padding: 10px; min-height: 80px; }
.nv-tile-label { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.nv-tile-number { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.nv-tile-number.small-number { font-size: 20px; }
.nv-tile-list { margin: 4px 0 0; padding-left: 16px; font-size: 12px; }
.nv-tbar { margin: 4px 0; font-size: 12px; }
.nv-tbar-row { display: flex; justify-content: space-between; gap: 6px; }
.nv-tbar-track { height: 6px; background: var(--hover); border-radius: 3px; }
.nv-tbar-fill { height: 100%; background: var(--accent); border-radius: 3px; }
@media (max-width: 700px) { .nv-gantt-labels { width: 96px; } .nv-cal-day { min-height: 48px; } .nv-col { width: 190px; } }
.nv-compass svg { max-width: 100%; height: auto; }
.nv-deps { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.nv-deps path { fill: none; stroke: var(--muted); stroke-width: 1.2; }
.nv-lanes { display: flex; flex-direction: column; gap: 10px; }
.nv-lane { font-weight: 700; font-size: 14px; margin-top: 4px; }
.nv-col.over { outline: 2px solid var(--danger); }
.nv-over { color: var(--danger); font-weight: 700; }
.nv-field { flex-direction: column; align-items: stretch; gap: 4px; }
.nv-gantt-label.editable, .nv-bar.editable, .nv-milestone.editable { cursor: pointer; }
.nv-bar.editable { cursor: grab; touch-action: pan-y; }
.nv-bar.editable:focus-visible, .nv-gantt-label.editable:focus-visible { outline: 2px solid var(--accent); }
.nv-card-title { all: unset; cursor: pointer; display: block; width: 100%; }
.nv-card-title:focus-visible { outline: 2px solid var(--accent); border-radius: 4px; }
.nv-cal-seg { margin: 0 0 6px; }
.nv-cal-day { position: relative; }
.nv-cal-day.tall { min-height: 160px; }
.nv-cal-day.drop { outline: 2px dashed var(--accent); }
.nv-cal-item { display: block; width: 100%; text-align: left; border: 0; font: inherit; cursor: pointer; color: inherit; }
.nv-cal-item.long { padding: 6px 8px; font-size: 14px; margin: 3px 0; border-radius: 8px; }
.nv-cal-add { position: absolute; right: 2px; top: 2px; opacity: 0; border: 0; background: none; color: var(--accent); cursor: pointer; }
.nv-cal-day:hover .nv-cal-add, .nv-cal-add:focus-visible { opacity: 1; }
@media (pointer: coarse) { .nv-cal-add { opacity: 0.7; } }
.nv-agenda { display: flex; flex-direction: column; gap: 8px; }
.nv-agenda-day.today > .small { color: var(--accent); font-weight: 600; }
.nv-mnode { cursor: pointer; }
.nv-mnode:focus-visible rect { stroke: var(--accent); stroke-width: 2; stroke-opacity: 1; }
.nv-fold { cursor: pointer; }
.nv-fold circle { fill: var(--card); stroke: var(--accent); }
.nv-fold text { font-size: 11px; fill: var(--accent); font-family: var(--font); }
.nv-tile.editable { cursor: pointer; text-align: left; border: 0; font: inherit; color: inherit; }
.nv-tile.editable:hover { outline: 1px solid var(--line); }
.nv-goal { display: flex; align-items: center; gap: 10px; }
.nv-ring-bg { fill: none; stroke: var(--accent-soft); stroke-width: 7; }
.nv-ring { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; }
.nv-ring-text { font-size: 11px; font-weight: 600; fill: var(--text); font-family: var(--font); }
.nv-spark { fill: none; stroke: var(--accent); stroke-width: 2; }

/* Notebooks and ribbons */
.nb-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; }
.nb-chip { display: inline-flex; align-items: center; gap: 7px; background: var(--card); border-radius: 99px; padding: 6px 13px; min-height: 36px; border: 2px solid transparent; font-size: 14px; white-space: nowrap; }
.nb-chip[aria-pressed='true'] { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.nb-chip .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.nb-status { color: var(--muted); font-size: 13px; margin: 0 2px 10px; }
.tone-dusk { background: var(--cover-dusk); } .tone-sage { background: var(--cover-sage); } .tone-rose { background: var(--cover-rose); }
.tone-mist { background: var(--cover-mist); } .tone-lilac { background: var(--cover-lilac); } .tone-sand { background: var(--cover-sand); }
.nb-menu { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border-radius: 99px; background: rgba(255, 255, 255, 0.5); color: #222; display: flex; align-items: center; justify-content: center; }
.ribbon { display: inline-block; width: 20px; height: 46px; flex: none; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25)); cursor: grab; position: relative; }
.ribbon svg { width: 100%; height: 100%; display: block; }
.ribbon .rname { position: absolute; top: 3px; left: 0; width: 20px; writing-mode: vertical-rl; font-size: 10px; font-weight: 600; color: #fff; overflow: hidden; max-height: 64px; white-space: nowrap; text-overflow: ellipsis; }
.ribbon.rc-yellow .rname, .ribbon.rc-cyan .rname { color: rgba(0, 0, 0, 0.78); }
.ribbon.tall { height: 74px; }
.ribbon.sm { width: 12px; height: 18px; filter: none; cursor: inherit; }
.nb-tray { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; margin: 4px 0 14px; }
.nb-tray .hint { flex-basis: 100%; font-size: 13px; color: var(--muted); }
.nb-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 10px 0 14px; overflow-x: auto; }
.nb-tabs button { padding: 9px 14px; min-height: 44px; border-bottom: 3px solid transparent; color: var(--muted); }
.nb-tabs button[aria-selected='true'] { color: var(--text); border-color: var(--accent); font-weight: 600; }
.nb-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 1000px) { .nb-layout { grid-template-columns: minmax(0, 1fr) 240px; } }
.nb-rail h3 { font-size: 12px; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; letter-spacing: 0.04em; }
.nb-ghost { border: 1px dashed var(--muted); border-radius: 10px; padding: 10px 12px; display: flex; gap: 10px; align-items: center; margin: 6px 0; }
.nb-ghost .grow { flex: 1; color: var(--muted); }
.nb-bar { height: 6px; background: var(--hover); border-radius: 9px; overflow: hidden; margin-top: 5px; }
.nb-bar > i { display: block; height: 100%; background: var(--accent); }
.nb-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 12px 14px; }
.nb-pick label { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: 8px; border: 2px solid transparent; font-size: 11px; color: var(--muted); cursor: pointer; }
.nb-pick input { position: absolute; opacity: 0; pointer-events: none; }
.nb-pick label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.nb-pick label:has(input:focus-visible) { outline: 2px solid var(--accent); }
.nb-tones { display: flex; gap: 10px; padding: 12px 14px; }
.nb-tones label { width: 44px; height: 56px; border-radius: 8px; border: 2px solid var(--line); cursor: pointer; }
.nb-tones label:has(input:checked) { border-color: var(--accent); border-width: 3px; }
.nb-tones input { position: absolute; opacity: 0; }
.nb-chip-row { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; border-radius: 99px; padding: 2px 8px; background: var(--cover-dusk); color: var(--text); margin-left: 6px; }

/* A portrait book: cloth cover, spine with stitching, an elastic band, a paper label, pages peeking out, and bookmark ribbons from the pages. */
.nb-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 30px 26px; padding: 8px 0 48px; }
.nb-cell { position: relative; padding-bottom: 60px; }
.nb-cell.drop .nb-cover { outline: 3px dashed var(--accent); outline-offset: 4px; }
.nb-cover {
  position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; text-align: left; overflow: hidden; color: #26231d;
  border-radius: 3px 10px 10px 3px; background-color: var(--cover-dusk);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .13 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    linear-gradient(135deg, rgba(255,255,255,.38), rgba(255,255,255,0) 45%, rgba(0,0,0,.14));
  box-shadow: 3px 3px 0 #f3eee0, 4.5px 4.5px 0 #cdc5b0, 7px 9px 16px rgba(0,0,0,.28), 0 1px 0 rgba(255,255,255,.4) inset;
  transition: transform .18s ease, box-shadow .18s ease;
}
.nb-cover:hover { transform: translateY(-3px) rotate(-.4deg); }
.nb-cover .spine { position: absolute; left: 0; top: 0; bottom: 0; width: 13%; background: linear-gradient(90deg, rgba(0,0,0,.32), rgba(255,255,255,.14) 72%, rgba(0,0,0,.24)); border-right: 1px solid rgba(0,0,0,.18); }
.nb-cover .stitch { position: absolute; left: 17%; top: 5%; bottom: 5%; border-left: 2px dashed rgba(0,0,0,.28); }
.nb-cover .band { position: absolute; right: 9%; top: -2px; bottom: -2px; width: 7px; background: linear-gradient(90deg, rgba(0,0,0,.45), rgba(255,255,255,.16) 45%, rgba(0,0,0,.4)); box-shadow: 0 0 2px rgba(0,0,0,.35); }
.nb-cover .label { position: absolute; left: 24%; right: 22%; top: 17%; padding: 10px 8px 9px; background: #f6f0e0; border: 1px solid rgba(0,0,0,.22); outline: 1px solid rgba(255,255,255,.6); outline-offset: -4px; box-shadow: 0 1px 2px rgba(0,0,0,.25); text-align: center; }
.nb-cover .t { display: block; font: 600 15px/1.2 Georgia, 'Iowan Old Style', 'Times New Roman', serif; color: #2a261d; overflow-wrap: anywhere; }
.nb-cover .s { display: block; margin-top: 6px; padding-top: 5px; border-top: 1px solid rgba(0,0,0,.2); font-size: 10.5px; letter-spacing: .03em; color: #5d574a; }
.nb-menu { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; z-index: 2; border-radius: 99px; background: rgba(255,255,255,.55); color: #222; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s; }
.nb-cell:hover .nb-menu, .nb-menu:focus-visible { opacity: 1; }
@media (hover: none) { .nb-menu { opacity: .9; } }
.nb-ribbons { position: absolute; left: 50%; bottom: 8px; display: flex; gap: 5px; align-items: flex-start; flex-direction: row; transform: translateY(0); z-index: 1; }
.nb-ribbons .ribbon { margin-top: -54px; }
.nb-ribbons .ribbon { clip-path: none; }
@media (max-width: 560px) {
  .nb-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 18px; }
  .nb-cover .t { font-size: 13px; }
  .nb-cover .s { font-size: 9.5px; letter-spacing: 0; }
  .nb-cover .label { left: 22%; right: 20%; padding: 8px 5px 7px; }
}

/* The book opening: a 3D stage over the page. */
.book-fly { position: fixed; inset: 0; z-index: 9999; pointer-events: none; perspective: 1700px; perspective-origin: 50% 45%; background: radial-gradient(ellipse at center, rgba(0,0,0,0), rgba(0,0,0,.0)); }
.book3d { position: absolute; transform-style: preserve-3d; transform-origin: 0 50%; will-change: transform; filter: drop-shadow(0 24px 30px rgba(0,0,0,.35)); }
.book3d .pages { position: absolute; inset: 0; border-radius: 2px 10px 10px 2px; background:
  repeating-linear-gradient(to bottom, transparent 0 25px, rgba(60,90,140,.18) 25px 26px), linear-gradient(90deg, rgba(0,0,0,.14), rgba(0,0,0,0) 8%), #fbf8ef;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08), 2px 2px 0 #e9e3d1, 4px 4px 0 #d8d0ba; display: flex; align-items: flex-start; justify-content: center; }
.book3d .pg-title { margin-top: 18%; font: 600 15px Georgia, serif; color: #3a3428; opacity: .0; }
.book3d .front { position: absolute; inset: 0; transform-origin: 0 50%; transform-style: preserve-3d; }
.book3d .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; margin: 0; }
.book3d .face.out { pointer-events: none; transition: none; box-shadow: none; }
.book3d .face.in { transform: rotateY(180deg); border-radius: 10px 3px 3px 10px; background: #efe6cf; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.book3d .endpaper { position: absolute; inset: 0; background: radial-gradient(circle at 30% 30%, rgba(160,110,60,.18) 0 1px, transparent 1.5px) 0 0 / 14px 14px, linear-gradient(270deg, rgba(0,0,0,.18), rgba(0,0,0,0) 14%), #efe6cf; }
.book3d .shade { position: absolute; inset: 0; border-radius: 3px 10px 10px 3px; background: #000; opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .book-fly { display: none; } }

/* The ribbons come from between the pages: behind the cover, with their tops hidden. */
.nb-cover { z-index: 2; }
.nb-ribbons { z-index: 1; bottom: 14px; }
.nb-ribbons .ribbon { margin-top: 0; height: 62px; }
.nb-ribbons .ribbon.tall { height: 90px; }
.book3d .fly-ribbons { position: absolute; left: 50%; top: calc(100% - 16px); bottom: auto; z-index: 0; transform: translateZ(-2px); }
.book3d .pages, .book3d .front { z-index: 1; }

/* Search, ribbons as links, progress, timeline */
.nb-search { display: flex; align-items: center; gap: 6px; background: var(--hover); border-radius: 99px; padding: 0 12px; height: 34px; margin: 0 6px; color: var(--muted); }
.nb-search-input { border: 0; background: transparent; outline: none; font: inherit; color: var(--text); width: 160px; min-width: 0; }
.nb-search:focus-within { box-shadow: 0 0 0 2px var(--accent); }
@media (max-width: 560px) { .nb-search-input { width: 90px; } }
.nb-rib { padding: 0; background: none; border-radius: 4px; }
.nb-rib:hover .ribbon, .nb-rib:focus-visible .ribbon { transform: translateY(3px); }
.nb-rib .ribbon { transition: transform .15s; cursor: pointer; }
.nb-rib:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nb-cover .pbar { display: block; height: 4px; margin-top: 7px; border-radius: 9px; background: rgba(0,0,0,.14); overflow: hidden; }
.nb-cover .pbar i { display: block; height: 100%; background: #3f8f5a; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.tl-day { margin: 0 0 14px; position: relative; }
.tl-date { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 4px 14px; }
.tl-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; margin-left: 4px; border-radius: 10px; background: var(--card); margin-bottom: 4px; min-height: 40px; }
.tl-item:disabled { cursor: default; }
.tl-dot { width: 24px; height: 24px; border-radius: 99px; display: flex; align-items: center; justify-content: center; background: var(--hover); color: var(--muted); flex: none; }
.tl-done .tl-dot { background: rgba(48,164,108,.16); color: var(--ok); } .tl-done { opacity: .78; }
.tl-deadline .tl-dot { background: rgba(242,85,77,.16); color: var(--red); }
.tl-scheduled .tl-dot { background: var(--accent-soft); color: var(--accent); }
.tl-today { position: relative; margin: 14px 0 14px -14px; display: flex; align-items: center; }
.tl-today::before { content: ''; flex: 1; height: 2px; background: var(--accent); }
.tl-today span { background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 99px; order: -1; margin-right: 8px; }

.pane-header .brand-title { font-size: 15px; line-height: 1.15; white-space: normal; overflow: visible; text-overflow: clip; }

.nb-pin { position: absolute; top: -6px; left: -6px; width: 22px; height: 22px; border-radius: 99px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; z-index: 3; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.nb-continue { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px 14px; margin: 4px 0 12px; border-radius: 12px; background: var(--card); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.nb-continue span { flex: 1; }
.digest-card { display: flex; align-items: center; gap: 10px; width: calc(100% - 24px); margin: 8px 12px 0; padding: 10px 14px; border-radius: 14px; background: var(--card); text-align: left; }
.digest-card .d { flex: 1; } .digest-card .warn { color: var(--red); }

/* Plans, trial reminder and the web ad banner */
.plan-card { border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 10px 0; display: flex; flex-direction: column; gap: 8px; }
.plan-card.current { border-color: var(--accent); }
.plan-title { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.trial-bar { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 6px 12px; background: var(--accent-soft); font-size: 14px; }
.ad-bar { display: flex; flex: none; min-height: 50px; align-items: center; justify-content: center; background: var(--card); border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.ad-bar[hidden], .ad-bar:has(.adsbygoogle[data-ad-status="unfilled"]) { display: none; }
.ad-bar .adsbygoogle { width: min(100%, 970px); }
body:has(.ad-bar:not([hidden])), body:has(.trial-bar) { display: flex; flex-direction: column; }
body:has(.ad-bar:not([hidden])) > #app, body:has(.trial-bar) > #app { height: auto; min-height: 0; flex: 1; }

/* Sign-in and account setup */
.app.auth-root { display: block; overflow: auto; }
.auth-page {
  display: grid;
  min-height: 100%;
  place-items: center;
  padding: max(24px, var(--safe-top)) 16px max(24px, var(--safe-bottom));
}
.auth-card {
  width: min(100%, 420px);
  padding: clamp(20px, 5vw, 32px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  text-align: center;
}
.auth-card header img { border-radius: 16px; }
.auth-card h1 { font-size: clamp(1.55rem, 5vw, 2rem); margin: 8px 0 4px; line-height: 1.15; }
.auth-card header p { margin: 0 0 22px; font-size: .95rem; }
.auth-stack { display: grid; gap: 10px; padding: 0; border: 0; margin: 0; min-width: 0; }
.auth-stack > .button { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 9px; }
.auth-stack > .button img { flex: 0 0 18px; object-fit: contain; }
.auth-stack .auth-apple { background: #080808; color: #fff; }
.auth-apple img { filter: brightness(0) invert(1); }
.auth-stack .auth-google { background: #fff; color: #1f1f1f; border: 1px solid #747775; }
@media (prefers-color-scheme: dark) {
  .auth-stack .auth-apple { background: #fff; color: #080808; }
  .auth-apple img { filter: brightness(0); }
  .auth-stack .auth-google { background: #202124; color: #f5f5f5; }
}
.auth-stack label { display: grid; gap: 4px; text-align: start; }
.auth-stack label input:not([type='checkbox']) { width: 100%; padding: 10px 12px; min-height: 44px; font-size: 16px; }
.auth-stack .auth-check { grid-template-columns: auto 1fr; gap: 8px; align-items: start; font-size: .9rem; }
.auth-check input { margin-top: 4px; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.auth-status { margin: 10px 0 0; font-size: .875rem; color: var(--muted); }
.auth-status:empty { display: none; }
.auth-status.auth-error { color: var(--danger); }
.auth-email { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.auth-policy { font-size: .875rem; margin-top: 12px; }
.auth-terms-section h3 { margin-bottom: 4px; }
.auth-terms-section p { margin-top: 0; }
