/* XEL arcade — the glass modal, six games, and the treasure shine. */

/* ---------- modal ---------- */

.arc-modal {
  pointer-events: auto;
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.arc-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 3, 18, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: arc-fade-in 0.25s ease both;
}

.arc-shell {
  position: relative;
  width: min(94vw, 660px);
  max-height: min(92svh, 780px);
  display: flex;
  flex-direction: column;
  background: var(--panel-bg);
  backdrop-filter: blur(var(--panel-blur));
  -webkit-backdrop-filter: blur(var(--panel-blur));
  border: 1px solid var(--panel-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop), var(--glow-violet);
  animation: arc-pop-in 0.42s var(--ease-boing) both;
  overflow: hidden;
}

.arc-modal.closing .arc-shell {
  animation: arc-pop-out 0.24s ease both;
}
.arc-modal.closing .arc-backdrop {
  animation: arc-fade-out 0.24s ease both;
}

@keyframes arc-fade-in { from { opacity: 0; } }
@keyframes arc-fade-out { to { opacity: 0; } }
@keyframes arc-pop-in {
  from { opacity: 0; transform: scale(0.88) translateY(24px); }
}
@keyframes arc-pop-out {
  to { opacity: 0; transform: scale(0.92) translateY(14px); }
}

.arc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.15rem 0.75rem;
  border-bottom: 1px solid rgba(157, 123, 255, 0.18);
}

.arc-title {
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  background: linear-gradient(120deg, var(--seafoam), var(--violet), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.arc-close {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(157, 123, 255, 0.4);
  background: rgba(157, 123, 255, 0.14);
  color: var(--ink);
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s var(--ease-boing), background 0.2s, box-shadow 0.2s;
}
.arc-close:hover {
  background: rgba(255, 92, 122, 0.25);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 16px rgba(255, 92, 122, 0.4);
}

.arc-body {
  padding: 1.1rem 1.15rem 1.25rem;
  overflow-y: auto;
  min-height: 0;
}
.arc-body::-webkit-scrollbar { width: 8px; }
.arc-body::-webkit-scrollbar-thumb { background: rgba(157, 123, 255, 0.35); border-radius: 4px; }

/* ---------- picker ---------- */

.arc-sub {
  margin: 0 0 1rem;
  color: var(--ink-dim);
  font-size: 0.92rem;
  text-align: center;
}

.arc-cards {
  display: grid;
  /* five cards now — let the grid decide (3+2 on desktop, 2 columns mid) */
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.8rem;
}

.arc-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 1.1rem 0.8rem 0.95rem;
  background: linear-gradient(160deg, rgba(157, 123, 255, 0.12), rgba(92, 225, 255, 0.06));
  border: 1px solid rgba(157, 123, 255, 0.3);
  border-radius: var(--r-md);
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  animation: arc-card-in 0.5s var(--ease-boing) both;
  animation-delay: calc(var(--i, 0) * 0.07s);
  transition: transform 0.22s var(--ease-boing), box-shadow 0.22s, border-color 0.22s;
}
.arc-card:hover, .arc-card:focus-visible {
  transform: translateY(-4px) scale(1.03);
  border-color: var(--seafoam);
  box-shadow: var(--glow-seafoam);
}
.arc-card:active { transform: scale(0.96); }

@keyframes arc-card-in {
  from { opacity: 0; transform: translateY(18px) scale(0.92); }
}

.arc-card-emoji {
  font-size: 2.6rem;
  filter: drop-shadow(0 0 12px rgba(125, 249, 224, 0.5));
  animation: arc-bob 3s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.45s);
}
@keyframes arc-bob {
  50% { transform: translateY(-6px) rotate(-5deg); }
}

