/* Criers — shared site styles. Mirrors the app's visual system:
   pure white/black canvases, hairline dividers, #2A7BCA accent,
   no gradients, no heavy shadows, 12px radii. */

:root {
  color-scheme: light dark;
  --canvas: #ffffff;
  --text: #000000;
  --text2: rgba(0, 0, 0, 0.55);
  --text3: rgba(0, 0, 0, 0.32);
  --hairline: rgba(0, 0, 0, 0.08);
  --surface2: #f0f0f0;
  --accent: #2a7bca;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #000000;
    --text: #ffffff;
    --text2: rgba(255, 255, 255, 0.55);
    --text3: rgba(255, 255, 255, 0.3);
    --hairline: rgba(255, 255, 255, 0.1);
    --surface2: #1c1c1c;
  }
}

/* The corner's light switch overrides system preference locally */
:root[data-theme="dark"] {
  --canvas: #000000;
  --text: #ffffff;
  --text2: rgba(255, 255, 255, 0.55);
  --text3: rgba(255, 255, 255, 0.3);
  --hairline: rgba(255, 255, 255, 0.1);
  --surface2: #1c1c1c;
}

:root[data-theme="light"] {
  --canvas: #ffffff;
  --text: #000000;
  --text2: rgba(0, 0, 0, 0.55);
  --text3: rgba(0, 0, 0, 0.32);
  --hairline: rgba(0, 0, 0, 0.08);
  --surface2: #f0f0f0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: "Inter", -apple-system, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s ease, color 0.4s ease;
}

@media (prefers-reduced-motion: reduce) {
  body, .cord-knob, .bulb-fill, .bulb-rays, .stem, .leaf { transition: none; }
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.tagline {
  font-family: "New York", ui-serif, Georgia, serif;
  font-style: italic;
  font-size: 17px;
  color: var(--text2);
  margin: 0;
}

/* Landing */

.hero {
  min-height: 62svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
}

.hero img.logo {
  width: 76px;
  height: auto;
  display: block;
}

.hero h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.2px;
  margin: 0;
}

/* The Corner: a window, a switch, and a few flowers everyone shares.
   No cards, no invented colors beyond the app's own avatar palette,
   framed by the same hairline the rest of the site uses. */

.corner {
  max-width: 620px;
  margin: 0 auto;
  padding: 32px 24px 8px;
  text-align: center;
  border-top: 0.5px solid var(--hairline);
}

.scene-frame { padding: 4px 0; }

.scene-wrap { position: relative; width: 100%; aspect-ratio: 560 / 230; }
.scene-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  pointer-events: none;
}
.scene-bg .switch-group { pointer-events: auto; cursor: pointer; }

.wobbly { filter: url(#wobble); }

.ink { stroke: var(--text); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.ink-thin { stroke: var(--text); stroke-width: 2.5; stroke-linecap: round; fill: none; }

.bulb-outline { stroke: var(--text); stroke-width: 3.5; fill: none; }
.bulb-fill { fill: var(--accent); opacity: 0; transition: opacity 0.35s ease; }
.bulb-rays { stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; opacity: 0; transition: opacity 0.35s ease; }
.cord-knob { transition: transform 0.35s cubic-bezier(.4,1.4,.6,1); transform: translateY(0); }
.switch-on .bulb-fill { opacity: 1; }
.switch-on .bulb-rays { opacity: 1; }
.switch-on .cord-knob { transform: translateY(14px); }

/* Wheel: a local decision-maker, not shared across visitors — add names,
   give it a spin. Naive line + the app's own six-color avatar palette. */

.wheel-wrap {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.wheel-stage {
  position: relative;
  width: 220px;
}

.wheel-pointer {
  position: absolute;
  top: -14px;
  left: 50%;
  width: 26px;
  height: auto;
  transform: translateX(-50%);
  z-index: 2;
}

.wheel-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.wheel-rim { stroke: var(--text); stroke-width: 3; fill: none; }

#wheel-group {
  transform-box: fill-box;
  transform-origin: 50% 50%;
}

.wheel-wedge { stroke: var(--canvas); stroke-width: 1.5; }
.wheel-label {
  font-family: "Inter", sans-serif;
  font-size: 9px;
  font-weight: 600;
  fill: var(--text);
}

.wheel-empty {
  font-family: "New York", ui-serif, Georgia, serif;
  font-style: italic;
  font-size: 13px;
  fill: var(--text3);
}

.wheel-controls { width: 100%; max-width: 320px; display: flex; flex-direction: column; align-items: center; gap: 12px; }

.chip-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; min-height: 0; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text);
  background: var(--surface2);
  border-left: 3px solid var(--accent);
  padding: 5px 8px 5px 10px;
  border-radius: 8px;
}

.chip button {
  appearance: none;
  border: none;
  background: none;
  color: var(--text3);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0;
}
.chip button:hover { color: var(--text); }

.wheel-form { display: flex; gap: 8px; width: 100%; }

.wheel-form input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--surface2);
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
}
.wheel-form input::placeholder { color: var(--text3); }

