@font-face {
  font-family: Lora;
  src: url("/assets/lora-400.woff2");
}
@font-face {
  font-family: Lora;
  src: url("/assets/lora-600.woff2");
  font-weight: 600;
}
@font-face {
  font-family: Playfair;
  src: url("/assets/playfair-display-600.woff2");
  font-weight: 600;
}
@font-face {
  font-family: Playfair;
  src: url("/assets/playfair-display-700.woff2");
  font-weight: 700;
}
@font-face {
  font-family: Vibes;
  src: url("/assets/great-vibes-400.woff2");
}
@font-face {
  font-family: Cinzel;
  src: url("/assets/cinzel-decorative-400.woff2");
}
:root {
  --navy: #15304a;
  --cream: #fbf3e2;
  --red: #b3242b;
  --green: #1f5c40;
  --gold: #c9a24a;
  --muted: #5f625e;
  --border: #ded0b5;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: Lora, Georgia, serif;
  font-size: 17px;
  line-height: 1.65;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #2c87ab;
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  font-family: Playfair, Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
}
h1 {
  font-size: clamp(2rem, 3.4vw, 3.5rem);
}
h2 {
  font-size: clamp(1.8rem, 2.8vw, 2.7rem);
}
h3 {
  font-size: 1.45rem;
}
p {
  margin-bottom: 1.15em;
}
header {
  max-width: 1440px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 23px 5%;
  gap: 25px;
}
header nav {
  display: flex;
  align-items: center;
  gap: 36px;
  font-size: 0.9rem;
}
.brand {
  display: inline-flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  line-height: 1;
}
.brand-logo {
  display: block;
  width: 144px;
  height: auto;
  object-fit: contain;
}
.brand span {
  font-family: Lora, serif;
  font-size: 8px;
  letter-spacing: 2px;
  line-height: 2;
  margin-top: 4px;
  color: var(--navy);
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  background: var(--red);
  border: 1px solid var(--red);
  color: #fff8e9;
  padding: 16px 26px;
  border-radius: 5px;
  line-height: 1.4;
  font-weight: 600;
  transition:
    background 0.18s,
    transform 0.18s;
}
.button:hover {
  background: #912129;
  transform: translateY(-1px);
}
.button.outline {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}
.button.outline:hover {
  background: #15304a0a;
}
.button.small {
  padding: 11px 19px;
  font-size: 0.9rem;
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--green);
  padding: 10px 4px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.text-button:hover {
  color: var(--red);
}
.quiet-link {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.demo-bar {
  background: #eadfc8;
  text-align: center;
  font:
    11px/1.5 Lora,
    serif;
  letter-spacing: 0.04em;
  padding: 4px;
  color: #504a3d;
}
.hero {
  background: var(--navy);
  color: var(--cream);
  position: relative;
  overflow: hidden;
  padding-bottom: 52px;
}
.bunting {
  display: block;
  width: 100%;
  height: auto;
  max-height: 105px;
}
.hero-inner {
  max-width: 1440px;
  margin: auto;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 10px;
  padding: 27px 5% 0;
  align-items: center;
}
.hero-copy {
  position: relative;
  z-index: 1;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2.6px;
  font-weight: 600;
  margin-bottom: 18px;
  line-height: 1.7;
}
.hero .eyebrow {
  color: #dec58d;
}
.hero h1 {
  font-size: clamp(3.7rem, 6.3vw, 7rem);
  line-height: 1.04;
  letter-spacing: -2.8px;
  margin: 0 0 22px;
}
.hero h1 span {
  display: block;
  font-family: Cinzel, serif;
  font-size: 0.24em;
  letter-spacing: 6px;
  font-weight: 400;
  line-height: 2.6;
  color: var(--gold);
}
.script {
  font-family: Vibes, cursive;
  font-weight: 400;
}
.subtitle {
  color: #e2bf69;
  font-size: clamp(2rem, 3vw, 3.5rem);
  line-height: 1.2;
  margin-bottom: 28px;
  white-space: nowrap;
}
.story {
  font-size: 16px;
  max-width: 525px;
  color: #e1e0d7;
  line-height: 1.85;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 12px;
  color: #eddfbc;
  margin: 25px 0 30px;
}
.buy {
  background: #bd3136;
  padding: 18px 24px;
}
.buy b {
  margin-left: 5px;
  font-weight: 400;
  font-size: 24px;
  line-height: 1;
}
.purchase-note {
  font-size: 11px;
  color: #c4c6c6;
  letter-spacing: 0.4px;
  margin: 13px 0 0;
}
.hero-picture {
  align-self: center;
}
.house-art {
  display: block;
  width: 100%;
  height: auto;
}
.illustration-note {
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.7px;
  color: #e5d4ab;
  margin: -13px 0 0;
}
.illustration-note span {
  color: var(--gold);
  padding: 0 12px;
}
.how-section {
  padding: 70px 6% 65px;
  max-width: 1400px;
  margin: auto;
}
.section-title {
  text-align: center;
}
.section-title .eyebrow {
  color: var(--green);
}
.section-title h2 {
  margin-bottom: 16px;
}
.section-title > p:last-child {
  color: var(--muted);
  font-size: 14px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 45px;
  margin-top: 45px;
}
.steps article {
  position: relative;
  padding-left: 60px;
}
.step-number {
  font-family: Cinzel, serif;
  position: absolute;
  left: 0;
  top: -5px;
  font-size: 29px;
  color: #ae8537;
}
.steps h3 {
  font-size: 21px;
  margin-bottom: 12px;
}
.steps p {
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
  max-width: 300px;
}
.catalog-section {
  max-width: 1400px;
  margin: auto;
  padding: 30px 6% 80px;
  border-top: 1px solid var(--border);
}
.catalog-section h2 {
  font-size: 30px;
}
.catalog-section .eyebrow {
  margin-top: 35px;
  color: var(--green);
}
.catalog-grid {
  display: grid;
  gap: 20px;
}
.catalog-card {
  display: flex;
  align-items: center;
  gap: 25px;
  padding: 28px 35px;
  border: 1px solid #c8b487;
  border-radius: 8px;
  background: #f7edda;
}
.catalog-card:hover {
  border-color: var(--red);
}
.catalog-star {
  font-size: 55px;
  color: var(--red);
}
.catalog-card h3 {
  margin: 0 0 5px;
}
.catalog-card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}
.catalog-card div > span {
  font-size: 12px;
}
.catalog-card > b {
  margin-left: auto;
}
footer {
  border-top: 1px solid var(--border);
  max-width: 1440px;
  margin: auto;
  padding: 35px 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 11px;
}
footer small {
  font-size: 10px;
  color: var(--muted);
}
.paper,
.letter-paper,
.puzzle-paper {
  background: #fffaf0;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 7px 30px #53402306;
}
.center {
  max-width: 680px;
  margin: 60px auto;
  padding: 50px;
  text-align: center;
  min-height: 330px;
}
.center .button {
  margin: 10px 5px;
}
.center form {
  text-align: left;
}
.center form .button {
  width: 100%;
  margin: 18px 0;
}
.entry-layout {
  max-width: 1250px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 55px;
  align-items: center;
  padding: 45px 5% 90px;
  margin: auto;
}
.entry-art {
  border-radius: 50% 50% 8px 8px;
  background: var(--navy);
  padding: 25px;
}
.entry-card {
  padding: 40px;
}
.entry-card h1 {
  font-size: 36px;
}
.entry-card > p {
  font-size: 15px;
}
.entry-card .button {
  width: 100%;
  margin-top: 20px;
}
.entry-card .quiet-link {
  display: inline-block;
  margin-top: 25px;
  font-size: 13px;
}
label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  border: 1px solid #bcad91;
  border-radius: 4px;
  background: #fffdf7;
  color: var(--navy);
  padding: 12px 15px;
  margin-top: 8px;
  min-height: 48px;
}
textarea {
  resize: vertical;
}
.code-input {
  text-transform: uppercase;
  font-size: 28px;
  letter-spacing: 5px;
  text-align: center;
}
.notice {
  padding: 16px 20px;
  background: #f2e5c7;
  border-left: 3px solid #bd933e;
  border-radius: 3px;
  font-size: 15px;
  margin: 20px 0;
}
.notice.error {
  background: #fae6dd;
  color: #8f2827;
  border-color: #b3242b;
}
.notice.success {
  background: #e7eedf;
  color: #20563d;
  border-color: #427b4e;
}
.notice:empty,
#message:empty {
  display: none;
}
.access-code {
  font-family: Cinzel, serif;
  font-size: clamp(2rem, 6vw, 3.5rem);
  letter-spacing: 6px;
  color: var(--green);
  margin: 25px 0;
}
.game-shell {
  max-width: 1380px;
  padding: 5px 5% 70px;
  margin: auto;
}
.game-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 15px 0 20px;
}
.game-top .quiet-link {
  font-size: 14px;
}
.game-top p {
  font-size: 12px;
  color: var(--muted);
  margin: 7px 0;
}
.timer-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--navy);
  padding: 10px 22px;
  border-radius: 6px;
  color: var(--cream);
  min-width: 160px;
}
.timer-box span {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #e1c989;
}
.timer-box strong {
  font:
    600 34px/1.3 Lora,
    serif;
  font-variant-numeric: tabular-nums;
}
.chest-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #eee3cb;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 24px;
}
.digit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 13px 8px;
  color: #777163;
  font-size: 12px;
}
.digit + .digit {
  border-left: 1px solid #d9caad;
}
.digit .symbol {
  font-size: 25px;
  color: #a0813f;
}
.digit b {
  font-size: 25px;
  font-family: Cinzel, serif;
  min-width: 20px;
}
.digit.found {
  color: var(--green);
  background: #e2e8d7;
}
.letter-paper {
  max-width: 820px;
  margin: 0 auto;
  padding: 55px 65px;
  position: relative;
}
.letter-paper:before,
.puzzle-paper:before {
  content: "✥";
  font: 48px/1 Georgia;
  position: absolute;
  right: 18px;
  top: 15px;
  color: #2a648e33;
}
.letter-paper h1 {
  font-size: 36px;
  margin-bottom: 30px;
}
.letter-paper p {
  font-size: 20px;
  line-height: 1.8;
}
.letter-paper .eyebrow {
  font-size: 10px;
}
.signature {
  font-size: 46px !important;
  color: var(--green);
  text-align: right;
  margin: 10px 0 20px;
}
.letter-paper .helper {
  font-size: 12px;
  color: var(--muted);
  margin-top: 15px;
}
.puzzle-paper {
  padding: 38px 45px;
  position: relative;
}
.challenge-heading {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}
.challenge-heading h1 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  margin: 0;
}
.challenge-heading .eyebrow {
  font-size: 10px;
  margin-bottom: 6px;
  color: var(--green);
}
.challenge-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 65px;
  height: 70px;
  flex: none;
  background: var(--navy);
  color: var(--gold);
  border-radius: 4px;
  font:
    27px Cinzel,
    serif;
}
.statement {
  font-size: 22px;
  line-height: 1.75;
  max-width: 1050px;
}
.challenge-art {
  margin: 30px 0;
  text-align: center;
}
.alphabet {
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 6px;
  max-width: 850px;
  margin: 0 auto 30px;
}
.alphabet > div {
  border: 1px solid #dcd1b9;
  background: #f7edda;
  border-radius: 4px;
  padding: 4px;
  display: flex;
  flex-direction: column;
}
.alphabet b {
  font-size: 21px;
}
.alphabet small {
  font-size: 13px;
  color: var(--muted);
}
.cipher-words {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 28px;
}
.letter-word {
  display: flex;
  gap: 5px;
  justify-content: center;
}
.letter {
  position: relative;
  margin: 0;
}
.letter input {
  padding: 4px;
  text-align: center;
  text-transform: uppercase;
  font-size: 23px;
  min-height: 48px;
  width: 44px;
  margin: 0;
  border-bottom: 3px solid #b7aa8e;
}
.letter small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
}
.starred input {
  background: #fae9b7;
  border-color: #ad8330;
}
.star-label {
  position: absolute;
  top: -22px;
  left: 0;
  right: 0;
  font-size: 15px;
  color: #9b701c;
}
.anagrams {
  display: flex;
  flex-direction: column;
  gap: 30px;
  max-width: 900px;
  margin: auto;
}
.anagram {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
}
.scramble {
  font-weight: 600;
  letter-spacing: 3px;
  font-size: 19px;
  text-align: left;
}
.anagram-arrow {
  color: #8f794c;
}
.tree {
  max-width: 520px;
  width: 100%;
  height: auto;
}
.count-layout {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
}
.legend {
  text-align: left;
  font-size: 15px;
  max-width: 250px;
}
.swatch {
  display: inline-block;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 12px;
  border: 1px solid #85784b;
}
.swatch.red {
  background: #c44740;
}
.swatch.gold {
  background: repeating-linear-gradient(45deg, #dcaf45 0 4px, #734f1e 4px 6px);
}
.swatch.green {
  background: radial-gradient(#183e2b 25%, #6ba773 26%);
  background-size: 7px 7px;
}
.helper {
  font-size: 12px;
  color: var(--muted);
}
.countable {
  cursor: pointer;
}
.countable:hover {
  filter: brightness(1.15);
}
.count-check {
  display: none;
  fill: white;
  stroke: #15304a;
  stroke-width: 0.7px;
  font-size: 28px;
  font-weight: bold;
  pointer-events: none;
}
.countable[aria-pressed="true"] .count-check {
  display: block;
}
.countable[aria-pressed="true"] {
  opacity: 0.65;
}
.trays {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}
.trays svg {
  width: min(43%, 340px);
}
.logic-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 30px;
  align-items: start;
}
.logic-clues {
  text-align: left;
  padding-left: 23px;
  font-size: 18px;
}
.logic-clues li {
  padding: 6px 0;
}
.table-scroll {
  overflow-x: auto;
  max-width: 100%;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
th,
td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
table small {
  display: block;
  font-size: 10px;
}
thead {
  background: #eee3cb;
}
caption {
  caption-side: bottom;
  padding-top: 10px;
  color: var(--muted);
  font-size: 12px;
}
.logic th,
.logic td {
  border: 1px solid #d6c8ab;
  text-align: center;
  padding: 8px;
}
.logic th {
  font-size: 13px;
}
.logic-cell {
  background: #fffdf5;
  border: 0;
  color: var(--green);
  width: 100%;
  min-width: 43px;
  min-height: 45px;
  font-size: 25px;
}
.mirror-frame {
  max-width: 700px;
  padding: 24px;
  margin: 0 auto 20px;
  border: 12px ridge #bd9c53;
  border-radius: 60px;
  background: #eadfcb;
}
.mirror-frame img {
  width: 100%;
  display: block;
  transition: transform 0.8s;
}
.flipped {
  transform: scaleX(-1);
}
.clock-face {
  width: 260px;
  max-width: 100%;
  height: auto;
}
#answer-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}
#answer-form input {
  max-width: 430px;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 2px;
  font-size: 22px;
  margin: 0;
}
#answer-form label {
  margin: 0;
  text-align: center;
}
#answer-form .number-answer {
  max-width: 130px;
}
#answer-form .button {
  margin-top: 5px;
}
.hints {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}
.hints p {
  flex-basis: 100%;
  margin: 0;
  background: #f4ead3;
  padding: 12px 18px;
  font-size: 17px;
  color: var(--navy);
}
.lock-wheels {
  display: flex;
  gap: 20px;
  padding: 30px 0;
}
.lock-wheels label {
  width: 110px;
}
.lock-wheels label > span {
  font-size: 13px;
}
.lock-wheels select {
  font:
    40px Cinzel,
    serif;
  text-align: center;
  padding: 12px;
}
.envelope-dialog {
  border: 1px solid var(--gold);
  border-radius: 10px;
  background: var(--cream);
  color: var(--navy);
  max-width: 580px;
  width: 90%;
  text-align: center;
  padding: 40px;
  font:
    20px/1.6 Lora,
    serif;
}
.envelope-dialog::backdrop {
  background: #10263dce;
}
.envelope-icon {
  font-size: 80px;
  color: var(--red);
  animation: envelope 0.7s ease-out;
}
.envelope-dialog .eyebrow {
  color: var(--green);
}
@keyframes envelope {
  from {
    transform: translateY(25px) rotate(-8deg);
    opacity: 0;
  }
  to {
    transform: translateY(0) rotate(0);
    opacity: 1;
  }
}
.results {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 25px;
  background: #ede7d3;
  border-radius: 6px;
}
.recipe {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding-top: 35px;
}
.recipe li {
  font-size: 17px;
  margin-bottom: 12px;
}
.recipe h2 {
  font-size: 30px;
}
.recipe h3 {
  margin-top: 30px;
}
.diploma-form {
  border-top: 1px solid var(--border);
  padding: 35px 0;
  margin-top: 35px;
}
.diploma-form .button {
  margin-top: 18px;
}
.admin-shell {
  max-width: 1400px;
  padding: 35px 5% 70px;
  margin: auto;
}
.admin-shell section {
  margin-top: 50px;
}
.admin-games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
}
.game-settings {
  padding: 25px;
  max-width: 500px;
}
.game-settings label {
  margin-top: 20px;
}
.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
}
.checkbox input {
  width: 22px;
  height: 22px;
  min-height: 0;
  margin: 0;
}
.gift-section {
  padding: 30px;
}
.gift-section form {
  display: flex;
  gap: 25px;
  align-items: end;
  flex-wrap: wrap;
}
.gift-section label {
  flex: 1;
  min-width: 180px;
}
.sales {
  min-width: 820px;
}
.sales td {
  font-size: 12px;
}
.sale-code {
  font-weight: 600;
  white-space: nowrap;
}
.mail {
  padding: 25px;
  margin-top: 20px;
}
.mail pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    14px/1.7 Lora,
    serif;
}
.legal {
  max-width: 850px;
  margin: 45px auto 70px;
  padding: 50px;
}
.legal h1 {
  font-size: 38px;
}
.loading {
  text-align: center;
  padding: 150px 20px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 15px;
  top: 10px;
  z-index: 10;
  background: white;
  padding: 15px;
}
@media (min-width: 1600px) {
  .game-shell {
    max-width: 1650px;
  }
  .puzzle-paper {
    padding: 45px 70px;
  }
  .statement {
    font-size: 28px;
  }
  .challenge-heading h1 {
    font-size: 48px;
  }
  .letter-paper {
    max-width: 1000px;
  }
  .letter-paper p {
    font-size: 26px;
  }
  .alphabet {
    max-width: 1050px;
  }
  .alphabet b {
    font-size: 30px;
  }
  .letter input {
    width: 60px;
    min-height: 64px;
    font-size: 32px;
  }
  .anagrams {
    max-width: 1200px;
  }
  .scramble {
    font-size: 26px;
  }
  .tree {
    max-width: 590px;
  }
  .logic-clues {
    font-size: 24px;
  }
  .logic th {
    font-size: 20px;
  }
  .logic-cell {
    min-height: 66px;
    font-size: 32px;
  }
  .timer-box strong {
    font-size: 43px;
  }
  .hints p {
    font-size: 23px;
  }
  .digit {
    font-size: 17px;
  }
  .button {
    font-size: 21px;
  }
}
@media (max-width: 1000px) {
  .hero-inner {
    padding-top: 15px;
    grid-template-columns: 1.1fr 1fr;
  }
  .hero h1 {
    font-size: 6.8vw;
  }
  .subtitle {
    font-size: 3vw;
  }
  .story {
    font-size: 14px;
  }
  .facts {
    font-size: 10px;
    gap: 8px 12px;
  }
  .buy {
    font-size: 13px;
    padding: 15px;
  }
  .hero-picture {
    margin: 0 -10px;
  }
  .steps {
    gap: 25px;
  }
  .steps article {
    padding-left: 0;
    padding-top: 50px;
  }
  .entry-layout {
    gap: 30px;
  }
  .entry-card {
    padding: 28px;
  }
  .anagram {
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
  }
  .scramble {
    min-width: 180px;
  }
  .logic-layout {
    grid-template-columns: 1fr;
  }
  .logic-clues {
    columns: 2;
  }
  .letter input {
    width: 38px;
    font-size: 20px;
  }
  .game-shell {
    padding-left: 3%;
    padding-right: 3%;
  }
  .puzzle-paper {
    padding: 30px;
  }
  .letter-paper {
    padding: 35px 40px;
  }
  .how-link {
    display: none;
  }
  footer small {
    display: none;
  }
}
@media (max-width: 650px) {
  body {
    font-size: 15px;
  }
  header {
    padding: 17px 5%;
    gap: 10px;
  }
  header nav {
    gap: 10px;
    font-size: 11px;
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  header nav a,
  header nav button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .brand-logo {
    width: 118px;
  }
  .brand span {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .button.small {
    font-size: 11px;
    padding: 10px 13px;
  }
  .hero {
    padding-bottom: 35px;
  }
  .bunting {
    width: 180%;
    max-width: none;
    transform: translateX(-20%);
  }
  .hero-inner {
    grid-template-columns: 1fr;
    padding: 10px 7% 0;
    text-align: center;
  }
  .hero .eyebrow {
    font-size: 9px;
    letter-spacing: 1.7px;
    margin-top: 10px;
  }
  .hero h1 {
    font-size: 16vw;
    letter-spacing: -2px;
  }
  .hero h1 span {
    letter-spacing: 5px;
  }
  .subtitle {
    font-size: 8vw;
    white-space: normal;
    margin-bottom: 20px;
  }
  .story {
    font-size: 13px;
    line-height: 1.8;
  }
  .facts {
    justify-content: center;
    font-size: 10px;
    margin: 20px 0;
    gap: 6px 13px;
  }
  .buy {
    font-size: 14px;
    width: 100%;
    padding: 17px 12px;
    gap: 8px;
  }
  .purchase-note {
    font-size: 10px;
  }
  .hero-picture {
    max-width: 440px;
    width: 100%;
    margin: 12px auto 0;
  }
  .house-art {
    margin: 0 auto;
  }
  .illustration-note {
    font-size: 10px;
    margin-top: -15px;
  }
  .how-section {
    padding: 45px 7%;
  }
  .section-title h2 {
    font-size: 29px;
  }
  .steps {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 35px;
  }
  .steps article {
    padding: 0 0 0 54px;
  }
  .step-number {
    font-size: 27px;
  }
  .steps h3 {
    font-size: 21px;
  }
  .steps p {
    max-width: none;
    margin: 0;
    font-size: 13px;
  }
  .catalog-section {
    padding: 20px 7% 45px;
  }
  .catalog-section h2 {
    font-size: 27px;
  }
  .catalog-card {
    padding: 20px;
    gap: 15px;
  }
  .catalog-card h3 {
    font-size: 20px;
  }
  .catalog-star {
    font-size: 35px;
  }
  .catalog-card p {
    font-size: 12px;
  }
  .catalog-card div > span {
    font-size: 10px;
  }
  footer {
    flex-direction: column;
    padding: 30px 5%;
    gap: 25px;
  }
  footer nav {
    justify-content: center;
    font-size: 10px;
  }
  .entry-layout {
    display: block;
    padding: 20px 5% 50px;
  }
  .entry-art {
    display: none;
  }
  .entry-card {
    padding: 30px 25px;
  }
  .entry-card h1 {
    font-size: 31px;
  }
  .center {
    margin: 25px 5% 50px;
    padding: 30px 25px;
  }
  .code-input {
    font-size: 25px;
    letter-spacing: 3px;
  }
  .game-top {
    align-items: flex-start;
    gap: 10px;
  }
  .game-top > div:first-child {
    max-width: 55%;
  }
  .game-top .quiet-link {
    font-size: 11px;
  }
  .game-top p {
    font-size: 10px;
    line-height: 1.5;
  }
  .timer-box {
    min-width: 115px;
    padding: 9px 10px;
  }
  .timer-box span {
    font-size: 7px;
  }
  .timer-box strong {
    font-size: 28px;
  }
  .digit {
    flex-wrap: wrap;
    gap: 0 6px;
    padding: 8px 4px;
    font-size: 9px;
  }
  .digit .symbol {
    font-size: 18px;
  }
  .digit b {
    width: 100%;
    text-align: center;
    font-size: 20px;
  }
  .chest-bar {
    margin-bottom: 15px;
  }
  .game-shell {
    padding-bottom: 35px;
  }
  .letter-paper {
    padding: 30px 23px;
  }
  .letter-paper h1 {
    font-size: 27px;
  }
  .letter-paper p {
    font-size: 17px;
  }
  .signature {
    font-size: 36px !important;
  }
  .puzzle-paper {
    padding: 25px 16px;
  }
  .challenge-heading {
    gap: 12px;
  }
  .challenge-heading h1 {
    font-size: 24px;
  }
  .challenge-badge {
    width: 42px;
    height: 55px;
    font-size: 20px;
  }
  .challenge-heading .eyebrow {
    font-size: 8px;
  }
  .statement {
    font-size: 18px;
    line-height: 1.7;
  }
  .alphabet {
    gap: 3px;
    grid-template-columns: repeat(13, 1fr);
  }
  .alphabet > div {
    padding: 4px 0;
  }
  .alphabet b {
    font-size: 14px;
  }
  .alphabet small {
    font-size: 9px;
  }
  .cipher-words {
    gap: 17px;
  }
  .letter-word {
    gap: 3px;
  }
  .letter input {
    width: 25px;
    min-height: 38px;
    font-size: 17px;
    padding: 1px;
  }
  .cipher-words .letter input {
    width: 34px;
  }
  .letter small {
    font-size: 10px;
  }
  .anagrams {
    gap: 35px;
  }
  .anagram {
    gap: 23px 8px;
    justify-content: center;
    flex-direction: column;
  }
  .anagram-arrow {
    display: none;
  }
  .scramble {
    text-align: center;
    font-size: 16px;
    letter-spacing: 3px;
  }
  .star-label {
    font-size: 12px;
    top: -20px;
  }
  .count-layout {
    flex-direction: column;
    gap: 0;
  }
  .legend {
    max-width: none;
    font-size: 12px;
    width: 100%;
  }
  .legend p {
    display: inline-block;
    margin: 6px 9px 6px 0;
  }
  .legend .helper {
    display: block;
    font-size: 11px;
  }
  .swatch {
    width: 15px;
    height: 15px;
    margin-right: 4px;
  }
  .trays {
    gap: 10px;
  }
  .trays svg {
    width: 100%;
    max-width: 270px;
  }
  .logic-clues {
    columns: 1;
    font-size: 16px;
  }
  .logic-layout {
    gap: 10px;
  }
  .logic th {
    font-size: 10px;
    padding: 5px;
  }
  .logic td {
    padding: 3px;
  }
  .logic-cell {
    min-width: 35px;
    min-height: 42px;
    font-size: 22px;
  }
  .logic th small {
    font-size: 9px;
  }
  .clock-face {
    width: 230px;
  }
  .mirror-frame {
    padding: 8px;
    border-width: 7px;
    border-radius: 28px;
  }
  .challenge-art {
    margin: 24px 0;
  }
  #answer-form {
    margin-top: 25px;
  }
  #answer-form label {
    font-size: 13px;
  }
  #answer-form .button {
    font-size: 14px;
    width: 100%;
  }
  #answer-form input {
    font-size: 19px;
  }
  .hints {
    gap: 5px 10px;
    font-size: 10px;
  }
  .hints p {
    font-size: 14px;
  }
  .hints .text-button {
    font-size: 13px;
  }
  .lock-wheels {
    gap: 8px;
    width: 100%;
    padding: 10px 0;
  }
  .lock-wheels label {
    flex: 1;
    min-width: 0;
  }
  .lock-wheels label > span {
    font-size: 10px;
  }
  .lock-wheels select {
    font-size: 26px;
    padding: 9px 5px;
  }
  .envelope-dialog {
    padding: 28px;
    font-size: 17px;
  }
  .results {
    font-size: 13px;
    gap: 20px;
    padding: 20px;
  }
  .recipe li {
    font-size: 15px;
  }
  .recipe h2 {
    font-size: 25px;
  }
  .diploma-form h2 {
    font-size: 25px;
  }
  .diploma-form .button {
    font-size: 13px;
    width: 100%;
  }
  .legal {
    margin: 25px 5% 45px;
    padding: 30px 24px;
  }
  .legal h1 {
    font-size: 30px;
  }
  .admin-shell {
    padding: 25px 5% 45px;
  }
  .admin-shell h1 {
    font-size: 32px;
  }
  .gift-section {
    padding: 25px;
  }
  .gift-section form {
    display: block;
  }
  .gift-section label {
    margin-bottom: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.symbol-svg {
  width: 1.15em;
  height: 1.15em;
  vertical-align: middle;
  flex: none;
}
.chest-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  box-shadow: 0 3px 10px #15304a10;
}