/* The cards use tiny procedural cabinet marks instead of platform emoji. */
.arc-card-art {
  position: relative;
  width: 66px;
  height: 54px;
  display: block;
  border: 1px solid rgba(125, 249, 224, 0.32);
  border-radius: 18px;
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,.2), transparent 18%),
    linear-gradient(145deg, rgba(125,249,224,.18), rgba(157,123,255,.18));
  box-shadow: inset 0 0 18px rgba(7,3,18,.7), 0 0 16px rgba(125,249,224,.16);
  animation: arc-bob 3s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.45s);
  overflow: hidden;
}
.arc-card-art::before,
.arc-card-art::after,
.arc-card-art i,
.arc-card-art i::before,
.arc-card-art i::after {
  content: '';
  position: absolute;
  display: block;
}
.arc-card-feed-frenzy .arc-card-art::before {
  width: 31px; height: 23px; left: 17px; bottom: 8px;
  border-radius: 48% 52% 42% 45%;
  background: radial-gradient(circle at 34% 28%, #d9fff7, #7df9e0 48%, #34b69e);
}
.arc-card-feed-frenzy .arc-card-art::after {
  width: 7px; height: 9px; left: 27px; bottom: 18px;
  border-radius: 50%; background: #160d2c;
  box-shadow: 12px 0 #160d2c, 6px -18px 0 -1px var(--gold);
}
.arc-card-shell-shuffle .arc-card-art::before {
  width: 35px; height: 31px; left: 15px; top: 11px;
  border-radius: 52% 48% 45% 55%;
  background: radial-gradient(circle at 32% 28%, #f7d4ff, #9d7bff 55%, #493081);
  box-shadow: 0 5px 12px rgba(5,2,20,.6);
}
.arc-card-shell-shuffle .arc-card-art::after {
  width: 18px; height: 18px; left: 23px; top: 17px;
  border: 3px solid var(--gold); border-left-color: transparent;
  border-radius: 50%; transform: rotate(-28deg);
}
.arc-card-jazz-memory .arc-card-art::before {
  inset: 9px 13px;
  border-radius: 8px;
  background: conic-gradient(from 90deg, var(--pink) 0 25%, var(--violet) 0 50%, var(--gold) 0 75%, var(--seafoam) 0);
  filter: saturate(.8); box-shadow: inset 0 0 0 5px rgba(7,3,18,.75);
}
.arc-card-void-sweeper .arc-card-art::before {
  width: 5px; height: 40px; left: 31px; top: 6px;
  border-radius: 3px; background: linear-gradient(var(--gold), #9b6739);
  transform: rotate(28deg);
}
.arc-card-void-sweeper .arc-card-art::after {
  width: 29px; height: 12px; left: 11px; bottom: 8px;
  border-radius: 4px 4px 12px 12px;
  background: repeating-linear-gradient(90deg, var(--violet) 0 4px, var(--pink) 4px 7px);
  transform: rotate(18deg);
}
.arc-card-word-salad .arc-card-art::before {
  width: 44px; height: 12px; left: 10px; top: 11px;
  border-radius: 10px; background: rgba(125,249,224,.78);
  box-shadow: 8px 15px rgba(157,123,255,.75), -1px 29px rgba(255,214,107,.75);
}
.arc-card-word-salad .arc-card-art::after {
  width: 18px; height: 3px; left: 23px; top: 16px;
  background: #160d2c; opacity: .65;
  box-shadow: 8px 15px #160d2c, -1px 29px #160d2c;
}
.arc-card-jazz-session .arc-card-art::before {
  inset: 8px 10px;
  background: repeating-linear-gradient(90deg, transparent 0 7px, rgba(244,241,255,.22) 7px 8px);
  border-bottom: 2px solid rgba(244,241,255,.45);
}
.arc-card-jazz-session .arc-card-art::after {
  width: 8px; height: 27px; left: 18px; bottom: 8px;
  border-radius: 6px 6px 2px 2px; background: var(--seafoam);
  box-shadow: 11px -9px var(--violet), 22px 4px var(--pink), 33px -14px var(--gold);
}

.arc-card-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}

.arc-card-tag {
  font-size: 0.76rem;
  line-height: 1.35;
  color: var(--ink-dim);
  min-height: 3.1em;
}

.arc-card-best {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--gold);
  background: rgba(255, 214, 107, 0.1);
  border: 1px solid rgba(255, 214, 107, 0.25);
  border-radius: var(--r-pill);
  padding: 0.2rem 0.7rem;
}

.arc-card { position: relative; }
.arc-card.is-daily {
  border-color: rgba(255, 214, 107, 0.72);
  box-shadow: inset 0 0 24px rgba(255,214,107,.07);
}
.arc-card-daily {
  position: absolute;
  top: 0.5rem;
  right: 0.55rem;
  padding: 0.14rem 0.42rem;
  border: 1px solid rgba(255,214,107,.45);
  border-radius: var(--r-pill);
  color: var(--gold);
  background: rgba(7,3,18,.66);
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.arc-daily {
  display: grid;
  gap: 0.18rem;
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(255,214,107,.32);
  border-radius: var(--r-md);
  background: linear-gradient(120deg, rgba(255,214,107,.1), rgba(157,123,255,.08));
  color: var(--ink-dim);
  font-size: 0.78rem;
}
.arc-daily strong { color: var(--ink); font-family: var(--font-display); font-size: 1rem; }
.arc-daily-kicker {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.arc-daily-target { color: var(--seafoam); }
.arc-daily.is-complete { border-color: rgba(125,249,224,.4); }
.arc-game-assignment {
  margin: 0 0 .55rem;
  color: var(--gold);
  font-size: .72rem;
  letter-spacing: .06em;
  text-align: center;
}

/* ---------- game box (shared) ---------- */

.arc-gamebox {
  position: relative;
  height: clamp(330px, 52vh, 450px);
  border-radius: var(--r-md);
  border: 1px solid rgba(157, 123, 255, 0.22);
  background:
    radial-gradient(ellipse 90% 60% at 50% 110%, rgba(157, 123, 255, 0.16), transparent),
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(92, 225, 255, 0.1), transparent),
    rgba(7, 3, 18, 0.55);
  overflow: hidden;
  animation: arc-fade-in 0.3s ease both;
}

/* games park keyboard focus here (tabindex=-1) when they disable the
   focused control; it's a holding pen, not a visible focus stop */
.arc-gamebox:focus {
  outline: none;
}

.arc-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.45rem;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  pointer-events: none;
}

/* ---------- feed frenzy ---------- */

.arc-ff-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: crosshair;
}
.arc-ff .arc-hint { bottom: 0.2rem; }