.add-btn, .spin-btn {
  appearance: none;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}
.add-btn:hover, .spin-btn:hover { opacity: 0.85; }
.add-btn:active, .spin-btn:active { opacity: 0.7; }
.spin-btn:disabled { background: var(--surface2); color: var(--text3); cursor: default; }
.spin-btn:disabled:hover { opacity: 1; }

.wheel-result {
  font-family: "New York", ui-serif, Georgia, serif;
  font-style: italic;
  font-size: 16px;
  color: var(--text);
  min-height: 20px;
  margin: 0;
  text-align: center;
}

.wheel-form input:focus-visible, .add-btn:focus-visible, .spin-btn:focus-visible, .chip button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.board {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  min-height: 40px;
}

.sticky {
  width: 108px;
  height: 100px;
  padding: 12px 10px 10px;
  position: relative;
  font-family: "New York", ui-serif, Georgia, serif;
  font-style: italic;
  font-size: 12.5px;
  line-height: 1.35;
  color: #2a2a2a;
  clip-path: polygon(0 0, 82% 0, 100% 18%, 100% 100%, 0 100%);
}

.sticky .fold {
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 20px;
  clip-path: polygon(100% 0, 0 0, 100% 100%);
  filter: brightness(0.88);
}

.note-form {
  max-width: 460px;
  margin: 24px auto 0;
  padding-bottom: 36px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.note-form label {
  font-family: "New York", ui-serif, Georgia, serif;
  font-style: italic;
  font-size: 15px;
  color: var(--text2);
}

.field-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.note-form input[type="text"] {
  flex: 1 1 220px;
  min-width: 0;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--surface2);
  border: none;
  border-radius: 10px;
  padding: 11px 14px;
}

.note-form input::placeholder { color: var(--text3); }

.swatches { display: flex; gap: 8px; }

.swatch {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}

.swatch[aria-pressed="true"] { border-color: var(--text); }

.row-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.form-msg { font-size: 12px; color: var(--text3); }
.form-msg.error { color: #C0392B; }

.join-btn {
  appearance: none;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}

.join-btn:hover { opacity: 0.85; }
.join-btn:active { opacity: 0.7; }

.note-form input:focus-visible,
.join-btn:focus-visible,
.swatch:focus-visible,
.switch-group:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text3);
  padding: 8px 24px 40px;
}

.site-footer .row {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.site-footer a { color: var(--text2); font-weight: 500; }

/* Document pages (privacy, terms) */

.doc {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.doc .home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 40px;
}

.doc .home img { width: 24px; height: auto; }

.doc h1 { font-size: 30px; font-weight: 700; letter-spacing: 0.2px; margin: 0 0 4px; }

.doc .updated { font-size: 13px; color: var(--text3); margin: 0 0 12px; }

.doc h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 36px 0 8px;
  padding-top: 20px;
  border-top: 0.5px solid var(--hairline);
}

.doc p, .doc li { color: var(--text); }
.doc .muted { color: var(--text2); }

.doc footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 0.5px solid var(--hairline);
  font-size: 13px;
  color: var(--text3);
}
