/* Generated by scripts/build-shell-assets.mjs from src/styles/tokens.css + src/styles/solver.css — do not edit directly. */

/* Design tokens ported from docs/Cross-platform design request.zip
   (Buscador de Palabras.dc.html) — warm cream palette, terracotta accent,
   Bricolage Grotesque display type. Light-only for v1; structured so a
   dark palette is a one-file addition later. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A1, U+00BF, U+00D1, U+00E1, U+00E9, U+00ED,
    U+00F1, U+00F3, U+00FA, U+00FC, U+00AB, U+00BB, U+00B7;
}

:root {
  --bg: #f6f4ef;
  --surface: #fffdf8;
  --tile: #f3efe4;
  --tile-edge: #ddd6c7;
  --ink: #302b25;
  --ink-2: #6d665c;
  --muted: #8a8378;
  --muted-2: #a39b8e;
  --rule: #e2ddd2;
  --rule-2: #e6e1d5;
  --rule-3: #efebe1;
  --accent: #b8503a;
  --accent-hover: #8d3826;
  --panel: #302b25;
  --panel-ink: #f6f4ef;
  --panel-muted: #b6ada0;

  --radius-card: 18px;
  --radius-ctrl: 10px;
  --radius-chip: 9px;
  --radius-pill: 999px;
  --measure: 880px;

  --font-display: "Bricolage Grotesque", "Helvetica Neue", Helvetica, system-ui, sans-serif;
  --font-body: "Helvetica Neue", Helvetica, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
}

body {
  -webkit-text-size-adjust: 100%;
  color: var(--ink);
  font-family: var(--font-body);
}

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

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

input,
button {
  font: inherit;
}

@keyframes settle {
  0% {
    transform: translateY(-6px) scale(0.94);
    opacity: 0;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

.page {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px 64px;
}

.measure {
  width: 100%;
  max-width: var(--measure);
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0 4px;
}

.site-nav {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 0 14px;
  border-bottom: 1px solid var(--rule);
}

.site-nav a {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--accent);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.wordmark .dot {
  color: var(--accent);
}

.site-header .tag {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-footer {
  width: 100%;
  max-width: var(--measure);
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.site-footer p {
  margin: 0 0 6px;
}

.site-footer p:last-child {
  margin-bottom: 0;
}

.solver {
  padding-top: 28px;
}

.solver-h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 6vw, 44px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 0 0 10px;
  text-wrap: balance;
}

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

.solver-intro {
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 46ch;
  text-wrap: pretty;
}

.solver-intro strong {
  font-weight: 600;
}

/* Game mode tabs */
.game-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.game-tab {
  position: relative;
  appearance: none;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  min-height: 44px;
}

.game-tab:hover {
  border-color: #c8c1b3;
}

.game-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: -2px;
  border: 2px solid var(--accent);
  border-radius: var(--radius-pill);
}

.mode-note {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  min-height: 1.45em; /* reserve height — avoid CLS when the note changes */
}

/* Rack card */
.rack-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  padding: 14px;
  box-shadow: 0 1px 0 var(--rule-3);
}

.must-include-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule-3);
}

.must-include-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.must-include-input {
  flex: 1 1 160px;
  min-width: 0;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: #f9f7f1;
  border: 1px solid var(--rule);
  border-radius: var(--radius-ctrl);
  outline: none;
}

.must-include-input:focus {
  border-color: var(--accent);
  background: var(--surface);
}

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

.rack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: 62px;
  padding: 4px 2px 10px;
}

.rack-empty {
  font-size: 15px;
  color: var(--muted-2);
}

.tile {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1px;
  min-width: 48px;
  height: 54px;
  padding: 0 8px 12px;
  background: var(--tile);
  border: 1px solid var(--tile-edge);
  border-bottom-width: 3px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  animation: settle 160ms ease-out;
}

.tile sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  bottom: 0;
}

.rack-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  border-top: 1px solid var(--rule-3);
  padding-top: 12px;
}

.rack-input {
  flex: 1 1 180px;
  min-width: 0;
  min-height: 46px;
  padding: 10px 14px;
  font-size: 17px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: #f9f7f1;
  border: 1px solid var(--rule);
  border-radius: var(--radius-ctrl);
  outline: none;
}

.rack-input:focus {
  border-color: var(--accent);
  background: var(--surface);
}

.btn-icon,
.btn-ghost {
  appearance: none;
  min-height: 46px;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-ctrl);
  cursor: pointer;
}

.btn-icon {
  color: var(--ink);
  background: var(--tile);
  border: 1px solid var(--rule);
}

.btn-icon:hover {
  background: #ebe6d9;
}

.btn-ghost {
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--rule);
}

.btn-ghost:hover {
  color: var(--ink);
  border-color: #c8c1b3;
}

.keyboard {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 12px;
}

.keyboard-row {
  display: flex;
  gap: 5px;
}

.key {
  flex: 1 1 0;
  min-width: 0;
  min-height: 46px;
  padding: 0 2px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  color: var(--ink);
  background: #f9f7f1;
  border: 1px solid var(--rule-2);
  border-radius: 8px;
  cursor: pointer;
}

.key:hover {
  background: #f0ebdf;
}

.key:active {
  background: #e6e0d0;
}

/* Selected-word panel */
.selected-panel {
  margin-top: 18px;
  background: var(--panel);
  color: var(--panel-ink);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}

.selected-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.selected-note {
  font-size: 13px;
  color: var(--panel-muted);
  margin-top: 4px;
}

.selected-stats {
  display: flex;
  gap: 22px;
  font-size: 13px;
}

.selected-stats .stat-label {
  color: var(--panel-muted);
}

.selected-stats .stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
}

/* Results */
.results {
  padding-top: 26px;
  min-height: 4em; /* reserve height for the headline + first group */
}

.results-headline {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.result-group {
  margin-bottom: 22px;
}

.result-group h2 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 6px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  appearance: none;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-height: 40px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--rule-2);
  border-radius: var(--radius-chip);
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

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

.chip sub {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted-2);
}
