/* Gameplay layout approved 2026-09-07. Preserve the live backpack and all choices in the available viewport. */
body[data-gameplay-layout]:not([data-screen]) .app-shell {
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto;
  gap: 6px; width: min(100%, 620px); max-width: none; min-height: 100dvh; height: auto;
  padding: max(8px, env(safe-area-inset-top)) 12px max(10px, env(safe-area-inset-bottom));
  align-content: start; align-items: start; overflow: visible;
}
body[data-gameplay-layout]:not([data-screen]) .gameplay-hud {
  display: grid; grid-template-columns: minmax(0,1fr); gap: 4px; min-width: 0;
}
body[data-gameplay-layout]:not([data-screen]) .gameplay-board { display: grid; gap: 6px; min-width: 0; }
body[data-gameplay-layout]:not([data-screen]) .brand-header {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 40px; height: auto; margin: 0; padding: 0; grid-area: auto;
}
body[data-gameplay-layout] .gameplay-hud .quake-logo { width: 94px; height: auto; filter: none; }
body[data-gameplay-layout] .gameplay-hud .round-rule { display: none; }
body[data-gameplay-layout] .gameplay-hud .sound-toggle {
  min-width: 82px; min-height: 40px; padding: 6px 8px; font-size: .8rem; line-height: 1.2;
}
body[data-gameplay-layout]:not([data-screen]) .mission {
  display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: center;
  position: relative; inset: auto; grid-area: auto; margin: 0; padding: 0; min-width: 0;
}
body[data-gameplay-layout] .mission-copy { min-width: 0; }
body[data-gameplay-layout] #mission-title {
  font-size: 1.65rem; line-height: 1.1; letter-spacing: -.035em; white-space: normal;
  margin: 0; overflow-wrap: normal; text-transform: none;
}
body[data-gameplay-layout] #mission-title span { white-space: nowrap; margin: 0; }
body[data-gameplay-layout] .mission #timer {
  min-width: 98px; display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 0; padding: 7px 9px; grid-area: auto; border: 0; clip-path: none;
}
body[data-gameplay-layout] #timer .timer-label { font-size: .7rem; line-height: 1.2; }
body[data-gameplay-layout] #timer strong { font-size: 1.5rem; line-height: 1; }
body[data-gameplay-layout]:not([data-screen]) .progress-panel {
  display: flex; align-items: center; gap: 10px; grid-area: auto; margin: 0; padding: 2px 0;
}
body[data-gameplay-layout] .progress-panel .progress-copy {
  display: flex; gap: 6px; align-items: center; white-space: nowrap; font-size: .8rem;
}
body[data-gameplay-layout] .progress-copy strong { font-size: 1rem; }
body[data-gameplay-layout] .progress-track { flex: 1; min-width: 0; }
body[data-gameplay-layout] .progress-segment { height: 7px; }
body[data-gameplay-layout]:not([data-screen]) .chain-proof-game {
  grid-area: auto; display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px;
  padding: 3px 0 6px; margin: 0; border: 0; border-bottom: 1px solid #ded8df;
}
body[data-gameplay-layout] .chain-proof-game > strong { font-size: 1.05rem; line-height: 1.2; letter-spacing: 0; }
body[data-gameplay-layout] .chain-proof-game > span { font-size: .8rem; line-height: 1.2; max-width: none; }
body[data-gameplay-layout] .chain-proof-game > small { flex-basis: 100%; font-size: .75rem; }
body[data-gameplay-layout]:not([data-screen]) .status-message {
  grid-area: auto; display: flex; min-height: 52px; margin: 0; padding: 4px 0;
  align-items: center; gap: 8px;
}
body[data-gameplay-layout] .status-message.is-neutral .status-symbol { display: none; }
body[data-gameplay-layout] .status-message.is-neutral #statusText { display: none; }
body[data-gameplay-layout] .status-copy { min-width: 0; }
body[data-gameplay-layout] .status-copy strong { font-size: 1rem; line-height: 1.25; }
body[data-gameplay-layout] .status-copy > span { font-size: .875rem; line-height: 1.3; }
body[data-gameplay-layout]:not([data-screen]) .choices { grid-area: auto; margin: 0; min-width: 0; }
body[data-gameplay-layout] .choices-heading { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); margin: -1px; }
body[data-gameplay-layout] .item-grid {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); grid-template-rows: none;
  grid-auto-rows: minmax(84px,auto); gap: 6px; margin: 0;
}
body[data-gameplay-layout] .item-grid .item-button {
  min-width: 0; width: auto; min-height: 84px; height: auto; margin: 0; padding: 7px 4px;
  display: flex; flex-direction: column; gap: 5px; align-items: center; justify-content: center;
  border: 1px solid #c9bdce; border-bottom: 3px solid #640a55;
}
body[data-gameplay-layout] .item-button svg { flex: 0 0 30px; width: 30px; height: 30px; }
body[data-gameplay-layout] .item-button .item-label,
body[data-gameplay-layout] .item-button .item-label.is-stacked {
  font-size: .9375rem; line-height: 1.13; font-weight: 700;
}
body[data-gameplay-layout] .item-button.is-packed { background: #ffb400; border-color: #ffb400; }
body[data-gameplay-layout] .item-button.is-wrong { background: #b91b00; border-color: #b91b00; }
@media (max-width:350px) {
  body[data-gameplay-layout] #mission-title { font-size: 1.45rem; }
  body[data-gameplay-layout] .item-button .item-label,
  body[data-gameplay-layout] .item-button .item-label.is-stacked { font-size: .875rem; line-height: 1.12; }
  body[data-gameplay-layout] .item-button svg { flex-basis: 28px; width: 28px; height: 28px; }
}
@media (orientation:landscape) and (max-height:500px) {
  body[data-gameplay-layout]:not([data-screen]) .app-shell {
    grid-template-columns: 180px minmax(0,1fr); grid-template-rows: auto; gap: 18px;
    width: min(100%,1100px); padding: max(8px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
  }
  body[data-gameplay-layout]:not([data-screen]) .gameplay-hud { position: sticky; top: 8px; gap: 10px; }
  body[data-gameplay-layout]:not([data-screen]) .brand-header { flex-wrap: wrap; gap: 4px; }
  body[data-gameplay-layout] .gameplay-hud .quake-logo { width: 86px; }
  body[data-gameplay-layout] .gameplay-hud .sound-toggle { min-width: 76px; font-size: .75rem; }
  body[data-gameplay-layout]:not([data-screen]) .mission { grid-template-columns: minmax(0,1fr); gap: 10px; }
  body[data-gameplay-layout] #mission-title { font-size: 1.6rem; }
  body[data-gameplay-layout] .mission #timer { justify-self: start; padding: 9px 14px; }
  body[data-gameplay-layout] #timer strong { font-size: 1.9rem; }
  body[data-gameplay-layout] .gameplay-board { gap: 6px; }
  body[data-gameplay-layout]:not([data-screen]) .status-message { min-height: 44px; padding: 0; }
  body[data-gameplay-layout] .item-grid { grid-template-columns: repeat(4,minmax(0,1fr)); grid-auto-rows: minmax(72px,auto); }
  body[data-gameplay-layout] .item-grid .item-button { min-height: 72px; padding: 5px 4px; gap: 3px; }
  body[data-gameplay-layout] .item-button svg { flex-basis: 27px; width: 27px; height: 27px; }
  body[data-gameplay-layout] .item-button .item-label,
  body[data-gameplay-layout] .item-button .item-label.is-stacked { font-size: .875rem; line-height: 1.15; }
}
/* Keep the live backpack: it is the destination for the existing packing animation. */
body[data-gameplay-layout]:not([data-screen]) .gameplay-hud { grid-template-columns: minmax(0,1fr); gap: 4px; }
body[data-gameplay-layout] .gameplay-hud .brand-header { gap: 8px; }
body[data-gameplay-layout] .gameplay-hud .quake-logo { width: 88px; flex-shrink: 0; }
body[data-gameplay-layout] .brand-header #mission-title { font-size: 1.2rem; line-height: 1.1; flex: 1; min-width: 0; text-align: center; }
body[data-gameplay-layout] .gameplay-hud .sound-toggle { min-width: 80px; }
body[data-gameplay-layout] .gameplay-score-bag { display: grid; grid-template-columns: minmax(0,1fr) 142px; align-items: center; gap: 12px; }
body[data-gameplay-layout] .gameplay-score { display: grid; gap: 7px; min-width: 0; }
body[data-gameplay-layout]:not([data-screen]) .gameplay-score .mission { display: block; }
body[data-gameplay-layout] .gameplay-score .mission-copy { display: none; }
body[data-gameplay-layout] .gameplay-score #timer { width: max-content; padding: 8px 12px; }
body[data-gameplay-layout] .gameplay-score #timer strong { font-size: 1.9rem; }
body[data-gameplay-layout] .gameplay-score .timer-label { max-width: 5em; }
body[data-gameplay-layout]:not([data-screen]) .gameplay-score .progress-panel { margin: 0; padding: 0; }
body[data-gameplay-layout]:not([data-screen]) .gameplay-score .chain-proof-game { padding: 0; margin: 0; border: 0; gap: 4px; }
body[data-gameplay-layout] .gameplay-score .chain-proof-game > strong { font-size: 1.1rem; }
body[data-gameplay-layout] .gameplay-score .chain-proof-game > span { font-size: .8rem; }
body[data-gameplay-layout]:not([data-screen]) .game-stage {
  display: grid; place-items: center; position: relative; grid-area: auto;
  width: 142px; min-width: 0; height: 158px; min-height: 0; max-height: none;
  margin: 0; padding: 0; background: none; overflow: visible;
}
body[data-gameplay-layout] .game-stage::before,
body[data-gameplay-layout] .game-stage .brand-fragment,
body[data-gameplay-layout] .game-stage .seismic-line { display: none; }
body[data-gameplay-layout] .game-stage #backpack {
  width: 124px; height: 155px; min-width: 0; margin: 0; aspect-ratio: 4/5;
  filter: drop-shadow(0 4px 3px rgba(50,10,75,.18));
}
body[data-gameplay-layout] .game-stage .bag-slots { gap: 2px; }
body[data-gameplay-layout] .game-stage .bag-slot.is-filled { filter: none; }
@media (max-width:350px) {
  body[data-gameplay-layout] .gameplay-hud .quake-logo { width: 78px; }
  body[data-gameplay-layout] .brand-header #mission-title { font-size: 1.08rem; }
  body[data-gameplay-layout] .gameplay-score-bag { grid-template-columns: minmax(0,1fr) 124px; gap: 10px; }
  body[data-gameplay-layout]:not([data-screen]) .game-stage { width: 124px; height: 140px; }
  body[data-gameplay-layout] .game-stage #backpack { width: 110px; height: 137.5px; }
  body[data-gameplay-layout]:not([data-screen]) .status-message { min-height: 44px; }
  /* Preserve all twelve choices with the larger bag, without reducing type or tap targets. */
  body[data-gameplay-layout]:not([data-screen]) .app-shell { gap: 4px; }
  body[data-gameplay-layout]:not([data-screen]) .gameplay-hud { gap: 2px; }
  body[data-gameplay-layout]:not([data-screen]) .gameplay-board { gap: 4px; }
  body[data-gameplay-layout] .item-grid { grid-template-columns: repeat(2,minmax(0,1fr)); grid-auto-rows: minmax(48px,auto); gap: 2px; }
  body[data-gameplay-layout] .item-grid .item-button { display: grid; grid-template-columns: 24px minmax(0,1fr); min-height: 48px; padding: 5px; column-gap: 5px; }
  body[data-gameplay-layout] .item-button svg { width: 24px; height: 24px; }
  body[data-gameplay-layout] .item-button .item-label,
  body[data-gameplay-layout] .item-button .item-label.is-stacked { text-align: left; font-size: .875rem; line-height: 1.15; }
}
@media (orientation:landscape) and (max-height:500px) {
  body[data-gameplay-layout]:not([data-screen]) .app-shell { grid-template-columns: 220px minmax(0,1fr); gap: 16px; }
  body[data-gameplay-layout] .gameplay-hud .brand-header { flex-wrap: wrap; gap: 8px; }
  body[data-gameplay-layout] .gameplay-hud .quake-logo { width: 94px; }
  body[data-gameplay-layout] .brand-header #mission-title { order: 3; flex: 1 0 100%; font-size: 1.45rem; text-align: left; }
  body[data-gameplay-layout] .gameplay-score-bag { grid-template-columns: minmax(0,1fr) 108px; gap: 8px; }
  body[data-gameplay-layout]:not([data-screen]) .game-stage { width: 108px; height: 136px; }
  body[data-gameplay-layout] .game-stage #backpack { width: 102px; height: 127.5px; }
  body[data-gameplay-layout] .gameplay-score #timer { padding: 8px; }
  body[data-gameplay-layout] .gameplay-score #timer strong { font-size: 1.55rem; }
  body[data-gameplay-layout] .gameplay-score .progress-panel { flex-wrap: wrap; gap: 4px; }
  body[data-gameplay-layout] .gameplay-score .progress-track { flex-basis: 100%; }
  body[data-gameplay-layout]:not([data-screen]) .status-message { min-height: 52px; }
  body[data-gameplay-layout] .item-grid { grid-template-columns: repeat(4,minmax(0,1fr)); grid-auto-rows: minmax(68px,auto); }
  body[data-gameplay-layout] .item-grid .item-button { min-height: 68px; padding: 4px; gap: 2px; }
  body[data-gameplay-layout] .item-button svg { flex-basis: 25px; width: 25px; height: 25px; }
}
body[data-gameplay-layout] .game-stage .bag-slots { inset: 18% 10% 30%; }
body[data-gameplay-layout] .game-stage .bag-slot svg { width: 100%; height: 100%; color: #ffb400; fill: none; }
body[data-gameplay-layout] .game-stage .bag-slot svg .accent { fill: none; }
body[data-gameplay-layout] .gameplay-score #timer { min-width: 0; max-width: 100%; flex-wrap: wrap; }
body[data-gameplay-layout] .flying-item,
body[data-gameplay-layout] .rejected-item { z-index: 7; }

/* 0.11.7 — the photographic skin keeps the existing backpack and nine live targets. */
body[data-gameplay-layout] .game-stage #backpack.backpack--photographic {
  --bag-content-top: 22%;
  --bag-content-right: 26%;
  --bag-content-bottom: 37%;
  --bag-content-left: 25%;
}
body[data-gameplay-layout] .game-stage .backpack--photographic .backpack-photo {
  position: absolute; inset: 0; z-index: 0; display: block;
  width: 100%; height: 100%; max-width: none; object-fit: contain;
  object-position: center; pointer-events: none;
}
body[data-gameplay-layout] .game-stage .backpack--photographic::before,
body[data-gameplay-layout] .game-stage .backpack--photographic::after,
body[data-gameplay-layout] .game-stage .backpack--photographic .backpack-body::before,
body[data-gameplay-layout] .game-stage .backpack--photographic .backpack-body::after,
body[data-gameplay-layout] .game-stage .backpack--photographic .backpack-handle,
body[data-gameplay-layout] .game-stage .backpack--photographic .backpack-straps,
body[data-gameplay-layout] .game-stage .backpack--photographic .backpack-opening,
body[data-gameplay-layout] .game-stage .backpack--photographic .backpack-pocket { display: none; }
body[data-gameplay-layout] .game-stage .backpack--photographic .backpack-body {
  inset: 0; z-index: 1; overflow: visible; clip-path: none;
  background: none; border: 0; box-shadow: none;
}
body[data-gameplay-layout] .game-stage .backpack--photographic .bag-slots {
  inset: var(--bag-content-top) var(--bag-content-right) var(--bag-content-bottom) var(--bag-content-left);
  gap: 1px; pointer-events: none;
}
body[data-gameplay-layout] .game-stage .backpack--photographic .bag-slot svg {
  display: block; filter: drop-shadow(0 1px 1px #320a4b);
}
