/* ==================================================================
   Tokens & reset
   ================================================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html {
  font-size: 62.5%;
  -webkit-text-size-adjust: 100%;
}

:root {
  /* tokens importados/inspirados en el style.css del usuario */
  --color-correct: #43a047;
  --color-present: #e4a81d;
  --color-absent: #757575;
  --color-error: #bb3429;
  --key-bg: #e2e8f0;
  --light-blue: rgb(128, 207, 233);
  --timeline-bg: #252339;

  --background: #fefefe;
  --surface: #ffffff;
  --surface-2: #f3f4f6;
  --border-color: rgb(215, 215, 215);
  --text: #252339;
  --text-muted: #6b7280;

  --cell-bg: #ffffff;
  --cell-block: #1b1b1b;
  --cell-active: rgb(128, 207, 233);
  --cell-active-word: #e0f2fb;
  --cell-error: #bb3429;

  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);

  --font-display: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

[data-theme="dark"] {
  --background: #0f1115;
  --surface: #1a1d24;
  --surface-2: #242832;
  --border-color: #2d3340;
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --cell-bg: #1f2330;
  --cell-block: #0a0c10;
  --cell-active: #2563eb;
  --cell-active-word: #173356;
  --key-bg: #2d3340;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* ==================================================================
   Base
   ================================================================== */
body {
  font-family: var(--font-body);
  font-size: 1.6rem;
  line-height: 1.5;
  background: var(--background);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input { font: inherit; }
ul, ol { list-style: none; }

/* ==================================================================
   Header
   ================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.6rem;
  padding-top: max(1rem, env(safe-area-inset-top));
}
.header__inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.header__title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.header__title svg { width: 2.2rem; height: 2.2rem; flex-shrink: 0; color: var(--light-blue); }
.header__caption {
  font-size: 1.3rem;
  color: var(--text-muted);
  font-weight: 400;
  font-family: var(--font-body);
  margin-left: 0.2rem;
}
.header__actions { display: flex; gap: 0.4rem; }

.icon-btn {
  width: 4rem;
  height: 4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.8rem;
  color: var(--text);
  transition: background-color 0.15s ease;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 2rem; height: 2rem; }

/* ==================================================================
   Layout
   ================================================================== */
.main {
  flex: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.4rem;
  padding: 1.4rem;
  padding-bottom: 1.4rem;
  min-width: 0;
}
@media (min-width: 900px) {
  .main {
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 2.4rem;
    padding: 2.4rem;
  }
}

/* ==================================================================
   Toolbar
   ================================================================== */
.toolbar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
  min-width: 0;
}
.toolbar > * { flex-shrink: 0; }
.toolbar__meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  flex-shrink: 0;
}
.btn {
  padding: 0.7rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 0.7rem;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--color-correct);
  border-color: var(--color-correct);
  color: white;
}
.btn--primary:hover { background: #388e3c; border-color: #388e3c; }
.btn--danger {
  background: var(--color-error);
  border-color: var(--color-error);
  color: white;
}
.btn--danger:hover { background: #9a2920; border-color: #9a2920; }
.btn svg { width: 1.4rem; height: 1.4rem; }

.toolbar__timer {
  font-size: 1.3rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  user-select: none;
  padding: 0.2rem 0.4rem;
  border-radius: 0.4rem;
  transition: background-color 0.15s ease;
}
.toolbar__timer:hover { background: var(--surface-2); }
.toolbar__timer::before {
  content: "";
  display: inline-block;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--color-correct);
  animation: pulse-dot 1.4s ease-in-out infinite;
}
.toolbar__timer--paused::before {
  background: var(--text-muted);
  animation: none;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}
.toolbar__progress {
  font-size: 1.3rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

/* ==================================================================
   Active clue bar (móvil)
   ================================================================== */
.clue-bar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--surface-2);
  border-radius: 1rem;
  padding: 0.8rem 0.8rem;
  margin-bottom: 0.8rem;
  min-height: 5.6rem;
}
@media (min-width: 900px) {
  .clue-bar { display: none; }
}
.clue-bar__nav {
  width: 4rem;
  height: 4rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  color: var(--text);
  transition: background 0.15s ease;
}
.clue-bar__nav:hover { background: var(--surface-2); }
.clue-bar__nav:active { transform: scale(0.92); }
.clue-bar__nav svg { width: 1.6rem; height: 1.6rem; }
.clue-bar__content { flex: 1; min-width: 0; padding: 0 0.2rem; }
.clue-bar__label {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}
.clue-bar__text {
  font-size: 1.45rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

/* ==================================================================
   Grid
   ================================================================== */
.grid-section {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}
.grid-wrap {
  position: relative;
  width: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0.2rem;
  /* on mobile let it scroll; on desktop it'll just fit */
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.grid {
  display: grid;
  background: var(--cell-block);
  border: 2px solid var(--cell-block);
  border-radius: 0.4rem;
  gap: 1px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-x pan-y;
  /* sized via JS using CSS vars --cw-cols and --cw-cell */
  grid-template-columns: repeat(var(--cw-cols, 32), var(--cw-cell, 28px));
  grid-auto-rows: var(--cw-cell, 28px);
}

.cell {
  position: relative;
  background: var(--cell-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(var(--cw-cell, 28px) * 0.55);
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
  font-family: var(--font-mono);
  color: var(--text);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.cell--block { background: var(--cell-block); cursor: default; }
.cell--word-active:not(.cell--block) { background: var(--cell-active-word); }
.cell--active:not(.cell--block) { background: var(--cell-active); color: var(--text); }
.cell--error:not(.cell--block) { background: var(--cell-error); color: white; }

.cell__num {
  position: absolute;
  top: 1px;
  left: 2px;
  font-size: calc(var(--cw-cell, 28px) * 0.27);
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--text-muted);
  pointer-events: none;
  line-height: 1;
}
.cell--active .cell__num,
.cell--error .cell__num { color: inherit; opacity: 0.85; }

.cw-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  text-align: center;
  text-transform: uppercase;
  font: inherit;
  color: inherit;
  outline: none;
  caret-color: transparent;
  padding: 0;
  cursor: pointer;
}

@keyframes pop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
.cell--just-filled { animation: pop 0.18s ease; }

@keyframes victory-wave {
  0%   { transform: scale(1);    background: var(--cell-bg); }
  35%  { transform: scale(1.15); background: var(--color-correct); color: white; }
  70%  { transform: scale(1.1);  background: var(--color-correct); color: white; }
  100% { transform: scale(1);    background: var(--color-correct); color: white; }
}

/* ==================================================================
   Definitions panel (desktop)
   ================================================================== */
.defs {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 1.2rem;
  overflow: hidden;
  height: fit-content;
  max-height: calc(100vh - 14rem);
  position: sticky;
  top: 8rem;
  flex-direction: column;
}
@media (min-width: 900px) {
  .defs { display: flex; }
}
.defs__tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: var(--surface);
}
.defs__tab {
  flex: 1;
  padding: 1.2rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}
.defs__tab--active {
  color: var(--text);
  border-bottom-color: var(--light-blue);
}
.defs__list {
  overflow-y: auto;
  padding: 0.4rem 0;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}
.defs__list::-webkit-scrollbar { width: 6px; }
.defs__list::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }

.defs__group { padding: 0.4rem 0; }
.defs__item {
  display: flex;
  gap: 1rem;
  padding: 0.7rem 1.2rem;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1.4;
  transition: background-color 0.12s ease;
  border-left: 3px solid transparent;
  align-items: baseline;
}
.defs__item:hover { background: var(--surface-2); }
.defs__item--active {
  background: var(--cell-active-word);
  border-left-color: var(--light-blue);
}
.defs__item--solved { color: var(--text-muted); text-decoration: line-through; opacity: 0.7; }
.defs__item-num {
  font-weight: 700;
  color: var(--text-muted);
  min-width: 2.6rem;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
  font-size: 1.3rem;
}
.defs__item--active .defs__item-num { color: var(--text); }

/* ==================================================================
   Mobile keyboard
   ================================================================== */
.keyboard {
  position: sticky;
  bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--border-color);
  padding: 0.6rem 0.4rem;
  padding-bottom: max(0.6rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  z-index: 40;
}
@media (min-width: 900px) { .keyboard { display: none; } }

.keyboard__row { display: flex; gap: 0.4rem; justify-content: center; }
.key {
  flex: 1 1 0;
  min-width: 0;
  height: 4.4rem;
  background: var(--key-bg);
  border-radius: 0.5rem;
  font-size: 1.55rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  color: var(--text);
  transition: transform 0.05s ease, filter 0.1s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.key:active { transform: scale(0.92); filter: brightness(0.92); }
.key--wide { flex: 1.5 1 0; }
.key svg { width: 1.9rem; height: 1.9rem; }

/* ==================================================================
   Toast
   ================================================================== */
.toast {
  position: fixed;
  top: max(1.2rem, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%) translateY(-150%);
  background: var(--text);
  color: var(--background);
  padding: 1rem 1.6rem;
  border-radius: 0.8rem;
  font-size: 1.4rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1), opacity 0.2s ease;
  pointer-events: none;
  max-width: calc(100vw - 3.2rem);
  opacity: 0;
}
.toast--show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast--success { background: var(--color-correct); color: white; }
.toast--error { background: var(--color-error); color: white; }

