.games-shell { padding-block: var(--space-8) 4rem; color: var(--text-primary); }
/* The crumb owns the gap below the site menu, as on CommuLingo.
   Contain its margin so it cannot collapse through the page shell. */
.games-shell:has(> .games-crumb:first-child) { display: flow-root; padding-block-start: 0; }
.games-shell [hidden] { display: none !important; }
.games-hero { padding: 28px 0 36px; border-bottom: 1px solid var(--border); margin-bottom: 28px; }
.games-hero h1 { font-size: var(--text-2xl); line-height: var(--leading-tight); letter-spacing: -.04em; margin: 12px 0 22px; }
.games-hero p { color: var(--text-secondary); line-height: var(--leading-relaxed); }
.games-shell .games-kicker { font-size: var(--text-xs); font-weight: 700; letter-spacing: .08em; color: var(--text-secondary); }
.games-catalog { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.games-shell .game-card { display: flex; flex-direction: column; text-decoration: none; }
.games-shell .game-card:hover { border-color: var(--text-primary); }
.game-card-copy { padding: 26px; }
.game-card-copy h2 { font-size: var(--text-xl); margin: 8px 0 14px; }
.game-card-copy p { line-height: var(--leading-relaxed); }
.games-note { font-size: var(--text-sm); color: var(--text-secondary); line-height: var(--leading-relaxed); margin: 16px 0; }
/* Context bar under the site menu: the way back to the catalogue on the left, the
   other game on the right. Same geometry as the CommuLingo crumb (34px row,
   bordered, cream text), but it stays in flow — a game page is one screen of
   play, not a long read that needs the way out pinned. */
.games-crumb { --games-crumb-gutter: 10px; padding-inline: var(--games-crumb-gutter); position: relative; }
.games-crumb-icon { width: 15px; height: 15px; flex: 0 0 auto; }
@media (max-width: 560px) { .games-crumb { --games-crumb-gutter: 8px; } .games-crumb-home span { display: none; } }
.strike-panel { border: 1px solid var(--border); background: var(--bg-surface); padding: 24px; margin-bottom: 20px; min-width: 0; }
.strike-panel h2 { font-size: var(--text-xl); margin: 0 0 16px; }
.strike-panel p { line-height: var(--leading-relaxed); }
.strike-demands { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.strike-demands strong { border: 1px solid var(--border); padding: 12px 15px; font-size: var(--text-base); }
.games-shell button, .games-shell select { font: inherit; min-height: 44px; border: 1px solid var(--border); padding: 12px 16px; color: var(--text-primary); background: var(--bg-canvas); max-width: 100%; }
.games-shell button { cursor: pointer; }
.games-shell button:disabled { opacity: .45; cursor: default; }
.games-shell .strike-primary { background: #a21e2a; color: #fff; border-color: #a21e2a; font-weight: 700; margin: 12px 0; }
.games-shell :is(a, button, select):focus-visible { outline: 3px solid var(--text-primary); outline-offset: 4px; }
.strike-log { padding-left: 20px; }
.strike-log li { font-size: var(--text-meta); color: var(--text-secondary); line-height: var(--leading-relaxed); padding: 12px 0; border-top: 1px solid var(--border); }
#strikeAnnouncement { font-size: var(--text-sm); }
.strike-reading { margin: 32px 0; padding: 24px 0; border-block: 1px solid var(--border); }
.strike-reading h2 { font-size: var(--text-lg); }
.strike-reading p, .strike-rules { color: var(--text-secondary); line-height: var(--leading-relaxed); font-size: var(--text-base); }
.strike-reading-links { display: flex; flex-wrap: wrap; gap: 14px 24px; }
.strike-rules summary { cursor: pointer; padding: 12px 0; }
@media (max-width: 560px) {
  .games-catalog { grid-template-columns: 1fr; }
  .games-shell { padding-block: var(--space-5) var(--space-10); }
  .strike-panel { padding: 18px; }
}

/* Catalog: two clear choices before the first mobile scroll. */
.games-home .games-hero { padding: 12px 0 22px; margin-bottom: 20px; }
.games-home .games-hero h1 { margin: 10px 0 14px; }
.games-local-note { color: var(--text-muted); font-size: var(--text-meta); }
.games-home .game-card { overflow: hidden; }
.games-home .game-card-copy h2 a { color: inherit; text-decoration: none; }
/* Give captions their own full-width row when two cards share the screen. */
.game-preview { min-height: 172px; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-content: center; gap: var(--space-2); padding: var(--space-4); color: var(--clr-cream-light); font-weight: 700; }
.game-preview > span { min-width: 0; max-width: 100%; text-align: center; word-break: keep-all; overflow-wrap: anywhere; line-height: var(--leading-tight); }
.strike-preview { background: #791c27; }
.strike-preview img { height: 100px; width: 112px; object-fit: contain; }
.puzzle-preview { background: #214d2e; }
.civil-war-preview { background: #a21e2a; background-image: repeating-linear-gradient(-45deg, transparent, transparent 18px, #00000012 18px, #00000012 36px); }
.civil-war-preview strong { font-size: 1.6rem; letter-spacing: -.03em; }
.mini-puzzle { display: grid; grid-template-columns: repeat(5, 16px); gap: 2px; padding: 5px; border: 1px solid #faf2da; }
.mini-puzzle i { width: 16px; height: 16px; background: #faf2da; }
.mini-puzzle .ink { background: #111c16; }
.game-card-actions { margin-top: var(--space-4); }
/* The start on a war's card: the red, raised button of the war's own page
   (war.css .cw-primary), not the site's green. */
.games-home .game-card-actions .game-cta { background: #a21e2a; border: 2px solid #a21e2a; color: #fff; font-weight: 700; min-height: 46px; padding-inline: 22px; box-shadow: 4px 4px 0 var(--text-primary); transition: transform .08s, box-shadow .08s; }
.games-home .game-card-actions .game-cta:hover { background: #a21e2a; border-color: #a21e2a; color: #fff; filter: brightness(1.12); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--text-primary); }
.games-home .game-card-actions .game-cta:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--text-primary); }
.games-home .game-card-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding-bottom: 4px; }
.games-home .game-card-actions [hidden] { display: none; }
/* 「이어하기」 beside the start: paper and a dark edge, not the grey of a plain .btn. */
.games-home .game-card-actions .btn:not(.btn-primary) { background: var(--bg-surface); border: 2px solid var(--text-primary); color: var(--text-primary); font-weight: 700; min-height: 46px; box-shadow: 3px 3px 0 var(--text-primary); }
.games-home .game-card-actions .btn:not(.btn-primary):hover { background: var(--bg-surface); box-shadow: 4px 4px 0 #a21e2a; }
/* A war's card in the list: its poster across the top, the battles to play
   one at a time in a strip of picture tiles under the copy. */
.game-art { display: block; height: 220px; overflow: hidden; border-bottom: 1px solid var(--border); background: #14110d; }
.game-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.game-battles { margin-top: auto; padding: 14px 26px 22px; border-top: 1px solid var(--border); }
.game-battles h3 { font-size: var(--text-sm); margin: 0 0 10px; }
.game-battles h3 small { font-weight: 400; color: var(--text-secondary); margin-left: 6px; }
.game-battles ul { list-style: none; margin: 0; padding: 0 4px 4px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 10px; }
.game-battles li { min-width: 0; }
.game-battle { display: grid; grid-template-rows: auto 1fr auto; gap: 4px; height: 100%; padding: 6px; border: 2px solid var(--text-primary); background: var(--bg-surface); color: var(--text-primary); text-decoration: none; box-shadow: 3px 3px 0 var(--text-primary); transition: transform .08s, box-shadow .08s; }
.game-battle:hover, .game-battle:focus-visible { color: var(--text-primary); transform: translate(-2px, -2px); box-shadow: 5px 5px 0 #a21e2a; text-decoration: none; }
.game-battle:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--text-primary); }
.game-battle img { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; }
.game-battle { min-width: 0; }
.game-battle strong { font-size: var(--text-meta); line-height: var(--leading-tight); word-break: keep-all; overflow-wrap: anywhere; min-width: 0; }
.game-battle small { font-size: var(--text-2xs); color: var(--text-secondary); }
/* All of a war's battles: a row of its own under the tiles, at every width. */
.game-battle.game-battle-more { grid-template-rows: 1fr; justify-items: center; text-align: center; height: auto; margin: 10px 4px 4px 0; padding: 10px; }
.game-progress { font-size: var(--text-meta); color: var(--text-secondary); margin: 6px 0 0; }
.game-guide { border: 1px solid var(--border); background: var(--bg-surface); padding: 12px 16px; margin: 12px 0 18px; line-height: var(--leading-relaxed); }
.game-guide summary { cursor: pointer; font-weight: 700; }
.strike-objectives { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: var(--text-sm); padding: 12px 0; }
.strike-objectives strong { flex-basis: 100%; }
@media (max-width: 560px) {
  .games-home .games-hero { padding: 0 0 16px; margin-bottom: 16px; }
  .games-home .games-hero h1 { font-size: var(--text-2xl); }
  .games-home .games-hero p { margin: 8px 0; }
  .games-home .games-catalog { gap: 14px; }
  .games-home .game-preview { min-height: 78px; grid-template-columns: 70px minmax(0, 1fr); align-items: center; padding: 8px 14px; gap: 14px; font-size: var(--text-meta); }
  .games-home .game-preview > span { justify-self: start; text-align: left; }
  .games-home .strike-preview img { height: 62px; width: 70px; }
  .games-home .civil-war-preview strong { font-size: var(--text-md); }
  .games-home .mini-puzzle { grid-template-columns: repeat(5, 9px); gap: 1px; padding: 3px; }
  .games-home .mini-puzzle i { width: 9px; height: 9px; }
  .games-home .game-card-copy { padding: 14px 18px; }
  .games-home .game-card-copy h2 { font-size: var(--text-lg); margin: 6px 0; }
  .games-home .game-card-copy p { font-size: var(--text-meta); margin: 4px 0; line-height: var(--leading-normal); }
  .games-home .game-card-copy .games-kicker { font-size: var(--text-2xs); letter-spacing: .02em; }
  .games-home .game-card-actions { margin-top: 4px; font-size: var(--text-sm); }
  .games-home .game-art { height: 132px; }
  .games-home .game-battles { padding: 10px 0 14px 18px; }
  /* The tiles in one row that slides sideways. */
  .games-home .game-battles ul { display: flex; overflow-x: auto; padding: 2px 18px 6px 2px; scrollbar-width: none; }
  .games-home .game-battles li { flex: 0 0 112px; }
  .games-home .game-battle.game-battle-more { margin: 6px 18px 0 2px; }
}

/* Keep text readable inside full-width sections without insetting their borders. */
.games-shell > :is(.games-hero, .strike-heading, .nono-heading, .games-note, .strike-rules, .strike-reading, #strikeAnnouncement),
.games-shell > noscript > p,
.strike-daybar,
.strike-objectives,
.strike-command,
.games-shell .strike-history {
  padding-inline: var(--content-inset);
}
.gpw-preview { background-color: #4b5140; }
