/* ============================================================
   JOVANA ARCADE — shared styles
   A vibrant, playful, game-like layer for the bonus arcade
   pages. Loaded AFTER styles.css; the pages set
   data-theme="cosmic" so the shared nav/footer chrome turns
   dark to match the immersive backdrop.

   Per-page accent palettes are set on .arc-page via custom
   properties (--a1, --a2, --a3, --glow) so the same components
   recolour for Calculus vs Linear Algebra.
   ============================================================ */

/* ---- Fun display font for arcade headings ---- */
.arc-page {
  --arc-font-display: "Fredoka", "Hanken Grotesk", "Noto Sans SC", system-ui, sans-serif;
  --arc-font-body: "Hanken Grotesk", "Noto Sans SC", system-ui, sans-serif;
  /* sensible default palette; pages override */
  --a1: #FFD93D;       /* primary pop */
  --a2: #FF6B6B;       /* secondary pop */
  --a3: #38E1FF;       /* tertiary pop */
  --glow: rgba(255, 217, 61, .55);
  --ink: #ECEAF4;
  --ink-soft: #C3BFD6;
  --ink-faint: #8E89A6;
  --panel: rgba(255, 255, 255, .045);
  --panel-2: rgba(255, 255, 255, .07);
  --edge: rgba(255, 255, 255, .12);
  --edge-soft: rgba(255, 255, 255, .07);

  background: var(--arc-bg, radial-gradient(120% 90% at 80% -10%, #1a1640 0%, #0c0a1e 55%, #07060f 100%));
  color: var(--ink);
  font-family: var(--arc-font-body);
  min-height: 100vh;
  overflow-x: hidden;
  padding-top: 74px; /* clear the fixed site nav (.nav-inner is 74px tall) */
}

/* twinkling starfield + drifting aurora behind everything */
.arc-sky {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.arc-sky .stars {
  position: absolute; inset: -10%;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(255,255,255,.9), transparent),
    radial-gradient(1.5px 1.5px at 75% 18%, rgba(255,255,255,.7), transparent),
    radial-gradient(2px 2px at 50% 70%, rgba(255,255,255,.8), transparent),
    radial-gradient(1px 1px at 12% 80%, rgba(255,255,255,.6), transparent),
    radial-gradient(1.5px 1.5px at 88% 62%, rgba(255,255,255,.7), transparent),
    radial-gradient(1px 1px at 35% 50%, rgba(255,255,255,.55), transparent),
    radial-gradient(1.5px 1.5px at 65% 88%, rgba(255,255,255,.65), transparent),
    radial-gradient(1px 1px at 92% 35%, rgba(255,255,255,.5), transparent);
  background-repeat: repeat; background-size: 100% 100%;
  animation: arcTwinkle 6s ease-in-out infinite alternate;
}
@keyframes arcTwinkle { from { opacity: .55; } to { opacity: 1; } }
.arc-sky .aurora {
  position: absolute; width: 70vw; height: 70vw; border-radius: 50%;
  filter: blur(80px); opacity: .5; mix-blend-mode: screen;
}
.arc-sky .aurora.a { top: -25%; right: -10%; background: radial-gradient(circle, var(--a2), transparent 65%); animation: arcDrift1 22s ease-in-out infinite alternate; }
.arc-sky .aurora.b { bottom: -30%; left: -15%; background: radial-gradient(circle, var(--a3), transparent 65%); animation: arcDrift2 26s ease-in-out infinite alternate; }
.arc-sky .aurora.c { top: 30%; left: 40%; width: 40vw; height: 40vw; background: radial-gradient(circle, var(--a1), transparent 65%); opacity: .25; animation: arcDrift1 30s ease-in-out infinite alternate; }
@keyframes arcDrift1 { from { transform: translate(0,0) scale(1); } to { transform: translate(-6%, 8%) scale(1.15); } }
@keyframes arcDrift2 { from { transform: translate(0,0) scale(1); } to { transform: translate(8%, -6%) scale(1.2); } }
@media (prefers-reduced-motion: reduce) {
  .arc-sky .stars, .arc-sky .aurora { animation: none; }
}

.arc-main { position: relative; z-index: 1; }
.arc-wrap { width: min(1120px, 92vw); margin-inline: auto; }

/* ============================ HUD ============================ */
.arc-hud {
  position: sticky; top: 74px; z-index: 40;
  background: rgba(10, 9, 22, .72);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--edge-soft);
}
.arc-hud-inner { width: min(1120px, 92vw); margin-inline: auto; display: flex; align-items: center; gap: 18px; padding: 11px 0; }
.arc-hud-prog { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.arc-hud-bar { position: relative; flex: 1; height: 11px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.4); }
.arc-hud-bar span { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--a3), var(--a1) 55%, var(--a2)); box-shadow: 0 0 12px var(--glow); transition: width .6s cubic-bezier(.2,.9,.25,1); }
.arc-hud-count { font-family: var(--arc-font-display); font-weight: 600; font-size: 14px; letter-spacing: .03em; white-space: nowrap; color: var(--ink); }
.arc-hud-right { display: flex; align-items: center; gap: 14px; }
.arc-stars { font-size: 15px; letter-spacing: 2px; color: var(--a1); text-shadow: 0 0 8px var(--glow); }
.arc-sound { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--edge); background: var(--panel); color: var(--ink); cursor: pointer; font-size: 15px; transition: transform .15s, background .2s, border-color .2s; }
.arc-sound:hover { transform: translateY(-1px); background: var(--panel-2); border-color: var(--a1); }
.arc-sound.on { border-color: var(--a1); box-shadow: 0 0 10px var(--glow); }
@media (max-width: 640px) { .arc-stars { display: none; } }

