/* ==========================================================================
   Street Smart Arcade — styles
   Shares the site's soft language (Comfortaa, coral, rounded cards) but pushes
   toward a game surface: bigger tap targets, a live HUD, and motion feedback.
   ========================================================================== */

body.arcade {
  background: var(--ground);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- top bar ------------------------------------------------------ */

.arc-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px clamp(16px, 3vw, 32px);
  background: var(--white);
  box-shadow: 0 4px 20px rgba(80, 92, 120, .06);
  position: sticky;
  top: 0;
  z-index: 20;
}
.arc-bar__home {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.arc-bar__home:hover { color: var(--coral-d); }
.arc-bar__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(15px, 1.6vw, 19px);
  color: var(--ink);
  margin-inline: auto;
  text-align: center;
}
.arc-bar__streak {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  color: #a8411c;
  white-space: nowrap;
}

/* ---------- layout ------------------------------------------------------- */

.arc-main {
  flex: 1;
  width: 100%;
  max-width: 900px;
  margin-inline: auto;
  padding: clamp(20px, 4vw, 40px) clamp(16px, 4vw, 32px) 40px;
}

.arc-screen { animation: arc-in .28s ease both; }

/* the drill and the scoreboard sit in the middle of the screen, the lobby
   stays top-aligned because it is long enough to scroll */
#screen-play, #screen-result {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100svh - 210px);
}
@keyframes arc-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- home --------------------------------------------------------- */

.arc-head { margin-bottom: clamp(20px, 3vw, 32px); }
.arc-head h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(26px, 4vw, 40px);
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1.1;
}
.arc-head__sub {
  font-size: clamp(15px, 1.5vw, 17px);
  color: var(--ink-2);
  max-width: 56ch;
  line-height: 1.55;
}

/* workout banner */
.arc-workout {
  display: grid;
  gap: 6px;
  width: 100%;
  text-align: left;
  padding: clamp(20px, 2.6vw, 30px);
  margin-bottom: clamp(16px, 2vw, 22px);
  border: 0;
  border-radius: var(--r-card);
  background: var(--on-pastel);
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 20px 46px rgba(47, 38, 32, .28);
  transition: transform .18s ease;
}
.arc-workout:hover { transform: translateY(-4px); }
.arc-workout__tag {
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--coral);
}
.arc-workout__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(20px, 2.6vw, 27px);
}
.arc-workout__blurb { font-size: 15px; color: rgba(255,255,255,.78); line-height: 1.5; }
.arc-workout__best {
  margin-top: 6px;
  font-size: 14px;
  color: rgba(255,255,255,.68);
}
.arc-workout__best b { color: var(--butter); font-family: var(--display); }

/* drill grid */
.arc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(12px, 1.6vw, 18px);
}

.arc-card {
  display: grid;
  gap: 6px;
  text-align: left;
  padding: 20px;
  border: 0;
  border-radius: 28px;
  background: var(--white);
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-s);
  transition: transform .18s ease, box-shadow .18s ease;
}
.arc-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }

