/* Play móvil v2: viewport fijo, layout por % — sin scroll de página */
html:has(body.play),
body.play {
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  position: relative;
  background: #070a09;
  margin: 0;
}

.play-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.play-bg .stage-bg-cycle {
  inset: -4%;
  animation: bgDrift 32s ease-in-out infinite alternate;
}

.play-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 10, 9, 0.7), rgba(8, 10, 9, 0.92));
}

.play-settings-fab {
  flex: 0 0 auto;
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  border: 1px solid rgba(242, 193, 78, 0.35);
  border-radius: 0.35rem;
  background: rgba(12, 16, 14, 0.85);
  color: var(--cream);
  font-size: 1.05rem;
  line-height: 1;
}
.play-settings-fab:active {
  transform: scale(0.96);
}

.settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(4, 6, 5, 0.72);
}
.settings-overlay[hidden] { display: none !important; }
.settings-card {
  width: min(420px, 94vw);
  padding: 1.25rem 1.35rem 1.15rem;
}
.settings-grid {
  display: grid;
  gap: 0.55rem;
}
.volume-field {
  display: grid;
  gap: 0.35rem;
  color: var(--cream);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}
.volume-field input[type='range'] {
  width: 100%;
  accent-color: #2a9d8f;
}

.dialogue-block {
  display: grid;
  gap: 0.4rem;
  min-height: 0;
}
.dialogue-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
}
.dialogue-actions.has-skip {
  grid-template-columns: 1fr 1fr;
}
.dialogue-actions[hidden] {
  display: none !important;
}
.dialogue-actions .btn {
  min-height: 2.45rem;
  font-size: clamp(0.72rem, 3.1vw, 0.88rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}
.dialogue-actions .btn[hidden] {
  display: none !important;
}

.play-audio-bar {
  grid-row: 2;
  width: 100%;
  margin: 0;
  padding: 0.45rem 0.6rem;
  border: 1px solid rgba(42, 157, 143, 0.55);
  background: rgba(12, 40, 36, 0.92);
  color: var(--cream);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: clamp(0.72rem, 3.2vw, 0.88rem);
  min-height: 2.4rem;
}
.play-audio-bar[hidden] {
  display: none !important;
}

.play-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 auto;
  padding: 0.6% 2.5% calc(1.2% + env(safe-area-inset-bottom));
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 0.45%;
  overflow: hidden;
}

.play-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2%;
  min-height: 0;
  margin: 0;
}

.play-brand,
.play-top-right .site-account-slot,
body.play .site-account-slot,
body.play .site-account-login {
  display: none !important;
}

.play-top-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  margin-left: auto;
}

.play-top-right .site-account-slot {
  flex-shrink: 0;
}

.play-top-right .site-account-name {
  display: none;
}

.play-top-right .site-account-trigger {
  max-width: none;
  padding-right: 0.4rem;
}

.play-top-right .site-account-dropdown {
  right: 0;
  min-width: min(248px, 78vw);
}

.play-brand {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: clamp(0.95rem, 4.2vw, 1.25rem);
  margin: 0;
  font-weight: 700;
  line-height: 1.1;
}