/* ============================ HERO ============================ */
.arc-hero { position: relative; padding: clamp(54px, 9vw, 96px) 0 clamp(30px, 5vw, 48px); text-align: center; }
.arc-eyebrow {
  display: inline-flex; align-items: center; gap: 9px; font-family: var(--arc-font-display); font-weight: 600;
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--a1);
  padding: 7px 16px; border: 1px solid var(--edge); border-radius: 99px; background: var(--panel);
  box-shadow: 0 0 24px -8px var(--glow);
}
.arc-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--a1); box-shadow: 0 0 8px var(--a1); animation: arcPulse 1.8s ease-in-out infinite; }
@keyframes arcPulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: .5; } }
.arc-hero h1 {
  font-family: var(--arc-font-display); font-weight: 700; line-height: 1.04;
  font-size: clamp(40px, 9vw, 92px); letter-spacing: -.01em; margin: 22px auto 0; max-width: 16ch; text-wrap: balance;
}
.arc-hero h1 .pop { background: linear-gradient(115deg, var(--a1), var(--a3) 55%, var(--a2)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 18px var(--glow)); }
.arc-hero .arc-lede { max-width: 60ch; margin: 22px auto 0; font-size: clamp(16px, 2.1vw, 20px); line-height: 1.6; color: var(--ink-soft); }
html[data-lang="zh"] .arc-hero .arc-lede, html[data-lang="zhHant"] .arc-hero .arc-lede { line-height: 1.8; }
.arc-hero-actions { margin-top: 32px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.arc-btn {
  display: inline-flex; align-items: center; gap: 9px; font-family: var(--arc-font-display); font-weight: 600;
  font-size: 16px; padding: 14px 26px; border-radius: 99px; cursor: pointer; text-decoration: none;
  border: 0; transition: transform .16s cubic-bezier(.2,.9,.25,1), box-shadow .2s, filter .2s; -webkit-tap-highlight-color: transparent;
}
.arc-btn-primary { color: #1a1230; background: linear-gradient(120deg, var(--a1), var(--a2)); box-shadow: 0 10px 30px -10px var(--glow), 0 2px 0 rgba(255,255,255,.4) inset; }
.arc-btn-primary:hover { transform: translateY(-2px) scale(1.02); filter: brightness(1.06); }
.arc-btn-primary:active { transform: translateY(0) scale(.99); }
.arc-btn-ghost { color: var(--ink); background: var(--panel); border: 1px solid var(--edge); }
.arc-btn-ghost:hover { transform: translateY(-2px); border-color: var(--a1); background: var(--panel-2); }
.arc-btn .arrow { transition: transform .2s; }
.arc-btn:hover .arrow { transform: translateX(4px); }

/* floating hero emoji/sprite row */
.arc-hero-sprites { margin: 30px auto 0; display: flex; gap: clamp(14px, 4vw, 38px); justify-content: center; font-size: clamp(30px, 6vw, 54px); }
.arc-hero-sprites span { display: inline-block; filter: drop-shadow(0 8px 16px rgba(0,0,0,.45)); animation: arcFloat 3.4s ease-in-out infinite; }
.arc-hero-sprites span:nth-child(2) { animation-delay: .4s; }
.arc-hero-sprites span:nth-child(3) { animation-delay: .8s; }
.arc-hero-sprites span:nth-child(4) { animation-delay: 1.2s; }
.arc-hero-sprites span:nth-child(5) { animation-delay: 1.6s; }
@keyframes arcFloat { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-14px) rotate(3deg); } }
@media (prefers-reduced-motion: reduce) { .arc-hero-sprites span { animation: none; } }

