/* v187 · Portada y preparación. Todo el estilo queda fuera del campo de juego. */
:root {
  --front-ink: #211b19;
  --front-paper: #f4e5c7;
  --front-cream: #fff2d5;
  --front-crust: #b77736;
  --front-gold: #f2b947;
  --front-red: #af4b35;
  --front-stone: #292a29;
  --front-muted: #c7bb9e;
  --front-display: var(--tostu-display);
  --front-text: var(--tostu-text);
}
.front-screen {
  font-family: var(--front-text);
  color: var(--front-cream);
  isolation: isolate;
}
.front-screen button,
.front-screen summary {
  -webkit-tap-highlight-color: transparent;
}
.front-screen button:focus-visible,
.front-screen summary:focus-visible,
.music-credits a:focus-visible {
  outline: 3px solid #ffdd83;
  outline-offset: 4px;
}
#titleScreen.front-screen,
#menuScreen.front-screen {
  background:
    radial-gradient(ellipse at 78% 35%, #d99c4325, transparent 52%),
    linear-gradient(110deg, #191b20f7 8%, #24231ff0 52%, #252321b8),
    url("assets/art/menu-plaza-v187.jpg") center/cover;
  padding: max(22px, env(safe-area-inset-top))
    max(32px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom))
    max(32px, env(safe-area-inset-left));
}
#titleScreen.front-screen {
  flex-direction: column;
  align-items: stretch;
  justify-content: initial;
  overflow-y: auto;
}
.front-masthead,
.front-footer {
  width: min(100%, 1280px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-shrink: 0;
}
.front-masthead {
  min-height: 46px;
}
.front-location {
  font-weight: 800;
  letter-spacing: 0.18em;
  font-size: 11px;
  color: var(--front-muted);
}
.front-location::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--front-gold);
  margin-right: 12px;
  box-shadow: 0 0 15px #efa44270;
}
.front-screen .front-tool {
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid #a998765e;
  border-radius: 7px;
  background: #211d18a3;
  color: var(--front-cream);
  font: 700 13px var(--front-text);
  cursor: pointer;
}
.front-screen .front-tool:hover {
  background: #5c4633;
}
#titleContent {
  position: relative;
  inset: auto;
  justify-content: normal;
  min-height: 0;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 28px;
  width: min(100%, 1200px);
  max-width: 1200px;
  flex: 1;
  margin: auto;
  padding: 38px 0 28px;
  text-align: left;
}
.title-copy {
  z-index: 2;
  min-width: 0;
}
.front-kicker {
  color: var(--front-gold);
  font: 800 11px var(--front-text);
  letter-spacing: 0.21em;
  margin-bottom: 18px;
}
#titleContent .front-wordmark {
  font-family: var(--front-display);
  font-size: clamp(64px, 7.6vw, 115px);
  font-weight: 1000;
  letter-spacing: -0.065em;
  line-height: 0.92;
  color: var(--front-cream);
  margin: 0 0 28px;
  transform: rotate(-2deg);
  text-shadow:
    3px 4px 0 #38251a,
    6px 8px 0 #0a0a0b55;
}
#titleContent .front-wordmark span {
  display: block;
  color: var(--front-gold);
  text-shadow:
    3px 4px 0 #603318,
    6px 8px 0 #0a0a0b55;
}
.front-story {
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.02em;
}
.front-promise {
  color: var(--front-muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 14px 0 28px;
  max-width: 34ch;
}
#startBtn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 42px;
  width: min(100%, 300px);
  min-height: 60px;
  padding: 14px 22px;
  border: 2px solid #ffdb88;
  border-radius: 6px;
  color: #2b2218;
  background: linear-gradient(110deg, #f3c76d, #df9d37);
  box-shadow: 0 5px 0 #7d4b24;
  font: 900 17px var(--front-text);
  letter-spacing: 0.07em;
  animation: none;
  transition:
    transform 0.16s,
    background 0.16s;
}
#startBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 #7d4b24;
  background: #ffda85;
}
#startBtn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #7d4b24;
}
#startBtn span {
  font-size: 26px;
  line-height: 1;
}
.front-cta-note {
  font-size: 11px;
  color: var(--front-muted);
  margin: 14px 0 20px;
}
.front-help {
  font-size: 13px;
  color: var(--front-muted);
  max-width: 380px;
}
.front-help summary {
  min-height: 36px;
  padding: 7px 0;
  cursor: pointer;
  color: var(--front-cream);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.front-help p {
  margin-top: 6px;
  padding: 12px 14px;
  border-left: 2px solid var(--front-crust);
  background: #17191adb;
  line-height: 1.6;
}
.title-character {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  align-self: center;
  min-width: 0;
}
.hero-halo {
  position: absolute;
  inset: 8% 2% 7% 0;
  border: 1px solid #b69a6155;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #e9ad4430, transparent 65%);
  box-shadow:
    0 0 0 22px #e9ad4404,
    0 0 0 23px #b69a611c;
}
.hero-halo::before {
  content: "";
  position: absolute;
  inset: 15%;
  border: 1px dashed #c9a46635;
  border-radius: 50%;
}
.hero-toast {
  position: absolute;
  inset: 0 0 auto 0;
  width: 100%;
  height: auto;
  filter: drop-shadow(8px 20px 7px #0005);
}
.hero-pigeon {
  position: absolute;
  right: -5%;
  bottom: -4%;
  width: 47%;
  height: auto;
  transform: rotate(-3deg);
  filter: drop-shadow(4px 8px 4px #0005);
}
.hero-note {
  position: absolute;
  right: -1%;
  top: 10%;
  background: var(--front-paper);
  color: #3c2a1f;
  padding: 13px 17px;
  box-shadow: 3px 5px 0 #0004;
  transform: rotate(7deg);
  font: 900 clamp(13px, 1.3vw, 18px)/1.15 var(--front-text);
  letter-spacing: 0.01em;
}
.hero-note::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 35%;
  width: 46px;
  height: 16px;
  background: #ccb57d95;
  transform: rotate(-5deg);
}
.scene-caption {
  position: absolute;
  bottom: 2%;
  left: 4%;
  font-size: 11px;
  color: #c5ae83;
  letter-spacing: 0.06em;
}
.front-footer {
  border-top: 1px solid #b9a07236;
  padding-top: 14px;
  min-height: 46px;
  flex-wrap: wrap;
}
.front-screen .front-link {
  color: var(--front-muted);
  font: 700 12px var(--front-text);
  background: none;
  border: 0;
  min-height: 34px;
  cursor: pointer;
}
.front-screen .front-link:hover {
  color: var(--front-cream);
}
.front-version {
  color: #958b78;
  font-size: 10px;
  letter-spacing: 0.06em;
  margin-left: auto;
}
body.front-active #cfgBtn {
  display: none !important;
}
body.front-active #cfgPanel {
  z-index: 700;
  top: 78px;
  right: max(24px, env(safe-area-inset-right));
}
body.front-active #rotateOverlay {
  display: none !important;
}
#videoScreen {
  display: none;
}
#skipBtn {
  min-height: 44px;
  animation: none;
}
/* Una mesa de preparación y un retrato, no un formulario a pantalla completa. */
#menuScreen.front-screen {
  align-items: center;
  justify-content: center;
  overflow: auto;
}
.menu-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  grid-template-rows: 62px minmax(0, 1fr) 34px;
  gap: 22px 30px;
  width: min(100%, 1280px);
  height: min(100%, 860px);
  min-height: 0;
  margin: auto;
}
.menu-masthead {
  grid-column: 1/-1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid #b9a07236;
  padding-bottom: 16px;
  min-width: 0;
}
.menu-brand {
  font: 900 23px/1 var(--front-display);
  letter-spacing: -0.045em;
  color: var(--front-cream);
}
.menu-brand span {
  color: var(--front-gold);
}
.menu-brand small {
  display: block;
  margin-top: 9px;
  color: var(--front-muted);
  font: 700 8px var(--front-text);
  letter-spacing: 0.23em;
}
.menu-tools {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.menu-character {
  display: flex;
  flex-direction: column;
  min-height: 0;
  align-items: center;
  padding: 12px 0 0;
}
.menu-portrait {
  width: 100%;
  aspect-ratio: 1;
  position: relative;
}
.menu-portrait img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 4px #0004);
}
.portrait-note {
  display: block;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 800;
  color: var(--front-cream);
  text-align: center;
  margin-top: 4px;
  transform: rotate(-3deg);
}
#menuTop {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px 8px;
  max-width: none;
  width: 100%;
  padding: 18px 14px;
  margin-top: 72px;
  background: #191c20a8;
  color: var(--front-cream);
  border: 1px solid #b9a07240;
  border-radius: 8px;
  box-shadow: none;
}
#menuToast {
  width: 42px;
  font-size: 0;
}
#menuToast img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}
#menuLevelBox {
  min-width: 0;
}
#menuLevelLbl {
  color: var(--front-paper);
  font-size: 10px;
  letter-spacing: 0.08em;
}
#menuXpBar {
  height: 6px;
  border: 0;
  background: #ffffff18;
  margin: 7px 0 5px;
}
#menuXpFill {
  background: var(--front-gold);
}
#menuXpTxt {
  color: var(--front-muted);
  font-size: 10px;
}
#menuUser {
  display: block;
  grid-column: 1/-1;
  max-width: 100%;
  font-size: 11px;
  color: var(--front-muted);
  text-align: center;
}
#menuCreditos {
  grid-column: 1/-1;
  grid-row: 2;
  justify-self: center;
  font-size: 16px;
  border: 0;
  border-radius: 4px;
  padding: 5px 17px;
  background: #edbd66;
  color: #35271b;
}
.menu-side-note {
  color: #9b917b;
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
  margin-top: 18px;
}
.menu-workbench {
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.bench-heading {
  flex: none;
  min-height: 67px;
}
.bench-heading .front-kicker {
  margin-bottom: 8px;
  font-size: 9px;
}
.bench-heading h2 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--front-cream);
}
#menuTabs {
  flex: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  margin: 0 0 12px;
  width: 100%;
  max-width: none;
  overflow: visible;
}
#menuTabs .mTab {
  display: block;
  flex: initial;
  min-width: 0;
  min-height: 44px;
  font-size: 13px;
  font-weight: 800;
  padding: 9px 6px;
  background: #212226;
  border: 1px solid #a68b593f;
  border-radius: 5px;
  color: var(--front-muted);
  opacity: 1;
  box-shadow: none;
  cursor: pointer;
}
#menuTabs .mTab.active {
  background: var(--front-paper);
  border-color: var(--front-paper);
  color: var(--front-ink);
  box-shadow: inset 0 -3px 0 var(--front-crust);
}
#menuTabs .mTab:hover:not(.active) {
  color: var(--front-cream);
  background: #40362d;
}
#menuBody {
  min-height: 0;
  max-width: none;
  width: 100%;
  flex: 1;
  overflow: hidden;
  padding: 18px;
  background: var(--front-paper);
  border: 1px solid #e7c486;
  border-radius: 7px;
  box-shadow: 0 7px 0 #0e111355;
  color: var(--front-ink);
}
#menuBody .mPane {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 3px 6px 0;
  scrollbar-width: thin;
  scrollbar-color: #a17d4f #dfcfac;
}
#menuBody .mHint {
  font-size: 12px;
  line-height: 1.5;
  font-weight: 600;
  color: #67523c;
  margin-bottom: 15px;
}
#menuBody .mGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
#menuBody .shopItem {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 13px;
  min-height: 115px;
  background: #fff5df;
  border: 1px solid #c2a678;
  border-radius: 6px;
  box-shadow: 0 2px 0 #a2845a2e;
}
#menuBody .shopInfo {
  min-width: 0;
}
#menuBody .shopName {
  font-size: 14px;
  line-height: 1.35;
  font-weight: 900;
  color: #362b21;
}
#menuBody .shopName small {
  display: block;
  font-size: 10px;
  margin-top: 3px;
}
#menuBody .shopDesc {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.5;
  color: #786247;
}
#menuBody .shopBuy {
  flex: 0 0 auto;
  min-width: 80px;
  min-height: 44px;
  width: auto;
  aspect-ratio: auto;
  height: auto;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #69492d;
  border-radius: 5px;
  outline: none;
  box-shadow: 0 3px 0 #69492d;
  background: #805233;
  color: #fff4db;
  font: 800 11px var(--front-text);
  text-shadow: none;
  cursor: pointer;
}
#menuBody .shopBuy.off {
  opacity: 0.7;
  background: #dfd5bd;
  border-color: #baa88b;
  color: #665842;
  box-shadow: none;
}
#menuBody .shopBuy:hover:not(.off) {
  background: #a16636;
}
#menuBody .skinPrev {
  flex: none;
  width: 50px;
  height: 50px;
  border-radius: 6px;
}
#menuFoot {
  width: 100%;
  max-width: none;
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 20px;
}
.loadout-note {
  min-width: 0;
  flex: 1;
}
.loadout-note span {
  display: block;
  color: #ac9c7e;
  font-size: 9px;
  letter-spacing: 0.13em;
  margin-bottom: 5px;
}
.loadout-note strong {
  font-size: 14px;
  color: var(--front-cream);
}
#shopPlayBtn {
  flex: 0 1 320px;
  min-width: 0;
  width: auto;
  min-height: 54px;
  padding: 10px 20px;
  font: 900 15px var(--front-text);
  border: 1px solid #ffdc8f;
  border-radius: 5px;
  color: #33251b;
  background: linear-gradient(110deg, #f0c66f, #dca04b);
  text-shadow: none;
  box-shadow: 0 4px 0 #80512c;
}
#shopPlayBtn.bloqueado {
  filter: none;
  border-color: #ffdc8f;
  box-shadow: 0 4px 0 #80512c;
}
#shopPlayBtn:hover {
  background: #ffda8a;
}
.menu-bottom {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #a89b80;
  font-size: 10px;
  min-width: 0;
}
#menuBody .medallas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
#menuBody .medalla {
  background: #fff5df;
  border: 1px solid #c2a678;
  min-width: 0;
  border-radius: 5px;
  padding: 18px 8px;
}
#menuBody .medalla .num {
  font-size: 22px;
  overflow-wrap: anywhere;
}
#menuBody .medalla .lbl {
  margin-top: 7px;
  font-size: 10px;
}
#pane-cuenta input {
  font-size: 16px;
  min-height: 44px;
  border-width: 1px;
  border-radius: 5px;
}
#menuBody .mBtn {
  min-height: 44px;
  border-width: 1px;
  border-radius: 5px;
  box-shadow: 0 2px 0 #5b423633;
  font-family: var(--front-text);
  font-size: 14px;
}
#menuBody .mBtn.gris {
  background: #594b3b;
}
#menuBody #authForms,
#menuBody #resetForm {
  max-width: 480px;
  margin: 0 auto;
}
/* Los créditos ocupan un lugar real en el pie, no flotan sobre Jugar. */
#musicCredits.music-credits {
  position: relative;
  inset: auto;
  z-index: 480;
  max-width: none;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  color: var(--front-muted);
  font: 11px/1.6 var(--front-text);
}
#musicCredits summary {
  min-height: 34px;
  display: flex;
  align-items: center;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}