.status-pill {
  display: inline-block;
  padding: 0.2em 0.55em;
  border: 1px solid rgba(42, 157, 143, 0.45);
  font-size: clamp(0.58rem, 2.6vw, 0.72rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(0, 0, 0, 0.28);
  color: var(--cream);
  white-space: nowrap;
}

.play-hud {
  display: grid;
  grid-template-rows: auto auto;
  gap: 2%;
  min-height: 0;
  overflow: hidden;
}
.play-hud .turn-alert[hidden] {
  display: none !important;
}

.turn-board {
  margin: 0;
  padding: 2% 3%;
  border: 1px solid rgba(242, 193, 78, 0.28);
  background: rgba(0, 0, 0, 0.28);
  min-height: 0;
}

.turn-board.is-enemy {
  border-color: rgba(255, 77, 46, 0.45);
  background: rgba(255, 77, 46, 0.1);
}

.turn-board-label {
  font-size: clamp(0.55rem, 2.4vw, 0.68rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 700;
  line-height: 1.1;
}

.turn-board-names {
  font-family: var(--font-display);
  color: var(--cream);
  font-size: clamp(0.85rem, 3.8vw, 1.05rem);
  margin-top: 0.15em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.turn-alert {
  margin: 0;
  padding: 2% 3%;
  border: 2px solid var(--ember);
  background: rgba(255, 77, 46, 0.14);
  border-radius: var(--radius);
  min-height: 0;
}

.turn-alert.is-waiting {
  border-color: rgba(42, 157, 143, 0.55);
  background: rgba(42, 157, 143, 0.1);
}

.turn-alert strong {
  display: block;
  font-family: var(--font-display);
  color: var(--cream);
  font-size: clamp(0.85rem, 3.6vw, 1.05rem);
  margin-bottom: 0.1em;
  line-height: 1.15;
}

.turn-alert span {
  font-family: var(--font-story);
  color: var(--bone);
  font-size: clamp(0.72rem, 3vw, 0.88rem);
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.turn-alert.is-mine {
  box-shadow: 0 0 0 1px rgba(255, 77, 46, 0.35);
}

.play-popups {
  position: absolute;
  top: 7%;
  left: 3%;
  right: 3%;
  z-index: 8;
  display: grid;
  gap: 0.35rem;
  pointer-events: none;
  margin: 0;
}

.play-popup {
  font-family: var(--font-display);
  font-size: clamp(0.75rem, 3.2vw, 0.92rem);
  padding: 0.4em 0.65em;
  background: rgba(8, 10, 9, 0.92);
  border: 1px solid rgba(242, 193, 78, 0.35);
  animation: floatUp 2.2s ease forwards;
}

.play-popup.dmg-enemy { border-color: rgba(255, 77, 46, 0.5); color: #ffb4a2; }
.play-popup.dmg-heal { border-color: rgba(42, 157, 143, 0.5); color: #8fd9cf; }
.play-popup.dmg-hero { color: var(--gold); }

.card-step {
  min-height: 0;
  height: 100%;
  margin: 0;
  padding: 1.2% 2.2%;
  border-color: rgba(242, 193, 78, 0.16);
  background: rgba(14, 18, 17, 0.82);
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 0.8%;
  overflow: hidden;
  box-sizing: border-box;
}

.card-step[hidden] {
  display: none !important;
}

.card-step h2 {
  margin: 0 0 1.5%;
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 4vw, 1.1rem);
  color: var(--gold);
  line-height: 1.15;
  flex: 0 0 auto;
}

/* —— Join —— */
#stepJoin .field {
  margin-bottom: 2%;
  flex: 0 0 auto;
}
#stepJoin .muted {
  font-size: clamp(0.68rem, 2.8vw, 0.8rem);
  margin: 0 0 2%;
  flex: 0 0 auto;
}
#stepJoin .btn {
  margin-top: auto;
  flex: 0 0 auto;
  min-height: 12%;
}

/* —— Setup compacto —— */
#stepSetup {
  gap: 1.2%;
}
#stepSetup .setup-block {
  min-height: 0;
  flex: 1 1 28%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#stepSetup .setup-block h2 {
  font-size: clamp(0.8rem, 3.4vw, 0.95rem);
  margin: 0 0 2%;
}
#stepSetup .muted {
  display: none;
}
#stepSetup #btnReady {
  flex: 0 0 auto;
  margin-top: 1%;
  min-height: 10%;
}

.class-grid,
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5%;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
  align-content: stretch;
}

.class-grid {
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
}

.avatar-grid {
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: 1fr;
}

.class-opt,
.avatar-opt {
  border: 1px solid rgba(242, 193, 78, 0.22);
  background: rgba(0, 0, 0, 0.22);
  color: var(--bone);
  padding: 4% 5%;
  cursor: pointer;
  text-align: left;
  border-radius: var(--radius);
  font: inherit;
  font-size: clamp(0.62rem, 2.6vw, 0.78rem);
  line-height: 1.15;
  min-height: 0;
  overflow: hidden;
}

.class-opt .muted {
  display: none;
}

.class-opt.selected,
.avatar-opt.selected {
  border-color: var(--teal);
  background: rgba(42, 157, 143, 0.12);
  box-shadow: inset 0 0 0 1px rgba(42, 157, 143, 0.45);
}

.avatar-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2%;
  padding: 3%;
  text-align: center;
}

.avatar-opt .anim-sprite,
.avatar-opt .sheet-sprite,
.avatar-opt .ai-art,
.avatar-opt img {
  width: 70% !important;
  height: auto !important;
  max-height: 55% !important;
  object-fit: contain;
}