.arc-card__tag {
  font-family: var(--display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  justify-self: start;
  color: var(--on-pastel);
  background: var(--mint);
}
.arc-card--coral  .arc-card__tag { background: var(--coral); }
.arc-card--lilac  .arc-card__tag { background: var(--lilac); }
.arc-card--blue   .arc-card__tag { background: var(--blue); }
.arc-card--butter .arc-card__tag { background: var(--butter); }

.arc-card__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(18px, 2vw, 22px);
  color: var(--ink);
  line-height: 1.15;
}
.arc-card__blurb { font-size: 14px; color: var(--ink-2); line-height: 1.45; min-height: 2.9em; }
.arc-card__best { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.arc-card__best b { color: var(--ink); font-family: var(--display); font-size: 15px; }
.arc-card__go {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  color: #a8411c;
  margin-top: 4px;
}

.arc-note {
  margin-top: clamp(20px, 3vw, 30px);
  font-size: 14px;
  color: var(--ink-3);
  text-align: center;
}

/* ---------- play --------------------------------------------------------- */

.arc-hud {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 12px;
}
.arc-hud__left { display: grid; gap: 2px; }
.arc-hud__round {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.arc-hud__game {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(16px, 1.8vw, 20px);
  color: var(--ink);
}
.arc-hud__right { display: grid; gap: 2px; text-align: right; }
.arc-hud__score {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(24px, 3vw, 32px);
  color: var(--ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.arc-hud__combo {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  transition: color .2s ease;
}
.arc-hud__combo.is-on { color: #a8411c; }

/* timer */
.arc-timer {
  height: 8px;
  border-radius: 999px;
  background: #e4e7ee;
  overflow: hidden;
  margin-bottom: clamp(18px, 2.4vw, 26px);
}
.arc-timer__fill {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: var(--mint);
  transition: background .25s linear;
}

/* question card */
.arc-q {
  background: var(--white);
  border-radius: var(--r-card);
  padding: clamp(22px, 3vw, 34px);
  box-shadow: var(--shadow);
  margin-bottom: clamp(14px, 2vw, 20px);
}
.arc-q__prompt {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(20px, 2.6vw, 27px);
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 10px;
}
.arc-q__sub {
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--ink-2);
  line-height: 1.5;
}
.arc-q__msg {
  margin: 14px 0 0;
  padding: 16px 18px;
  background: var(--ground);
  border-left: 4px solid var(--coral);
  border-radius: 16px;
  font-size: clamp(15px, 1.6vw, 17px);
  color: var(--ink);
  line-height: 1.5;
}

/* options */
.arc-opts { display: grid; gap: 10px; }
.arc-opts--two { grid-template-columns: 1fr 1fr; }

.arc-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  border: 0;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-s);
  font-family: inherit;
  font-size: clamp(15px, 1.6vw, 17px);
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: transform .14s ease, background .14s ease, box-shadow .14s ease;
}
.arc-opt:hover:not(:disabled) {
  transform: translateY(-2px);
  background: #fff3ee;
  box-shadow: var(--shadow);
}
.arc-opt:disabled { cursor: default; }

.arc-opt__key {
  flex: none;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--ground);
  color: var(--ink-3);
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
}

.arc-opt.is-right { background: var(--mint); color: #123; box-shadow: 0 10px 26px rgba(134,198,184,.45); }
.arc-opt.is-right .arc-opt__key { background: rgba(255,255,255,.55); color: #123; }
.arc-opt.is-wrong { background: var(--coral); color: #2f2620; box-shadow: 0 10px 26px rgba(255,158,128,.45); }
.arc-opt.is-wrong .arc-opt__key { background: rgba(255,255,255,.55); color: #2f2620; }
.arc-opt.is-right, .arc-opt.is-wrong { animation: arc-pop .22s ease; }
@keyframes arc-pop { 0% { transform: scale(1); } 45% { transform: scale(1.03); } 100% { transform: scale(1); } }

/* memory sequence */
.arc-seq {
  background: var(--white);
  border-radius: var(--r-card);
  padding: clamp(18px, 2.4vw, 26px);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  text-align: center;
}
.arc-seq__hint {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #a8411c;
  margin-bottom: 12px;
}
.arc-seq__list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.arc-seq__chip {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(16px, 2vw, 20px);
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--ground);
  color: var(--ink);
}

/* feedback */
.arc-fb {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  animation: arc-in .2s ease both;
}
.arc-fb--good { background: rgba(134,198,184,.22); }
.arc-fb--bad  { background: rgba(226,96,60,.13); }
.arc-fb__head {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}
.arc-fb--good .arc-fb__head { color: #2f6d5f; }
.arc-fb--bad  .arc-fb__head { color: #a8411c; }
.arc-fb__why { font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.arc-fb__combo {
  font-size: 12px;
  font-weight: 700;
  color: #2f6d5f;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.flash-good .arc-q { box-shadow: 0 0 0 3px var(--mint), var(--shadow); }
.flash-bad .arc-q  { box-shadow: 0 0 0 3px var(--coral), var(--shadow); animation: arc-shake .3s ease; }
@keyframes arc-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

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

.arc-res {
  text-align: center;
  background: var(--white);
  border-radius: var(--r-card);
  padding: clamp(26px, 4vw, 48px);
  box-shadow: var(--shadow);
}
.arc-res__badge {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 999px;
  background: var(--coral);
  color: var(--on-pastel);
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .04em;
  margin-bottom: 18px;
}
.arc-res__badge--flat { background: var(--ground); color: var(--ink-2); }
.arc-res__score {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(56px, 11vw, 96px);
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.arc-res__label { font-size: 15px; color: var(--ink-3); margin-top: 6px; }

.arc-res__stats {
  display: flex;
  justify-content: center;
  gap: clamp(20px, 5vw, 56px);
  margin: clamp(22px, 3vw, 32px) 0;
}
.arc-res__stats div { display: grid; gap: 2px; }
.arc-res__stats b {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(20px, 2.4vw, 26px);
  color: var(--ink);
}
.arc-res__stats span { font-size: 12px; color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; }

.arc-res__row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.arc-res__hint { margin-top: 16px; font-size: 13px; color: var(--ink-3); }

/* ---------- footer ------------------------------------------------------- */

.arc-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px clamp(16px, 3vw, 32px);
  font-size: 13px;
  color: var(--ink-3);
}
.arc-foot__mute {
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  text-decoration: underline;
  padding: 4px;
}

/* ---------- mobile ------------------------------------------------------- */

@media (max-width: 620px) {
  .arc-bar { padding: 12px 14px; }
  .arc-bar__home { font-size: 13px; }
  .arc-opts--two { grid-template-columns: 1fr; }
  .arc-card__blurb { min-height: 0; }
  .arc-res__stats { gap: 18px; }
  .arc-res__stats b { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .arc-screen, .arc-opt.is-right, .arc-opt.is-wrong, .flash-bad .arc-q { animation: none !important; }
  * { transition: none !important; }
}

/* ---------- bar: stats button ------------------------------------------- */

.arc-bar__stats {
  border: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
}
.arc-bar__stats:hover { background: var(--paper-3); }

/* ---------- category sections on the lobby ------------------------------ */

.arc-cat { margin-top: clamp(20px, 3vw, 30px); }
.arc-cat__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}

/* ---------- the play stage ---------------------------------------------- */

.arc-stage { border-radius: var(--r-card); }
.arc-stage.flash-good { box-shadow: 0 0 0 3px var(--mint); }
.arc-stage.flash-bad { box-shadow: 0 0 0 3px var(--coral); animation: arc-shake .3s ease; }

/* ---------- swipe mechanic ---------------------------------------------- */

.arc-swipe { display: grid; gap: 18px; }

.arc-swipe__card {
  background: var(--white);
  border-radius: var(--r-card);
  padding: clamp(22px, 3vw, 34px);
  box-shadow: var(--shadow);
  min-height: 190px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .32s cubic-bezier(.3,.7,.3,1), opacity .32s ease;
}
.arc-swipe__card.is-left  { transform: translate(-115%, 8px) rotate(-9deg); opacity: 0; }
.arc-swipe__card.is-right { transform: translate(115%, 8px) rotate(9deg); opacity: 0; }
.arc-swipe__card.is-drop  { transform: translateY(40px); opacity: 0; }

.arc-swipe__from {
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #a8411c;
}
.arc-swipe__msg {
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.45;
  color: var(--ink);
}

.arc-swipe__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.arc-swipe__btn {
  padding: 18px;
  border: 0;
  border-radius: 20px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(15px, 1.7vw, 18px);
  cursor: pointer;
  transition: transform .14s ease, filter .14s ease;
}
.arc-swipe__btn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.03); }
.arc-swipe__btn--bad  { background: var(--coral); color: var(--on-pastel); box-shadow: 0 10px 24px rgba(255,158,128,.4); }
.arc-swipe__btn--good { background: var(--mint);  color: #123; box-shadow: 0 10px 24px rgba(134,198,184,.42); }
.arc-swipe__btn:disabled { opacity: .55; }

/* ---------- options: three across --------------------------------------- */

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

/* ---------- reward: SMART30 on a personal best --------------------------- */

.arc-reward {
  display: grid;
  gap: 8px;
  justify-items: center;
  margin: clamp(20px, 3vw, 30px) 0;
  padding: clamp(20px, 3vw, 30px);
  border-radius: 28px;
  background: linear-gradient(160deg, #fff4ee, #ffe9df);
  border: 2px dashed rgba(226,96,60,.45);
  animation: arc-in .35s ease both;
}
.arc-reward__tag {
  font-family: var(--display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #a8411c;
}
.arc-reward__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(20px, 2.6vw, 27px);
  color: var(--ink);
}
.arc-reward__code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-weight: 700;
  font-size: clamp(24px, 3.4vw, 34px);
  letter-spacing: .14em;
  color: var(--ink);
  background: #fff;
  padding: 8px 22px;
  border-radius: 14px;
  box-shadow: var(--shadow-s);
}
.arc-reward__note { font-size: 14px; color: var(--ink-2); max-width: 44ch; text-align: center; line-height: 1.5; }

/* ---------- result trend ------------------------------------------------ */

.arc-res__trend { display: grid; gap: 6px; justify-items: center; margin: 4px 0 18px; }
.arc-res__trendlabel { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.arc-spark { width: 220px; height: 44px; display: block; }
