/* Base + shared styles. Split from the single original stylesheet; zero visual change. */

/* The `hidden` attribute must always win. Author display rules (e.g.
/* .modal-backdrop's `display: flex`) otherwise override the UA stylesheet's
/* `[hidden] { display: none }` and "closed" overlays stay visible forever. */
[hidden] { display: none !important; }

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg-paper);
  background-attachment: fixed; /* static, no animation */
  line-height: 1.5;
  min-height: 100vh;
}

.serif { font-family: Georgia, "Times New Roman", serif; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff;
  padding: 0.5rem 1rem; z-index: 100; border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

/* Decision 34: ledger layout — input on top, ranked results stack below.
 * Page scrolls naturally; the old no-scroll orbit constraint is gone. */
.ledger-layout { padding: 0 1rem 4rem; }

.input-section { max-width: 720px; margin: 0 auto; }

.ledger-section { max-width: 680px; margin: 2.5rem auto 0; }

.btn {
  font: inherit; font-size: 0.95rem; cursor: pointer;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--btn-bg); color: var(--ink); padding: 0.55rem 1.1rem;
  min-height: 44px;
}

.btn:hover { background: var(--btn-hover); }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

.btn-primary:hover { background: #d14a40; border-color: #d14a40; }

/* Decision 33: copied confirmation state — deeper coral, not green. */
.btn-primary.copied { background: #d14a40; border-color: #d14a40; }

.btn-small { min-height: 36px; padding: 0.3rem 0.7rem; font-size: 0.85rem; }

#submit-btn { margin-top: 0.75rem; width: 100%; }

.inline-error { color: var(--danger); font-weight: 600; margin: 0.5rem 0; }

.linklike {
  background: none; border: none; padding: 0 0.25rem; color: var(--focus);
  text-decoration: underline; cursor: pointer; font: inherit; font-size: 0.85rem;
  min-height: 32px;
}

.muted { color: var(--muted); }

.small { font-size: 0.85rem; }

/* Small chips still used inside the content modal's top-words list */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.chip {
  font: inherit; font-size: 0.95rem; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: #fff; padding: 0.5rem 0.9rem; min-height: 44px;
  display: inline-flex; align-items: center; gap: 0.4rem;
}

.chip:hover { border-color: var(--accent); }

.small-chips .chip { min-height: 36px; font-size: 0.85rem; padding: 0.3rem 0.7rem; }

.games-section { max-width: 680px; margin: 0 auto; padding: 0 1rem 4rem; }

/* P2 (games patch, 2026-11-15): the Games panel is back to the
   shared 680px tab width — the 2026-10-31 two-column layout with its
   pinned progress side column is gone. Progress is a card in the
   grid now (see css/games/game-grid.css). */

.games-confirm {
  border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 8px; background: var(--panel); padding: 0.75rem 1rem; margin: 1rem 0 1.5rem;
}

.games-confirm ol { margin: 0.5rem 0; padding-left: 1.25rem; }

/* D-020: full developer privacy notice page — same 680px tab width,
   paper theme, no app chrome. */
.privacy-page { max-width: 680px; margin: 0 auto; padding: 0 1rem 4rem; }

/* Reduced motion: no popup animation */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .popup { animation: none; }
  .pipeline-status .spinner { animation: none; border-top-color: var(--line); }
}