/* ==================================================================
   Pause overlay
   ================================================================== */
.pause-overlay {
  position: absolute;
  inset: 0;
  background: var(--surface);
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 0.4rem;
  z-index: 10;
}
.pause-overlay--show { display: flex; animation: fade-in 0.2s ease; }
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.pause-overlay__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  text-align: center;
}
.pause-overlay__content svg {
  width: 5rem;
  height: 5rem;
  color: var(--text-muted);
}
.pause-overlay__content p {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--text);
}
.pause-overlay__content .btn {
  padding: 1rem 2rem;
  font-size: 1.4rem;
}

/* ==================================================================
   Error navigation FAB
   ================================================================== */
.error-nav {
  position: fixed;
  bottom: 1.6rem;
  right: 1.6rem;
  bottom: calc(1.6rem + env(safe-area-inset-bottom));
  z-index: 90;

  display: none;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.2rem;

  background: var(--color-error);
  color: white;
  border-radius: 3rem;
  box-shadow: 0 4px 14px rgba(187, 52, 41, 0.4);
  font-weight: 600;
  font-size: 1.4rem;

  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.error-nav:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(187, 52, 41, 0.5);
}
.error-nav:active { transform: translateY(0); }
.error-nav--visible {
  display: inline-flex;
  animation: pop-in 0.3s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.error-nav svg { width: 1.8rem; height: 1.8rem; }
.error-nav__count {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 1.2rem;
  padding: 0.1rem 0.6rem;
  font-variant-numeric: tabular-nums;
  font-size: 1.2rem;
  min-width: 2rem;
  text-align: center;
}
@keyframes pop-in {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
/* On mobile, position above the keyboard */
@media (max-width: 899px) {
  .error-nav {
    bottom: calc(20rem + env(safe-area-inset-bottom));
  }
}

/* ==================================================================
   Modal
   ================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1.6rem;
}
.modal-backdrop--show { display: flex; }
.modal {
  background: var(--surface);
  border-radius: 1.2rem;
  padding: 2.4rem;
  max-width: 50rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.3s cubic-bezier(0.2, 0.9, 0.4, 1);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.modal h2 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 600;
  margin-bottom: 1.4rem;
  letter-spacing: -0.01em;
}
.modal__content { font-size: 1.4rem; line-height: 1.6; color: var(--text-muted); }
.modal__content kbd {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  background: var(--surface-2);
  border: 1px solid var(--border-color);
  border-bottom-width: 2px;
  border-radius: 0.4rem;
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--text);
  margin: 0 0.1rem;
}
.modal__content p { margin-bottom: 0.6rem; }
.modal__section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--text);
  margin-top: 1.4rem !important;
  margin-bottom: 0.8rem !important;
}
.modal__section-title:first-child { margin-top: 0 !important; }
.modal__close {
  width: 100%;
  margin-top: 2rem;
  padding: 1.2rem;
  background: var(--text);
  color: var(--background);
  border-radius: 0.8rem;
  font-weight: 600;
  font-size: 1.4rem;
}

/* Confirm modal variant */
.modal--confirm { max-width: 38rem; }
.modal__confirm-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  letter-spacing: -0.01em;
}
.modal__confirm-msg {
  font-size: 1.4rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.5;
}
.modal__confirm-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: flex-end;
}
.modal__confirm-actions .btn {
  padding: 0.9rem 1.6rem;
  font-size: 1.4rem;
  font-weight: 500;
}

