/* ================================================================
   BITÁCORA — sistema visual
   Papel de archivo, tinta, naranja bitcoin y verde Colombia.
   ================================================================ */

:root {
  --paper: #f2ede2;
  --paper-bright: #fbf7ec;
  --paper-deep: #e7dfcf;
  --ink: #17150f;
  --ink-soft: #4b463a;
  --ink-faint: #7b7464;
  --orange: #e4572e;
  --orange-deep: #b93d1c;
  --green: #0e5a46;
  --green-bright: #1f7a5f;
  --blue: #26357a;
  --mustard: #e9b949;
  --red: #a62b12;
  --line: rgba(23, 21, 15, 0.16);
  --line-strong: rgba(23, 21, 15, 0.35);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "Courier New", monospace;
  --shadow: 6px 6px 0 rgba(23, 21, 15, 0.92);
  --shadow-soft: 4px 4px 0 rgba(23, 21, 15, 0.18);
  --radius: 3px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 8% 4%, rgba(228, 87, 46, 0.09), transparent 30%),
    radial-gradient(circle at 94% 88%, rgba(14, 90, 70, 0.07), transparent 32%),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(23, 21, 15, 0.045) 39px 40px);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='.05'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  background: var(--orange);
  color: var(--paper-bright);
}

h1,
h2,
h3,
h4,
p,
ol,
ul,
dl,
dd {
  margin: 0;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper-bright);
  font-family: var(--mono);
  font-size: 12px;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

/* ------------------------------------------------ primitivas */

.mono {
  font-family: var(--mono);
}

.micro {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.kicker span + span::before {
  content: "/";
  margin-right: 10px;
  color: var(--orange);
}

.panel {
  background: var(--paper-bright);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line-strong);
}

.panel-kicker {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange-deep);
  margin-bottom: 5px;
}

.btn {
  --btn-bg: var(--paper-bright);
  --btn-fg: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 10px 18px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
}

.btn:active {
  transform: translate(0, 0);
  box-shadow: 2px 2px 0 var(--ink);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
  box-shadow: 2px 2px 0 var(--ink);
}

.btn-primary {
  --btn-bg: var(--orange);
  --btn-fg: var(--ink);
}

.btn-ink {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper-bright);
}

.btn-ghost {
  --btn-bg: transparent;
  box-shadow: none;
  min-height: 40px;
  padding: 8px 13px;
  font-size: 12px;
}

.btn-ghost:hover {
  background: rgba(23, 21, 15, 0.06);
  box-shadow: 3px 3px 0 var(--ink);
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  background: var(--paper-bright);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1;
  transition: background 0.14s ease, color 0.14s ease;
}

.icon-btn:hover {
  background: var(--ink);
  color: var(--paper-bright);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-bright);
  box-shadow: 0 0 0 0 rgba(31, 122, 95, 0.5);
  animation: live-pulse 2.4s infinite;
  flex: none;
}

.live-line {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stamp-mini {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  padding: 4px 7px;
  border: 1.5px solid var(--ink);
  transform: rotate(2deg);
  background: var(--mustard);
}

/* ------------------------------------------------ barra superior */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 74px;
  padding: 10px clamp(16px, 3vw, 36px);
  background: rgba(242, 237, 226, 0.92);
  border-bottom: 2px solid var(--ink);
  backdrop-filter: blur(8px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  margin-right: auto;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--orange);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
}

.brand-text strong {
  display: block;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}

.brand-text small {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.sound-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  flex: none;
}

.sound-btn svg {
  width: 18px;
  height: 18px;
}

.sound-btn .sound-off {
  display: none;
}

.sound-btn[aria-pressed="true"] .sound-on {
  display: none;
}

.sound-btn[aria-pressed="true"] .sound-off {
  display: block;
}

.room-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1.5px solid var(--line-strong);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  background: rgba(251, 247, 236, 0.6);
}

.player-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px 5px 5px;
  border: 1.5px solid var(--ink);
  background: var(--paper-bright);
}