#musicCredits summary::before {
  content: "＋";
  margin-right: 8px;
  color: var(--front-gold);
}
#musicCredits[open] summary::before {
  content: "−";
}
.music-credit-body {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  width: min(360px, 85vw);
  padding: 18px;
  background: #242b31;
  border: 1px solid #a98d58;
  border-radius: 8px;
  box-shadow: 0 12px 35px #0007;
  color: #eee0c7;
}
.music-credit-body p + p {
  margin-top: 10px;
}
#titleCreditSlot .music-credit-body {
  left: 0;
  right: auto;
}
@media (min-width: 1500px) and (min-height: 850px) {
  #titleContent {
    max-width: 1280px;
    gap: 65px;
  }
  .menu-shell {
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 30px 50px;
  }
}
@media (max-width: 1100px) {
  .menu-shell {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 18px 22px;
  }
  #menuBody .mGrid {
    grid-template-columns: 1fr;
  }
  #menuBody .shopItem {
    min-height: 85px;
  }
  #menuTop {
    margin-top: 65px;
  }
  .bench-heading h2 {
    font-size: 23px;
  }
}
@media (max-height: 600px) and (min-width: 621px) {
  #titleScreen.front-screen,
  #menuScreen.front-screen {
    padding: 12px 24px 10px;
  }
  .front-masthead {
    min-height: 36px;
  }
  .front-screen .front-tool {
    min-height: 36px;
    font-size: 11px;
    padding: 6px 10px;
  }
  #titleContent {
    width: min(100%, 1050px);
    padding: 12px 0 8px;
    gap: 30px;
    grid-template-columns: 1.05fr 1fr;
  }
  #titleContent .front-wordmark {
    font-size: clamp(52px, 8vw, 85px);
    margin-bottom: 14px;
  }
  .front-kicker {
    font-size: 9px;
    margin-bottom: 12px;
  }
  .front-story {
    font-size: 18px;
  }
  .front-promise {
    font-size: 11px;
    margin: 8px 0 14px;
    max-width: none;
  }
  #startBtn {
    min-height: 46px;
    font-size: 13px;
    padding: 7px 17px;
    width: 245px;
  }
  .front-cta-note {
    margin: 9px 0 0;
    font-size: 10px;
  }
  .front-help {
    position: relative;
    font-size: 11px;
  }
  .front-help summary {
    min-height: 28px;
    padding: 5px 0;
  }
  .front-help p {
    position: absolute;
    bottom: 100%;
    width: 320px;
    max-width: 85vw;
    z-index: 8;
    border: 1px solid #957044;
    border-radius: 5px;
  }
  .title-character {
    width: min(100%, 340px);
    justify-self: center;
    max-height: 320px;
  }
  .hero-note {
    font-size: 12px;
  }
  .scene-caption {
    font-size: 9px;
  }
  .front-footer {
    padding-top: 4px;
    min-height: 30px;
    gap: 15px;
  }
  .front-version {
    font-size: 9px;
  }
  .front-footer .front-link {
    min-height: 28px;
    font-size: 10px;
  }
  #musicCredits summary {
    min-height: 28px;
    font-size: 10px;
  }
  .menu-shell {
    grid-template-columns: 150px minmax(0, 1fr);
    grid-template-rows: 38px minmax(0, 1fr) 25px;
    gap: 10px 20px;
    height: 100%;
  }
  .menu-masthead {
    padding-bottom: 9px;
  }
  .menu-brand {
    font-size: 18px;
  }
  .menu-brand small {
    font-size: 7px;
    margin-top: 4px;
  }
  .menu-character {
    padding-top: 0;
  }
  .menu-portrait {
    max-width: 120px;
  }
  .portrait-note {
    display: none;
  }
  #menuTop {
    margin-top: 8px;
    padding: 10px 9px;
    gap: 7px;
    grid-template-columns: 28px 1fr;
  }
  #menuToast,
  #menuToast img {
    width: 28px;
    height: 28px;
  }
  #menuLevelLbl {
    font-size: 8px;
  }
  #menuXpTxt {
    font-size: 8px;
  }
  #menuXpBar {
    height: 4px;
    margin: 5px 0;
  }
  #menuCreditos {
    font-size: 12px;
    padding: 3px 12px;
  }
  #menuUser {
    font-size: 9px;
  }
  .menu-side-note {
    display: none;
  }
  .bench-heading {
    min-height: 40px;
  }
  .bench-heading h2 {
    font-size: 18px;
  }
  .bench-heading .front-kicker {
    font-size: 8px;
    margin-bottom: 3px;
  }
  #menuTabs {
    margin-bottom: 8px;
    gap: 4px;
  }
  #menuTabs .mTab {
    min-height: 40px;
    font-size: 11px;
    padding: 6px 4px;
  }
  #menuBody {
    padding: 10px;
  }
  #menuBody .mGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  #menuBody .shopItem {
    padding: 9px;
    gap: 7px;
    min-height: 76px;
  }
  #menuBody .shopName {
    font-size: 12px;
  }
  #menuBody .shopDesc {
    font-size: 10px;
    margin-top: 4px;
  }
  #menuBody .shopBuy {
    min-width: 65px;
    min-height: 44px;
    font-size: 10px;
    padding: 6px 7px;
  }
  #menuBody .mHint {
    font-size: 10px;
    margin-bottom: 8px;
  }
  #menuFoot {
    padding-top: 12px;
    gap: 10px;
  }
  #shopPlayBtn {
    min-height: 44px;
    font-size: 12px;
    padding: 8px 12px;
    flex-basis: 260px;
  }
  .loadout-note span {
    font-size: 8px;
    margin-bottom: 2px;
  }
  .loadout-note strong {
    font-size: 11px;
  }
  .menu-bottom {
    font-size: 9px;
  }
  #menuBody .medalla {
    padding: 10px 6px;
  }
  #menuBody .medalla .num {
    font-size: 17px;
  }
  #menuBody .skinPrev {
    width: 38px;
    height: 38px;
  }
  body.front-active #cfgPanel {
    top: 56px;
    max-height: calc(100dvh - 72px);
  }
}
@media (max-width: 620px) {
  #titleScreen.front-screen,
  #menuScreen.front-screen {
    padding: 16px 18px;
  }
  .front-location {
    font-size: 8px;
    letter-spacing: 0.13em;
  }
  .front-location::before {
    margin-right: 7px;
  }
  .front-screen .front-tool {
    min-height: 42px;
    font-size: 11px;
    padding: 7px 9px;
  }
  #titleContent {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 30px 0 10px;
  }
  .title-copy {
    max-width: 420px;
    justify-self: center;
    width: 100%;
  }
  #titleContent .front-wordmark {
    font-size: clamp(65px, 17vw, 100px);
    margin-bottom: 22px;
  }
  .front-story {
    font-size: 21px;
  }
  .front-promise {
    margin: 10px 0 20px;
    font-size: 12px;
  }
  #startBtn {
    width: 100%;
    min-height: 54px;
    font-size: 15px;
  }
  .front-cta-note {
    font-size: 10px;
  }
  .front-help {
    font-size: 12px;
  }
  .title-character {
    width: 250px;
    justify-self: center;
  }
  .hero-note {
    font-size: 11px;
    padding: 10px;
  }
  .hero-pigeon {
    right: -8%;
  }
  .scene-caption {
    font-size: 9px;
  }
  .front-footer {
    gap: 7px 16px;
  }
  .front-version {
    width: 100%;
    margin: 0;
    font-size: 8px;
  }
  .front-footer .front-link {
    font-size: 10px;
  }
  .menu-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 52px auto minmax(220px, 1fr) 30px;
    height: 100%;
    min-height: 660px;
    gap: 14px;
  }
  .menu-masthead {
    padding-bottom: 10px;
  }
  .menu-brand {
    font-size: 18px;
  }
  .menu-brand small {
    font-size: 6px;
  }
  .menu-tools {
    gap: 5px;
  }
  .menu-character {
    display: block;
    padding: 0;
  }
  .menu-portrait,
  .menu-side-note {
    display: none;
  }
  #menuTop {
    display: grid;
    grid-template-columns: 32px minmax(70px, 1fr) auto;
    gap: 8px;
    align-items: center;
    margin: 0;
    padding: 10px 12px;
  }
  #menuToast,
  #menuToast img {
    width: 32px;
    height: 32px;
  }
  #menuLevelLbl {
    font-size: 9px;
  }
  #menuXpTxt {
    font-size: 8px;
  }
  #menuXpBar {
    height: 5px;
    margin: 5px 0;
  }
  #menuCreditos {
    grid-column: 3;
    grid-row: 1;
    font-size: 13px;
    padding: 4px 10px;
  }
  #menuUser {
    grid-column: 2;
    grid-row: 2;
    text-align: left;
    font-size: 9px;
    margin-top: -5px;
  }
  .bench-heading {
    min-height: 62px;
  }
  .bench-heading h2 {
    font-size: 22px;
  }
  .bench-heading .front-kicker {
    font-size: 8px;
    margin-bottom: 9px;
  }
  #menuTabs {
    margin-bottom: 10px;
    gap: 4px;
  }
  #menuTabs .mTab {
    min-height: 44px;
    font-size: 11px;
    padding: 8px 4px;
  }
  #menuBody {
    padding: 12px;
  }
  #menuBody .mGrid {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  #menuBody .shopItem {
    min-height: 88px;
    padding: 12px;
  }
  #menuBody .shopName {
    font-size: 13px;
  }
  #menuBody .shopDesc {
    font-size: 10px;
  }
  #menuBody .shopBuy {
    min-width: 72px;
    font-size: 10px;
  }
  #menuBody .mHint {
    font-size: 11px;
  }
  #menuBody .medallas {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #menuBody .medalla {
    padding: 14px 6px;
  }
  #menuBody .medalla .num {
    font-size: 18px;
  }
  #menuFoot {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-top: 16px;
  }
  .loadout-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .loadout-note span {
    font-size: 8px;
    margin: 0;
  }
  .loadout-note strong {
    font-size: 12px;
  }
  #shopPlayBtn {
    flex: initial;
    width: 100%;
    font-size: 13px;
  }
  .menu-bottom > span {
    display: none;
  }
  .menu-bottom {
    justify-content: flex-start;
  }
  .music-credit-body {
    right: auto;
    left: 0;
  }
  body.front-active #cfgPanel {
    top: 70px;
    right: 18px;
    max-height: calc(100dvh - 90px);
  }
}
@media (max-height: 360px) and (min-width: 621px) {
  #titleContent .front-wordmark {
    font-size: 54px;
  }
  .title-character {
    width: 250px;
  }
  .front-promise,
  .front-cta-note {
    display: none;
  }
  .front-story {
    font-size: 15px;
  }
  .front-help {
    margin-top: 8px;
  }
  .menu-shell {
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 8px 14px;
  }
  .menu-portrait {
    max-width: 85px;
  }
  #menuTop {
    padding: 8px;
  }
  .bench-heading .front-kicker {
    display: none;
  }
  .bench-heading {
    min-height: 27px;
  }
  #menuBody .mGrid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .front-screen * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