/* ============================ LEVELS ============================ */
.arc-level { position: relative; padding: clamp(40px, 7vw, 72px) 0; }
.arc-level + .arc-level { border-top: 1px dashed var(--edge-soft); }
.arc-level-inner { width: min(1120px, 92vw); margin-inline: auto; }
.arc-level-head { max-width: 760px; margin: 0 auto clamp(22px, 4vw, 34px); text-align: center; }
.arc-chip {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--arc-font-display); font-weight: 600;
  font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #1a1230;
  padding: 6px 15px; border-radius: 99px; background: linear-gradient(120deg, var(--a3), var(--a1)); box-shadow: 0 6px 18px -8px var(--glow);
}
.arc-level h2 { font-family: var(--arc-font-display); font-weight: 700; font-size: clamp(28px, 4.6vw, 46px); line-height: 1.08; margin: 16px 0 0; letter-spacing: -.01em; }
.arc-mission { margin: 14px auto 0; max-width: 56ch; font-size: clamp(15px, 1.9vw, 18px); line-height: 1.6; color: var(--ink-soft); }
html[data-lang="zh"] .arc-mission, html[data-lang="zhHant"] .arc-mission { line-height: 1.8; }
.arc-mission .goal { color: var(--a1); font-weight: 600; }

/* the interactive play surface */
.arc-stage {
  position: relative; background: var(--panel); border: 1px solid var(--edge); border-radius: 22px;
  padding: clamp(16px, 2.6vw, 26px); box-shadow: 0 30px 70px -40px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.06);
  overflow: hidden;
}
.arc-stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 100% 28px,
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 28px 100%;
  -webkit-mask-image: radial-gradient(120% 120% at 50% 0%, #000 30%, transparent 90%);
  mask-image: radial-gradient(120% 120% at 50% 0%, #000 30%, transparent 90%);
}
.arc-stage > * { position: relative; z-index: 1; }
.arc-canvas-wrap { position: relative; border-radius: 16px; overflow: hidden; background: rgba(0,0,0,.28); border: 1px solid var(--edge-soft); }
.arc-canvas-wrap canvas { display: block; width: 100%; height: auto; touch-action: none; }

/* read-out / gauges row */
.arc-readouts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.arc-gauge { flex: 1; min-width: 130px; background: var(--panel-2); border: 1px solid var(--edge-soft); border-radius: 14px; padding: 12px 16px; }
.arc-gauge .gk { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.arc-gauge .gv { font-family: var(--arc-font-display); font-weight: 600; font-size: clamp(22px, 3vw, 30px); line-height: 1.1; margin-top: 4px; color: var(--ink); }
.arc-gauge .gv .unit { font-size: 14px; color: var(--ink-faint); font-weight: 500; margin-left: 3px; }
.arc-gauge.hot .gv { color: var(--a1); text-shadow: 0 0 14px var(--glow); }

/* control row (sliders, buttons) */
.arc-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 16px; }
.arc-control { display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 180px; }
.arc-control label { font-size: 12.5px; letter-spacing: .05em; color: var(--ink-soft); font-weight: 500; display: flex; justify-content: space-between; }
.arc-control label b { color: var(--a1); font-family: var(--arc-font-display); }
.arc-range { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 99px; background: rgba(255,255,255,.14); outline: none; }
.arc-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(140deg, var(--a1), var(--a2)); cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.5), 0 0 0 4px rgba(255,255,255,.08); border: 0; }
.arc-range::-moz-range-thumb { width: 24px; height: 24px; border: 0; border-radius: 50%; background: linear-gradient(140deg, var(--a1), var(--a2)); cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.5); }