.player-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper-bright);
  font-family: var(--serif);
  font-size: 18px;
  text-transform: uppercase;
}

.player-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.player-meta small {
  font-family: var(--mono);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}

.player-meta strong {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}

.player-score {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  padding: 5px 8px;
  background: var(--orange);
  border-left: 1.5px solid var(--ink);
  white-space: nowrap;
}

/* ------------------------------------------------ portada */

.join {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 430px);
  gap: clamp(32px, 5vw, 76px);
  align-items: center;
  width: min(1340px, 100%);
  margin: 0 auto;
  padding: clamp(36px, 6vw, 76px) clamp(20px, 4vw, 48px) 64px;
  min-height: calc(100vh - 74px);
}

.join-intro {
  max-width: 720px;
}

.join-title {
  margin: 22px 0 24px;
  font-family: var(--serif);
  font-size: clamp(70px, 9.6vw, 144px);
  font-weight: 600;
  line-height: 0.76;
  letter-spacing: -0.05em;
}

.join-title em {
  display: inline-block;
  font-style: italic;
  font-weight: 500;
  color: var(--orange);
  margin-left: clamp(8px, 2vw, 30px);
  text-shadow: 3px 3px 0 rgba(23, 21, 15, 0.14);
}

.join-lede {
  max-width: 560px;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.rules {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  max-width: 590px;
}

.rules li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid var(--line-strong);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.rules li:last-child {
  border-bottom: 1px solid var(--line-strong);
}

.rules strong {
  color: var(--ink);
}

.rule-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--orange-deep);
  padding-top: 2px;
}

.join-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.join-strip i {
  width: 5px;
  height: 5px;
  background: var(--orange);
  transform: rotate(45deg);
  flex: none;
}

.join-footnote {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

.join-side {
  align-self: center;
}

.join-panel {
  padding: 24px;
  box-shadow: 9px 9px 0 rgba(23, 21, 15, 0.9);
}

.join-panel-title {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.join-panel-copy {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
}

#joinForm {
  margin-top: 20px;
}

.field-label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 7px;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
}

#nameInput {
  width: 100%;
  height: 54px;
  padding: 0 13px;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

#nameInput::placeholder {
  color: var(--ink-faint);
  font-weight: 400;
}

#nameInput:focus {
  outline: none;
  background: #fffdf6;
  box-shadow: inset 0 -4px 0 var(--orange);
}

#joinBtn {
  min-width: 116px;
  height: 54px;
  min-height: 54px;
}

.field-help {
  margin-top: 7px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
}

.form-error {
  margin-top: 10px;
  padding: 8px 10px;
  border-left: 3px solid var(--red);
  background: rgba(166, 43, 18, 0.08);
  color: var(--red);
  font-size: 12.5px;
  font-weight: 600;
}

.join-live {
  margin-top: 24px;
  padding-top: 17px;
  border-top: 1px dashed var(--line-strong);
}

.join-live .live-line {
  color: var(--ink-soft);
}

.join-top {
  margin-top: 12px;
}

.mini-rank {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}

.mini-rank:last-child {
  border-bottom: 0;
}

.mini-rank .rank {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--orange-deep);
}

.mini-rank .who {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.mini-rank .pts {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-soft);
}

.empty-note {
  padding: 8px 0;
  font-size: 12px;
  color: var(--ink-faint);
  font-style: italic;
}

.join-disclaimer {
  margin: 14px 4px 0;
  line-height: 1.55;
  color: var(--ink-faint);
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 9.5px;
}

/* ------------------------------------------------ juego */

.game {
  position: relative;
  z-index: 1;
  width: min(1460px, 100%);
  margin: 0 auto;
  padding: 28px clamp(16px, 3vw, 36px) 72px;
}

.game-head {
  display: flex;
  align-items: flex-end;
  gap: 28px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--ink);
}

.game-head-copy {
  margin-right: auto;
}

.game-title {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.game-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 3px;
}