#shopWeapons .shopItem:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}
@media (max-width: 740px) and (max-height: 600px) {
  #menuBody .mGrid {
    grid-template-columns: 1fr;
  }
}
/* El contenido crece antes que solaparse con el pie al abrir la ayuda. */
#titleContent {
  flex: 1 0 auto;
}
.front-promise {
  max-width: none;
}
@media (max-height: 450px) and (min-width: 621px) {
  #titleContent {
    padding: 8px 0;
  }
  #titleContent .front-wordmark {
    font-size: clamp(46px, 6.1vw, 68px);
    margin-bottom: 10px;
  }
  .front-kicker {
    font-size: 8px;
    margin-bottom: 8px;
  }
  .front-promise,
  .front-cta-note {
    display: none;
  }
  #startBtn {
    margin-top: 10px;
  }
  .front-help {
    margin-top: 0;
  }
  .title-character {
    width: 270px;
    max-height: none;
  }
}
@media (max-width: 620px) {
  #titleContent {
    padding: 20px 0 16px;
    gap: 0;
  }
  .title-character {
    width: 230px;
    margin: 4px 0 16px;
  }
  .front-cta-note {
    margin: 10px 0 8px;
  }
}
@media (max-width: 620px) {
  #titleCreditSlot .music-credit-body,
  #menuCreditSlot .music-credit-body {
    position: fixed;
    left: 18px;
    right: 18px;
    bottom: 74px;
    width: auto;
  }
}