/* Nivel Experto: los mismos componentes con el color del PDF de referencia. */
.expert-theme {
  --navy: #520f20;
}
.expert-theme .puzzle-paper:before {
  content: none;
}
.level-label {
  display: inline-block;
  border: 1px solid var(--gold);
  padding: 5px 18px;
  color: var(--red);
  font:
    600 15px Lora,
    serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero .level-label {
  color: #efd790;
  margin: 0 0 22px;
}
.seal {
  width: 84px;
  height: 84px;
  flex: none;
  fill: none;
  stroke: var(--red);
  stroke-width: 3;
  color: var(--red);
}
.seal-chucho {
  stroke: var(--green);
  color: var(--green);
}
.seal .seal-fill {
  fill: currentColor;
  stroke: none;
}
.challenge-heading > .seal {
  width: 60px;
  height: 60px;
  order: 3;
  margin-left: auto;
}
.seal-guide {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  font-size: 14px;
}
.seal-guide > div {
  display: flex;
  align-items: center;
  gap: 12px;
}
.seal-guide .seal {
  width: 64px;
  height: 64px;
}
.cipher-layout {
  display: grid;
  grid-template-columns: minmax(280px, 440px) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}
.wheel-tool {
  max-width: 440px;
  margin: auto;
  width: 100%;
}
#cipher-wheel {
  display: block;
  width: 100%;
  font:
    600 18px Lora,
    serif;
}
#wheel-inner {
  cursor: grab;
  touch-action: none;
}
#wheel-inner:active {
  cursor: grabbing;
}
.wheel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
  font-size: 14px;
}
.wheel-controls .button {
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  font-size: 22px;
}
.wheel-tool .helper {
  font-size: 12px;
  margin: 12px 0 0;
}
.wheel-clue {
  text-align: left;
  padding: 18px 22px;
  border-left: 3px solid var(--gold);
  background: #eee3cb;
  font-size: 17px;
}
.cipher-notes .cipher-words {
  gap: 18px;
}
.cipher-notes .letter-word {
  flex-wrap: nowrap;
  gap: 3px;
}
.cipher-notes .letter input {
  width: clamp(24px, 2.4vw, 36px);
}
.posada-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.5fr);
  align-items: start;
  gap: 28px;
}
.posada-layout .logic-clues {
  font-size: 16px;
  text-align: left;
  padding-left: 24px;
}
.posada-table {
  width: 100%;
  table-layout: fixed;
  font-size: 14px;
  border-collapse: collapse;
}
.posada-table caption {
  padding: 0 10px 14px;
  font-style: italic;
  color: var(--muted);
}
.posada-table th,
.posada-table td {
  border: 1px solid var(--border);
  padding: 10px 5px;
}
.posada-table thead {
  background: #eee3cb;
}
.posada-table th:first-child {
  width: 20%;
}
.posada-table th:nth-child(2) {
  width: 14%;
}
.posada-table th:nth-child(3) {
  width: 38%;
}
.posada-table select {
  width: 100%;
  min-width: 0;
  padding: 10px 4px;
  font-size: 13px;
}
.posada-answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 24px;
}
.posada-answers label {
  display: block;
}
.posada-answers input {
  width: 100%;
}
.lottery-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  max-width: 470px;
  padding: 14px;
  margin: auto;
  border: 2px solid var(--gold);
  border-radius: 5px;
  background: #e7d7b7;
}
.number-card {
  position: relative;
  min-height: 62px;
  border: 1px solid #b7a27c;
  border-radius: 3px;
  background: #fff9ec;
  color: #520f20;
  box-shadow: inset 0 0 0 4px #f2e6ce;
}
.number-card b {
  font:
    600 26px Lora,
    serif;
}
.card-ornament {
  position: absolute;
  top: 1px;
  left: 5px;
  font-size: 11px;
  color: #a6823a;
}
.card-check {
  display: none;
  position: absolute;
  bottom: 0;
  right: 4px;
  font-size: 12px;
}
.number-card[aria-pressed="true"] {
  background: var(--green);
  color: white;
  box-shadow: inset 0 0 0 4px #477857;
  border-color: var(--green);
}
.number-card[aria-pressed="true"] .card-check {
  display: block;
}
.number-card[aria-pressed="true"] .card-ornament {
  color: #e1c989;
}
.balances {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.balances figure {
  margin: 0;
  border: 1px solid var(--border);
  padding: 14px 4px;
  background: #fff9ee;
  border-radius: 6px;
}
.balances figcaption {
  font:
    600 16px Playfair,
    serif;
}
.balances svg {
  display: block;
  width: 100%;
  margin: 8px 0;
}
.balances p {
  font-size: 13px;
  margin: 0;
}
.notes-pair {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  align-items: center;
  gap: 30px;
  text-align: left;
}
.notes-pair article {
  padding: 25px;
  border: 1px solid var(--border);
  background: #fff9ee;
  box-shadow: 3px 6px 0 #dcc8a233;
}
.notes-pair .seal {
  display: block;
  margin: 0 0 20px;
}
.poem-lines {
  font-size: 18px;
  line-height: 1.9;
}
.poem-lines p {
  margin: 0;
  padding-left: 1em;
  text-indent: -1em;
}
.false-note {
  transform: rotate(2deg);
  font-style: italic;
}
.reflected-clock-frame {
  max-width: 350px;
  margin: auto;
  padding: 18px;
  background: linear-gradient(135deg, #ad8137, #e8d09b, #ad8137);
  border: 3px solid #b08b42;
  border-radius: 48% 48% 8px 8px;
  box-shadow: 0 10px 25px #51351420;
}
.reflected-clock {
  display: block;
  width: 100%;
  border-radius: 50%;
  background: #e9f0ed;
}
.order-rules {
  text-align: left;
  font-size: 20px;
  max-width: 800px;
  margin: 0 auto 30px;
}
.order-rules li {
  margin-bottom: 12px;
  padding-left: 6px;
}
.order-pieces {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  list-style: none;
  max-width: 720px;
  margin: auto;
  padding: 0;
  gap: 14px;
}
.order-pieces li {
  background: #f3e7cf;
  border: 1px solid var(--gold);
  padding: 16px 8px 10px;
  border-radius: 5px;
  cursor: grab;
}
.order-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 14px;
}
.order-pieces strong {
  display: block;
  font:
    600 48px Playfair,
    serif;
  margin: 12px 0;
}
.order-pieces button {
  color: var(--navy);
  background: #fff9ec;
  border: 1px solid var(--border);
  border-radius: 4px;
  min-width: 44px;
  min-height: 44px;
  font-size: 22px;
}
.prank-dialog > .seal {
  display: block;
  margin: 0 auto 20px;
}
@media (max-width: 1000px) {
  .cipher-layout,
  .posada-layout {
    grid-template-columns: 1fr;
  }
  .cipher-notes .letter input {
    width: 32px;
  }
  .cipher-notes {
    max-width: 600px;
    margin: auto;
  }
  .notes-pair {
    grid-template-columns: 1fr;
  }
  .balances {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin: auto;
  }
}
@media (max-width: 650px) {
  .challenge-heading > .seal {
    width: 38px;
    height: 38px;
  }
  .expert-theme .challenge-heading {
    gap: 10px;
  }
  .expert-theme .challenge-badge {
    width: 42px;
    height: 52px;
    font-size: 22px;
  }
  .seal-guide,
  .posada-answers {
    grid-template-columns: 1fr;
  }
  .cipher-layout {
    gap: 24px;
  }
  .cipher-notes .letter input {
    width: 24px;
    font-size: 19px;
  }
  .wheel-clue {
    font-size: 15px;
    padding: 14px;
  }
  .wheel-controls {
    gap: 8px;
    font-size: 12px;
  }
  .posada-table,
  .posada-table tbody,
  .posada-table tr,
  .posada-table td,
  .posada-table th {
    display: block;
    width: 100% !important;
  }
  .posada-table {
    font-size: 15px;
  }
  .posada-table caption {
    display: block;
  }
  .posada-table thead {
    display: none;
  }
  .posada-table tr {
    margin-bottom: 14px;
    border: 1px solid var(--border);
  }
  .posada-table th {
    background: #eee3cb;
    text-align: left;
    padding: 10px 14px;
  }
  .posada-table td {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    border: 0;
  }
  .posada-table td::before {
    content: attr(data-label);
    text-align: left;
  }
  .posada-table select {
    font-size: 16px;
  }
  .lottery-board {
    gap: 5px;
    padding: 8px;
  }
  .number-card {
    min-height: 52px;
    padding: 4px;
  }
  .number-card b {
    font-size: 22px;
  }
  .notes-pair article {
    padding: 18px;
  }
  .poem-lines {
    font-size: 16px;
  }
  .order-rules {
    font-size: 17px;
    padding-left: 23px;
  }
  .order-pieces {
    gap: 5px;
  }
  .order-pieces li {
    padding: 10px 3px 5px;
  }
  .order-mark {
    flex-direction: column;
    font-size: 10px;
  }
  .order-pieces strong {
    font-size: 36px;
  }
  .order-pieces button {
    display: block;
    width: 100%;
    margin: 4px 0;
  }
}

/* Expediente de la Estrella de Plata */
.silver-theme {
  --navy: #123f4a;
  --gold: #c9d0d6;
  --red: #245b68;
  --border: #c6d0cf;
}
.silver-theme .hero .level-label {
  color: #dbe4e8;
}
.silver-theme .hero h1 {
  font-size: clamp(2.4rem, 4.1vw, 4.8rem);
  line-height: 1.13;
  letter-spacing: 0;
}
.silver-theme .hero .subtitle {
  font-size: clamp(1.7rem, 2.5vw, 2.8rem);
}
.silver-theme .paper,
.silver-theme .puzzle-paper,
.silver-theme .letter-paper {
  border-color: #c6d0cf;
}
.silver-theme .puzzle-paper:before {
  content: none;
}
.hacienda {
  display: block;
  width: 100%;
}
.case-shell {
  max-width: 1540px;
}
.penalty-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 20px;
  background: #e4ebea;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 14px;
  margin-bottom: 20px;
}
.case-shell #message:empty {
  display: none;
}
.case-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 24px;
}
.case-sidebar {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  gap: 20px;
  min-width: 0;
}
.case-main {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}
.case-main .letter-paper {
  padding: 35px;
}
.case-main .puzzle-paper {
  padding: 30px;
}
.case-main h1 {
  font-size: clamp(1.7rem, 2.5vw, 2.7rem);
}
.case-main .statement {
  font-size: 20px;
}
.case-dossier,
.case-envelopes {
  padding: 20px;
}
.case-dossier .eyebrow {
  font-size: 10px;
}
.case-dossier [role="tablist"] {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: 3px;
}
.case-dossier [role="tab"] {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--navy);
  padding: 12px 3px;
  font-size: 12px;
}
.case-dossier [role="tab"][aria-selected="true"] {
  background: var(--navy);
  color: white;
  border-radius: 5px 5px 0 0;
}
.case-dossier [role="tabpanel"] {
  max-height: 440px;
  overflow: auto;
  padding: 20px 5px 5px;
  font-size: 14px;
}
.case-dossier [role="tabpanel"][hidden] {
  display: none;
}
.case-dossier .signature {
  font-size: 30px !important;
}
.suspects article {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.suspects h3 {
  font-size: 18px;
  margin: 0 0 8px;
}
.suspects p {
  margin: 0 0 10px;
}
#case-notes {
  width: 100%;
  font-size: 16px;
  margin-top: 8px;
}
.case-dossier label {
  display: block;
  margin-top: 18px;
}
.estate-map {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.estate-map article {
  background: #e4ebea;
  border: 2px solid #aebec2;
  text-align: center;
  padding: 18px 8px;
}
.estate-map h3 {
  font-size: 16px;
  margin: 8px 0;
}
.estate-map p {
  font-size: 11px;
  margin: 0;
}
.case-envelopes h2 {
  font-size: 25px;
  margin-bottom: 20px;
}
.envelope-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.case-envelope {
  display: grid;
  justify-items: center;
  gap: 4px;
  background: linear-gradient(155deg, #f5f1e4 50%, #e9e4d5 50%);
  padding: 14px 5px;
  border: 1px solid #b4bfc2;
  border-radius: 4px;
}
.case-envelope > span {
  font-size: 25px;
  line-height: 1;
  color: #8a9ca5;
}
.case-envelope b {
  font-size: 13px;
  letter-spacing: 0.05em;
}
.case-envelope small {
  font-size: 11px;
  color: #6a716e;
}
.case-envelope.open {
  background: #dfece3;
}
#envelope-form {
  margin-top: 22px;
}
#envelope-form input {
  width: 100%;
}
#envelope-form .button {
  width: 100%;
  margin-top: 12px;
  font-size: 14px;
}
.case-rules {
  padding-left: 22px;
}
.case-rules li {
  margin-bottom: 18px;
}
.envelope-awaiting {
  text-align: center;
  padding: 75px 30px !important;
}
.envelope-awaiting > span {
  font-size: 80px;
  color: #859da6;
}
.case-program {
  list-style: none;
  margin: 10px 0;
  padding: 0;
  text-align: left;
}
.case-program li {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  align-items: baseline;
}
.case-program p {
  margin: 0;
}
.line-number {
  display: block;
  background: #dce7e8;
  font-size: 13px;
  width: 24px;
  min-width: 24px;
  text-align: center;
  border-radius: 3px;
}
.program-word {
  border: 0;
  background: transparent;
  padding: 3px 1px;
  color: inherit;
  font: inherit;
  border-radius: 3px;
}
.program-word:hover,
.program-word.selected {
  background: #b9d4d7;
  color: #123f4a;
}
.word-position {
  min-height: 24px;
  color: #395d67;
  font-size: 13px;
  margin: 15px 0;
}
.book-code {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 25px 0;
}
.book-code span {
  background: #dce7e8;
  border: 1px solid #9cb3b9;
  border-radius: 4px;
  padding: 8px 14px;
  font:
    600 21px Lora,
    serif;
}
.case-challenge {
  margin: 25px 0;
}
.testimonies {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.testimonies blockquote {
  margin: 0;
  padding: 18px;
  background: #edf0e9;
  border-left: 3px solid #9ab1b8;
  font-size: 16px;
}
.testimonies cite {
  font-style: normal;
  font-weight: 600;
  font-size: 14px;
}
.testimonies p {
  margin-bottom: 12px;
}
.case-table-scroll {
  overflow-x: auto;
  margin-top: 25px;
}
.deductions {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.deductions td,
.deductions th {
  border: 1px solid var(--border);
  padding: 7px;
  text-align: center;
}
.deductions th {
  background: #e4ebea;
}
.deductions button {
  min-width: 40px;
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--navy);
  font-size: 24px;
}
.deductions caption {
  padding-bottom: 12px;
  text-align: left;
  font-size: 13px;
}
#case-answer {
  text-align: center;
  margin-top: 30px;
}
#case-answer > label {
  display: block;
  font-weight: 600;
}
#case-response {
  display: block;
  max-width: 400px;
  margin: 8px auto 15px;
  width: 100%;
  text-align: center;
  text-transform: uppercase;
}
#cipher-key {
  display: block;
  max-width: 350px;
  text-transform: uppercase;
}
#key-letters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 12px 0 24px;
}
#key-letters button {
  min-width: 36px;
  min-height: 40px;
  border: 1px solid var(--border);
  background: #e4ebea;
  color: var(--navy);
}
.case-challenge .cipher-words {
  margin-bottom: 18px;
}
.case-challenge .letter input {
  width: 36px;
  padding: 0;
  font-size: 25px;
}
.vigenere-scroll {
  max-width: 100%;
  max-height: 650px;
  overflow: auto;
  border: 1px solid #9ab1b8;
  margin: 20px 0;
}
.vigenere-table {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  font:
    14px Lora,
    serif;
  text-align: center;
}
.vigenere-table th,
.vigenere-table td {
  min-width: 26px;
  height: 26px;
  padding: 2px;
  border-right: 1px solid #d0dbdb;
  border-bottom: 1px solid #d0dbdb;
}
.vigenere-table th {
  background: #d3e0e1;
  font-weight: 600;
  position: sticky;
  left: 0;
}
.vigenere-table thead th {
  top: 0;
  z-index: 1;
}
.vigenere-table tr.selected td,
.vigenere-table tr.selected th {
  background: #a9cdd0;
  color: #0b3039;
  font-weight: 600;
}
.case-photos {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.case-photos li {
  background: #fffaf0;
  padding: 10px;
  border: 1px solid #b4bfc2;
  box-shadow: 3px 4px 0 #c9d0d633;
  border-radius: 4px;
  cursor: grab;
}
.case-photos figure {
  margin: 0;
}
.case-photos svg {
  display: block;
  width: 100%;
}
.case-photos figcaption {
  position: relative;
  padding: 18px 6px 0;
}
.case-photos figcaption strong {
  position: absolute;
  top: -22px;
  right: 8px;
  background: #123f4a;
  border: 3px solid #c9d0d6;
  border-radius: 50%;
  color: white;
  padding: 2px 12px;
  font:
    600 26px Playfair,
    serif;
}
.case-photos p {
  font-size: 15px;
  margin: 10px 0;
}
.move-buttons {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.move-buttons button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid #b4bfc2;
  border-radius: 4px;
  background: #edf0e9;
  color: var(--navy);
  font-size: 24px;
}
.photo-word {
  font:
    600 25px Lora,
    serif;
  text-align: center;
  letter-spacing: 0.1em;
}
.sudoku-board {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  max-width: 450px;
  margin: 25px auto 15px;
  border: 3px solid #123f4a;
  background: #fffcf4;
}
.sudoku-cell {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #b4bfc2;
}
.sudoku-cell.block-bottom {
  border-bottom: 3px solid #123f4a;
}
.sudoku-cell.block-right {
  border-right: 3px solid #123f4a;
}
.sudoku-cell:nth-child(6n) {
  border-right: 0;
}
.sudoku-cell:nth-last-child(-n + 6) {
  border-bottom: 0;
}
.sudoku-cell.given {
  background: #e1e8e7;
}
.sudoku-cell b {
  font:
    600 28px Lora,
    serif;
}
.sudoku-cell select {
  appearance: none;
  background: transparent;
  color: var(--navy);
  border: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 14px 0 0;
  text-align: center;
  font:
    600 27px Lora,
    serif;
  border-radius: 0;
  cursor: pointer;
}
.cell-mark {
  position: absolute;
  top: 1px;
  left: 4px;
  font-size: 13px;
  pointer-events: none;
}
.sudoku-key {
  text-align: center;
  font-size: 25px;
}
.sudoku-key small {
  font-size: 13px;
}
#accusation-form label {
  display: block;
  margin: 20px 0 8px;
}
#accusation-form select {
  width: 100%;
}
#accusation-form .button {
  margin-top: 25px;
}
.saved-accusation {
  background: #e8eeea;
  padding: 20px;
  margin: 20px 0;
  border: 1px solid #b4bfc2;
}
.saved-accusation h2 {
  font-size: 23px;
}
.saved-accusation p {
  margin: 8px 0;
}
.torn-letter {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.torn-letter li {
  padding: 22px 18px 12px;
  background: #efe7d4;
  border: 1px dashed #a6a89d;
  clip-path: polygon(
    0 1%,
    8% 0,
    17% 2%,
    30% 0,
    46% 1%,
    62% 0,
    81% 2%,
    100% 0,
    99% 98%,
    86% 100%,
    62% 98%,
    36% 100%,
    16% 98%,
    0 100%
  );
  cursor: grab;
}
.torn-letter p {
  font-size: 17px;
  line-height: 1.9;
}
.letter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.case-final h2 {
  font-size: 28px;
  margin-top: 25px;
}
.accusation-results {
  list-style: none;
  padding: 0;
}
.accusation-results li {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.accusation-results li > span {
  font-size: 32px;
}
.accusation-results p {
  font-size: 17px;
  margin: 0;
}
.correct {
  color: #28714d;
}
.incorrect {
  color: #a53742;
}
.case-results {
  background: #e4ebea;
  padding: 18px;
  margin: 25px 0;
}
.case-results p {
  font-size: 16px;
  margin: 4px 0;
}
#certificate-form textarea {
  display: block;
  width: 100%;
  margin: 8px 0 15px;
}
@media (max-width: 1100px) {
  .case-layout {
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 16px;
  }
  .case-main .puzzle-paper,
  .case-main .letter-paper {
    padding: 22px;
  }
  .testimonies,
  .case-photos {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 850px) {
  .case-layout {
    display: flex;
    flex-direction: column;
  }
  .case-sidebar,
  .case-main {
    width: 100%;
  }
  .case-sidebar {
    grid-template-columns: 1fr 1fr;
  }
  .case-dossier [role="tabpanel"] {
    max-height: 350px;
  }
  .case-photos,
  .testimonies {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 650px) {
  .case-sidebar {
    grid-template-columns: 1fr;
  }
  .case-main .puzzle-paper,
  .case-main .letter-paper {
    padding: 20px 16px;
  }
  .case-dossier [role="tabpanel"] {
    max-height: 300px;
  }
  .case-dossier [role="tab"] {
    font-size: 12px;
  }
  .case-main .statement {
    font-size: 18px;
  }
  .case-main .challenge-badge {
    width: 45px;
    height: 55px;
  }
  .case-main .challenge-heading {
    gap: 12px;
  }
  .penalty-bar {
    font-size: 12px;
    padding: 12px;
  }
  .case-photos,
  .testimonies,
  .torn-letter {
    grid-template-columns: 1fr;
  }
  .envelope-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .case-envelope b {
    font-size: 10px;
  }
  .case-envelope small {
    font-size: 10px;
  }
  .case-program {
    font-size: 16px;
  }
  .case-challenge .letter input {
    width: 29px;
    font-size: 20px;
  }
  .case-challenge .letter-word {
    gap: 3px;
  }
  .case-main .letter-paper p {
    font-size: 18px;
  }
  .deductions td,
  .deductions th {
    padding: 3px;
    font-size: 12px;
  }
  .deductions button {
    min-width: 34px;
  }
  .sudoku-cell select {
    font-size: 23px;
  }
  .case-results p {
    font-size: 15px;
  }
  .letter-actions .button {
    width: 100%;
  }
}

.silver-theme .hero .subtitle,
.silver-theme .hero .eyebrow,
.silver-theme .timer-box span {
  color: #c9d0d6;
}
.silver-theme .buy {
  background: #c9d0d6;
  color: #123f4a;
}
.case-jumps {
  display: none;
}
@media (max-width: 850px) {
  .case-jumps {
    display: flex;
    gap: 15px;
    justify-content: space-around;
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 12px;
    background: #f7f2e4;
    border: 1px solid #c6d0cf;
    border-radius: 5px;
    margin-bottom: 16px;
    font-size: 14px;
  }
  #case-file,
  #case-main {
    scroll-margin-top: 60px;
  }
}

.case-jumps button {
  border: 0;
  background: transparent;
  color: var(--navy);
  font: inherit;
  padding: 5px;
}

/* Antes de la Medianoche: mantiene el estilo de InvitaYa con azul y champaña. */
.midnight-theme {
  --navy: #101a3c;
  --green: #25335b;
  --red: #866223;
  --gold: #c9a24a;
  --cream: #f7f0df;
  --border: #d8c9a5;
  background: #f7f0df;
}
.midnight-theme .hero {
  background: linear-gradient(155deg, #101a3c, #070d22);
  color: #fff3d8;
}
.midnight-theme .hero .story,
.midnight-theme .hero .facts,
.midnight-theme .hero .purchase-note,
.midnight-theme .illustration-note {
  color: #e9dfc8;
}
.midnight-theme .hero .eyebrow,
.midnight-theme .hero .subtitle,
.midnight-theme .hero .level-label {
  color: #e9cf8a;
}
.midnight-theme .hero .buy {
  background: #e9cf8a;
  color: #101a3c;
  border-color: #e9cf8a;
}
.midnight-theme .hero-picture svg {
  width: 100%;
  max-height: 620px;
}
.year-shell {
  max-width: 1540px;
}
.year-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  align-items: start;
  gap: 32px;
}
.year-sidebar {
  position: sticky;
  top: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  background: #efe6d0;
  border-radius: 4px;
}
.year-sidebar h2 {
  font-size: 23px;
  margin-top: 22px;
}
.year-letter summary {
  cursor: pointer;
  font-weight: 600;
}
.year-letter p {
  font-size: 14px;
  margin-top: 12px;
}
.year-envelopes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 20px;
}
.year-envelope {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 82px;
  padding: 9px 4px;
  border: 1px solid #cbb98c;
  background: #faf4e5;
}
.year-envelope span {
  color: #a18a59;
  font-size: 24px;
  line-height: 1;
}
.year-envelope b {
  font-size: 11px;
  letter-spacing: 1px;
}
.year-envelope small {
  font-size: 10px;
}
.year-envelope.ready {
  box-shadow: inset 0 0 0 2px #c9a24a;
}
.year-envelope.open {
  background: #dce5df;
}
.year-sidebar input {
  min-width: 0;
}
.year-tabs {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 23px;
}
.year-tabs button {
  display: flex;
  gap: 10px;
  text-align: left;
  padding: 10px;
  font-size: 12px;
  line-height: 1.4;
  border: 1px solid transparent;
  background: transparent;
  color: var(--navy);
}
.year-tabs button > b {
  font-size: 20px;
  opacity: 0.7;
}
.year-tabs small {
  display: block;
  margin-top: 3px;
  font-size: 10px;
}
.year-tabs button.active {
  background: #101a3c;
  color: #fff3d8;
  border-color: #c9a24a;
}
.year-main {
  min-width: 0;
  scroll-margin-top: 20px;
}
.year-main #message:empty {
  display: none;
}
.year-main .puzzle-paper,
.year-main .letter-paper {
  max-width: none;
  margin: 0;
  padding: clamp(20px, 3vw, 52px);
}
.year-main h1 {
  font-size: clamp(28px, 2.6vw, 44px);
}
.year-main .statement {
  font-size: clamp(16px, 1.25vw, 21px);
  max-width: none;
}
.year-main form {
  margin-top: 28px;
}
.year-main .letter-paper p {
  max-width: 900px;
}
.year-main .year-letter {
  margin-bottom: 20px;
}
.wordsearch-layout {
  display: grid;
  grid-template-columns: minmax(300px, 1.25fr) minmax(230px, 1fr);
  gap: 26px;
  align-items: start;
}
.wordsearch {
  display: grid;
  grid-template-columns: repeat(15, minmax(0, 1fr));
  aspect-ratio: 1;
  border: 2px solid #a99058;
  touch-action: none;
  user-select: none;
}
.wordsearch button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: clamp(12px, 1.15vw, 20px);
  line-height: 1;
  color: #101a3c;
  border: 0;
  border-right: 1px solid #d4c7a9;
  border-bottom: 1px solid #d4c7a9;
  background: #fffdf5;
  touch-action: none;
}
.wordsearch button.found {
  background: #d7e5dc;
  color: #486a55;
}
.wordsearch button.selecting {
  background: #e9cf8a;
}
.wordsearch button.remaining {
  color: #101a3c;
  background: #e9cf8a;
  font-weight: 600;
}
.found-count {
  font-size: 14px;
  font-weight: 600;
}
.riddles {
  padding-left: 22px;
  margin: 0;
  max-height: 690px;
  overflow: auto;
  font-size: 14px;
}
.riddles li {
  padding: 0 5px 9px;
}
.riddles li.done {
  text-decoration: line-through;
  color: #58745b;
}
.riddles small {
  white-space: nowrap;
}
.secret-postcards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.postcard {
  min-height: 185px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 22px;
  color: #101a3c;
  background: #f6edda;
  border: 1px solid #c3a25a;
  box-shadow:
    inset 0 0 0 6px #fffcf3,
    inset 0 0 0 7px #d8c9a5;
}
.postcard small {
  font-size: 9px;
  letter-spacing: 1px;
}
.postcard strong {
  font: 40px Vibes;
  margin: 12px 0;
}
.postcard span:last-child {
  font-size: 11px;
}
.year-dialog {
  max-width: 560px;
  width: calc(100% - 32px);
  max-height: 90dvh;
  overflow: auto;
  padding: 38px;
  color: #101a3c;
  border: 2px solid #c9a24a;
  background: #faf4e6;
}
.year-dialog::backdrop {
  background: #070d22dd;
}
.year-dialog h2 {
  font-size: 32px;
}
.year-dialog .postcard-text {
  font-size: 24px;
}
.year-dialog button {
  margin-top: 16px;
}
.light-garland {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 30px 20px;
  margin: 20px 0;
  border-radius: 6px;
  background: #101a3c;
}
.light-letter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 16px 2px;
  border-top: 2px solid #e9cf8a;
}
.bulb {
  display: inline-block;
  width: 16px;
  height: 23px;
  border-radius: 50%;
  background: #a26944;
  border: 1px solid #e9cf8a;
  position: relative;
}
.bulb:before {
  content: "";
  height: 18px;
  width: 1px;
  background: #e9cf8a;
  position: absolute;
  bottom: 100%;
  left: 50%;
}
.bulb.long {
  width: 13px;
  height: 39px;
  background: #406452;
}
.bulb.lit {
  background: #fffbd4;
  box-shadow: 0 0 18px 6px #e9cf8a88;
}
.light-separator {
  color: #e9cf8a;
  font-size: 28px;
}
.light-leaf {
  color: #81a575;
  font-size: 24px;
}
.morse-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
#lights-status {
  font-size: 13px;
}
.morse-table {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  background: #f1e6ce;
  padding: 20px;
}
.morse-table span {
  font-size: 16px;
  white-space: nowrap;
}
.morse-table b {
  margin-right: 8px;
}
.match-board {
  width: 100%;
  max-height: 310px;
  user-select: none;
  touch-action: none;
}
.match-board g {
  cursor: pointer;
}
.stick-touch {
  fill: transparent;
}
.stick {
  fill: #bc884c;
  stroke: #73512e;
  stroke-width: 1.5;
}
.stick-slot {
  fill: #fff6e8;
  stroke: #d2c4a6;
  stroke-dasharray: 3 4;
}
.match-board .selected .stick {
  fill: #e9cf8a;
  stroke: #101a3c;
  stroke-width: 4;
}
.nonogram {
  display: grid;
  grid-template-columns: 40px repeat(10, minmax(0, 1fr));
  max-width: 550px;
  margin: 32px auto;
}
.nono-clue {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.nono-clue.column {
  flex-direction: column;
  padding: 8px 0;
  line-height: 1.3;
  justify-content: flex-end;
}
.nonogram button {
  padding: 0;
  aspect-ratio: 1;
  font-size: 26px;
  line-height: 1;
  color: #6c6b6b;
  background: #fffef7;
  border: 1px solid #a9a08a;
  border-radius: 0;
}
.nonogram button.painted {
  background: #101a3c;
}
.spot-scenes {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 680px;
  margin: 0 auto;
  gap: 20px;
}
.spot-scenes figure {
  margin: 0;
}
.spot-scenes img {
  width: 100%;
  display: block;
  border-radius: 5px;
}
.spot-scenes figcaption {
  font-size: 13px;
  padding: 7px 0;
}
.spot-image {
  position: relative;
  cursor: crosshair;
  user-select: none;
}
.spot-ring {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 2px solid #ffdf63;
  border-radius: 50%;
  pointer-events: none;
}
.spot-ring b {
  position: absolute;
  bottom: -18px;
  right: -4px;
  min-width: 23px;
  text-align: center;
  border-radius: 50%;
  background: #ffdf63;
  color: #101a3c;
  font-size: 16px;
  line-height: 23px;
}
.spot-letters {
  text-align: center;
  font-size: 32px;
  letter-spacing: 8px;
  margin-top: 20px;
}
.crossword-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) minmax(200px, 1fr);
  gap: 28px;
  align-items: start;
}
.crossword {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}
.cross-cell {
  margin: 0;
  display: block;
  position: relative;
  aspect-ratio: 1;
  border: 1px solid #8a826b;
  background: #fffdf6;
}
.cross-cell.marked {
  background: #f0d58b;
}
.cross-cell small {
  position: absolute;
  top: 0;
  left: 2px;
  font: 9px Lora;
  z-index: 1;
}
.cross-cell b {
  position: absolute;
  bottom: 0;
  right: 2px;
  color: #9a352d;
  font: 9px Lora;
  z-index: 1;
}
.cross-cell input {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 7px 0 0;
  margin: 0;
  text-align: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #101a3c;
  font-size: 20px;
  text-transform: uppercase;
}
.cross-clues {
  font-size: 14px;
  line-height: 1.6;
}
.cross-clues p {
  margin-bottom: 10px;
}
.cross-clues h3 {
  font-size: 20px;
}
.cross-extract {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.cross-extract span {
  display: flex;
  flex-direction: column;
  min-width: 30px;
  text-align: center;
}
.cross-extract small {
  font-size: 11px;
}
.cross-extract b {
  font-size: 27px;
  border-bottom: 1px solid #b59b61;
}
.year-sudoku {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  max-width: 590px;
  border: 2px solid #101a3c;
  margin: 28px auto;
}
.year-sudoku .sudoku-cell {
  border-color: #b8ab8e;
  aspect-ratio: 1;
  margin: 0;
}
.year-sudoku .block-right {
  border-right: 2px solid #101a3c;
}
.year-sudoku .block-bottom {
  border-bottom: 2px solid #101a3c;
}
.year-sudoku select {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 10px 0 0;
  text-align: center;
  text-align-last: center;
  appearance: none;
  background: transparent;
  font-size: 24px;
  color: #101a3c;
}
.year-sudoku .given {
  background: #e5e3d8;
}
.year-sudoku .given b {
  font-size: 24px;
}
.symbol-entry,
.year-lock {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin: 20px 0;
}
.symbol-entry label {
  text-align: center;
  font-size: 25px;
}
.symbol-entry select,
.year-lock select {
  font-size: 24px;
  min-width: 58px;
  width: 70px;
  text-align: center;
  padding: 10px;
}
.town-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin: 30px auto;
  max-width: 690px;
  padding: 12px;
  border: 1px solid #b5a06c;
  background: #dfceab;
}
.map-piece {
  min-width: 0;
  background: #f5e9cb;
  border: 2px dashed #c49b58;
  cursor: grab;
}
.map-piece.picked {
  border: 3px solid #183b77;
}
.piece-cells {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.map-square {
  background: #f2e3bd;
  border: 1px solid #b19b70;
  border-radius: 0;
  position: relative;
  padding: 8px 2px 2px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-width: 0;
  aspect-ratio: 0.82;
  color: #4e4638;
}
.map-square svg {
  width: 90%;
  height: auto;
  max-height: 90px;
}
.map-square small {
  font-size: clamp(10px, 1.1vw, 16px);
  letter-spacing: 1px;
  line-height: 1.3;
  white-space: nowrap;
}
.edge-row {
  position: absolute;
  left: 2px;
  top: 35%;
  font-size: 10px;
  font-weight: 600;
  color: #a44333;
}
.edge-col {
  position: absolute;
  top: 0;
  left: 48%;
  font-size: 10px;
  font-weight: 600;
  color: #a44333;
}
.town-square {
  background: #bbd2dd;
  color: #345061;
  font-size: 30px;
}
.piece-select {
  width: 100%;
  background: #faf6e9;
  border: 0;
  border-top: 1px solid #b7a075;
  padding: 7px 1px;
  font-size: 11px;
  color: #101a3c;
}
.town-map.assembled {
  gap: 0;
  padding: 0;
}
.assembled .map-piece {
  border: 0;
  cursor: default;
}
.map-actions,
.bells-controls {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.saved-clues,
.year-results {
  margin: 22px 0;
  padding: 18px;
  background: #e9e1d0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 15px;
}
.door-symbols {
  font-size: 52px;
  letter-spacing: 12px;
  text-align: center;
}
.year-results p {
  margin: 0;
}
.wish-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  margin-bottom: 20px;
}
.wish-grid label {
  display: flex;
  align-items: start;
  gap: 12px;
  color: #89703c;
}
.wish-grid textarea {
  width: 100%;
  margin: 0;
  min-height: 80px;
  font-size: 16px;
  padding: 10px;
  background: #fffdf6;
  border: 1px solid #cab989;
  color: #101a3c;
  resize: vertical;
}
#year-restart {
  margin-top: 25px;
}
#year-time {
  max-width: 220px;
}
#year-start .button {
  display: block;
}
@media (min-width: 1600px) {
  .year-main .statement {
    font-size: 21px;
  }
  .wordsearch button {
    font-size: 21px;
  }
}
@media (max-width: 1100px) {
  .year-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
  }
  .year-sidebar {
    padding: 15px;
  }
  .wordsearch-layout,
  .crossword-layout {
    grid-template-columns: 1fr;
  }
  .riddles {
    max-height: 350px;
    columns: 2;
  }
  .secret-postcards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wordsearch button {
    font-size: 20px;
  }
  .cross-clues {
    columns: 2;
  }
  .morse-table {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .year-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .year-sidebar {
    position: static;
    width: 100%;
    padding: 15px;
  }
  .year-main {
    width: 100%;
  }
  .year-main .puzzle-paper,
  .year-main .letter-paper {
    padding: 18px 14px;
  }
  .year-sidebar h2 {
    font-size: 19px;
    margin: 14px 0 10px;
  }
  .year-envelopes {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
    margin-bottom: 8px;
  }
  .year-envelope {
    min-height: 70px;
    padding: 6px 2px;
  }
  .year-envelope b {
    font-size: 8px;
    letter-spacing: 0;
  }
  .year-envelope small {
    font-size: 8px;
  }
  .year-tabs {
    flex-direction: row;
    overflow: auto;
    max-height: 96px;
    margin-top: 14px;
    padding-bottom: 5px;
  }
  .year-tabs button {
    min-width: 140px;
    max-width: 150px;
    font-size: 10px;
    flex-shrink: 0;
  }
  .year-tabs small {
    font-size: 9px;
  }
  .year-sidebar .helper {
    display: none;
  }
  .year-sidebar form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px;
    margin-top: 12px;
  }
  .year-sidebar form label {
    grid-column: 1/-1;
    font-size: 12px;
    margin: 0;
  }
  .year-sidebar input {
    height: 40px;
    margin: 0;
    font-size: 16px;
    padding: 8px;
  }
  .year-sidebar .button {
    padding: 7px;
    font-size: 12px;
  }
  .year-shell .game-top {
    gap: 8px;
  }
  .year-shell .game-top small {
    font-size: 10px;
    display: block;
  }
  .year-shell .game-top .quiet-link {
    font-size: 12px;
  }
  .year-shell .timer-box {
    padding: 8px 12px;
  }
  .year-shell .timer-box strong {
    font-size: 27px;
  }
  .year-shell .timer-box span {
    font-size: 8px;
  }
  .year-shell .penalty-bar {
    font-size: 10px;
    gap: 8px;
  }
  .year-main .statement {
    font-size: 16px;
  }
  .wordsearch-layout {
    gap: 18px;
  }
  .wordsearch button {
    font-size: 15px;
  }
  .riddles {
    font-size: 13px;
    max-height: 330px;
    columns: 1;
  }
  .secret-postcards {
    gap: 10px;
  }
  .postcard {
    min-height: 155px;
    padding: 15px;
  }
  .postcard strong {
    font-size: 33px;
  }
  .postcard span:last-child {
    font-size: 10px;
  }
  .morse-table {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 12px;
    gap: 10px;
  }
  .morse-table span {
    font-size: 12px;
  }
  .light-garland {
    padding: 20px 8px;
    gap: 5px;
  }
  .light-letter {
    gap: 5px;
  }
  .bulb {
    width: 12px;
    height: 19px;
  }
  .bulb.long {
    width: 10px;
    height: 33px;
  }
  .nonogram {
    grid-template-columns: 25px repeat(10, minmax(0, 1fr));
  }
  .nono-clue {
    font-size: 12px;
  }
  .nonogram button {
    font-size: 19px;
  }
  .crossword-layout {
    gap: 20px;
  }
  .cross-cell input {
    font-size: 16px;
    padding-top: 6px;
  }
  .cross-cell small,
  .cross-cell b {
    font-size: 7px;
  }
  .cross-clues {
    font-size: 12px;
    columns: 1;
  }
  .cross-extract {
    gap: 6px;
  }
  .cross-extract span {
    min-width: 24px;
  }
  .year-sudoku select,
  .year-sudoku .given b {
    font-size: 19px;
  }
  .year-sudoku .cell-mark {
    font-size: 10px;
  }
  .symbol-entry,
  .year-lock {
    gap: 10px;
  }
  .symbol-entry select,
  .year-lock select {
    min-width: 0;
    width: 57px;
  }
  .town-map {
    gap: 7px;
    padding: 5px;
  }
  .map-square {
    padding: 10px 0 2px;
  }
  .map-square small {
    font-size: 8px;
    letter-spacing: 0;
  }
  .map-square svg {
    width: 95%;
  }
  .piece-select {
    font-size: 8px;
    min-height: 30px;
  }
  .edge-row,
  .edge-col {
    font-size: 8px;
  }
  .town-square {
    font-size: 20px;
  }
  .door-symbols {
    font-size: 40px;
    letter-spacing: 6px;
  }
  .wish-grid {
    grid-template-columns: 1fr;
  }
  .saved-clues {
    font-size: 13px;
  }
  .year-dialog {
    padding: 24px;
  }
  .year-dialog .postcard-text {
    font-size: 22px;
  }
}