/* ---------- shell shuffle ---------- */

.arc-ss {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0.9rem 1rem 1.6rem;
}

.arc-ss-status, .arc-jm-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
}
.arc-ss-score, .arc-jm-score { color: var(--gold); }

.arc-ss-table {
  position: relative;
  flex: 1;
  min-height: 180px;
  margin-top: 2.2rem;
}

.arc-ss-shell {
  position: absolute;
  left: 50%;
  top: 55%;
  width: 92px;
  height: 84px;
  margin-left: -46px;
  margin-top: -42px;
  display: grid;
  place-items: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.26s var(--ease-boing);
  will-change: transform;
  z-index: 2;
}
.arc-ss-shell.over { z-index: 3; }

.arc-ss-shell-art {
  font-size: 4.1rem;
  line-height: 1;
  filter: drop-shadow(0 6px 14px rgba(5, 2, 20, 0.7)) drop-shadow(0 0 10px rgba(157, 123, 255, 0.35));
  transition: transform 0.2s var(--ease-boing), filter 0.2s;
}
.arc-ss-table.picking .arc-ss-shell:hover .arc-ss-shell-art,
.arc-ss-table.picking .arc-ss-shell:focus-visible .arc-ss-shell-art {
  transform: translateY(-7px) rotate(-6deg) scale(1.08);
  filter: drop-shadow(0 8px 16px rgba(5, 2, 20, 0.7)) drop-shadow(0 0 16px rgba(125, 249, 224, 0.7));
}
.arc-ss-shell:disabled { cursor: default; }

.arc-ss-token {
  position: absolute;
  left: 50%;
  top: 55%;
  width: 40px;
  height: 40px;
  margin-left: -20px;
  margin-top: -8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #b6fff0, var(--seafoam) 55%, #37bfa4);
  box-shadow: var(--glow-seafoam);
  opacity: 0;
  transform-origin: center bottom;
  transition: opacity 0.18s ease;
  z-index: 1;
}
.arc-ss-token.show {
  opacity: 1;
  animation: arc-token-wiggle 0.9s ease-in-out infinite;
}
@keyframes arc-token-wiggle {
  50% { margin-top: -13px; }
}

.arc-ss-token-eyes,
.arc-ss-token-eyes::after {
  content: '';
  position: absolute;
  top: 13px;
  left: 10px;
  width: 7px;
  height: 9px;
  border-radius: 50%;
  background: #12082b;
}
.arc-ss-token-eyes::after { left: 13px; top: 0; }

.arc-ss-msg, .arc-jm-msg {
  min-height: 1.6em;
  margin-top: 0.6rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--seafoam);
}

/* ---------- jazz memory ---------- */

.arc-jm {
  display: flex;
  flex-direction: column;
  padding: 0.9rem 1rem 1.6rem;
}

.arc-jm-pads {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin: 1rem auto 0;
  width: min(100%, 320px);
  align-content: center;
}