#menuCreditos::after {
  content: " TOKENS";
  font-size: 8px;
  letter-spacing: 0.06em;
  vertical-align: middle;
}
/* Ya estamos en la portada/preparación: no ofrecer una salida redundante. */
body.front-active #menuBtn { display:none; }

/* v192 · Accesorios en su propia pestaña. */
#accessoryShopTitle { margin:0 0 10px;font-size:20px;color:#493323; }
#shopAccessories { margin-top:14px; }
#shopAccessories .accessoryPreview { flex:none;width:72px;height:72px;object-fit:contain; }
#unequipAccessory { margin:4px 0 8px;min-height:44px; }
@media(max-height:600px){#shopAccessories .accessoryPreview{width:52px;height:52px;} #accessoryShopTitle{font-size:17px;}}

/* La cabecera compacta deja visibles los objetos en móvil horizontal. */
.accessoryToolbar { display:flex;align-items:center;gap:12px;flex-wrap:wrap; }
.accessoryToolbar .mHint { flex:1 1 190px;margin:0; }
.accessoryToolbar #unequipAccessory { flex:none;margin:0; }
@media(max-height:600px){
  #accessoryShopTitle { display:none; }
  .accessoryToolbar { flex-wrap:nowrap;gap:8px; }
  #shopAccessories { margin-top:8px; }
  #shopAccessories .shopItem { min-height:62px;padding:7px;gap:7px; }
  #shopAccessories .accessoryPreview { width:44px;height:44px; }
}
@media(max-height:600px) and (max-width:700px){
  #shopAccessories { grid-template-columns:1fr; }
}
@media(max-height:600px) and (max-width:700px){
  #menuBody { padding:6px; }
  #shopAccessories { margin-top:6px; }
  #shopAccessories .shopItem { min-height:52px;padding:4px; }
  #shopAccessories .accessoryPreview { width:36px;height:36px; }
}

/* v196 · Progreso: logros y tokens, sin ampliar las pestañas del menú. */
#achievementsPanel { margin-top: 24px; border-top: 1px solid #a6814a66; padding-top: 16px; }
#achievementsTitle { color: #4b2f19; font-size: 24px; margin: 0 0 8px; }
#achievementSummary { color: #64401c; font-weight: 800; line-height: 1.5; }
.achievementFilters { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.achievementFilters label { display: flex; flex-direction: column; gap: 6px; color: #543b28; flex: 1 1 140px; font-size: 14px; }
.achievementFilters select { min-height: 44px; width: 100%; border: 1px solid #977246; border-radius: 8px; padding: 8px; background: #fff5dd; color: #3c291b; font: inherit; }
#achievementList { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.achievement { padding: 14px; border: 1px solid #80674488; border-radius: 10px; background: #fff4df; min-width: 0; }
.achievement h4 { margin: 0 0 6px; color: #513119; font-size: 16px; line-height: 1.3; }
.achievement p { margin: 0 0 10px; color: #5d4732; font-size: 14px; line-height: 1.45; }
.achievement span { display: block; color: #6d573e; font-size: 12px; line-height: 1.5; }
.achievement progress { display: block; width: 100%; height: 10px; margin: 8px 0; accent-color: #95651e; }
.achievement.achieved { border-color: #acbb70; background: #e6e9c8; }
.achievement.achieved h4, .achievement.achieved span { color: #3b4b20; }
#achievementToast { position: fixed; z-index: 5000; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); max-width: min(380px, calc(100vw - 24px)); padding: 12px 16px; border: 1px solid #e3bd66; border-radius: 12px; background: #2d211af2; color: #fff0c7; font: 700 14px/1.5 Nunito, sans-serif; box-shadow: 0 4px 18px #0008; pointer-events: none; }
#achievementToast[hidden] { display: none; }

#achievementStats summary { min-height: 44px; display: list-item; padding: 12px 4px; color: #543b28; cursor: pointer; font-weight: 700; }

/* v208 · A single static ensemble keeps the menu vivid without a render loop. */
.title-character--ensemble .hero-halo { inset:12% 1% 7% 0;opacity:.6; }
.hero-ensemble { position:absolute;inset:0;width:100%;height:100%;object-fit:contain;filter:drop-shadow(5px 12px 6px #0004); }
.title-character--ensemble .hero-note { top:auto;bottom:1%;right:0;transform:rotate(-5deg);padding:10px 14px;font-size:clamp(11px,1.1vw,15px); }
.title-character--ensemble .scene-caption { bottom:-4%;left:5%; }
@media(max-height:600px) and (min-width:621px){
  .title-character--ensemble .hero-note { bottom:0;padding:7px 10px;font-size:10px; }
  .title-character--ensemble .scene-caption { bottom:-5%;font-size:9px; }
}
@media(max-width:620px){
  .title-character--ensemble { width:min(100%,330px);margin-top:10px;margin-bottom:18px; }
  .title-character--ensemble .hero-note { padding:7px 10px;font-size:10px; }
}
@media(max-height:420px) and (min-width:621px){
  .title-character--ensemble .scene-caption { display:none; }
}

/* v209 · TOSTU bread-and-jam wordmark; one shared illustration at every size. */
#titleContent .front-wordmark { width:min(100%,530px);margin:0 0 6px;font-size:0;line-height:0;letter-spacing:normal;transform:none;text-shadow:none; }
.tostu-logo { display:block;width:100%;height:auto;object-fit:contain; }
.front-tagline { font:800 clamp(26px,3vw,40px)/1.1 var(--front-display);color:var(--front-cream);margin:4px 0 22px;transform:rotate(-2deg); }
.menu-brand { width:150px;flex:0 0 auto;letter-spacing:normal; }
.menu-brand .tostu-logo { height:40px;width:150px; }
.menu-brand small { margin-top:1px;font:800 10px/1 var(--front-display);letter-spacing:.04em;text-align:center; }
.front-screen button,.front-screen summary,.bench-heading h2,.shopItemName,.hero-note { font-family:var(--front-display); }
.front-screen button { font-weight:800; }
@media(max-height:600px) and (min-width:621px){
  #titleContent .front-wordmark { width:270px;max-width:100%;margin-bottom:2px; }
  .front-tagline { font-size:23px;margin:2px 0 10px; }
  .menu-brand { width:112px; }
  .menu-brand .tostu-logo { width:112px;height:30px; }
  .menu-brand small { font-size:8px; }
}
@media(max-width:620px){
  #titleContent .front-wordmark { width:100%;margin-bottom:8px; }
  .front-tagline { font-size:30px;margin:2px 0 20px; }
}
