:root {
  --ink: #120c13;
  --paper: #f3ead8;
  --gold: #e5b765;
  --red: #e73f37;
  --wine: #491326;
  --muted: #a69a91;
  --line: rgba(243, 234, 216, 0.16);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--ink);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--paper);
  font-family: "DM Sans", sans-serif;
  background:
    radial-gradient(circle at 18% 24%, rgba(111, 23, 48, 0.34), transparent 28rem),
    radial-gradient(circle at 85% 66%, rgba(114, 43, 31, 0.2), transparent 30rem),
    linear-gradient(135deg, #160c15 0%, #0c0a0d 52%, #171014 100%);
  overflow-x: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  z-index: 10;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.game-shell {
  width: min(1120px, calc(100% - 40px));
  min-height: calc(100vh - 70px);
  margin: 0 auto;
  position: relative;
}

.topbar {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--paper);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.26em;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--ink);
  background: var(--gold);
  border-radius: 50%;
  letter-spacing: -0.08em;
  font-family: "Playfair Display", serif;
  font-size: 15px;
}

.brand-logo {
  width: 58px;
  height: 42px;
  object-fit: contain;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.language-switch {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.18);
}

.language-switch button {
  width: 34px;
  height: 28px;
  border: 0;
  border-radius: 16px;
  color: var(--muted);
  background: transparent;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.language-switch button.active {
  color: var(--ink);
  background: var(--gold);
}

.sound-control {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.18em;
  font-weight: 700;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--paper);
  background: transparent;
  cursor: pointer;
  transition: 180ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  color: var(--gold);
  border-color: var(--gold);
}

.icon-button.muted {
  color: var(--muted);
  opacity: 0.72;
}

.screen {
  display: none;
  min-height: calc(100vh - 190px);
}

.screen.active {
  display: flex;
  animation: screen-in 420ms ease both;
}

.start-screen {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 52px 20px 60px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.32em;
}

.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 38px;
  height: 1px;
  background: var(--gold);
  opacity: 0.7;
}

.hero-lockup {
  position: relative;
  margin-top: 25px;
}

.hero-kicker {
  display: block;
  margin-bottom: -5px;
  color: var(--paper);
  font-family: "Playfair Display", serif;
  font-size: clamp(16px, 2vw, 22px);
  font-style: italic;
}

h1 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(82px, 15vw, 164px);
  font-style: italic;
  line-height: 0.86;
  letter-spacing: -0.07em;
  text-shadow: 6px 7px 0 var(--wine);
}

.vinyl {
  position: absolute;
  width: clamp(82px, 10vw, 112px);
  aspect-ratio: 1;
  right: -56px;
  bottom: -30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle, #111 0 2px, #292226 3px 4px, #111 5px 7px);
  box-shadow: var(--shadow);
  animation: spin 12s linear infinite;
}

.vinyl::after {
  content: "";
  position: absolute;
  width: 10%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #111;
}

.vinyl-label {
  display: grid;
  place-items: center;
  width: 45%;
  aspect-ratio: 1;
  border-radius: 50%;
  color: #181013;
  background: var(--red);
  font-size: 10px;
  font-weight: 700;
}

.intro {
  margin: 45px 0 26px;
  color: #c8beb5;
  font-family: "Playfair Display", serif;
  font-size: 17px;
  line-height: 1.5;
}

.primary-button {
  width: min(330px, 100%);
  min-height: 58px;
  padding: 0 22px 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  color: #1b1012;
  background: var(--gold);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.16em;
  cursor: pointer;
  box-shadow: 7px 7px 0 rgba(98, 29, 34, 0.75);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button:hover,
.primary-button:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 10px 10px 0 rgba(98, 29, 34, 0.75);
  background: #f1c878;
}

