/* ============================================================
   tobedone — Paper theme (Direction A из прототипа).
   ============================================================ */

:root {
  --font-head: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-mono: 'Space Mono', 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

.theme-paper {
  --bg: #f4ecdc;
  --bg-2: #ece2cd;
  --surface: #fffaf0;
  --surface-2: #fbf3df;
  --ink: #2a241d;
  --ink-soft: #6f6253;
  --ink-faint: #a89a85;
  --border: rgba(60, 40, 20, 0.10);
  --border-strong: rgba(60, 40, 20, 0.22);
  --accent-terra: #d97757;
  --accent-indigo: #4f5fb3;
  --accent-olive: #7d8b3f;
  --accent-mustard: #c89a3c;
  --accent-rose: #c75d72;
  --accent-clay: #a85b3c;
  --danger: #c43e2f;
  --shadow-sm: 0 1px 0 rgba(60,40,20,0.06), 0 2px 4px rgba(60,40,20,0.04);
  --shadow-md: 0 1px 0 rgba(60,40,20,0.06), 0 8px 18px -8px rgba(60,40,20,0.18);
  --shadow-lg: 0 1px 0 rgba(60,40,20,0.06), 0 18px 36px -16px rgba(60,40,20,0.22);
  --radius-tile: 14px;
  --radius-button: 10px;
}

html.dark .theme-paper,
.theme-paper.dark {
  --bg: #221d17;
  --bg-2: #1a1612;
  --surface: #2c2620;
  --surface-2: #251f1a;
  --ink: #f1e8d6;
  --ink-soft: #b6a892;
  --ink-faint: #6e6354;
  --border: rgba(255, 230, 200, 0.10);
  --border-strong: rgba(255, 230, 200, 0.22);
}

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-head);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
}

button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }
a { color: var(--accent-terra); text-decoration: none; }
a:hover { text-decoration: underline; }

.paper-texture {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.85' numOctaves='2' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.15 0 0 0 0 0.10 0 0 0 0 0.05 0 0 0 0.50 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.14;
  mix-blend-mode: multiply;
}
html.dark .paper-texture { mix-blend-mode: screen; opacity: 0.06; }
