/* sl8: lapis ink on cool paper. Full-bleed canvas, tools float at the thumb's reach. */
:root {
  --paper: #f7f8fb;
  --surface: #ffffff;
  --line: #e1e4ee;
  --dot: #c9cede;
  --text: #191c29;
  --muted: #60667d;
  --accent: #2a44c4;
  --accent-soft: #e6eaff;
  --on-accent: #ffffff;
  --danger: #b8322f;
  --ink-ink: #191c29;
  --ink-blue: #2a44c4;
  --ink-red: #cf3a35;
  --ink-green: #1d8558;
  --ink-yellow: #f2c200;
  --hl-alpha: 0.38;
  --shadow: 0 1px 2px rgb(25 28 41 / 0.06), 0 8px 24px rgb(25 28 41 / 0.10);
  --font-display: 'Gloock', 'Iowan Old Style', Georgia, serif;
  --font-ui: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #12141c;
    --surface: #1b1e29;
    --line: #2b2f40;
    --dot: #2f3448;
    --text: #e9ebf3;
    --muted: #979db2;
    --accent: #8fa2ff;
    --accent-soft: #252c4d;
    --on-accent: #10131c;
    --danger: #ff8a85;
    --ink-ink: #eef0f7;
    --ink-blue: #8197ff;
    --ink-red: #ff7d77;
    --ink-green: #5cd39c;
    --ink-yellow: #ffd84d;
    --hl-alpha: 0.32;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #12141c; --surface: #1b1e29; --line: #2b2f40; --dot: #2f3448; --text: #e9ebf3; --muted: #979db2;
  --accent: #8fa2ff; --accent-soft: #252c4d; --on-accent: #10131c; --danger: #ff8a85;
  --ink-ink: #eef0f7; --ink-blue: #8197ff; --ink-red: #ff7d77; --ink-green: #5cd39c; --ink-yellow: #ffd84d; --hl-alpha: 0.32;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 16px/1.5 var(--font-ui);
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); font-weight: 600; text-decoration: none; color: var(--text);
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn:disabled { opacity: 0.6; cursor: default; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--text);
}
.icon-btn:hover { background: var(--accent-soft); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.icon-btn:disabled { opacity: 0.35; cursor: default; background: transparent; }

.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field input {
  min-height: 46px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper);
}
.field input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }

.toast {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 64px); transform: translateX(-50%);
  max-width: min(440px, calc(100% - 32px)); padding: 10px 16px;
  background: var(--text); color: var(--paper); border-radius: var(--radius);
  font-size: 15px; box-shadow: var(--shadow); z-index: 50;
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