/* Victory modal variant */
.modal--victory {
  max-width: 42rem;
  text-align: center;
  padding: 3rem 2.4rem 2.4rem;
  position: relative;
  overflow: hidden;
}
.victory__emoji {
  font-size: 6.4rem;
  animation: victory-pop 0.6s cubic-bezier(0.2, 1.5, 0.4, 1);
  margin-bottom: 0.8rem;
}
@keyframes victory-pop {
  0% { transform: scale(0) rotate(-30deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.victory__title {
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  background: linear-gradient(135deg, var(--color-correct), var(--light-blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.victory__subtitle {
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-bottom: 2.4rem;
}
.victory__stats {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2.4rem;
}
.victory__stat {
  flex: 1;
  background: var(--surface-2);
  border-radius: 1.2rem;
  padding: 1.4rem 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.victory__stat-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.victory__stat-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.victory__actions {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
}
.victory__actions .btn {
  padding: 1rem 1.8rem;
  font-size: 1.4rem;
  font-weight: 600;
}
/* Confetti background */
.victory__confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 20%, var(--color-correct) 2px, transparent 3px),
    radial-gradient(circle at 80% 15%, var(--light-blue) 2px, transparent 3px),
    radial-gradient(circle at 25% 80%, var(--color-present) 2px, transparent 3px),
    radial-gradient(circle at 90% 75%, var(--color-correct) 2px, transparent 3px),
    radial-gradient(circle at 50% 10%, var(--light-blue) 2px, transparent 3px),
    radial-gradient(circle at 15% 50%, var(--color-present) 2px, transparent 3px),
    radial-gradient(circle at 75% 50%, var(--color-correct) 2px, transparent 3px);
  background-size: 100% 100%;
  opacity: 0.5;
  animation: confetti-fade 2s ease-out;
}
@keyframes confetti-fade {
  0% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 0.7; }
  100% { opacity: 0.3; transform: scale(1); }
}

/* ==================================================================
   Mobile tweaks
   ================================================================== */
@media (max-width: 899px) {
  .main {
    padding: 1rem;
    gap: 1rem;
  }

  /* Toolbar más compacta */
  .toolbar { gap: 0.5rem; margin-bottom: 0.4rem; }
  .btn {
    padding: 0.7rem 1rem;
    font-size: 1.3rem;
  }
  /* Hide labels on tight screens, keep just the icon */
  .btn__label { display: inline; }

  /* Grid wrap: enable both-axis scroll when needed */
  .grid-wrap {
    /* Use a fixed height = available viewport minus chrome, set by JS via --cw-grid-max-h */
    height: var(--cw-grid-max-h, 50vh);
    max-height: var(--cw-grid-max-h, 50vh);
    justify-content: flex-start;
    align-items: flex-start;
  }
  /* When grid overflows, show subtle scrim edges to hint at scrollability */
  .grid-wrap--scrollable {
    position: relative;
  }
  .grid-wrap--scrollable::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
      linear-gradient(90deg, var(--background) 0%, transparent 4%, transparent 96%, var(--background) 100%),
      linear-gradient(180deg, var(--background) 0%, transparent 4%, transparent 96%, var(--background) 100%);
    opacity: 0.6;
  }
}

@media (max-width: 480px) {
  .btn__label { display: none; }
  .btn { padding: 0.7rem 0.9rem; }
  .btn svg { width: 1.6rem; height: 1.6rem; }
  .header { padding: 0.8rem 1.2rem; }
  .header__title { font-size: 1.9rem; }
  .header__title svg { width: 2rem; height: 2rem; }
}

@media (max-width: 380px) {
  .header__caption { display: none; }
  .key { font-size: 1.4rem; height: 4rem; }
  .clue-bar { padding: 0.6rem; gap: 0.6rem; min-height: 5rem; }
  .clue-bar__nav { width: 3.6rem; height: 3.6rem; }
  .clue-bar__text { font-size: 1.35rem; }
}