.seal-counter {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: right;
}

.seal-counter strong {
  font-family: var(--mono);
  font-size: 23px;
  font-weight: 500;
}

.seal-counter span {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.seal-dots {
  display: grid;
  grid-template-columns: repeat(4, 10px);
  gap: 4px;
}

.seal-dots i {
  width: 10px;
  height: 10px;
  border: 1.2px solid var(--ink);
  background: transparent;
}

.seal-dots i.is-solved {
  background: var(--green);
}

.seal-dots i.is-current {
  background: var(--orange);
}

.game-actions {
  display: flex;
  gap: 8px;
  padding-bottom: 1px;
}

.btn-ranking {
  display: none;
}

.game-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 318px;
  gap: 26px;
  align-items: start;
  margin-top: 20px;
}

.stage {
  min-width: 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 9px;
}

.section-title {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.section-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-tools .micro {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 9.5px;
  color: var(--ink-faint);
}

.arrow-buttons {
  display: flex;
  gap: 5px;
}

/* ------------------------------------------------ timeline */

.timeline {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 12px 4px 20px;
  margin: 0 -4px;
  scrollbar-color: var(--ink-soft) transparent;
  scrollbar-width: thin;
}

.timeline::-webkit-scrollbar {
  height: 8px;
}

.timeline::-webkit-scrollbar-thumb {
  background: var(--ink-soft);
  border: 2px solid var(--paper);
}

.timeline-loading {
  width: 280px;
  height: 400px;
  display: grid;
  place-items: center;
  border: 2px dashed var(--line-strong);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faint);
}

.timeline-track {
  position: relative;
  display: flex;
  gap: 18px;
  width: max-content;
  padding: 0 6px 10px;
}

.timeline-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 55px;
  border-top: 2px dashed var(--line-strong);
  z-index: 0;
}

.stop {
  width: 272px;
  flex: none;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  position: relative;
}

.stop-card {
  position: relative;
  height: 354px;
  perspective: 1500px;
  border-radius: var(--radius);
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.22, 0.8, 0.24, 1);
}

.stop.is-flipped .card-inner {
  transform: rotateY(180deg);
}

.face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper-bright);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 5px 5px 0 rgba(23, 21, 15, 0.85);
}

.face--front {
  color: var(--paper-bright);
}

.face--front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
}

.face--front::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23, 21, 15, 0.16) 0%, rgba(23, 21, 15, 0) 36%, rgba(23, 21, 15, 0.9) 100%);
  pointer-events: none;
}

.front-top {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.year-tag {
  display: inline-block;
  padding: 6px 9px 5px;
  background: var(--paper-bright);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
}

.place-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 1.5px solid var(--ink);
  background: var(--paper-bright);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.place-tag.is-colombia {
  background: var(--green);
  color: var(--paper-bright);
  border-color: var(--ink);
}

.place-tag.is-mundo {
  background: var(--blue);
  color: var(--paper-bright);
}

.front-caption {
  position: absolute;
  z-index: 2;
  left: 16px;
  right: 16px;
  bottom: 15px;
}

.front-caption .front-index {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 6px;
}

.front-caption h3 {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 230px;
}

.flip-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.75;
}

.face--back {
  transform: rotateY(180deg);
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.5), transparent 45%),
    var(--paper-bright);
}

.back-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 9px;
}

.back-date {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: var(--orange-deep);
}

.face--back h3 {
  margin-top: 12px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}

.back-copy {
  margin-top: 9px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-soft);
  position: relative;
  z-index: 1;
}

.back-fact {
  margin-top: auto;
  padding: 9px 0;
  border-top: 1px dashed var(--line-strong);
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.45;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
}

.back-source {
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.5;
  color: var(--ink-faint);
}

.back-source a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.back-year {
  position: absolute;
  right: 8px;
  bottom: 38px;
  font-family: var(--serif);
  font-size: 86px;
  font-weight: 600;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(23, 21, 15, 0.13);
  pointer-events: none;
  user-select: none;
}