.midnight-theme .riddles {
  list-style-position: inside;
  padding-left: 0;
}

/* Ilustraciones originales: segunda hoja de personajes y nacimiento del día 9. */
.illustration { display: block; object-fit: contain; max-width: 100%; }
.hero-picture .game-cover, .entry-art .game-cover { width: 100%; height: auto; border-radius: 22px; aspect-ratio: 3 / 2; }
.hero-picture { align-self: center; }
.hero-picture .illustration-note { margin-top: 14px; }
.catalog-card { grid-template-columns: 124px 1fr auto; gap: 20px; align-items: center; }
.catalog-cover { width: 124px; height: 92px; border-radius: 12px; }
.symbol-svg.illustration { display: inline-block; width: 2.2em; height: 2.2em; vertical-align: middle; }
.seal.illustration { object-fit: contain; }
.case-photos .case-photo { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: contain; }
.suspects article { display: grid; grid-template-columns: 76px 1fr; column-gap: 14px; padding: 14px 0; align-items: start; }
.suspects .suspect-portrait { grid-row: span 2; width: 76px; height: 88px; background: #fcf8ee; border-radius: 12px; }
.suspects h3, .suspects p { margin: 0; }
.suspects p { margin-top: 5px; }
.case-envelope .illustration, .year-envelope .illustration { width: 54px; height: 46px; margin: 0 auto; }
.envelope-awaiting > .illustration { width: 130px; height: 110px; margin: 0 auto 14px; }
.envelope-icon > .illustration { width: 110px; height: 100px; margin: 0 auto; }
.chest-illustration { width: 160px; height: 140px; margin: 10px auto 20px; }
.postcard > .illustration { width: 66px; height: 58px; margin: 0 auto 12px; }
.house-tile { display: block; position: relative; width: 100%; }
.house-tile > .illustration { width: 100%; aspect-ratio: 1; }
.house-tile > b { position: absolute; left: 50%; top: 52%; transform: translate(-50%,-50%); background: #fff8e9; color: #15304a; border-radius: 3px; padding: 1px 3px; font: 600 12px Lora, serif; }
@media (max-width: 600px) {
  .catalog-card { grid-template-columns: 82px 1fr auto; gap: 12px; }
  .catalog-cover { width: 82px; height: 78px; border-radius: 9px; }
  .hero-picture .game-cover { border-radius: 16px; }
  .suspects article { grid-template-columns: 64px 1fr; gap: 10px; }
  .suspects .suspect-portrait { width: 64px; height: 78px; }
  .house-tile > b { font-size: 10px; padding: 0 2px; }
}

.novena-shell {
  max-width: 1480px;
  margin: auto;
  padding: 24px 28px 64px;
  color: #15304a;
}
.novena-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  border-bottom: 1px solid #c9a24a55;
  padding-bottom: 20px;
  margin-bottom: 30px;
}
.novena-nav .text-button {
  font-size: 15px;
}
.novena-heading {
  display: grid;
  grid-template-columns: 1fr 340px;
  align-items: center;
  gap: 36px;
  margin-bottom: 36px;
}
.novena-heading h1 {
  font:
    600 clamp(36px, 4vw, 62px) Playfair,
    serif;
  margin: 12px 0;
}
.novena-calendar-image {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
}
.novena-days {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}
.novena-day {
  position: relative;
  background: #fffaf0;
  border: 1px solid #c9a24a66;
  border-radius: 18px;
  min-height: 170px;
  padding: 22px 50px 22px 22px;
  text-align: left;
  color: #15304a;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font:
    17px Lora,
    serif;
}
.novena-day strong {
  font:
    600 29px Playfair,
    serif;
}
.novena-day small {
  font-size: 13px;
}
.novena-day:disabled {
  opacity: 0.55;
  cursor: default;
}
.novena-day.completed {
  background: #f0f4e8;
  border-color: #1f5c40;
}
.novena-star {
  position: absolute;
  right: 18px;
  top: 20px;
  font: 32px system-ui;
  color: #947127;
}
.novena-options {
  margin-top: 32px;
  border: 1px solid #c9a24a66;
  border-radius: 16px;
  padding: 22px;
  background: #fffaf0;
}
.novena-options summary {
  font:
    600 21px Playfair,
    serif;
  cursor: pointer;
}
.novena-options-grid,
.novena-turnos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 24px 0;
}
.novena-options label {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
}
.novena-options .checkbox {
  display: flex;
  flex-direction: row;
  align-items: center;
}
.novena-options input,
.novena-options select {
  width: 100%;
  min-height: 46px;
}
.novena-options input[type="checkbox"] {
  width: 20px;
}
.novena-prayer {
  padding: clamp(22px, 4vw, 58px);
  border-radius: 22px;
}
.novena-reading-heading {
  text-align: center;
  margin-bottom: 24px;
}
.novena-reading-heading h1 {
  font:
    600 clamp(28px, 3.3vw, 48px) Playfair,
    serif;
  margin: 12px 0;
}
.novena-reader {
  display: inline-block;
  border-radius: 100px;
  padding: 8px 20px;
  background: #e6edde;
  color: #1f5c40;
  font-weight: 600;
}
.novena-text p {
  margin: 0 0 18px;
  line-height: 1.65;
}
.novena-text.bilingual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}
.novena-text.bilingual > [lang="en"] {
  border-left: 1px solid #c9a24a66;
  padding-left: 32px;
}
.prayer-copy {
  font-size: clamp(21px, 2vw, 30px);
}
.novena-explanation {
  background: #f1ead9;
  border-left: 3px solid #c9a24a;
  padding: 18px 22px;
  margin: 20px 0 28px;
  font-size: 17px;
  border-radius: 6px;
}
.novena-explanation .novena-text p {
  margin: 8px 0 0;
}
.novena-refrain {
  background: #ede0b9;
  border-radius: 14px;
  padding: 22px 30px;
  margin-top: 26px;
  font-size: clamp(21px, 2vw, 30px);
  text-align: center;
}
.novena-refrain strong {
  display: block;
  font-size: 16px;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.novena-refrain p {
  margin-bottom: 0;
}
.novena-scene-reading {
  display: grid;
  grid-template-columns: minmax(200px, 0.8fr) 1.7fr;
  align-items: start;
  gap: 36px;
}
.novena-scene {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
}
.novena-scripture {
  font-size: 17px;
  color: #1f5c40;
}
.novena-reading-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid #c9a24a55;
}
.novena-reading-controls .button {
  min-height: 54px;
}
.novena-reading-controls > span {
  white-space: nowrap;
  font-size: 15px;
}
.novena-night-end {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  font-size: 22px;
}
.novena-night-end h2 {
  font:
    600 29px Playfair,
    serif;
}
.novena-night-end li {
  margin-bottom: 10px;
}
.novena-after {
  font-size: 19px;
  color: #1f5c40;
}
.novena-extra {
  padding: 40px;
}
.novena-extra h1 {
  font:
    600 clamp(32px, 4vw, 52px) Playfair,
    serif;
}
.novena-extra h2 {
  font:
    600 27px Playfair,
    serif;
}
.novena-extra > .novena-text {
  font-size: 22px;
}
.novena-extra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 38px;
}
.novena-extra-grid section {
  border-top: 1px solid #c9a24a55;
  padding-top: 24px;
}
.novena-character {
  width: 110px;
  height: 120px;
  object-fit: contain;
}
.novena-offline-status {
  font-size: 14px;
  color: #526650;
  margin-top: 22px;
}
.novena-finished {
  padding: 24px;
  margin: 28px 0;
}
.novena-kids .prayer-copy,
.novena-kids .novena-night-end,
.novena-kids .novena-day {
  font-family: Fredoka, system-ui, sans-serif;
}
.novena-kids .prayer-copy {
  font-size: clamp(25px, 2.5vw, 36px);
}
.novena-hero-art {
  width: 100%;
  height: 100%;
  max-height: 620px;
  object-fit: contain;
}
.novena-landing .facts {
  flex-wrap: wrap;
}
.novena-crosslink {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 24px 0;
}
.novena-landing .hero-inner {
  align-items: center;
}
.novena-landing .hero-picture {
  height: auto;
  min-height: 300px;
}
.novena-landing .hero-copy .story {
  max-width: 640px;
}
@media (min-width: 1500px) {
  .novena-shell {
    max-width: 1740px;
  }
  .prayer-copy {
    font-size: 32px;
  }
  .novena-prayer {
    padding: 36px 60px;
  }
  .novena-scene-reading {
    grid-template-columns: 400px 1fr;
  }
  .novena-explanation {
    font-size: 19px;
  }
  .novena-refrain {
    font-size: 32px;
  }
}
@media (max-width: 760px) {
  .novena-shell {
    padding: 18px 16px 42px;
  }
  .novena-heading {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .novena-calendar-image {
    max-height: 210px;
    grid-row: 1;
  }
  .novena-days {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .novena-day {
    font-size: 14px;
    padding: 17px 28px 17px 14px;
    min-height: 174px;
  }
  .novena-day strong {
    font-size: 24px;
  }
  .novena-star {
    font-size: 24px;
    right: 7px;
    top: 12px;
  }
  .novena-options-grid,
  .novena-turnos,
  .novena-night-end,
  .novena-extra-grid,
  .novena-scene-reading,
  .novena-text.bilingual {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .novena-text.bilingual > [lang="en"] {
    border-left: 0;
    border-top: 1px solid #c9a24a66;
    padding: 18px 0 0;
  }
  .novena-scene {
    max-height: 270px;
  }
  .novena-reading-controls {
    gap: 8px;
    flex-wrap: wrap;
  }
  .novena-reading-controls .button {
    padding: 13px 15px;
    font-size: 14px;
  }
  .novena-reading-controls > span {
    font-size: 12px;
  }
  .novena-nav {
    gap: 6px 14px;
  }
  .novena-nav .text-button {
    font-size: 13px;
    min-height: 44px;
  }
  .novena-prayer,
  .novena-extra {
    padding: 22px 18px;
  }
  .novena-night-end {
    font-size: 20px;
  }
  .novena-options {
    padding: 18px;
  }
  .novena-hero-art {
    max-height: 330px;
  }
}
@font-face {
  font-family: Fredoka;
  src: url("/assets/novena/Fredoka.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

.nv-cipher-message {
  display: flex;
  justify-content: center;
  gap: clamp(3px, 1vw, 18px);
  margin: 25px 0;
}
.nv-cipher-message > div {
  width: min(12%, 110px);
  aspect-ratio: 1;
  border-bottom: 2px solid #c9a24a;
}
.nv-cipher-message img,
.nv-figure-key img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.nv-key {
  margin: 24px 0;
}
.nv-key summary,
.nv-morse summary {
  cursor: pointer;
  padding: 12px;
  font-weight: 600;
}
.nv-figure-key {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(66px, 1fr));
  gap: 8px;
  margin: 20px 0;
}
.nv-figure-key > div {
  display: grid;
  grid-template-rows: 70px auto;
  text-align: center;
  background: #f5efdf;
  border-radius: 12px;
  padding: 6px;
}
.nv-lanterns {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  max-width: 700px;
  margin: 20px auto;
}
.nv-lantern {
  border: 2px solid transparent;
  border-radius: 16px;
  background: none;
  cursor: pointer;
  color: #15304a;
  padding: 8px;
  min-width: 0;
}
.nv-lantern svg {
  display: block;
  width: 100%;
  max-height: 130px;
}
.nv-lantern[aria-pressed="true"] {
  border-color: #c9a24a;
  background: #f5efdf;
}
.nv-lantern .count-check {
  opacity: 0;
  font-size: 24px;
  fill: #fff;
}
.nv-lantern[aria-pressed="true"] .count-check {
  opacity: 1;
}
.nv-lantern span {
  font-size: 14px;
}
.nv-crossword {
  --cell: clamp(22px, 4vw, 42px);
  margin: 25px auto;
  max-width: 720px;
}
.nv-crossword-row {
  margin: 18px 0;
}
.nv-crossword-row p {
  margin-bottom: 8px;
}
.nv-crossword-cells {
  display: flex;
  gap: 3px;
  margin-left: calc(var(--offset) * (var(--cell) + 3px));
}
.nv-letter {
  width: var(--cell) !important;
  min-width: 0;
  height: calc(var(--cell) * 1.2);
  padding: 0 !important;
  text-align: center;
  font-size: clamp(14px, 2vw, 24px) !important;
  border: 1px solid #c6baa3;
  border-radius: 5px !important;
}
.nv-highlight {
  background: #f4df9f !important;
  border: 2px solid #b28c36 !important;
}
.nv-morse > img {
  display: block;
  width: 110px;
  height: 110px;
  object-fit: contain;
  margin: auto;
}
.nv-morse-message {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  margin: 20px 0;
}
.nv-morse-message > div {
  display: grid;
  text-align: center;
  padding: 12px;
  background: #f5efdf;
  border-radius: 12px;
}
.nv-morse-message strong {
  font: 600 28px monospace;
  white-space: pre;
}
.nv-morse-message span {
  font-size: 14px;
}
.nv-morse-key {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
  gap: 8px;
}
.nv-morse-key > div {
  display: flex;
  justify-content: space-between;
  padding: 8px;
  border-bottom: 1px solid #dbd0b9;
}
.nv-morse-key span {
  font-family: monospace;
}
.nv-sudoku {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(100%, 360px);
  margin: 25px auto;
  border: 3px solid #15304a;
}
.nv-sudoku label {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  position: relative;
  border: 1px solid #c6baa3;
  min-width: 0;
  margin: 0;
}
.nv-sudoku .box-right {
  border-right: 3px solid #15304a;
}
.nv-sudoku .box-bottom {
  border-bottom: 3px solid #15304a;
}
.nv-sudoku input {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  text-align: center;
  border: 0;
  border-radius: 0;
  font-size: 30px;
  background: transparent;
  color: #1f5c40;
}
.nv-sudoku input[aria-invalid="true"] {
  outline: 3px solid #b34236;
  outline-offset: -4px;
}
.nv-sudoku strong {
  font-size: 28px;
}
.nv-sudoku .nv-target {
  background: #f4df9f;
}
.nv-sudoku img {
  position: absolute;
  width: 35%;
  height: 35%;
  object-fit: contain;
  right: 0;
  bottom: 0;
  pointer-events: none;
}
.nv-map {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(100%, 840px);
  aspect-ratio: 600/370;
  margin: 24px auto;
  gap: 5px;
}
.nv-map-piece {
  min-width: 0;
  border: 2px solid #c6baa3;
  background-size: 300% 200%;
  background-repeat: no-repeat;
  cursor: grab;
  padding: 0;
  border-radius: 4px;
}
.nv-map-piece[aria-pressed="true"] {
  outline: 4px solid #c9a24a;
  outline-offset: -4px;
}
.nv-map-piece:focus-visible {
  outline: 4px solid #15304a;
  outline-offset: 2px;
}
@media (max-width: 440px) {
  .nv-lanterns {
    gap: 3px;
  }
  .nv-lantern {
    padding: 2px;
  }
  .nv-lantern span {
    font-size: 11px;
  }
  .nv-figure-key {
    grid-template-columns: repeat(5, 1fr);
  }
  .nv-figure-key > div {
    grid-template-rows: 47px auto;
  }
  .nv-crossword-cells {
    gap: 2px;
  }
  .nv-crossword {
    --cell: 22px;
  }
  .nv-crossword-cells {
    margin-left: calc(var(--offset) * 24px);
  }
}

.am-art {
  width: clamp(52px, 9vw, 105px);
  height: clamp(52px, 9vw, 105px);
  object-fit: contain;
}
.am-preparation {
  max-width: 900px;
  margin: 1.5rem auto;
  padding: 1.5rem 2rem;
  border: 1px solid #d0c4a8;
  border-radius: 16px;
  background: #fffaf0;
}
.am-search {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  align-items: start;
}
.am-search > .am-art {
  width: 140px;
  height: 190px;
}
.am-search ol,
.am-riddles {
  padding-left: 1.5rem;
}
.am-search li,
.am-riddles li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #dfd2b7;
}
.am-search label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.4rem 1rem 0.4rem 0;
}
.am-search input.am-letter {
  width: 3rem;
  padding: 0.3rem;
  text-align: center;
}
.am-search input[type="checkbox"],
.am-riddles input {
  width: 1.2rem;
  height: 1.2rem;
}
.am-tangram {
  margin: 2rem 0;
}
.am-tangram svg {
  display: block;
  width: 100%;
  max-width: 750px;
  margin: auto;
  touch-action: none;
  background: #f6efde;
  border-radius: 16px;
}
.am-tangram g[role="button"] {
  cursor: grab;
}
.am-tangram g[aria-pressed="true"] polygon {
  stroke: #b14335;
  stroke-width: 1.5;
}
.am-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0;
}
.am-controls label {
  min-width: 6rem;
}
.am-maze {
  max-width: 670px;
  margin: auto;
}
.am-maze svg {
  width: 100%;
  touch-action: none;
  border: 1px solid #b7a883;
  border-radius: 8px;
}
.am-equations {
  max-width: 700px;
  margin: auto;
}
.am-equations > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0.6rem;
  border-bottom: 1px solid #d9c9aa;
}
.am-equations b,
.am-rebus b {
  font-size: clamp(1.3rem, 3vw, 2rem);
}
.am-rebus {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
}
.am-rebus .am-art {
  width: clamp(80px, 20vw, 210px);
  height: clamp(80px, 20vw, 210px);
}
.am-answer-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 650px;
  margin: 1rem auto;
}
.am-answer-pair label {
  flex: 1;
  min-width: 100px;
}
.am-answer-pair input {
  text-align: center;
}
.am-fold {
  margin: 2rem auto;
  max-width: 650px;
  padding: 2rem 0;
  border: 1px solid #c3ae83;
  background: #fffaf0;
  box-shadow: 0 6px 16px #58452b15;
}
.am-fold > div {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: clamp(1rem, 3vw, 2.4rem);
  font-weight: 600;
  line-height: 1.8;
}
.am-fold-middle {
  display: block;
  max-width: 240px;
  border-inline: 2px dashed #b96a42;
  padding: 0 0.7rem;
  margin: 0 0.2rem;
  color: #8f5d48;
  overflow: hidden;
  transition:
    max-width 0.6s,
    padding 0.6s,
    margin 0.6s,
    opacity 0.6s,
    transform 0.6s;
}
.am-fold.folded .am-fold-middle {
  max-width: 0;
  padding: 0;
  margin: 0;
  opacity: 0;
  transform: rotateY(90deg);
  border: 0;
}
.am-duende {
  padding: 1.4rem;
  border: 1px solid #c9a24a;
  background: #fff8de;
  border-radius: 12px;
}
.am-flags,
.am-flag-key {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}
.am-flags svg {
  width: clamp(65px, 9vw, 110px);
}
.am-flag-key > div {
  width: 85px;
  text-align: center;
}
.am-flag-key svg {
  width: 100%;
}
.am-flag-key strong {
  display: block;
}
.am-testimonies {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 1rem;
}
.am-testimonies article {
  padding: 1rem;
  border: 1px solid #d5c9b1;
  border-radius: 12px;
  text-align: center;
}
.am-testimonies h2 {
  font-size: 1.3rem;
}
.am-testimonies p {
  font-size: 1rem;
}
.am-portrait {
  width: 100px;
  height: 125px;
  object-fit: contain;
}
.am-report {
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  max-width: 650px;
  margin: 1.5rem auto;
  border: 1px solid #8a7959;
}
.am-report span {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid #d4c4a8;
  font-size: clamp(1rem, 3vw, 1.7rem);
  font-weight: 600;
  background: #fffaf0;
}
.am-report span.covered {
  color: transparent;
  background: #314f43;
  border-color: #314f43;
  user-select: none;
}
.am-kakuro {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  max-width: 550px;
  margin: 1.5rem auto;
  border: 2px solid #314f43;
}
.am-kakuro > div,
.am-kakuro > label {
  position: relative;
  aspect-ratio: 1;
  min-width: 0;
  margin: 0;
  border: 1px solid #d0c5af;
}
.am-kakuro-dark {
  background: #314f43;
  color: white;
}
.am-kakuro-dark.clue {
  background:
    linear-gradient(
      45deg,
      transparent 49%,
      #e9dfc5 49%,
      #e9dfc5 51%,
      transparent 51%
    ),
    #314f43;
}
.am-kakuro small {
  position: absolute;
  font-size: clamp(0.9rem, 2.4vw, 1.3rem);
  line-height: 1;
}
.am-kakuro .across {
  top: 13%;
  right: 12%;
}
.am-kakuro .down {
  bottom: 13%;
  left: 12%;
}
.am-kakuro input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  text-align: center;
  background: #fffaf0;
  font-size: clamp(1.2rem, 3vw, 2rem);
  padding: 20% 0 0;
}
.am-kakuro label span {
  position: absolute;
  top: 3%;
  left: 8%;
  z-index: 1;
  color: #a74936;
  font-size: clamp(0.85rem, 2vw, 1.3rem);
}
.am-symbol {
  font-size: 2.2rem;
  color: #314f43;
  display: block;
}
@media (max-width: 600px) {
  .am-preparation {
    padding: 1rem;
  }
  .am-search {
    display: block;
  }
  .am-search > .am-art {
    width: 90px;
    height: 110px;
    display: block;
    margin: auto;
  }
  .am-testimonies {
    grid-template-columns: 1fr 1fr;
  }
  .am-equations > div {
    gap: 0.3rem;
  }
  .am-rebus {
    gap: 0.3rem;
  }
  .am-controls {
    gap: 0.5rem;
  }
  .am-fold {
    padding: 1.3rem 0.3rem;
  }
  .am-fold-middle {
    padding: 0 0.3rem;
  }
  .am-tangram h2 {
    font-size: 1.5rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .am-fold-middle {
    transition: none;
  }
}

.ag-organizer,
.ag-personal,
.ag-party {
  max-width: 1160px;
  margin: auto;
  padding: 3rem 1.5rem 5rem;
}
.ag-personal {
  max-width: 920px;
}
.ag-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}
.ag-heading h1 {
  font-size: clamp(2rem, 4.5vw, 4rem);
  margin: 0.5rem 0;
}
.ag-small-cover {
  width: 180px;
  max-height: 220px;
  object-fit: contain;
}
.ag-organizer > .paper,
.ag-personal > .paper,
.ag-party > .paper {
  margin: 1.5rem 0;
  padding: 2rem;
  border-radius: 18px;
}
.ag-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem;
  margin: 1rem 0;
}
.ag-fields label,
.ag-person label,
.ag-exclusion label {
  min-width: 0;
}
.ag-person,
.ag-exclusion {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto;
  gap: 1rem;
  align-items: end;
  border-bottom: 1px solid #dccfb7;
  padding: 0.6rem 0;
}
.ag-person .text-button,
.ag-exclusion .text-button {
  margin-bottom: 1rem;
}
.ag-exclusions {
  padding: 1rem 0;
  margin: 1.5rem 0;
  border-block: 1px solid #dccfb7;
}
.ag-exclusions summary,
.ag-personal summary {
  cursor: pointer;
  font-weight: 600;
}
.ag-draw > .button {
  margin: 0.6rem 0.5rem 0.6rem 0;
}
.ag-status {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.ag-status article {
  border: 1px solid #cfc2a6;
  border-radius: 10px;
  padding: 1rem;
}
.ag-status article span {
  display: block;
  font-size: 0.95rem;
  margin-top: 0.4rem;
}
.ag-downloads {
  max-width: 1050px;
  margin: 3rem auto;
  padding: 2.5rem;
}
.ag-downloads > div {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.ag-related {
  max-width: 1100px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}
.ag-preline {
  white-space: pre-line;
}
.ag-card {
  text-align: center;
}
.ag-card .ag-small-cover {
  width: 150px;
  height: 160px;
}
.ag-card h2.ag-revealed {
  font-size: clamp(2.2rem, 5vw, 4rem);
  color: #31513d;
  margin: 1rem 0;
}
.ag-card dl {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 2fr;
  gap: 0.7rem 1rem;
  text-align: left;
  max-width: 650px;
  margin: 1rem auto;
}
.ag-card dt {
  font-weight: 600;
}
.ag-card dd {
  margin: 0;
}
.ag-cipher {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem auto;
}
.ag-cipher span {
  display: grid;
  place-items: center;
  min-width: 2.8rem;
  min-height: 3.4rem;
  padding: 0.4rem;
  background: #eae0c7;
  border-radius: 8px;
  font-size: 1.7rem;
  color: #31513d;
}
.ag-alphabet {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  max-width: 680px;
  margin: 1.4rem auto;
}
.ag-alphabet > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
  padding: 0.4rem;
  border: 1px solid #d9ccae;
  border-radius: 7px;
}
.ag-alphabet span {
  font-size: 1.3rem;
}
.ag-puzzle-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  max-width: 580px;
  margin: 1.5rem auto;
}
.ag-cell {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid #cfc2a7;
  background: #fffbef;
  color: #15304a;
  font-size: clamp(1rem, 3vw, 1.7rem);
  font-family: Lora, serif;
  cursor: pointer;
  padding: 0;
  min-width: 0;
}
.ag-cell[aria-pressed="true"] {
  background: #e4c46f;
}
.ag-cell.covered {
  background: #314f43;
  color: transparent;
  border-color: #314f43;
}
.ag-personal blockquote {
  border-left: 3px solid #c9a24a;
  margin: 1rem 0;
  padding: 0.5rem 1.3rem;
  background: #f6eedc;
}
.ag-personal blockquote footer {
  display: block;
  padding: 0.7rem 0;
  background: none;
  border: 0;
  font-size: 0.9rem;
  color: #655e50;
}
.ag-personal form > .button {
  margin-top: 1rem;
}
.ag-bingo {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 1.5rem 0;
}
.ag-bingo > div {
  border: 1px solid #cfbf9d;
  background: #fbf4e3;
  border-radius: 8px;
  min-height: 130px;
  padding: 0.7rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  font-size: 1rem;
}
.ag-bingo .free {
  display: grid;
  place-items: center;
  color: #fffaf0;
  background: #31513d;
}
.ag-bingo select {
  font-size: 0.9rem;
  padding: 0.45rem 0.3rem;
  margin-top: 0.6rem;
}
.ag-bingo strong {
  margin-top: 0.5rem;
  color: #31513d;
}
.ag-trivia-clues {
  font-size: 1.6rem;
  line-height: 1.65;
}
.ag-score {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.ag-score > div {
  padding: 1rem;
  border-radius: 10px;
  background: #e9e0c9;
  min-width: 140px;
}
.ag-score span {
  display: block;
}
.ag-awards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.ag-awards article {
  border: 1px solid #d0bd8a;
  border-radius: 12px;
  padding: 1.3rem;
  text-align: center;
}
.ag-awards h3 {
  font-size: 1.3rem;
}
.ag-awards strong {
  font-size: 1.3rem;
  color: #31513d;
}
.ag-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}
.ag-party .ag-fields .button {
  align-self: end;
}
.ag-personal details {
  padding: 0.8rem 0;
}
.ag-party h2 {
  font-size: 2rem;
}
@media (min-width: 1600px) {
  .ag-party {
    max-width: 1600px;
  }
  .ag-bingo > div {
    font-size: 1.5rem;
    min-height: 170px;
  }
  .ag-bingo select {
    font-size: 1.1rem;
  }
  .ag-party h2 {
    font-size: 2.7rem;
  }
  .ag-trivia-clues {
    font-size: 2.2rem;
  }
  .ag-awards h3 {
    font-size: 1.7rem;
  }
}
@media (max-width: 650px) {
  .ag-organizer,
  .ag-personal,
  .ag-party {
    padding: 2rem 0.8rem 4rem;
  }
  .ag-heading {
    gap: 0.5rem;
  }
  .ag-heading .ag-small-cover {
    width: 100px;
  }
  .ag-organizer > .paper,
  .ag-personal > .paper,
  .ag-party > .paper {
    padding: 1rem;
  }
  .ag-fields {
    grid-template-columns: 1fr;
  }
  .ag-person,
  .ag-exclusion {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .ag-person button,
  .ag-exclusion button {
    grid-column: 1/-1;
    justify-self: end;
    margin-bottom: 0.2rem !important;
  }
  .ag-person input {
    font-size: 1rem;
    padding: 0.6rem;
  }
  .ag-downloads {
    padding: 1.3rem;
    margin: 2rem 0.8rem;
  }
  .ag-downloads .button {
    width: 100%;
  }
  .ag-bingo {
    gap: 0.2rem;
  }
  .ag-bingo > div {
    font-size: 0.875rem;
    padding: 0.3rem;
    min-height: 130px;
    overflow-wrap: anywhere;
  }
  .ag-bingo select {
    width: 100%;
    font-size: 0.875rem;
    padding: 0.4rem 0;
  }
  .ag-awards {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .ag-awards article {
    padding: 0.7rem;
  }
  .ag-awards h3 {
    font-size: 1.1rem;
  }
  .ag-score {
    gap: 0.4rem;
  }
  .ag-score > div {
    min-width: 100px;
    padding: 0.7rem;
  }
  .ag-card dl {
    grid-template-columns: 1fr;
    text-align: left;
    gap: 0.3rem;
  }
  .ag-card dd {
    margin-bottom: 0.7rem;
  }
}