.arc-mini-btn {
  font-family: var(--arc-font-display); font-weight: 600; font-size: 14.5px; padding: 11px 20px; border-radius: 12px;
  border: 1px solid var(--edge); background: var(--panel-2); color: var(--ink); cursor: pointer;
  transition: transform .15s, background .2s, border-color .2s, box-shadow .2s; -webkit-tap-highlight-color: transparent;
}
.arc-mini-btn:hover { transform: translateY(-2px); border-color: var(--a1); }
.arc-mini-btn.go { background: linear-gradient(120deg, var(--a1), var(--a2)); color: #1a1230; border-color: transparent; box-shadow: 0 8px 22px -10px var(--glow); }
.arc-mini-btn.go:hover { filter: brightness(1.07); }
.arc-mini-btn:active { transform: translateY(0) scale(.98); }
.arc-mini-btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.arc-hint { font-size: 13.5px; color: var(--ink-faint); margin-top: 12px; text-align: center; }
.arc-hint b { color: var(--a3); font-weight: 600; }

/* status line under a game */
.arc-status {
  margin-top: 14px; text-align: center; font-family: var(--arc-font-display); font-weight: 600; font-size: 16px;
  min-height: 1.4em; color: var(--ink-soft); transition: color .2s;
}
.arc-status.good { color: var(--a1); text-shadow: 0 0 14px var(--glow); }
.arc-status.bad { color: #FF7B7B; }

/* ---- payoff box (revealed on level clear): why it matters + apps ---- */
.arc-payoff {
  margin-top: 22px; border-radius: 20px; border: 1px solid var(--edge);
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  padding: 0 clamp(18px, 3vw, 30px); max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .7s ease, opacity .5s ease, padding .5s ease;
}
.arc-payoff.show { max-height: 1400px; opacity: 1; padding: clamp(22px, 3.4vw, 32px) clamp(18px, 3vw, 30px); }
.arc-payoff .arc-stamp { display: inline-flex; align-items: center; gap: 8px; font-family: var(--arc-font-display); font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: #0c2a16; background: var(--a1); padding: 5px 13px; border-radius: 99px; }
.arc-payoff h3 { font-family: var(--arc-font-display); font-weight: 700; font-size: clamp(20px, 2.6vw, 26px); margin: 14px 0 0; }
.arc-payoff p { font-size: clamp(14.5px, 1.8vw, 16.5px); line-height: 1.65; color: var(--ink-soft); margin: 12px 0 0; max-width: 70ch; }
html[data-lang="zh"] .arc-payoff p, html[data-lang="zhHant"] .arc-payoff p { line-height: 1.85; }
.arc-payoff p b { color: var(--a1); font-weight: 600; }

/* application mini-cards */
.arc-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; margin-top: 18px; }
.arc-app {
  background: var(--panel); border: 1px solid var(--edge-soft); border-radius: 14px; padding: 16px;
  transition: transform .2s, border-color .2s, background .2s;
}
.arc-app:hover { transform: translateY(-3px); border-color: var(--a1); background: var(--panel-2); }
.arc-app .ic { font-size: 28px; line-height: 1; }
.arc-app .at { font-family: var(--arc-font-display); font-weight: 600; font-size: 15.5px; margin-top: 10px; }
.arc-app .ad { font-size: 13px; line-height: 1.5; color: var(--ink-faint); margin-top: 5px; }

/* ---- recommendation machine (dot-product game) ---- */
.arc-target-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; margin-bottom: 16px; padding: 12px 16px; border-radius: 14px; background: var(--panel-2); border: 1px dashed var(--a3); }
.arc-target-chip { font-family: var(--arc-font-display); font-weight: 600; font-size: 13px; letter-spacing: .04em; color: var(--ink-soft); }
.arc-target-movie { font-family: var(--arc-font-display); font-weight: 700; font-size: 18px; color: var(--a3); text-shadow: 0 0 14px var(--glow); }
.arc-bars { display: flex; flex-direction: column; gap: 9px; margin-top: 16px; }
.arc-bar { display: grid; grid-template-columns: minmax(120px, 1.3fr) 3fr auto; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 11px; border: 1px solid transparent; transition: background .2s, border-color .2s; }
.arc-bar.top { background: var(--panel-2); }
.arc-bar.target { border-color: var(--a3); }
.arc-bar-name { font-size: 14px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arc-bar-name b { color: var(--a1); font-family: var(--arc-font-display); margin-left: 4px; }
.arc-bar-track { position: relative; height: 12px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; }
.arc-bar-fill { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, var(--a2), var(--a1)); transition: width .35s cubic-bezier(.2,.9,.25,1); }
.arc-bar.target .arc-bar-fill { background: linear-gradient(90deg, var(--a2), var(--a3)); }
.arc-bar-pct { font-family: var(--arc-font-display); font-weight: 600; font-size: 13.5px; color: var(--ink-soft); min-width: 42px; text-align: right; }
@media (max-width: 520px) { .arc-bar { grid-template-columns: 1fr; gap: 4px; } .arc-bar-pct { text-align: left; } }

/* ---- flip cards (applications gallery game) ---- */
.arc-flips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.arc-flip { perspective: 900px; background: none; border: 0; padding: 0; cursor: pointer; aspect-ratio: 3/4; -webkit-tap-highlight-color: transparent; font-family: inherit; }
.arc-flip .flip-in { position: relative; width: 100%; height: 100%; transition: transform .55s cubic-bezier(.2,.8,.3,1); transform-style: preserve-3d; }
.arc-flip.flipped .flip-in { transform: rotateY(180deg); }
.arc-flip .flip-face { position: absolute; inset: 0; border-radius: 16px; border: 1px solid var(--edge); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 14px; text-align: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.arc-flip .flip-front { background: var(--panel-2); }
.arc-flip:hover .flip-front { border-color: var(--a1); }
.arc-flip .flip-front .fic { font-size: 38px; line-height: 1; }
.arc-flip .flip-front .ft { font-family: var(--arc-font-display); font-weight: 600; font-size: 15px; color: var(--ink); }
.arc-flip .flip-front .ftap { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); border: 1px solid var(--edge); border-radius: 99px; padding: 2px 9px; }
.arc-flip .flip-back { background: linear-gradient(160deg, var(--a2), var(--a3)); color: #1a1230; transform: rotateY(180deg); }
.arc-flip .flip-back .fd { font-size: 13.5px; line-height: 1.45; font-weight: 500; }
html[data-lang="zh"] .arc-flip .flip-back .fd, html[data-lang="zhHant"] .arc-flip .flip-back .fd { line-height: 1.6; }

/* ============================ FINALE ============================ */
.arc-finale { position: relative; padding: clamp(50px, 8vw, 90px) 0; text-align: center; }
.arc-finale-locked { max-width: 46ch; margin: 0 auto; color: var(--ink-faint); font-size: 16px; }
.arc-finale-locked .lock { font-size: 40px; display: block; margin-bottom: 14px; filter: grayscale(.3); }
.arc-finale-card {
  display: none; width: min(680px, 92vw); margin: 0 auto; padding: clamp(30px, 5vw, 52px);
  border-radius: 28px; border: 1px solid var(--edge);
  background: radial-gradient(120% 120% at 50% 0%, rgba(255,255,255,.1), var(--panel) 60%);
  box-shadow: 0 40px 90px -40px rgba(0,0,0,.85);
}
.arc-finale.unlocked .arc-finale-card { display: block; animation: arcPop .6s cubic-bezier(.2,1.2,.4,1) both; }
.arc-finale.unlocked .arc-finale-locked { display: none; }
@keyframes arcPop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.arc-badge {
  width: 132px; height: 132px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center;
  font-size: 64px; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.55), transparent 55%), conic-gradient(from 200deg, var(--a1), var(--a2), var(--a3), var(--a1));
  box-shadow: 0 0 0 8px rgba(255,255,255,.06), 0 18px 50px -16px var(--glow);
  animation: arcSpinGlow 8s linear infinite;
}
@keyframes arcSpinGlow { to { filter: hue-rotate(20deg); } }
.arc-finale-card h2 { font-family: var(--arc-font-display); font-weight: 700; font-size: clamp(26px, 4vw, 40px); margin: 0; }
.arc-finale-card p { color: var(--ink-soft); font-size: clamp(15px, 2vw, 18px); line-height: 1.6; margin: 14px auto 0; max-width: 50ch; }
.arc-finale-actions { margin-top: 28px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* cross-link / "play the other one" cards */
.arc-cross { width: min(1120px, 92vw); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-bottom: clamp(40px, 7vw, 80px); }
.arc-cross-card {
  display: flex; align-items: center; gap: 16px; padding: 22px 24px; border-radius: 18px; text-decoration: none;
  border: 1px solid var(--edge); background: var(--panel); color: var(--ink);
  transition: transform .2s, border-color .2s, background .2s;
}
.arc-cross-card:hover { transform: translateY(-3px); border-color: var(--a1); background: var(--panel-2); }
.arc-cross-card .cic { font-size: 34px; }
.arc-cross-card .ct { font-family: var(--arc-font-display); font-weight: 600; font-size: 18px; }
.arc-cross-card .cd { font-size: 13.5px; color: var(--ink-faint); margin-top: 3px; }
.arc-cross-card .ck { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--a1); font-weight: 600; }
@media (max-width: 720px) { .arc-cross { grid-template-columns: 1fr; } }