.avatar-opt span {
  font-size: 0.65em;
}

.dice-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3%;
  flex: 1 1 auto;
  min-height: 0;
}
.dice-mode .btn {
  min-height: 0;
  height: 100%;
  font-size: clamp(0.7rem, 3vw, 0.85rem);
  padding: 2% 3%;
}

/* —— Play HUD —— */
#stepPlay {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 0.55rem;
  padding: 0.45rem 0.5rem 0.3rem;
}
#stepPlay.is-combat,
#stepPlay.is-downed {
  grid-template-rows: auto minmax(0, 1fr) auto;
}
#stepPlay.is-combat #dialogueBlock,
#stepPlay.is-downed #dialogueBlock {
  display: none !important;
}

#hpSelf {
  min-height: 4.8rem;
  height: auto;
  max-height: none;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  overflow: visible;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(242, 193, 78, 0.32);
  background: rgba(8, 12, 11, 0.72);
  border-radius: 0.4rem;
  box-sizing: border-box;
}

#hpSelf > * {
  max-height: none;
  max-width: 100%;
  width: 100%;
}

#hpSelf .hero-strip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  height: auto;
  min-height: 0;
  overflow: visible;
}
#hpSelf .hero-strip-meta {
  flex: 1 1 auto;
  min-width: 0;
}
#hpSelf .hero-strip-name {
  font-size: clamp(0.88rem, 3.8vw, 1.08rem);
  white-space: normal;
  overflow: visible;
  line-height: 1.2;
  color: var(--cream);
}
#hpSelf .hero-strip .anim-sprite,
#hpSelf .hero-strip .sheet-sprite,
#hpSelf .hero-strip .ai-art,
#hpSelf .hero-strip img {
  width: auto !important;
  height: 3.8rem !important;
  max-height: 3.8rem !important;
  max-width: 30% !important;
  object-fit: contain;
  flex: 0 0 auto;
}
#hpSelf .hud-fx {
  height: 3.2rem;
  max-width: 22%;
  display: flex;
  align-items: center;
}
#hpSelf .hud-fx .sheet-sprite,
#hpSelf .hud-fx img {
  max-height: 100%;
  width: auto;
}
#hpSelf .hp-bar {
  height: 0.72em;
  margin: 0.35em 0 0.25em;
}
#hpSelf [data-hpmeta] {
  color: var(--cream);
  font-size: clamp(0.78rem, 3.3vw, 0.92rem);
  font-weight: 600;
}

#stepPlay .wait-msg {
  margin: 0;
  font-family: var(--font-story);
  font-size: clamp(0.72rem, 3.1vw, 0.9rem);
  line-height: 1.25;
  color: var(--cream);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 0;
}

.combat-controls {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 1%;
  margin: 0;
  padding: 1%;
  border: 1px solid rgba(255, 77, 46, 0.28);
  background: rgba(255, 77, 46, 0.06);
  min-height: 0;
  height: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.combat-controls[hidden] {
  display: none !important;
}

.devour-box {
  display: grid;
  gap: 0.45em;
  margin: 0 0 2%;
  padding: 3%;
  border: 1px solid rgba(255, 90, 46, 0.45);
  background: linear-gradient(160deg, rgba(90, 16, 10, 0.55), rgba(20, 8, 6, 0.72));
  min-height: 0;
  box-sizing: border-box;
}
.devour-box[hidden] {
  display: none !important;
}

body.play .save-popup:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 50;
  margin: 0;
  padding: max(1.1rem, env(safe-area-inset-top)) 1.1rem max(1.2rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.65rem;
  background:
    linear-gradient(180deg, rgba(6, 4, 4, 0.88), rgba(18, 8, 6, 0.94));
  border: 0;
  overflow: auto;
}

.item-use-popup .item-hero-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  text-align: left;
  padding: 0.7rem 0.75rem;
  border: 1px solid rgba(242, 193, 78, 0.28);
  background: rgba(8, 10, 9, 0.55);
  color: var(--cream);
  border-radius: 0.45rem;
}
.item-use-popup .item-hero-card.is-self {
  border-color: var(--teal);
  box-shadow: 0 0 0 1px rgba(42, 157, 143, 0.45);
  background: rgba(12, 28, 26, 0.72);
}
.item-use-popup .item-hero-card.is-down {
  opacity: 0.72;
  border-color: rgba(255, 90, 46, 0.4);
}
.item-hero-you {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05em 0.4em;
  font-size: 0.68em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  border: 1px solid rgba(42, 157, 143, 0.45);
}
.item-hero-meta {
  font-size: 0.82em;
  color: var(--bone-dim);
}
.item-hero-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.15rem;
}
.item-hero-actions .btn {
  flex: 1 1 auto;
}