.stop-card:hover .face--front img {
  transform: scale(1.025);
}

.face--front img {
  transition: transform 0.5s ease, filter 0.3s ease;
}

.stop.is-locked .face--front img {
  filter: grayscale(0.78) contrast(0.98) brightness(0.94);
}

.stop.is-locked .flip-hint {
  display: none;
}

.stop.is-locked .front-caption h3 {
  opacity: 0.72;
}

.lock-veil {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--paper-bright);
  background: rgba(23, 21, 15, 0.56);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.stop.is-locked .lock-veil {
  opacity: 1;
}

.lock-badge {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 2px solid var(--paper-bright);
  background: var(--ink);
  font-family: var(--mono);
  font-size: 17px;
}

.lock-veil span {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  max-width: 160px;
  line-height: 1.5;
}

.seal-badge {
  display: none;
  position: absolute;
  z-index: 4;
  left: 12px;
  top: 54px;
  padding: 5px 8px;
  background: var(--green);
  color: var(--paper-bright);
  border: 1.5px solid var(--ink);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: rotate(-3deg);
  box-shadow: 2px 2px 0 var(--ink);
}

.current-badge {
  display: none;
  position: absolute;
  z-index: 4;
  right: -6px;
  top: 50px;
  padding: 4px 8px;
  background: var(--orange);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: rotate(2deg);
  box-shadow: 2px 2px 0 var(--ink);
}

.stop.is-current .face {
  box-shadow:
    5px 5px 0 rgba(23, 21, 15, 0.9),
    0 0 0 4px var(--orange);
}

.stop.is-solved .seal-badge {
  display: inline-block;
}

.stop.is-current .current-badge {
  display: inline-block;
}

.face--front.is-missing {
  background:
    repeating-linear-gradient(135deg, rgba(23, 21, 15, 0.05) 0 12px, transparent 12px 24px),
    var(--paper-deep);
}

.face--front.is-missing::before {
  content: "IMAGEN DEL BLOQUE";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  z-index: 0;
}

.stop.is-current .stop-card {
  animation: card-breathe 3.6s ease-in-out infinite;
}

.stop.is-locked .stop-card {
  cursor: not-allowed;
}

.stop.is-locked.is-shaking .stop-card {
  animation: nudge 0.4s ease;
}

.stop-node {
  position: relative;
  z-index: 2;
  width: 46px;
  height: 46px;
  margin: 12px auto 0;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink);
  transition: background 0.2s ease, color 0.2s ease;
}

.stop.is-current .stop-node {
  background: var(--orange);
  color: var(--ink);
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 6px var(--orange);
}

.stop.is-solved .stop-node {
  background: var(--green);
  color: var(--paper-bright);
}

.stop.is-locked .stop-node {
  background:
    repeating-linear-gradient(45deg, transparent 0 3px, rgba(23, 21, 15, 0.12) 3px 4px),
    var(--paper-deep);
  color: var(--ink-faint);
}

.stop-caption {
  text-align: center;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}

.stop.is-current .stop-caption {
  color: var(--orange-deep);
  font-weight: 500;
}

/* ------------------------------------------------ consola de reto */

.console {
  position: relative;
  margin-top: 15px;
  padding: 16px 20px 14px;
  background: var(--paper-bright);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 7px 7px 0 rgba(23, 21, 15, 0.92);
}

.console::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 76px;
  height: 4px;
  background: var(--orange);
}

.console-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 11px;
  border-bottom: 1px dashed var(--line-strong);
}

.console-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.console-kicker {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}

.attempt-chip {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-left: 1px solid var(--line-strong);
  padding-left: 8px;
}

.timer-box {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 180px;
}

.timer-text {
  font-family: var(--mono);
  font-size: 9.5px;
  min-width: 34px;
  text-align: right;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.timer-track {
  height: 6px;
  flex: 1;
  background: var(--paper-deep);
  border: 1px solid var(--ink);
  overflow: hidden;
}

.timer-track i {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--green);
  transition: width 0.12s linear, background 0.2s ease;
}

