/* Shared base for the landing page, View, How it works and Share.
   Tokens, reset, buttons and touch-target rules (44 px under coarse pointers, per UX review 5). */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --text: #16191d;
  --text-2: #4b5563;
  --text-3: #6b7280;
  --border: #d9dee5;
  --accent: #1f5fbf;
  --accent-text: #ffffff;
  --accent-soft: #e5eefb;
  --ok: #1b7f4b;
  --ok-soft: #e3f4ea;
  --warn: #9a5b00;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 16px rgba(16, 24, 40, 0.06);
  --radius: 12px;
  --radius-sm: 8px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --gutter: 16px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1216;
    --surface: #171b21;
    --surface-2: #1f252d;
    --text: #e8ebef;
    --text-2: #b4bcc7;
    --text-3: #8b95a3;
    --border: #2c333d;
    --accent: #6ea4f2;
    --accent-text: #0b1220;
    --accent-soft: #1b2a40;
    --ok: #5cc98b;
    --ok-soft: #15281e;
    --warn: #e0a54a;
    --danger: #f2877c;
    --danger-soft: #2e1714;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3);
  }
}
:root[data-theme="dark"] {
  --bg: #0f1216;
  --surface: #171b21;
  --surface-2: #1f252d;
  --text: #e8ebef;
  --text-2: #b4bcc7;
  --text-3: #8b95a3;
  --border: #2c333d;
  --accent: #6ea4f2;
  --accent-text: #0b1220;
  --accent-soft: #1b2a40;
  --ok: #5cc98b;
  --ok-soft: #15281e;
  --warn: #e0a54a;
  --danger: #f2877c;
  --danger-soft: #2e1714;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
p { margin: 0 0 0.75em; }
a { color: var(--accent); }
img, canvas { display: block; }
.hidden { display: none !important; }
.muted { color: var(--text-3); }
.small { font-size: 0.875rem; }
.mono { font-family: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--surface-2); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn[disabled] { opacity: 0.5; cursor: default; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.icon { width: 20px; height: 20px; flex: none; }

input[type="text"], input[type="password"], input[type="url"], select {
  font: inherit;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  width: 100%;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

@media (pointer: coarse) {
  .btn, select, input[type="text"], input[type="password"], input[type="url"] { min-height: 44px; }
  .btn { min-width: 44px; }
  input[type="range"] { min-height: 44px; }
  input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; }
}

/* Simple page shell used by placeholder pages. */
.page {
  max-width: 720px;
  margin: 0 auto;
  padding: calc(32px + var(--safe-t)) calc(var(--gutter) + var(--safe-r)) calc(32px + var(--safe-b)) calc(var(--gutter) + var(--safe-l));
}