.start-meta {
  width: min(330px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.start-meta > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.start-meta > div + div {
  border-left: 1px solid var(--line);
}

.meta-label {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.2em;
}

.start-meta strong {
  color: var(--paper);
  font-family: "Playfair Display", serif;
  font-size: 17px;
}

.microcopy {
  margin: 24px 0 0;
  color: #756c6c;
  font-size: 9px;
  letter-spacing: 0.15em;
}

.game-screen {
  flex-direction: column;
  justify-content: center;
  padding: 45px 0 70px;
}

.game-status {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: end;
  width: min(860px, 100%);
  margin: 0 auto 22px;
}

.progress-copy,
.score-box {
  display: flex;
  flex-direction: column;
}

.progress-copy > span,
.score-box > span {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.2em;
}

.progress-copy strong {
  font-family: "Playfair Display", serif;
  font-size: 23px;
}

.progress-copy small {
  color: var(--muted);
  font-size: 12px;
}

.score-box {
  text-align: right;
}

.score-box strong {
  color: var(--gold);
  font-family: "Playfair Display", serif;
  font-size: 25px;
}

.progress-track {
  height: 2px;
  margin-bottom: 7px;
  background: var(--line);
}

.progress-fill {
  width: 10%;
  height: 100%;
  background: var(--red);
  transition: width 400ms ease;
}

.question-card {
  width: min(860px, 100%);
  min-height: 470px;
  margin: 0 auto;
  padding: 42px clamp(24px, 6vw, 68px) 36px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0)),
    #1c1319;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
}

.question-card::before,
.question-card::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: rgba(229, 183, 101, 0.45);
}