.timer-box.is-low .timer-track i {
  background: var(--red);
}

.timer-box.is-low .timer-text {
  color: var(--red);
  font-weight: 500;
}

.question {
  margin: 13px 0 4px;
  font-family: var(--serif);
  font-size: clamp(23px, 2.5vw, 30px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.022em;
  max-width: 820px;
}

.question:focus {
  outline: none;
}

.console-sub {
  font-size: 12.5px;
  color: var(--ink-soft);
  max-width: 660px;
}

.answers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 13px;
}

.answer {
  --answer-bg: var(--orange);
  --answer-fg: var(--ink);
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 64px;
  padding: 9px 13px;
  text-align: left;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: var(--answer-bg);
  color: var(--answer-fg);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.28;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.14s ease, box-shadow 0.14s ease, opacity 0.2s ease, filter 0.2s ease;
}

.answer.a0 {
  --answer-bg: var(--orange);
  --answer-fg: var(--ink);
}

.answer.a1 {
  --answer-bg: var(--mustard);
  --answer-fg: var(--ink);
}

.answer.a2 {
  --answer-bg: var(--green);
  --answer-fg: var(--paper-bright);
}

.answer.a3 {
  --answer-bg: var(--blue);
  --answer-fg: var(--paper-bright);
}

.answer:hover:not(:disabled) {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
}

.answer:active:not(:disabled) {
  transform: translate(0, 0);
  box-shadow: 2px 2px 0 var(--ink);
}

.answer:disabled {
  cursor: default;
}

.answer-shape {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1.8px solid currentColor;
  border-radius: 50%;
  background: rgba(251, 247, 236, 0.14);
}

.answer-shape svg {
  width: 15px;
  height: 15px;
}

.answer-text {
  position: relative;
  z-index: 1;
}

.answer.is-picked {
  opacity: 0.72;
}

.answer.is-wrong {
  opacity: 0.38;
  filter: grayscale(0.55);
  box-shadow: 1px 1px 0 var(--ink);
}

.answer.is-wrong .answer-text {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.answer.is-right {
  box-shadow: 3px 3px 0 var(--ink), inset 0 0 0 4px rgba(251, 247, 236, 0.85);
  animation: right-pop 0.45s ease;
}

.answer.is-right::after {
  content: "✓";
  position: absolute;
  right: 9px;
  top: 7px;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  background: var(--paper-bright);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.answer:disabled .answer-shape {
  background: rgba(251, 247, 236, 0.08);
}

.feedback {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-height: 46px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-strong);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.feedback-icon {
  font-size: 12px;
  line-height: 1.6;
  color: var(--orange-deep);
}

.feedback p {
  max-width: 780px;
}

.feedback.is-correct {
  color: var(--green);
}

.feedback.is-correct .feedback-icon {
  color: var(--green);
}

.feedback.is-wrong {
  color: var(--red);
}

.feedback.is-wrong .feedback-icon {
  color: var(--red);
}

.feedback strong {
  color: inherit;
}

.feedback .points {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  background: var(--green);
  color: var(--paper-bright);
  font-family: var(--mono);
  font-size: 10px;
  vertical-align: 1px;
}

.console-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 4px;
}

.console-foot .micro {
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 9.5px;
  color: var(--ink-faint);
  max-width: 440px;
}

.console-foot .btn {
  min-height: 42px;
  padding: 8px 15px;
  font-size: 12.5px;
  white-space: nowrap;
}

/* ------------------------------------------------ tablero */

.board {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 118px);
  padding: 17px;
  background: var(--paper-bright);
  z-index: 30;
}

.board-head h3 {
  margin-top: 2px;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.board-close {
  display: none;
}

.board-legend {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 48px 46px;
  gap: 7px;
  padding: 10px 0 7px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.board-legend span:nth-child(3),
.board-legend span:nth-child(4) {
  text-align: right;
}

.board-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
  min-height: 90px;
}

.board-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 48px 46px;
  gap: 7px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.board-row:last-child {
  border-bottom: 0;
}

.board-row .rank {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ink-faint);
}