.spell-slots-line {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 700;
}
.spell-slots-line[hidden] {
  display: none !important;
}
.item-use-targets {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 58dvh;
  overflow: auto;
}

.play-turn-timer {
  margin: 0.2rem 0 0;
}
.play-turn-timer[hidden] {
  display: none !important;
}
.play-turn-timer .turn-timer-track,
.save-timer .turn-timer-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(8, 10, 9, 0.55);
  border: 1px solid rgba(242, 193, 78, 0.35);
  overflow: hidden;
}
.play-turn-timer .turn-timer-fill,
.save-timer .turn-timer-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #2a9d8f, #e9c46a);
  transition: width 0.35s linear;
}
.play-turn-timer.is-low .turn-timer-fill,
.save-timer.is-low .turn-timer-fill,
.turn-timer.is-low .turn-timer-fill {
  background: linear-gradient(90deg, #e76f51, #c0392b);
}
.devour-title {
  margin: 0;
  font-size: 1.15em;
  color: #ffb070;
  font-family: Georgia, "Times New Roman", serif;
}
.devour-box .roll-display {
  font-size: 2.2em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: #ffe8c8;
}
.devour-box .btn-primary {
  width: 100%;
}

.poke-confirm .roll-display {
  font-size: 2em;
  text-align: center;
  margin: 0.25em 0;
  color: #ffe8c8;
  font-variant-numeric: tabular-nums;
}

.enemy-pick {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 0.3rem;
  margin: 0;
  min-height: 0;
  height: auto;
  max-height: 34%;
  overflow: auto;
}

.enemy-pick .poke-hint {
  display: none;
}

.enemy-pick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 0.45rem 0.35rem;
  border: 1px solid rgba(242, 193, 78, 0.25);
  background: rgba(8, 10, 9, 0.55);
  color: var(--cream);
  border-radius: 0.4rem;
  cursor: pointer;
  min-height: 0;
  min-width: 34%;
  flex: 1 1 34%;
  max-width: 48%;
  overflow: hidden;
  font-size: clamp(0.58rem, 2.4vw, 0.72rem);
  line-height: 1.1;
}

.enemy-pick-card strong {
  font-size: 1em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.enemy-pick-card.selected {
  border-color: var(--teal);
  box-shadow: 0 0 0 1px rgba(42, 157, 143, 0.55);
}

.enemy-pick-card .enemy-pick-art,
.enemy-pick-card .anim-sprite,
.enemy-pick-card img {
  width: min(22vw, 5.6rem) !important;
  height: min(22vw, 5.6rem) !important;
  max-height: min(22vw, 5.6rem) !important;
  max-width: 100% !important;
  margin: 0 auto;
  object-fit: contain;
  display: block;
}

.poke-frame {
  border: 2px solid rgba(242, 193, 78, 0.35);
  background: linear-gradient(180deg, rgba(18, 22, 20, 0.95), rgba(8, 10, 9, 0.92));
  border-radius: 0.5rem;
  padding: 2%;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.poke-menu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3%;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

.poke-cmd {
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 4vw, 1.05rem);
  letter-spacing: 0.04em;
  padding: 0;
  border: 1px solid rgba(242, 193, 78, 0.4);
  background: rgba(12, 16, 14, 0.9);
  color: var(--cream);
  cursor: pointer;
  min-height: 0;
  height: 100%;
}
.poke-cmd:active {
  background: rgba(42, 157, 143, 0.25);
}

.poke-panel,
.poke-confirm {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 2%;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.poke-panel[hidden],
.poke-confirm[hidden],
.poke-menu[hidden] {
  display: none !important;
}

.poke-hint {
  margin: 0;
  font-size: clamp(0.55rem, 2.4vw, 0.7rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 700;
  line-height: 1.1;
}

.attack-list,
.inventory-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2%;
  min-height: 0;
  overflow: hidden;
  align-content: start;
}

.attack-list .btn,
.inventory-list .btn,
.attack-opt,
.inv-opt {
  min-height: 0;
  padding: 4% 3%;
  font-size: clamp(0.65rem, 2.8vw, 0.8rem);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attack-opt {
  white-space: normal;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.15em;
}

.attack-opt .vs-hint {
  display: block;
  font-size: 0.72em;
  opacity: 0.72;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.enemy-pick-card.vs-strong {
  border-color: rgba(120, 200, 90, 0.6);
}

.enemy-pick-card.vs-weak {
  border-color: rgba(200, 90, 70, 0.5);
}

.combat-controls .roll-display {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 9vw, 2.4rem);
  text-align: center;
  color: var(--cream);
  line-height: 1;
  margin: 0;
}

.poke-panel .field {
  margin: 0;
  font-size: clamp(0.65rem, 2.6vw, 0.78rem);
}
.poke-panel .field input {
  min-height: 0;
  padding: 0.35em 0.5em;
  font-size: 1em;
}

.poke-back,
.poke-confirm .btn {
  min-height: 0;
  padding: 0.45em 0.6em;
  font-size: clamp(0.7rem, 3vw, 0.85rem);
}

#pathMagicBox {
  margin: 0.45rem 0 0.2rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid rgba(242, 193, 78, 0.28);
  border-radius: 8px;
  background: rgba(8, 12, 11, 0.55);
}

#pathMagicBox h2 {
  margin: 0 0 0.3rem;
  font-size: 1.02rem;
  color: var(--gold, #e9c46a);
}

.ally-pick {
  margin-bottom: 0.35rem;
}

#puzzleBox,
#choiceBox {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 2%;
  overflow: hidden;
}

#puzzleBox[hidden],
#choiceBox[hidden] {
  display: none !important;
}