.arc-jm-pad {
  --pad-color: var(--seafoam);
  aspect-ratio: 1.25;
  border-radius: var(--r-md);
  border: 2px solid var(--pad-color);
  background:
    radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--pad-color) 26%, transparent), transparent 75%),
    rgba(7, 3, 18, 0.5);
  color: var(--pad-color);
  font-size: 2rem;
  cursor: pointer;
  opacity: 0.5;
  filter: saturate(0.65);
  transition:
    opacity 0.15s ease,
    filter 0.15s ease,
    transform 0.18s var(--ease-boing),
    box-shadow 0.15s ease;
}
.pad-0 { --pad-color: var(--seafoam); }
.pad-1 { --pad-color: var(--violet); }
.pad-2 { --pad-color: var(--pink); }
.pad-3 { --pad-color: var(--gold); }

.arc-jm-pads.live .arc-jm-pad {
  opacity: 0.82;
  filter: saturate(1);
  cursor: pointer;
}
.arc-jm-pads.live .arc-jm-pad:hover,
.arc-jm-pads.live .arc-jm-pad:focus-visible {
  opacity: 1;
  transform: scale(1.04);
}
.arc-jm-pad:disabled { cursor: default; }

.arc-jm-pad.lit {
  opacity: 1;
  filter: saturate(1.2) brightness(1.25);
  transform: scale(1.08);
  box-shadow: 0 0 26px var(--pad-color), inset 0 0 30px color-mix(in srgb, var(--pad-color) 45%, transparent);
}
.arc-jm-pad.bad {
  --pad-color: var(--red);
  opacity: 1;
  animation: arc-pad-bad 0.38s ease both;
  box-shadow: 0 0 26px var(--red);
}
@keyframes arc-pad-bad {
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

/* ---------- result screen ---------- */

.arc-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  text-align: center;
  padding: 0.8rem 0.5rem 0.4rem;
}

.arc-stamp {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.3rem 1.1rem;
  border-radius: var(--r-pill);
  border: 2px solid;
  animation: arc-stamp-in 0.5s var(--ease-boing) both;
}
.arc-result.won .arc-stamp {
  color: var(--seafoam);
  border-color: var(--seafoam);
  box-shadow: var(--glow-seafoam);
  transform: rotate(-3deg);
}
.arc-result.lost .arc-stamp {
  color: var(--red);
  border-color: var(--red);
  box-shadow: 0 0 24px rgba(255, 92, 122, 0.35);
  transform: rotate(2deg);
}
@keyframes arc-stamp-in {
  from { opacity: 0; transform: scale(2.2); }
}

.arc-score-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 4.2rem;
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 0 30px rgba(255, 214, 107, 0.55);
}
.arc-score-num.done { animation: arc-score-pop 0.35s var(--ease-boing); }
@keyframes arc-score-pop {
  40% { transform: scale(1.14); }
}

.arc-best {
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}
.arc-best.new-best {
  color: var(--gold);
  animation: arc-best-blink 1.1s ease-in-out infinite;
}
@keyframes arc-best-blink {
  50% { opacity: 0.55; }
}

.arc-flavor {
  margin: 0.2rem 0 0;
  max-width: 42ch;
  color: var(--ink-dim);
  font-size: 0.98rem;
  animation: arc-fade-in 0.6s 0.25s ease both;
}

.arc-result-btns {
  display: flex;
  gap: 0.7rem;
  margin-top: 0.9rem;
  flex-wrap: wrap;
  justify-content: center;
}

.arc-daily-result {
  display: grid;
  gap: .12rem;
  width: min(100%, 390px);
  padding: .62rem .8rem;
  border: 1px solid rgba(255,214,107,.42);
  border-radius: var(--r-md);
  background: rgba(255,214,107,.08);
  color: var(--ink-dim);
  font-size: .76rem;
}
.arc-daily-result strong { color: var(--gold); font-family: var(--font-display); }

/* ---------- treasure reveal ---------- */

.arc-treasure { width: 100%; display: grid; place-items: center; }