.board-row .name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.board-row .name small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 7.5px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-top: 1px;
}

.board-row .seals {
  font-family: var(--mono);
  font-size: 10px;
  text-align: right;
  color: var(--ink-soft);
}

.board-row .pts {
  font-family: var(--mono);
  font-size: 10px;
  text-align: right;
  font-weight: 500;
}

.board-row.is-me {
  background: rgba(228, 87, 46, 0.1);
  box-shadow: inset 3px 0 0 var(--orange);
  padding-left: 6px;
}

.board-row.is-me .name {
  color: var(--orange-deep);
}

.board-row.is-top .rank {
  color: var(--ink);
  font-weight: 500;
}

.board-row.is-finished .seals::after {
  content: " ✓";
  color: var(--green);
}

.board-empty {
  padding: 22px 6px;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.6;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.board-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-strong);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.board-foot .live-line {
  font-size: 8px;
  text-transform: uppercase;
}

.drawer-backdrop {
  display: none;
}

/* ------------------------------------------------ resultados */

.results {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 34px;
  align-items: start;
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: clamp(34px, 6vw, 72px) clamp(20px, 4vw, 48px) 80px;
}

.results-hero h2 {
  margin: 20px 0 18px;
  font-family: var(--serif);
  font-size: clamp(44px, 6.4vw, 84px);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.045em;
}

.results-hero h2 em {
  font-style: italic;
  font-weight: 500;
  color: var(--orange);
}

.results-copy {
  max-width: 520px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.score-card {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 26px 0 18px;
  max-width: 500px;
  background: var(--ink);
  color: var(--paper-bright);
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 var(--orange);
}

.rank-hero,
.points-hero {
  padding: 16px 20px;
}

.rank-hero {
  min-width: 132px;
  border-right: 1px dashed rgba(251, 247, 236, 0.35);
}

.rank-label {
  display: block;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(251, 247, 236, 0.6);
}

.rank-hero strong {
  display: block;
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--orange);
}

