.arcade-round.action-game {
  justify-content: center;
  gap: .65rem;
  padding: clamp(.4rem,2vw,1.15rem);
  background: radial-gradient(ellipse at top,#303252,#101524 72%);
}
.action-game::before { content: none; }
.action-readout {
  display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center;
  gap:.2rem .85rem; width:min(100%,720px); padding:.45rem .7rem;
  border:1px solid #7980b2; border-radius:12px; background:#201e39; color:#eefaff;
}
.action-readout span {
  color:#c0ffe3;
  font-weight:700;
  font-variant-numeric:tabular-nums;
}
.action-canvas {
  width:min(100%,720px); height:auto; aspect-ratio:3/2;
  border:1px solid #687cb0; border-radius:14px; touch-action:none;
  box-shadow:0 10px 26px #0307159c;
}
.action-controls { display:flex; justify-content:center; flex-wrap:wrap; gap:.48rem; }
.arcade-round.action-game .action-controls button {
  padding:.32rem .72rem; color:#f1f5ff; background:#34395a;
  border:1px solid #8198c9; box-shadow:0 2px #080b22; min-width:48px;
  touch-action:manipulation;
}
.arcade-round.action-game .action-controls button:hover { background:#454e76; }
.arcade-round.action-game .action-controls button:active { background:#5b6999; }
.arcade-round.action-game .action-controls button:disabled { opacity:.48; cursor:default; }
.hover-run .action-controls button:nth-child(2),
.star-patrol .action-controls button:nth-child(2) { min-width:100px; }
.arcade-round.factor-warehouse {
  background: radial-gradient(ellipse at 75% 20%, #2a4253, #142333 66%);
}
.factor-warehouse .action-readout { max-width:590px; }
.warehouse-board {
  position:relative; width:min(100%,500px); aspect-ratio:8/7;
  border:1px solid #788d9e; border-radius:12px; overflow:hidden;
  touch-action:none; box-shadow:0 9px 26px #050d17;
}
.warehouse-floor,.warehouse-pieces { position:absolute; inset:0; }
.warehouse-floor { display:grid; grid-template-columns:repeat(8,1fr); grid-template-rows:repeat(7,1fr); }
.warehouse-floor i {
  box-shadow:inset 1px 1px #c4dcdf22,inset -1px -1px #060f15ad;
  background:repeating-linear-gradient(135deg,#273944 0 4px,#2a3d48 4px 6px);
}
.warehouse-floor .warehouse-wall {
  background:linear-gradient(170deg,#65798c 0 14%,#425161 15% 56%,#2f3a48 57%);
  box-shadow:inset 1px 1px #e5f1ff6b,inset -2px -5px #151b2b;
}
.warehouse-floor .warehouse-socket {
  background: radial-gradient(ellipse,#effbb281 10%,#f9dd7599 50%,#5d7668 58%,#293c48 65%);
}
.warehouse-powered .warehouse-floor .warehouse-socket {
  background:radial-gradient(ellipse,#eeffbf 18%,#87f6bd 53%,#4c9985 62%,#293c48 72%);
}
.warehouse-pieces { pointer-events:none; }
.warehouse-pieces>div {
  position:absolute; left:0;top:0; width:12.5%;height:calc(100% / 7);
  transform:translate(calc(var(--col)*100%),calc(var(--row)*100%));
  transition:transform .115s ease-out;
}
.warehouse-crate {
  display:grid; place-items:center; isolation:isolate;
  font-size:clamp(.85rem, 3.5vw,1.45rem); font-weight:800; color:#102538;
  --crate:#83e1d3; --edge:#438c91;
}
.warehouse-crate::before {
  content:''; position:absolute; z-index:-1; inset:9% 9% 16%; border-radius:13%;
  border:2px solid #d7edeb;
  background:repeating-linear-gradient(45deg, transparent 0 5px,#ffffff24 5px 6px),linear-gradient(var(--crate) 67%,var(--edge) 68%);
  box-shadow:0 4px #142534,0 6px 4px #07131eaa;
}
.warehouse-crate.crate-1 { --crate:#bdadf5;--edge:#776fb2; }
.warehouse-crate.crate-2 { --crate:#fbcd8f;--edge:#c08656; }
.warehouse-crate.is-seated::before { box-shadow:0 0 0 2px #ffe696,0 0 12px #f9e18f; }
.warehouse-powered .warehouse-crate.is-seated::before { box-shadow:0 0 0 2px #d8ffe2,0 0 15px #76ffac; }
.warehouse-forklift::before {
  content:''; position:absolute; inset:4%;
  background:url('/assets/img/arcade/warehouse-shift-forklift.webp') center / contain no-repeat;
  transform:scaleX(var(--facing)); filter:drop-shadow(0 3px 2px #081522);
}
.warehouse-message { margin:0; color:#e7f4f2; max-width:100%; }
.warehouse-commands {
  display:grid; width:min(100%,335px);
  grid-template-columns:minmax(0,.82fr) minmax(0,1.3fr) minmax(0,1.12fr);
}
.reef-rescue .reef-hint { margin: 0; color: #d8f1ee; font-size: .94rem; }
.arcade-round.reef-rescue .action-controls [aria-pressed="true"] {
  color: #092c35; background: #a3f3e1; box-shadow: 0 0 0 2px #b8ffed;
}
.arcade-round.reef-rescue .reef-next { padding: .55rem .9rem; background: #9cebd1; color: #103140; }
@media (pointer:coarse) and (orientation: landscape) and (max-height:500px) {
  .action-canvas { width:min(100%,calc((100svh - 116px)*1.5)); }
  .warehouse-board { width:min(100%,calc((100svh - 166px)*8/7)); }
}
@media (max-width:375px) {
  .arcade-round.action-game .action-controls button { padding-inline:.52rem; }
}

.arcade-round.lantern-path {
  background: linear-gradient(90deg,#14203365,#181d3888), url('/assets/img/arcade/lantern-path-glade.webp') center/cover, #17223d;
}
.lantern-path .action-readout, .lantern-board { width:min(100%,390px); }
.lantern-board {
  display:grid; grid-template-columns:repeat(var(--side),minmax(0,1fr)); gap:4px;
  border:1px solid #8786ae; border-radius:14px; padding:7px;
  background:#101937d9; box-shadow:0 12px 28px #0d173268;
}
.lantern-board > * { aspect-ratio:1; }
.arcade-round.lantern-path .lantern-tile {
  position:relative; display:block; min-width:0; min-height:0; padding:0; border:1px solid #7779aa;
  border-radius:10px; background:linear-gradient(#444b73,#303957);
  box-shadow:inset 0 2px #fdedcc29,0 2px #172341; touch-action:manipulation; overflow:hidden;
}
.lantern-moss {
  border-radius:10px; opacity:.56;
  background:radial-gradient(ellipse at 30% 35%,#7caf8770 0 8%,transparent 10%),radial-gradient(ellipse at 66% 68%,#54918d85 0 10%,transparent 12%),#243d47;
}
.lantern-piece { position:absolute; inset:0; transform:rotate(var(--turn)); transition:transform .2s ease-out; }
.lantern-arm,.lantern-bulb {
  position:absolute; display:block; background:#afb3ce; box-shadow:inset 0 0 0 1px #695f86;
}
.lantern-north,.lantern-south { inset-inline-start:40%; width:20%; height:53%; }
.lantern-north { top:0; } .lantern-south { bottom:0; }
.lantern-east,.lantern-west { inset-block-start:40%; width:53%; height:20%; }
.lantern-east { right:0; } .lantern-west { left:0; }
.lantern-bulb { inset:34%; border-radius:50%; }
.lantern-lit :is(.lantern-arm,.lantern-bulb) { background:#ffde79; box-shadow:0 0 10px #ffba57; }
.lantern-lit .lantern-arm::after {
  position:absolute; inset:30%; border-radius:99px;
  content:''; background:#fff3c1; animation:lantern-twinkle 1.05s ease-in-out infinite alternate;
}
.lantern-beacon .lantern-bulb { inset:23%; border:2px solid #fff1bf; }
.lantern-home .lantern-bulb {
  inset:23%; clip-path:polygon(50% 0,100% 46%,85% 46%,85% 100%,15% 100%,15% 46%,0 46%);
  border-radius:0;
}
.lantern-cleared { box-shadow:0 0 28px #ffd671a6; }
.lantern-instruction { margin:0; max-width:33rem; color:#f5f3ff; }
@keyframes lantern-twinkle { from { opacity:.3; } to { opacity:1; } }
@media (pointer:coarse) and (orientation:landscape) and (max-height:500px) {
  .lantern-path .lantern-board { width:min(100%,260px); }
}

.arcade-round.clockwork-rail { background:radial-gradient(ellipse at top,#25494f,#101e32 76%); }
.rail-roster { width:min(100%,720px); display:grid; grid-template-columns:repeat(auto-fit,minmax(min(170px,100%),1fr)); gap:.6rem; }
.rail-card {
  margin:0; padding:.3rem .65rem .55rem; min-width:0;
  border:1px solid var(--rail-color); border-radius:10px; background:#203043;
  display:flex; flex-wrap:wrap; justify-content:center; gap:.25rem .5rem;
}
.rail-name { color:var(--rail-color); font-weight:750; padding-inline:.25rem; }
.rail-facts,.rail-preview { width:100%; margin:0; color:#e6f0f6; font-size:.89rem; }
.rail-preview { color:#dbf8dd; }
.rail-field { display:flex; align-items:center; gap:.25rem; min-width:0; }
.rail-field select {
  min-height:44px; max-width:100%; padding:.19rem .28rem;
  color:#102334; background:#f0fbf3; border:1px solid #9ac1b2; border-radius:7px;
}
.rail-message { margin:0; color:#e5f8f3; }