.arc-treasure-inner {
  --rarity-color: var(--ink-dim);
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.5rem;
  padding: 0.7rem 1.2rem;
  border-radius: var(--r-md);
  border: 1px solid var(--rarity-color);
  background: rgba(7, 3, 18, 0.5);
  box-shadow: 0 0 22px color-mix(in srgb, var(--rarity-color) 35%, transparent);
  overflow: hidden;
  animation: arc-treasure-in 0.55s var(--ease-boing) both;
}
.arc-treasure-inner.rarity-common { --rarity-color: #b9b0dc; }
.arc-treasure-inner.rarity-uncommon { --rarity-color: var(--green); }
.arc-treasure-inner.rarity-rare { --rarity-color: var(--cyan); }
.arc-treasure-inner.rarity-mythic { --rarity-color: var(--gold); }

@keyframes arc-treasure-in {
  from { opacity: 0; transform: scale(0.6) rotate(-4deg); }
}

/* the shine sweep */
.arc-treasure-inner::after {
  content: '';
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -60%;
  width: 45%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-18deg);
  animation: arc-shine 1.6s 0.3s ease-in-out 2;
}
@keyframes arc-shine {
  to { left: 130%; }
}

.arc-treasure-emoji {
  font-size: 2.2rem;
  filter: drop-shadow(0 0 10px var(--rarity-color));
  animation: arc-bob 2.4s ease-in-out infinite;
}

.arc-treasure-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  text-align: left;
}
.arc-treasure-label {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.arc-treasure-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
}
.arc-treasure-rarity {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--rarity-color);
}

/* ---------- development-only feel lab ---------- */

.arc-lab {
  margin-top: .85rem;
  border: 1px dashed rgba(92,225,255,.38);
  border-radius: var(--r-md);
  background: rgba(7,3,18,.72);
  color: var(--ink-dim);
  font-size: .76rem;
}
.arc-lab summary {
  padding: .6rem .75rem;
  color: var(--cyan);
  font-family: var(--font-display);
  cursor: pointer;
  list-style-position: inside;
}
.arc-lab summary span {
  float: right;
  color: var(--ink-faint);
  font-family: var(--font-body);
  font-size: .65rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.arc-lab-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem .8rem;
  padding: .2rem .75rem .75rem;
}
.arc-lab-grid label { display: grid; gap: .2rem; }
.arc-lab-grid output { float: right; color: var(--gold); }
.arc-lab-grid input[type='range'] { width: 100%; accent-color: var(--seafoam); }
.arc-lab-seed { grid-column: 1 / -1; }
.arc-lab-seed input {
  width: 100%;
  padding: .42rem .55rem;
  border: 1px solid rgba(157,123,255,.35);
  border-radius: var(--r-sm);
  background: rgba(22,13,52,.72);
  color: var(--ink);
  font: inherit;
}
.arc-lab-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  padding: 0 .75rem .75rem;
}
.arc-lab-actions .btn { padding: .4rem .7rem; font-size: .72rem; }
.arc-lab-actions output { margin-left: auto; color: var(--ink-faint); }

/* ---------- responsive ---------- */

@media (max-width: 560px) {
  .arc-cards { grid-template-columns: 1fr; }
  .arc-card { flex-direction: row; text-align: left; align-items: center; padding: 0.8rem 0.9rem; }
  .arc-card-emoji { font-size: 2rem; }
  .arc-card-art { flex: none; width: 54px; height: 48px; animation: none; }
  .arc-card-name { flex: none; }
  .arc-card-tag { min-height: 0; flex: 1; }
  .arc-card-best { flex: none; }
  .arc-gamebox { height: clamp(300px, 56vh, 420px); }
  .arc-score-num { font-size: 3.4rem; }
  .arc-ss-shell { width: 74px; height: 70px; margin-left: -37px; margin-top: -35px; }
  .arc-ss-shell-art { font-size: 3.3rem; }
  .arc-lab-grid { grid-template-columns: 1fr; }
  .arc-lab-seed { grid-column: auto; }
  .arc-lab-actions output { width: 100%; margin-left: 0; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .arc-shell, .arc-backdrop, .arc-card, .arc-stamp, .arc-flavor,
  .arc-treasure-inner, .arc-gamebox { animation-duration: 0.01s; animation-delay: 0s; }
  .arc-card-emoji, .arc-card-art, .arc-treasure-emoji, .arc-ss-token.show,
  .arc-best.new-best { animation: none; }
  .arc-treasure-inner::after { animation-duration: 0.8s; animation-iteration-count: 1; }
  .arc-jm-pad.bad { animation: none; }
  .arc-ss-shell { transition-duration: 0.12s !important; }
  .arc-close:hover { transform: none; }
}

/* ---------- void sweeper ---------- */

.arc-vs-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: crosshair;
}
.arc-vs .arc-hint { bottom: 0.2rem; }

/* ---------- word salad ---------- */