.points-hero strong {
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.points-hero span:last-child {
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(251, 247, 236, 0.6);
  margin-left: 3px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  max-width: 500px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.stat-grid > div {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.stat-grid > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.stat-grid dt {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.stat-grid dd {
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.2;
  margin-top: 2px;
}

.results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.results-board-panel {
  padding: 22px;
  position: sticky;
  top: 96px;
}

.results-board-panel h3 {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.results-table {
  margin-top: 12px;
}

.results-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 62px 64px 54px;
  gap: 8px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.results-row.is-header {
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.results-row.is-me {
  background: rgba(228, 87, 46, 0.1);
  box-shadow: inset 3px 0 0 var(--orange);
  padding-left: 6px;
}

.results-row .r-rank {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faint);
}

.results-row .r-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.results-row .r-attempts,
.results-row .r-seals,
.results-row .r-points {
  font-family: var(--mono);
  font-size: 10px;
  text-align: right;
}

.results-row .r-points {
  font-weight: 500;
}

.results-footnote {
  margin-top: 14px;
  line-height: 1.6;
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 9px;
  color: var(--ink-faint);
}

/* ------------------------------------------------ avisos */

.toast {
  position: fixed;
  top: 86px;
  left: 50%;
  right: auto;
  bottom: auto;
  z-index: 150;
  transform: translate(-50%, -14px);
  max-width: min(440px, calc(100vw - 32px));
  padding: 11px 15px;
  background: var(--ink);
  color: var(--paper-bright);
  border: 1.5px solid var(--orange);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.45;
  letter-spacing: 0.01em;
  box-shadow: 4px 4px 0 rgba(228, 87, 46, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 30px;
  background: var(--paper);
  font-family: var(--mono);
  text-align: center;
}

/* ------------------------------------------------ animaciones */

@keyframes live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(31, 122, 95, 0.45);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(31, 122, 95, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(31, 122, 95, 0);
  }
}

@keyframes card-breathe {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes nudge {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

@keyframes right-pop {
  0% {
    transform: scale(0.985);
  }
  55% {
    transform: scale(1.012);
  }
  100% {
    transform: scale(1);
  }
}

/* ------------------------------------------------ responsive */

@media (max-width: 1180px) {
  .game-grid {
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 20px;
  }

  .stop {
    width: 262px;
  }

  .face--back h3 {
    font-size: 21px;
  }
}

@media (max-width: 1080px) {
  .join {
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 36px;
  }

  .join-title {
    font-size: clamp(66px, 9vw, 108px);
  }

  .game-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .btn-ranking {
    display: inline-flex;
  }

  .board {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(370px, 88vw);
    max-height: none;
    height: 100dvh;
    transform: translateX(104%);
    transition: transform 0.28s cubic-bezier(0.22, 0.8, 0.24, 1);
    z-index: 90;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    box-shadow: -8px 0 0 rgba(23, 21, 15, 0.2);
    padding: 20px;
  }

  .board-close {
    display: inline-grid;
  }

  .drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(23, 21, 15, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
  }

  body.board-open {
    overflow: hidden;
  }

  body.board-open .topbar {
    opacity: 0;
    pointer-events: none;
  }

  body.board-open .board {
    transform: translateX(0);
  }

  body.board-open .drawer-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .results {
    grid-template-columns: minmax(0, 1fr);
    max-width: 760px;
  }

  .results-board-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .join {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding-top: 32px;
    min-height: 0;
  }

  .join-intro {
    display: contents;
  }

  .join-intro > * {
    max-width: 640px;
    width: 100%;
  }

  .join-title {
    order: 2;
  }

  .join-intro > .kicker {
    order: 1;
  }

  .join-lede {
    order: 3;
  }

  .join-side {
    order: 4;
    width: min(520px, 100%);
    margin: 0 auto;
  }

  .rules {
    order: 5;
    margin-top: 12px;
  }

  .join-strip {
    order: 6;
  }

  .join-footnote {
    order: 7;
  }

  .join-panel {
    box-shadow: 7px 7px 0 rgba(23, 21, 15, 0.9);
  }

  .join-title {
    font-size: clamp(60px, 14vw, 108px);
    line-height: 0.8;
  }

  .join-title em {
    margin-left: 0;
  }

  .game-head {
    flex-wrap: wrap;
    gap: 14px 20px;
  }

  .game-head-copy {
    width: 100%;
    margin-right: 0;
  }

  .game-progress {
    margin-right: auto;
  }

  .game-actions {
    margin-left: auto;
  }

  .section-tools .micro {
    display: none;
  }
}

@media (max-width: 680px) {
  .topbar {
    min-height: 64px;
    gap: 10px;
    padding: 9px 14px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    box-shadow: 2px 2px 0 var(--ink);
  }

  .brand-text strong {
    font-size: 20px;
  }

  .brand-text small {
    font-size: 7.5px;
  }

  .room-pill {
    display: none;
  }

  .sound-btn {
    width: 30px;
    height: 30px;
  }

  .sound-btn svg {
    width: 16px;
    height: 16px;
  }

  .player-chip {
    gap: 7px;
  }

  .player-meta small {
    display: none;
  }

  .player-meta strong {
    max-width: 96px;
    font-size: 12px;
  }

  .player-score {
    font-size: 9px;
    padding: 4px 6px;
  }

  .player-avatar {
    width: 28px;
    height: 28px;
    font-size: 15px;
  }

  .join {
    padding: 26px 16px 46px;
  }

  .kicker {
    font-size: 9px;
    gap: 8px;
  }

  .join-title {
    font-size: clamp(58px, 19vw, 86px);
    margin: 16px 0 18px;
  }

  .join-lede {
    font-size: 14.5px;
  }

  .rules {
    margin-top: 24px;
  }

  .rules li {
    grid-template-columns: 32px 1fr;
    gap: 10px;
    font-size: 12.5px;
    padding: 12px 0;
  }

  .join-strip {
    gap: 7px;
    font-size: 8.5px;
    margin-top: 20px;
  }

  .join-panel {
    padding: 18px;
  }

  .join-panel-title {
    font-size: 23px;
  }

  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }

  #joinBtn {
    width: 100%;
  }

  .game {
    padding: 18px 14px 50px;
  }

  .game-title {
    font-size: 29px;
  }

  .game-progress {
    gap: 9px;
  }

  .seal-counter strong {
    font-size: 19px;
  }

  .seal-dots {
    grid-template-columns: repeat(4, 8px);
  }

  .seal-dots i {
    width: 8px;
    height: 8px;
  }

  .game-actions .btn {
    min-height: 36px;
    padding: 6px 9px;
    font-size: 10.5px;
  }

  .timeline {
    padding-top: 10px;
  }

  .timeline-track {
    gap: 13px;
  }

  .timeline-track::before {
    bottom: 51px;
  }

  .stop {
    width: 238px;
  }

  .stop-card {
    height: 330px;
  }

  .front-caption h3 {
    font-size: 20px;
  }

  .face--back {
    padding: 15px;
  }

  .face--back h3 {
    font-size: 19px;
    margin-top: 10px;
  }

  .back-copy {
    font-size: 11.5px;
    line-height: 1.48;
  }

  .back-year {
    font-size: 72px;
  }

  .stop-node {
    width: 40px;
    height: 40px;
    font-size: 10px;
  }

  .stop-caption {
    font-size: 7.5px;
  }

  .console {
    margin-top: 14px;
    padding: 14px 13px 13px;
    box-shadow: 5px 5px 0 rgba(23, 21, 15, 0.92);
  }

  .console-top {
    flex-wrap: wrap;
    gap: 9px;
  }

  .timer-box {
    min-width: 0;
    width: 100%;
  }

  .question {
    font-size: 22px;
    margin-top: 11px;
  }

  .console-sub {
    font-size: 11.5px;
  }

  .answers {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-top: 13px;
  }

  .answer {
    min-height: 58px;
    font-size: 13.5px;
    padding: 8px 11px;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 9px;
  }

  .answer-shape {
    width: 28px;
    height: 28px;
  }

  .feedback {
    font-size: 12px;
  }

  .console-foot {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 10px;
  }

  .console-foot .btn {
    width: 100%;
    min-height: 44px;
  }

  .console-foot .micro {
    font-size: 8.5px;
  }

  .toast {
    top: 74px;
    left: 12px;
    right: 12px;
    max-width: none;
    transform: translateY(-10px);
    text-align: center;
  }

  .toast.is-visible {
    transform: translateY(0);
  }

  .results {
    padding: 28px 16px 60px;
    gap: 24px;
  }

  .results-hero h2 {
    font-size: clamp(44px, 12vw, 62px);
  }

  .score-card {
    box-shadow: 5px 5px 0 var(--orange);
  }

  .rank-hero,
  .points-hero {
    padding: 13px 14px;
  }

  .rank-hero strong {
    font-size: 40px;
  }

  .points-hero strong {
    font-size: 24px;
  }

  .stat-grid dd {
    font-size: 21px;
  }

  .results-actions .btn {
    flex: 1 1 auto;
  }

  .results-board-panel {
    padding: 16px;
  }

  .results-row {
    grid-template-columns: 24px minmax(0, 1fr) 54px 48px;
    font-size: 11px;
  }

  .results-row .r-seals {
    display: none;
  }
}

@media (max-width: 390px) {
  .brand-text small {
    display: none;
  }

  .player-score {
    display: none;
  }

  .join-title {
    font-size: 56px;
  }

  .stop {
    width: 226px;
  }

  .stop-card {
    height: 318px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