#puzzleBox h2,
#choiceBox h2 {
  margin: 0;
  font-size: clamp(0.9rem, 3.8vw, 1.05rem);
}

#puzzleBox p,
#choiceBox p {
  margin: 0;
  font-size: clamp(0.72rem, 3vw, 0.88rem);
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.option-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2%;
  min-height: 0;
  overflow: hidden;
  align-content: start;
}

.option-list button {
  width: 100%;
  text-align: left;
  min-height: 0;
  padding: 6% 5%;
  font-size: clamp(0.68rem, 2.8vw, 0.82rem);
  line-height: 1.2;
}

.emote-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: auto auto;
  gap: 0.4rem;
  margin: 0;
  min-height: 0;
  height: auto;
  max-height: none;
  padding: 0.15rem 0 0.1rem;
}
.emote-row button {
  min-width: 0;
  width: 100%;
  height: 2.55rem;
  min-height: 2.55rem;
  font-size: clamp(1.05rem, 5vw, 1.3rem);
  padding: 0;
}
.emote-row .emote-extra {
  grid-column: span 2;
  font-size: clamp(0.78rem, 3.4vw, 0.95rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  height: 2.7rem;
  min-height: 2.7rem;
}
#stepPlay.is-downed .emote-row {
  display: none !important;
}

.downed-box {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.7rem;
  min-height: 0;
  height: 100%;
  padding: 4%;
  border: 1px solid rgba(255, 77, 46, 0.35);
  background: rgba(20, 8, 6, 0.55);
  overflow: auto;
}
#stepPlay.is-downed .downed-box:not([hidden]) {
  display: flex;
}
.downed-title {
  margin: 0;
  font-family: var(--font-display);
  color: #ffb070;
  font-size: clamp(1.1rem, 5vw, 1.4rem);
}
.downed-box p {
  margin: 0;
  color: var(--cream);
  font-size: clamp(0.78rem, 3.2vw, 0.95rem);
  line-height: 1.3;
}
.downed-skull {
  width: min(100%, 16rem);
  font-size: 1.15rem;
}

/* Shell rows: top / hud / main card */
.play-shell > .play-top { grid-row: 1; }
.play-shell > .play-audio-bar { grid-row: 2; }
.play-shell > .play-hud { grid-row: 3; }
.play-shell > .play-popups { grid-row: 1 / 4; }
.play-shell > .card-step { grid-row: 4; }

@media (orientation: landscape) and (max-height: 500px) {
  .play-shell {
    grid-template-rows: auto auto 0 minmax(0, 1fr);
    padding: 0.6% 2%;
  }
  .play-shell > .play-hud { display: none; }
  .play-shell > .card-step { grid-row: 4; }
  #stepPlay {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }
  .class-grid { grid-template-columns: repeat(4, 1fr); }
}