.arc-ws {
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1rem 1.5rem;
}

.arc-ws-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
}
.arc-ws-score { color: var(--gold); }

.arc-ws-timer {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.arc-ws-timer-fill {
  height: 100%;
  width: 100%;
  border-radius: 4px;
  background: var(--seafoam);
  box-shadow: 0 0 10px rgba(125, 249, 224, 0.4);
}
.arc-ws-timer-fill.low {
  background: var(--red);
  box-shadow: 0 0 10px rgba(255, 92, 122, 0.5);
  animation: ws-low-blink 0.6s steps(2) infinite;
}
@keyframes ws-low-blink {
  50% { opacity: 0.55; }
}

.arc-ws-sentence {
  min-height: 2.6em;
  margin-top: 0.55rem;
  text-align: center;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--ink-dim);
}
.arc-ws-say {
  color: var(--ink-faint);
  font-size: 0.85em;
  letter-spacing: 0.08em;
}
.arc-ws-word {
  display: inline-block;
  margin: 0 0.18em;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--seafoam);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.22s ease, transform 0.3s var(--ease-boing), color 0.2s;
}
.arc-ws-word.shown { opacity: 1; transform: none; }
.arc-ws-word.done {
  color: var(--ink-faint);
  text-decoration: line-through;
  opacity: 0.55;
}

.arc-ws-arena {
  position: relative;
  flex: 1;
  min-height: 170px;
  margin-top: 0.5rem;
}

.arc-ws-bub {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
}

.arc-ws-bubble {
  padding: 0.5rem 1rem;
  border-radius: var(--r-pill);
  border: 1px solid rgba(157, 123, 255, 0.45);
  background:
    radial-gradient(circle at 30% 25%, rgba(125, 249, 224, 0.16), transparent 60%),
    rgba(22, 13, 52, 0.75);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
  cursor: pointer;
  opacity: 0.55;
  box-shadow: 0 4px 14px rgba(5, 2, 20, 0.5), 0 0 12px rgba(157, 123, 255, 0.18);
  transition:
    transform 0.2s var(--ease-boing),
    border-color 0.2s,
    box-shadow 0.2s,
    opacity 0.2s;
}
.arc-ws-arena.live .arc-ws-bubble { opacity: 1; }
.arc-ws-arena.live .arc-ws-bubble:hover,
.arc-ws-arena.live .arc-ws-bubble:focus-visible {
  transform: scale(1.08);
  border-color: var(--seafoam);
  box-shadow: 0 4px 14px rgba(5, 2, 20, 0.5), var(--glow-seafoam);
}
.arc-ws-bubble:disabled { cursor: default; }

.arc-ws-bubble.popped {
  animation: ws-pop 0.34s ease both;
  pointer-events: none;
}
@keyframes ws-pop {
  30% { transform: scale(1.22); opacity: 1; }
  to { transform: scale(0.4); opacity: 0; }
}

.arc-ws-bubble.angry {
  border-color: var(--red);
  color: var(--red);
  box-shadow: 0 0 16px rgba(255, 92, 122, 0.45);
  animation: arc-pad-bad 0.38s ease both;
}

.arc-ws-float {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--red);
  pointer-events: none;
  z-index: 3;
  animation: ws-float-up 0.85s ease-out both;
}
.arc-ws-float.good { color: var(--green); }
@keyframes ws-float-up {
  to { transform: translateY(-34px); opacity: 0; }
}

/* ---------- new games: responsive + reduced motion ---------- */

@media (max-width: 560px) {
  .arc-ws-bubble { font-size: 0.85rem; padding: 0.42rem 0.85rem; }
  .arc-ws-sentence { font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .arc-ws-timer-fill.low { animation: none; opacity: 0.85; }
  .arc-ws-bubble.popped { animation-duration: 0.01s; }
  .arc-ws-bubble.angry { animation: none; }
  .arc-ws-word { transition-duration: 0.01s; }
  .arc-ws-float { animation-duration: 0.4s; }
  .arc-ws-arena.live .arc-ws-bubble:hover,
  .arc-ws-arena.live .arc-ws-bubble:focus-visible { transform: none; }
}

/* ---------- jazz session ---------- */

/* six cards now: the picker's auto-fit grid already lays them out 3×2 on
   desktop, 2×3 at mid widths, and a single column under 560px — no change
   needed, verified against the 660px shell. */

.arc-js-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: pointer;
}
.arc-js .arc-hint { bottom: 0.2rem; }
