/* ==========================================================================
   Arcade v4 — per-game styles
   Every class here was reported by the game modules. Grouped by game.
   ========================================================================== */

/* ---------- SUM GRID ------------------------------------------------------ */

.g-sumgrid {
  display: grid;
  gap: 8px;
  margin: 0 auto;
  /* keep all four rows on screen without scrolling */
  max-width: min(420px, 52vh);
}
.g-sumgrid__meter {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 14px;
}
.g-sumgrid__tag {
  font-family: var(--display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.g-sumgrid__total {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 36px);
  color: var(--ink);
  line-height: 1;
}
.g-sumgrid__need {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}
.g-sumgrid__need.is-exact { color: #2f6d5f; }
.g-sumgrid__need.is-over { color: #a8411c; }

.g-sumgrid__cell {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: var(--white);
  border: 0;
  border-radius: 16px;
  box-shadow: var(--shadow-s);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(18px, 2.4vw, 26px);
  color: var(--ink);
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
  padding: 0;
}
.g-sumgrid__cell:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow); }
.g-sumgrid__cell.is-on {
  background: var(--mint);
  color: #123;
  box-shadow: 0 8px 20px rgba(134,198,184,.45);
}
.g-sumgrid__cell.is-last { outline: 3px solid rgba(47,38,32,.25); outline-offset: -3px; }
.g-sumgrid__cell.is-far { opacity: .42; }
.g-sumgrid__cell.is-won { background: var(--mint); color: #123; }
.g-sumgrid__cell.is-solution { outline: 3px dashed var(--butter); outline-offset: -3px; }
.g-sumgrid__cell:disabled { cursor: default; }

.g-sumgrid__actions { display: flex; justify-content: center; margin-top: 16px; }
.g-sumgrid--wide { max-width: min(470px, 52vh); }
.g-sumgrid--wide .g-sumgrid__cell { font-size: clamp(15px, 2vw, 22px); }

/* ---------- PATTERN RECALL (sequence) ------------------------------------ */

.g-seq__pads {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 460px;
  margin: 0 auto;
}
.g-seq__pad {
  display: grid;
  place-items: center;
  gap: 4px;
  padding: clamp(20px, 4vw, 34px) 12px;
  border: 0;
  border-radius: 24px;
  cursor: pointer;
  font-family: inherit;
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
  box-shadow: var(--shadow-s);
}
.g-seq__pad--a { background: var(--mint);   color: #10302a; }
.g-seq__pad--b { background: var(--blue);   color: #10243a; }
.g-seq__pad--c { background: var(--lilac);  color: #241a3a; }
.g-seq__pad--d { background: var(--butter); color: #3a3110; }

.g-seq__pad:hover:not(:disabled) { filter: brightness(1.04); }
.g-seq__pad.is-lit {
  transform: scale(1.04);
  box-shadow: 0 0 0 4px rgba(47,38,32,.35), 0 14px 34px rgba(47,38,32,.22);
  filter: brightness(1.12);
}
.g-seq__pad.is-hit { transform: scale(.96); filter: brightness(.94); }
.g-seq__pad.is-cue { outline: 3px dashed rgba(47,38,32,.5); outline-offset: -6px; }
.g-seq__pad:disabled { cursor: default; }

.g-seq__key {
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  opacity: .55;
}
.g-seq__label {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(15px, 1.8vw, 19px);
}

.g-seq__dots { display: flex; gap: 8px; justify-content: center; margin: 18px 0 0; }
.g-seq__dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--paper-3);
}
.g-seq__dot.is-done { background: var(--coral); }

/* ---------- TAP RIGHT ----------------------------------------------------- */

.g-tapright { display: grid; gap: 16px; justify-items: center; }
.g-tapright__bar { display: flex; gap: 18px; align-items: baseline; }
.g-tapright__clock,
.g-tapright__stat {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(15px, 1.8vw, 19px);
  color: var(--ink-2);
}
.g-tapright__clock { color: var(--ink); font-size: clamp(20px, 2.4vw, 26px); }

.g-tapright__pad {
  width: 100%;
  max-width: 460px;
  min-height: 300px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--r-card);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background .1s linear, transform .1s ease;
}
.g-tapright__pad--idle { background: var(--paper-3); }
.g-tapright__pad--go   { background: var(--mint); }
.g-tapright__pad--stop { background: var(--coral); }
.g-tapright__pad:active { transform: scale(.99); }

.g-tapright__glyph {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 7vw, 76px);
  color: rgba(47,38,32,.32);
  letter-spacing: -.03em;
}
.g-tapright__pad--go .g-tapright__glyph,
.g-tapright__pad--stop .g-tapright__glyph { color: #123; }

.g-tapright__hint { font-size: 14px; color: var(--ink-3); text-align: center; }

/* ---------- MONEY TRAIL --------------------------------------------------- */

.g-trail__start {
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 18px;
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow-s);
  margin-bottom: 14px;
}
.g-trail__start b {
  font-family: var(--display);
  font-size: clamp(26px, 3.4vw, 36px);
  color: var(--ink);
}
.g-trail__start span { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }

.g-trail__chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.g-trail__chip {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(17px, 2vw, 22px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--shadow-s);
  color: var(--ink);
}
.g-trail__chip--in  { background: var(--mint); color: #123; }
.g-trail__chip--out { background: var(--coral); color: var(--on-pastel); }
.g-trail__go { display: flex; justify-content: center; margin-top: 16px; }

/* ---------- RULE SWITCH --------------------------------------------------- */

.g-switch__rule {
  display: grid;
  gap: 2px;
  justify-items: center;
  padding: 14px 20px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-s);
  margin-bottom: 14px;
  transition: background .2s ease;
}
.g-switch__rule--flip { background: var(--butter); animation: arc-pop .3s ease; }
.g-switch__ruletag {
  font-family: var(--display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.g-switch__rulename {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(17px, 2vw, 21px);
  color: var(--ink);
}

/* ---------- ORDER TRAY ---------------------------------------------------- */

.g-order__bar { display: flex; justify-content: center; margin-top: 12px; }

.g-order__slot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(14px, 1.6vw, 17px);
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--shadow-s);
  color: var(--ink);
}
.g-order__num {
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--ground);
  font-size: 11px;
  color: var(--ink-2);
}
.g-order__slot--right { background: var(--mint); color: #123; }
.g-order__slot--wrong { background: var(--coral); color: var(--on-pastel); }
.g-order__used { opacity: .38; }

/* ---------- BUDGET -------------------------------------------------------- */

.g-budget__plan {
  display: grid;
  gap: 10px;
  padding: 18px;
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow-s);
  border: 0;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease;
  width: 100%;
}
.g-budget__plan:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.g-budget__line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  padding: 6px 0;
  border-bottom: 1px solid var(--ground);
}
.g-budget__line:last-child { border-bottom: 0; }
.g-budget__what { color: var(--ink-2); }
.g-budget__cost { font-weight: 700; color: var(--ink); white-space: nowrap; }
.g-budget__cost--none { color: #a8411c; font-style: italic; font-weight: 600; }
.g-budget__total {
  display: flex;
  justify-content: space-between;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(16px, 1.9vw, 20px);
  color: var(--ink);
  padding-top: 8px;
}
.g-budget__opt { display: grid; gap: 12px; }

/* ---------- SAY IT RIGHT -------------------------------------------------- */

.g-say__tone {
  font-family: var(--display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ground);
  color: var(--ink-2);
  margin-right: 8px;
}
.g-say__tone--soft  { background: var(--butter); color: #3a3110; }
.g-say__tone--sharp { background: var(--coral); color: var(--on-pastel); }
.g-say__tone--works { background: var(--mint); color: #123; }

/* ---------- shared: option grid with three ------------------------------- */

@media (min-width: 700px) {
  .arc-opts--three { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   REAL PLAYABLE GAMES
   ========================================================================== */

/* ---------- PIPE RUN ------------------------------------------------------ */

.g-pipe {
  position: relative;
  width: min(92vw, 460px);
  margin: 0 auto;
}
.g-pipe__grid {
  display: grid;
  grid-template-columns: repeat(var(--n, 6), 1fr);
  gap: 6px;
  padding: 8px;
  background: var(--white);
  border-radius: 26px;
  box-shadow: var(--shadow);
  touch-action: none;
  user-select: none;
}
.g-pipe__cell {
  aspect-ratio: 1;
  border-radius: 12px;
  background: var(--ground);
  transition: background .1s ease, transform .1s ease;
}
.g-pipe__cell.is-block {
  background: #2f2620;
  border-radius: 10px;
}
.g-pipe__cell.is-start,
.g-pipe__cell.is-end {
  background: var(--butter);
  box-shadow: inset 0 0 0 3px rgba(47,38,32,.18);
}
.g-pipe__cell.is-start::after,
.g-pipe__cell.is-end::after {
  content: "";
  display: block;
  width: 38%;
  height: 38%;
  margin: 31% auto 0;
  border-radius: 50%;
  background: #2f2620;
}
.g-pipe__cell.is-end::after {
  border-radius: 4px;
  background: var(--coral);
}
.g-pipe__cell.is-path { background: #cfe7ef; }
.g-pipe__cell.is-path.is-head { background: #9fd0e3; }

.g-pipe__svg {
  position: absolute;
  inset: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  pointer-events: none;
  overflow: visible;
}
.g-pipe__line {
  fill: none;
  stroke: #2f2620;
  stroke-width: 0.26;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity .12s ease;
  vector-effect: non-scaling-stroke;
}
.g-pipe__hint {
  text-align: center;
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 12px;
}

/* ---------- SHAPE SHIFT --------------------------------------------------- */

.g-flip { display: grid; gap: 14px; justify-items: center; }

.g-flip__target { display: grid; gap: 6px; justify-items: center; }
.g-flip__label {
  font-family: var(--display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.g-flip__mini {
  display: grid;
  grid-template-columns: repeat(5, 16px);
  gap: 2px;
  padding: 6px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-s);
}
.g-flip__mcell { aspect-ratio: 1; border-radius: 3px; background: var(--ground); }
.g-flip__mcell.is-on { background: var(--coral); }

.g-flip__board { width: min(88vw, 340px); }
.g-flip__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  padding: 8px;
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.g-flip__cell {
  aspect-ratio: 1;
  border-radius: 8px;
  background: var(--ground);
  transition: background .12s ease, transform .12s ease;
}
.g-flip__cell.is-on {
  background: #7fb8cc;
  transform: scale(.96);
}

.g-flip__controls { display: flex; gap: 10px; }
.g-flip__btn {
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-s);
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  transition: transform .1s ease, background .1s ease;
}
.g-flip__btn:hover { background: var(--ground); }
.g-flip__btn:active { transform: scale(.94); }
.g-flip__btn--flip { width: 66px; }

.g-flip__meta { font-size: 13px; color: var(--ink-3); }

/* ---------- CROSS SUMS ---------------------------------------------------- */

.g-cross { display: grid; gap: 14px; justify-items: center; }

.g-cross__table {
  display: grid;
  grid-template-columns: auto repeat(var(--n, 4), minmax(46px, 64px));
  gap: 4px;
  padding: 10px;
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.g-cross__corner { }
.g-cross__clue {
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.05;
}
.g-cross__clue b { font-size: 14px; color: var(--ink); }
.g-cross__clue span { font-size: 10px; opacity: .55; }
.g-cross__clue.is-ok b, .g-cross__clue.is-ok span { color: #2f6d5f; }
.g-cross__clue.is-over b, .g-cross__clue.is-over span { color: #b8472a; }
.g-cross__clue--row { padding-right: 6px; }

.g-cross__cell {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: var(--ground);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(16px, 2vw, 21px);
  color: var(--ink);
  cursor: pointer;
  transition: background .1s ease, box-shadow .1s ease;
}
.g-cross__cell.is-filled { background: #e8f0f4; }
.g-cross__cell.is-sel {
  background: var(--butter);
  box-shadow: inset 0 0 0 3px rgba(47,38,32,.25);
}

.g-cross__keys {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  width: min(90vw, 340px);
}
.g-cross__key {
  aspect-ratio: 1.35;
  border: 0;
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow-s);
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  cursor: pointer;
}
.g-cross__key:active { transform: scale(.95); }
.g-cross__key--clear { background: #f6e9e4; font-size: 15px; }

.g-cross__hint { font-size: 13px; color: var(--ink-3); text-align: center; }

.arc-grid--flat { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .arc-grid--flat { grid-template-columns: 1fr; } }

/* game preview on each lobby card — this is where the showing belongs */
.arc-card { overflow: hidden; padding: 0; }
.arc-card__thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--ground);
  border-radius: 18px 18px 0 0;
}
.arc-card__name, .arc-card__blurb, .arc-card__best, .arc-card__go { padding-inline: 18px; }
.arc-card__name { padding-top: 14px; }
.arc-card__go { padding-bottom: 16px; }

@media (max-width: 760px) {
  .arc-card__thumb { aspect-ratio: 1; border-radius: 16px 16px 0 0; }
}