/* ============================ confetti + toasts ============================ */
.arc-confetti { position: fixed; inset: 0; z-index: 9998; pointer-events: none; }
.arc-toasts { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.arc-toast {
  font-family: var(--arc-font-display); font-weight: 600; font-size: 15px; padding: 12px 22px; border-radius: 99px;
  background: rgba(20, 16, 40, .92); color: #fff; border: 1px solid var(--edge); box-shadow: 0 14px 40px -12px rgba(0,0,0,.7);
  transform: translateY(20px) scale(.92); opacity: 0; transition: transform .35s cubic-bezier(.2,1.2,.4,1), opacity .35s; max-width: 90vw; text-align: center;
}
.arc-toast.show { transform: translateY(0) scale(1); opacity: 1; }
.arc-toast.win { background: linear-gradient(120deg, var(--a1), var(--a2)); color: #1a1230; border-color: transparent; }

/* tiny inline glossary-ish links inside payoff text */
.arc-payoff a.arc-link, .arc-mission a.arc-link { color: var(--a3); text-decoration: none; border-bottom: 1px dashed currentColor; }
.arc-payoff a.arc-link:hover { color: var(--a1); }

/* make the shared nav blend on the cosmic backdrop */
.arc-page .nav { background: rgba(10, 9, 22, .55); }
.arc-page .nav.scrolled { background: rgba(10, 9, 22, .85); }

/* responsive: stack readouts on small screens */
@media (max-width: 560px) {
  .arc-readouts { gap: 8px; }
  .arc-gauge { min-width: calc(50% - 4px); padding: 10px 12px; }
  .arc-control { min-width: 100%; }
}