.question-card::before {
  top: 13px;
  left: 13px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.question-card::after {
  right: 13px;
  bottom: 13px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.question-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.timer {
  --timer-progress: 360deg;
  width: 45px;
  height: 45px;
  position: absolute;
  top: 31px;
  left: 50%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--gold);
  background:
    radial-gradient(circle, #1c1319 57%, transparent 59%),
    conic-gradient(var(--gold) var(--timer-progress), rgba(229, 183, 101, 0.13) 0);
  font-family: "Playfair Display", serif;
  font-size: 18px;
  font-weight: 800;
  transform: translateX(-50%);
}

.timer.urgent {
  color: #fff;
  background:
    radial-gradient(circle, #38121c 57%, transparent 59%),
    conic-gradient(var(--red) var(--timer-progress), rgba(231, 63, 55, 0.16) 0);
  animation: timer-pulse 550ms ease-in-out infinite alternate;
}

.category-pill {
  padding: 6px 10px;
  color: var(--gold);
  background: rgba(229, 183, 101, 0.08);
  border: 1px solid rgba(229, 183, 101, 0.3);
  font-size: 8px;
  letter-spacing: 0.22em;
  font-weight: 800;
}

.lives {
  display: flex;
  gap: 7px;
  color: var(--red);
  font-size: 16px;
}

.lives span {
  transition: 250ms ease;
}

.lives span.lost {
  color: #4d4248;
  transform: scale(0.75);
}

.question-card h2 {
  max-width: 670px;
  margin: 30px 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(26px, 3.5vw, 38px);
  line-height: 1.18;
}

.answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.answer-button {
  min-height: 66px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 15px;
  border: 1px solid rgba(243, 234, 216, 0.19);
  color: #ddd2c5;
  background: rgba(255, 255, 255, 0.018);
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}

.answer-button:hover:not(:disabled),
.answer-button:focus-visible:not(:disabled) {
  border-color: var(--gold);
  background: rgba(229, 183, 101, 0.07);
  transform: translateY(-2px);
}

.answer-key {
  flex: 0 0 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(243, 234, 216, 0.18);
  color: var(--gold);
  font-family: "Playfair Display", serif;
  font-size: 13px;
}

.answer-button.correct {
  border-color: #69a77d;
  background: rgba(76, 145, 98, 0.13);
}

.answer-button.wrong {
  border-color: var(--red);
  background: rgba(231, 63, 55, 0.13);
}

.answer-button:disabled {
  cursor: default;
}

.answer-button.dimmed {
  opacity: 0.42;
}

.feedback {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.feedback.visible {
  display: flex;
  animation: feedback-in 280ms ease both;
}

.feedback > div {
  display: flex;
  gap: 13px;
  align-items: flex-start;
}

.feedback-icon {
  flex: 0 0 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #10120f;
  background: #79b68b;
  font-weight: 900;
}

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

.feedback strong {
  font-family: "Playfair Display", serif;
  font-size: 16px;
}

.feedback p {
  max-width: 490px;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.next-button {
  flex: 0 0 auto;
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid var(--gold);
  color: var(--gold);
  background: transparent;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
  cursor: pointer;
}

.streak-row {
  width: min(860px, 100%);
  margin: 22px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.2em;
}

.streak-pips {
  display: flex;
  gap: 5px;
}

.streak-pips span {
  width: 20px;
  height: 3px;
  background: #3e343b;
}

.streak-pips span.on {
  background: var(--gold);
}

.streak-row strong {
  color: var(--gold);
  font-size: 10px;
}

.result-screen {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 55px 20px 70px;
  text-align: center;
  overflow: hidden;
  position: relative;
}

.result-rays {
  position: absolute;
  width: 540px;
  aspect-ratio: 1;
  opacity: 0.055;
  background: repeating-conic-gradient(from 8deg, var(--gold) 0 8deg, transparent 8deg 18deg);
  animation: spin 55s linear infinite;
  pointer-events: none;
}

.result-overline {
  margin: 30px 0 6px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.24em;
}

.result-screen h2 {
  z-index: 1;
  margin: 0;
  color: var(--paper);
  font-family: "Playfair Display", serif;
  font-size: clamp(48px, 7vw, 75px);
  font-style: italic;
  line-height: 0.9;
  text-shadow: 4px 5px 0 var(--wine);
}

.result-score {
  z-index: 1;
  display: flex;
  flex-direction: column;
  margin-top: 28px;
}

.result-score span,
.result-score small {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.24em;
}

.result-score strong {
  color: var(--gold);
  font-family: "Playfair Display", serif;
  font-size: 42px;
}

.result-score small {
  color: var(--red);
  font-weight: 800;
}

.result-message {
  z-index: 1;
  max-width: 470px;
  margin: 18px 0;
  color: #c1b5ab;
  font-family: "Playfair Display", serif;
  font-size: 15px;
  line-height: 1.45;
}

.result-stats {
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(470px, 100%);
  margin: 8px 0 28px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.result-stats > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.result-stats > div + div {
  border-left: 1px solid var(--line);
}

.result-stats strong {
  color: var(--paper);
  font-family: "Playfair Display", serif;
  font-size: 21px;
}

.result-stats span {
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.17em;
}

.result-screen .primary-button {
  z-index: 1;
}

.result-actions {
  z-index: 1;
  width: min(470px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.result-actions .primary-button {
  width: 100%;
}

.secondary-button {
  min-height: 58px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--gold);
  color: var(--gold);
  background: rgba(229, 183, 101, 0.05);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: 160ms ease;
}

.secondary-button:hover,
.secondary-button:focus-visible {
  color: var(--ink);
  background: var(--gold);
}

footer {
  width: min(1120px, calc(100% - 40px));
  height: 70px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  color: #5f575c;
  font-size: 8px;
  letter-spacing: 0.17em;
}
footer small{display:block;max-width:900px;margin:.55rem auto 0;color:rgba(255,255,255,.48);font-size:.62rem;line-height:1.5;letter-spacing:.05em;text-align:center}

footer b {
  color: var(--red);
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes feedback-in {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .game-shell {
    width: min(100% - 24px, 1120px);
  }

  .topbar {
    height: 74px;
  }

  .vinyl {
    right: -20px;
  }

  .answers {
    grid-template-columns: 1fr;
  }

  .question-card {
    padding: 30px 21px 26px;
  }

  .question-card h2 {
    margin: 24px 0;
  }

  .feedback.visible {
    align-items: flex-start;
    flex-direction: column;
  }

  .game-screen {
    padding-top: 28px;
  }

  .game-status {
    gap: 12px;
  }

  .sound-control > span {
    display: none;
  }

  footer {
    width: calc(100% - 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* TGP: Malos Aires */
.start-screen {
  position: relative;
  justify-content: flex-start;
  align-items: stretch;
  padding: 52px 0 34px;
  overflow: hidden;
  text-align: left;
}

.world-backdrop {
  position: absolute;
  inset: 0 -12vw;
  background:
    linear-gradient(90deg, rgba(13, 7, 12, 0.98) 0%, rgba(13, 7, 12, 0.86) 44%, rgba(13, 7, 12, 0.22) 100%),
    linear-gradient(0deg, #120c13 0%, transparent 48%),
    url("assets/world/malos-aires-map.jpg") center 45% / cover no-repeat;
  opacity: 0.76;
  filter: saturate(0.85) contrast(1.08);
}

.start-content {
  position: relative;
  z-index: 1;
  width: min(1030px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(330px, 0.9fr);
  align-items: center;
  gap: 40px;
}

.hero-copy {
  padding: 28px 0 20px;
}

.hero-copy .eyebrow {
  justify-content: flex-start;
}

.hero-copy .eyebrow::before {
  display: none;
}

.hero-copy .hero-kicker {
  margin: 25px 0 5px;
  color: var(--gold);
  font-family: "DM Sans", sans-serif;
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.34em;
}

.hero-copy h1 {
  max-width: 620px;
  font-size: clamp(54px, 7vw, 92px);
  font-style: normal;
  line-height: 0.78;
  letter-spacing: -0.06em;
  text-shadow: 5px 6px 0 #651b34;
}

.hero-copy h1 em {
  color: var(--gold);
  font-weight: 800;
}

.hero-copy .intro {
  max-width: 510px;
  margin: 32px 0 25px;
  color: #d0c3b8;
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

.hero-copy .intro strong {
  color: var(--gold);
}

.hero-copy .start-meta {
  margin-top: 28px;
  text-align: center;
}

.gipsy-hero {
  position: relative;
  min-height: 550px;
  align-self: stretch;
}

.gipsy-frame {
  position: absolute;
  inset: 0 0 30px;
  overflow: hidden;
  clip-path: polygon(13% 0, 100% 0, 100% 91%, 88% 100%, 0 100%, 0 13%);
  border: 1px solid rgba(229, 183, 101, 0.6);
  background: #2a1525;
  box-shadow: var(--shadow);
}

.gipsy-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 -120px 90px rgba(17, 8, 14, 0.65);
  pointer-events: none;
}

.gipsy-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  transform: scale(1.02);
  animation: hero-breathe 5s ease-in-out infinite;
}

.gipsy-card {
  position: absolute;
  right: -18px;
  bottom: 0;
  width: 245px;
  padding: 15px 20px;
  display: flex;
  flex-direction: column;
  color: #1d1116;
  background: var(--gold);
  box-shadow: 7px 7px 0 #6d1b35;
  transform: rotate(-2deg);
}

.gipsy-card span,
.gipsy-card small {
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.gipsy-card strong {
  font-family: "Playfair Display", serif;
  font-size: 29px;
  line-height: 1;
}

.gipsy-card small {
  margin-top: 7px;
}

.gipsy-card i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #36a462;
  box-shadow: 0 0 8px #45db7d;
}

.city-seal {
  position: absolute;
  z-index: 2;
  top: -17px;
  right: -19px;
  width: 82px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 2px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  background: #3d1026;
  font-family: "Playfair Display", serif;
  font-size: 12px;
  line-height: 1;
  text-align: center;
  transform: rotate(8deg);
}

.cast-strip {
  position: relative;
  z-index: 2;
  width: min(1030px, 100%);
  margin: 25px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.secret-archive {
  position: relative;
  z-index: 2;
  width: min(1030px, 100%);
  margin: 28px auto 0;
  padding: 24px;
  border: 1px solid rgba(229, 183, 101, 0.28);
  background:
    linear-gradient(135deg, rgba(73, 19, 38, 0.78), rgba(15, 10, 14, 0.96)),
    url("assets/world/malos-aires-map.jpg") center / cover;
}

.archive-heading {
  max-width: 650px;
}

.archive-heading > span {
  color: var(--red);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.24em;
}

.archive-heading h2 {
  margin: 4px 0 5px;
  font-family: "Playfair Display", serif;
  font-size: 29px;
}

.archive-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.archive-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.archive-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 106px 1fr;
  min-height: 155px;
  overflow: hidden;
  border: 1px solid rgba(229, 183, 101, 0.22);
  background: rgba(12, 8, 11, 0.82);
}

.archive-portrait {
  position: relative;
  overflow: hidden;
  background: #090709;
}

.archive-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 500ms ease;
}

.archive-card.locked .archive-portrait img {
  filter: grayscale(1) brightness(0.12) contrast(1.6);
  transform: scale(1.08);
}

.archive-card.unlocked .archive-portrait img {
  filter: saturate(1.08);
}

.archive-lock {
  position: absolute;
  inset: auto 0 0;
  padding: 7px 4px;
  color: var(--gold);
  background: rgba(10, 6, 9, 0.9);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: center;
}

.archive-info {
  min-width: 0;
  padding: 15px 14px;
  display: flex;
  flex-direction: column;
}

.archive-info small,
.archive-info > span {
  color: var(--gold);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.archive-info strong {
  margin-top: 3px;
  overflow: hidden;
  font-family: "Playfair Display", serif;
  font-size: 16px;
  line-height: 1.05;
  text-overflow: ellipsis;
}

.archive-info p {
  flex: 1;
  margin: 8px 0;
  color: #a89da3;
  font-family: "Playfair Display", serif;
  font-size: 10px;
  line-height: 1.35;
}

.archive-progress {
  height: 2px;
  margin-bottom: 6px;
  overflow: hidden;
  background: #392b33;
}

.archive-progress i {
  display: block;
  height: 100%;
  background: var(--red);
}

.archive-card.unlocked {
  border-color: rgba(229, 183, 101, 0.62);
  box-shadow: 0 0 24px rgba(229, 183, 101, 0.08);
}

.villains-section {
  position: relative;
  z-index: 2;
  width: min(1030px, 100%);
  margin: 18px auto 0;
  padding: 24px;
  border: 1px solid rgba(231, 63, 55, 0.3);
  background: linear-gradient(135deg, rgba(38, 8, 16, 0.96), rgba(10, 8, 10, 0.98));
}

.villains-heading > span {
  color: var(--red);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.24em;
}

.villains-heading h2 {
  margin: 4px 0;
  font-family: "Playfair Display", serif;
  font-size: 29px;
}

.villains-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.villains-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.villain-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 145px 1fr;
  min-height: 145px;
  overflow: hidden;
  border: 1px solid rgba(231, 63, 55, 0.35);
  background: #0b0709;
}

.villain-card img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  filter: saturate(0.75) contrast(1.08);
  transition: 250ms ease;
}

.villain-card:hover img {
  filter: saturate(1.1) contrast(1.04);
  transform: scale(1.06);
}

.villain-card > div {
  padding: 18px 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(120deg, rgba(73, 8, 22, 0.35), rgba(8, 3, 6, 0.96));
}

.villain-card strong {
  font-family: "Playfair Display", serif;
  font-size: 19px;
}

.villain-card span {
  color: #e17878;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.villain-card p {
  margin: 8px 0 0;
  color: #a99ba1;
  font-size: 10px;
  line-height: 1.45;
}

.kidota-ranks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 620px;
  margin-top: 18px;
  border: 1px solid var(--line);
}

.kidota-ranks > div {
  min-width: 0;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 12px 1fr;
  column-gap: 7px;
  align-items: center;
}

.kidota-ranks > div + div {
  border-left: 1px solid var(--line);
}

.kidota-ranks i {
  grid-row: 1 / 3;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.rank-green i { background: #3caa68; box-shadow: 0 0 12px #3caa68; }
.rank-blue i { background: #287dd8; box-shadow: 0 0 12px #287dd8; }
.rank-red i { background: #d83442; box-shadow: 0 0 12px #d83442; }

.kidota-ranks span {
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.kidota-ranks strong {
  color: var(--muted);
  font-size: 6px;
  letter-spacing: 0.08em;
}

.cast-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.cast-list {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 8px;
}

.cast-avatar {
  min-width: 0;
  position: relative;
  height: 68px;
  overflow: hidden;
  border: 1px solid rgba(229, 183, 101, 0.27);
  background: #24151f;
  filter: saturate(0.8);
  transition: 180ms ease;
}

.cast-avatar:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  filter: saturate(1.1);
}

.cast-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cast-avatar span {
  position: absolute;
  inset: auto 0 0;
  padding: 15px 4px 4px;
  overflow: hidden;
  color: white;
  background: linear-gradient(transparent, rgba(10, 5, 9, 0.95));
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-screen {
  padding-top: 32px;
}

.game-status,
.streak-row {
  width: min(1030px, 100%);
}

.puzzle-progress {
  width: min(1030px, 100%);
  margin: 18px auto 0;
  padding: 13px 16px;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(300px, 470px) auto;
  align-items: center;
  gap: 20px;
  border: 1px solid rgba(229, 183, 101, 0.25);
  background: linear-gradient(90deg, rgba(73, 19, 38, 0.45), rgba(28, 19, 25, 0.96));
}

.puzzle-copy {
  display: flex;
  flex-direction: column;
}

.puzzle-copy > span {
  color: var(--gold);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.puzzle-copy strong {
  margin-top: 2px;
  font-family: "Playfair Display", serif;
  font-size: 16px;
}

.puzzle-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.puzzle-board {
  width: 100%;
  aspect-ratio: 5 / 2;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(229, 183, 101, 0.42);
  background: #0a0709;
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.75);
}

.puzzle-piece {
  min-width: 0;
  position: relative;
  overflow: hidden;
  background-image: url("assets/world/malos-aires-map.jpg");
  background-repeat: no-repeat;
  background-size: 500% 200%;
  filter: grayscale(1) brightness(0.12);
  opacity: 0.28;
  transition: filter 450ms ease, opacity 450ms ease, transform 450ms ease;
}

.puzzle-piece::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(229, 183, 101, 0.18);
}

.puzzle-piece span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(229, 183, 101, 0.45);
  font-family: "Playfair Display", serif;
  font-size: 10px;
}

.puzzle-piece.unlocked {
  filter: none;
  opacity: 1;
}

.puzzle-piece.unlocked span {
  display: none;
}

.puzzle-piece.piece-won {
  z-index: 2;
  animation: piece-won 720ms cubic-bezier(.18,.89,.32,1.28) both;
  box-shadow: 0 0 25px rgba(229, 183, 101, 0.9);
}

.piece-counter {
  display: flex;
  align-items: center;
  gap: 5px;
}

.piece-counter strong {
  color: var(--gold);
  font-family: "Playfair Display", serif;
  font-size: 28px;
}

.piece-counter span {
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.25;
}

.result-puzzle-wrap {
  z-index: 1;
  width: min(470px, 100%);
  margin: 4px 0 15px;
}

.result-puzzle {
  aspect-ratio: 5 / 2;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.45);
}

.result-puzzle-wrap > span {
  display: block;
  margin-top: 8px;
  color: var(--gold);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.piece-reward[hidden] {
  display: none;
}

.piece-reward {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 4, 7, 0.76);
  backdrop-filter: blur(7px);
  opacity: 0;
  transition: opacity 250ms ease;
}

.piece-reward.show {
  opacity: 1;
}

.reward-card {
  width: min(620px, 100%);
  position: relative;
  padding: 27px;
  overflow: hidden;
  border: 1px solid var(--gold);
  color: var(--paper);
  background:
    radial-gradient(circle at 50% 0, rgba(229, 183, 101, 0.22), transparent 45%),
    #191017;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7), 0 0 50px rgba(229, 183, 101, 0.18);
  text-align: center;
  transform: translateY(25px) scale(0.92);
  transition: transform 420ms cubic-bezier(.18,.89,.32,1.28);
}

.piece-reward.show .reward-card {
  transform: translateY(0) scale(1);
}

#reward-close {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--paper);
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.reward-kicker {
  display: block;
  color: var(--red);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.25em;
}

.reward-card > strong {
  display: block;
  margin: 4px 0 17px;
  color: var(--gold);
  font-family: "Playfair Display", serif;
  font-size: clamp(34px, 7vw, 55px);
  font-style: italic;
  line-height: 1;
  text-shadow: 3px 3px 0 #5e1730;
}

.reward-map {
  width: min(520px, 100%);
  margin: 0 auto;
  border-width: 2px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.55);
}

.reward-map .puzzle-piece {
  min-height: 70px;
}

.reward-card > p {
  margin: 15px 0 0;
  color: #c4b8ae;
  font-family: "Playfair Display", serif;
  font-size: 14px;
}

.encounter {
  width: min(1030px, 100%);
  min-height: 530px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  border: 1px solid var(--line);
  background: #1c1319;
  box-shadow: var(--shadow);
}

.character-stage {
  min-height: 530px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(0deg, rgba(24, 10, 18, 0.93), transparent 60%),
    linear-gradient(135deg, #51142f, #17101b);
  border-right: 1px solid rgba(229, 183, 101, 0.24);
}

.character-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(90deg, transparent 65%, #1c1319);
  pointer-events: none;
}

.character-glow {
  position: absolute;
  left: 50%;
  top: 34%;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(229, 183, 101, 0.23);
  filter: blur(40px);
  transform: translate(-50%, -50%);
}

#character-image {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  filter: saturate(1.03) contrast(1.02);
}

.character-nameplate {
  position: absolute;
  z-index: 3;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 12px 15px;
  display: flex;
  flex-direction: column;
  background: rgba(17, 8, 14, 0.9);
  border-left: 3px solid var(--gold);
  backdrop-filter: blur(8px);
}

.character-nameplate span {
  color: var(--gold);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.character-nameplate strong {
  font-family: "Playfair Display", serif;
  font-size: 22px;
}

.speech-bubble {
  position: absolute;
  z-index: 4;
  top: 22px;
  right: -3px;
  width: 220px;
  padding: 13px 15px;
  color: #24141b;
  background: var(--paper);
  box-shadow: 5px 5px 0 rgba(81, 20, 47, 0.8);
}

.speech-bubble::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: -12px;
  border: 6px solid transparent;
  border-top-color: var(--paper);
}

.speech-bubble strong {
  color: #8b213e;
  font-size: 8px;
  letter-spacing: 0.16em;
}

.speech-bubble p {
  margin: 3px 0 0;
  font-family: "Playfair Display", serif;
  font-size: 13px;
  line-height: 1.25;
}

.encounter .question-card {
  width: auto;
  min-height: 530px;
  margin: 0;
  border: 0;
  box-shadow: none;
}

.character-enter #character-image {
  animation: character-enter 520ms cubic-bezier(.2,.8,.2,1) both;
}

.react-correct #character-image {
  animation: character-correct 650ms ease both;
}

.react-wrong #character-image {
  animation: character-wrong 460ms ease both;
}

.speech-bubble.pop {
  animation: bubble-pop 350ms cubic-bezier(.18,.89,.32,1.28) both;
}

.result-gipsy {
  position: absolute;
  left: max(-170px, calc(50% - 600px));
  bottom: -190px;
  width: 400px;
  height: 680px;
  object-fit: cover;
  object-position: 50% 44%;
  opacity: 0.48;
  mask-image: linear-gradient(to bottom, black 65%, transparent 100%);
}

@keyframes hero-breathe {
  0%, 100% { transform: scale(1.02); }
  50% { transform: scale(1.055); }
}

@keyframes character-enter {
  from { opacity: 0; transform: translateX(-35px) scale(1.05); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes character-correct {
  0%, 100% { transform: translateY(0) rotate(0); filter: saturate(1.03); }
  35% { transform: translateY(-9px) rotate(-1deg); filter: saturate(1.35) brightness(1.08); }
}

@keyframes character-wrong {
  0%, 100% { transform: translateX(0); filter: saturate(1.03); }
  25% { transform: translateX(-7px) rotate(-0.8deg); }
  55% { transform: translateX(6px) rotate(0.8deg); filter: grayscale(0.45); }
}

@keyframes bubble-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes piece-won {
  0% { transform: translateY(-18px) rotate(-4deg) scale(1.18); opacity: 0; }
  55% { transform: translateY(0) rotate(1deg) scale(1.08); opacity: 1; }
  100% { transform: translateY(0) rotate(0) scale(1); opacity: 1; }
}

@keyframes timer-pulse {
  to {
    transform: translateX(-50%) scale(1.08);
    box-shadow: 0 0 20px rgba(231, 63, 55, 0.5);
  }
}

@media (max-width: 900px) {
  .start-content {
    grid-template-columns: 1fr 320px;
  }

  .hero-copy h1 {
    font-size: clamp(48px, 8vw, 70px);
  }

  .cast-list {
    overflow-x: auto;
    grid-template-columns: repeat(9, 82px);
    padding-bottom: 8px;
  }

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

  .puzzle-progress {
    grid-template-columns: 170px minmax(260px, 1fr) auto;
  }

  .archive-list {
    grid-template-columns: 1fr;
  }

  .villains-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .start-screen {
    padding-top: 30px;
  }

  .start-content {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    position: relative;
    z-index: 2;
  }

  .hero-copy h1 {
    font-size: 52px;
  }

  .gipsy-hero {
    min-height: 410px;
  }

  .world-backdrop {
    opacity: 0.5;
  }

  .encounter {
    grid-template-columns: 1fr;
  }

  .character-stage {
    min-height: 260px;
    border-right: 0;
    border-bottom: 1px solid rgba(229, 183, 101, 0.24);
  }

  #character-image {
    object-position: 50% 35% !important;
  }

  .character-stage::before {
    background: linear-gradient(0deg, #1c1319, transparent 50%);
  }

  .character-nameplate {
    right: auto;
    min-width: 180px;
  }

  .speech-bubble {
    right: 15px;
    width: min(205px, 58%);
  }

  .encounter .question-card {
    min-height: 0;
  }

  .result-gipsy {
    display: none;
  }

  .puzzle-progress {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  .puzzle-progress .puzzle-board {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .secret-archive {
    padding: 18px;
  }

  .archive-card {
    grid-template-columns: 95px 1fr;
  }

  .villains-section {
    padding: 18px;
  }

  .villains-list {
    grid-template-columns: 1fr;
  }

  .villain-card {
    grid-template-columns: 115px 1fr;
    min-height: 115px;
  }

  .villain-card > div {
    padding: 12px;
  }

  .villain-card strong {
    font-size: 16px;
  }

  .villain-card p {
    font-size: 9px;
  }

  .kidota-ranks {
    grid-template-columns: 1fr;
  }

  .kidota-ranks > div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .topbar-actions {
    gap: 7px;
  }

  .timer {
    top: 20px;
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .reward-card {
    padding: 23px 14px 18px;
  }

  .reward-map .puzzle-piece {
    min-height: 45px;
  }

  .result-actions {
    grid-template-columns: 1fr;
  }
}
