/* Proud Of Us games: the shared "game table" look for every game page.
   Sits on top of redesign.css (tokens, fonts, base). */

:root {
  --good: #5fd08a;
  --good-wash: rgba(95, 208, 138, 0.1);
  --bad: #ef7a6c;
  --bad-wash: rgba(239, 122, 108, 0.09);
  --tier-0: #a98b6b;   /* Apprentice: clay card */
  --tier-1: #c98a4b;   /* Archivist: bronze card */
  --tier-2: #c9ccd6;   /* Torchbearer: silver card */
  --tier-3: #ff9a4d;   /* Keeper of the Flame: flame card */
  --tier-4: #f2c75c;   /* Mastered, a perfect game: gold card */
}

body.game-body { min-height: 100vh; }
body.game-body main { position: relative; z-index: 1; }

/* ---------- Slim game header ---------- */
.gbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(6, 6, 10, 0.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.gbar__inner {
  max-width: 760px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.gbar__brand { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--text-secondary); min-width: 0; }
.gbar__brand img { width: 28px; height: 28px; border-radius: 7px; }
.gbar__brand b { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.1rem; font-weight: 600; color: var(--heading); white-space: nowrap; }
.gbar__brand a:hover b { color: var(--gold); }
.gbar__sep { color: var(--text-muted); }
.gbar__back { color: var(--text-muted); white-space: nowrap; }
.gbar__back:hover { color: var(--gold); }
.gbar__score { display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; font-size: 0.85rem; white-space: nowrap; }
.gbar__pts { color: var(--gold); font-weight: 600; }
.gbar__streak { color: var(--tier-3); font-weight: 600; }
.gbar__streak:empty, .gbar__pts:empty { display: none; }

/* ---------- The table ---------- */
.gwrap { max-width: 760px; margin: 0 auto; padding: 22px 20px 90px; }
.gstage {
  position: relative; overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.gstage__pic { position: relative; aspect-ratio: 16 / 7; overflow: hidden; background: var(--bg-elevated); }
.gstage__pic img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.02); }
.gstage__pic::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(16, 16, 24, 0) 35%, var(--bg-card) 100%);
}
.gstage__pic--short { aspect-ratio: 16 / 4.2; }
.gstage__pic.is-nopic { aspect-ratio: auto; height: 28px; background: none; }
.is-nopic { background: linear-gradient(150deg, var(--gold-dim) 0%, var(--bg-elevated) 70%); }
.gstage__body { padding: 8px 30px 32px; position: relative; }
.gstage__body--top { padding-top: 30px; }
.loading { text-align: center; color: var(--text-muted); padding: 90px 0; }

.glabel {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 0.7rem; letter-spacing: 2.4px; text-transform: uppercase; color: var(--gold); font-weight: 700;
  margin-bottom: 12px;
}
.glabel::before { content: ""; width: 22px; height: 1px; background: var(--gold); }
.gstage h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); line-height: 1.12; margin-bottom: 12px; text-wrap: balance; }
.gstage h2 { font-size: clamp(1.3rem, 3.6vw, 1.6rem); line-height: 1.25; margin-bottom: 16px; text-wrap: balance; }
.gstage p { color: var(--text-secondary); }
.gmeta { color: var(--text-muted); font-size: 0.86rem; }
.hook {
  font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: 1.22rem; line-height: 1.45;
  color: var(--gold-light); border-left: 2px solid var(--gold); padding: 6px 0 6px 18px; margin: 14px 0 20px;
}

/* Round map on the intro screen */
.rounds { display: grid; gap: 10px; margin: 18px 0 6px; counter-reset: rnd; }
.rounds li {
  list-style: none; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--border-soft); border-radius: 12px; background: var(--bg-elevated);
}
.rounds li::before {
  counter-increment: rnd; content: counter(rnd);
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--gold-glow); color: var(--gold); font-weight: 700; font-size: 0.85rem;
}
.rounds strong { color: var(--heading); font-weight: 600; display: block; font-size: 0.95rem; }
.rounds span { color: var(--text-muted); font-size: 0.8rem; }
.rounds em { font-style: normal; color: var(--gold); font-size: 0.78rem; font-weight: 600; white-space: nowrap; }

/* Progress: round pips + question dots */
.gprog { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.dots { display: flex; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bg-elevated); border: 1px solid rgba(255, 255, 255, 0.12); transition: all 0.3s; }
.dot.good { background: var(--good); border-color: var(--good); }
.dot.bad { background: var(--bad); border-color: var(--bad); }
.dot.now { border-color: var(--gold); background: var(--gold-dim); transform: scale(1.25); }

.timer { height: 5px; background: var(--bg-elevated); border-radius: 3px; overflow: hidden; margin: 0 0 20px; }
.timer__fill {
  height: 100%; width: 100%; transform-origin: left center;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
  transition: transform 0.08s linear, background 0.3s;
}
.timer__fill.low { background: var(--bad); }

.clue {
  font-size: 1.06rem; line-height: 1.6; color: var(--text-primary);
  background: var(--bg-elevated); border: 1px solid var(--border-soft); border-radius: 14px;
  padding: 20px 22px; margin-bottom: 18px;
}

/* ---------- Answer buttons ---------- */
.opts { display: grid; gap: 10px; }
.opts--2 { grid-template-columns: 1fr 1fr; }
.opt {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%;
  text-align: left; padding: 15px 16px; min-height: 56px;
  background: var(--bg-elevated); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px;
  color: var(--text-primary); font: inherit; font-size: 0.98rem; line-height: 1.45; cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.opt:hover:not([disabled]) { border-color: var(--gold-glow); transform: translateY(-1px); }
.opt:active:not([disabled]) { transform: translateY(0) scale(0.99); }
.opt:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.opt[disabled] { cursor: default; }
.opt__k {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center;
  font-size: 0.75rem; font-weight: 700; color: var(--text-muted); border: 1px solid rgba(255, 255, 255, 0.12);
}
.opt--year { font-size: 1.2rem; font-weight: 600; letter-spacing: 0.01em; font-variant-numeric: lining-nums tabular-nums; }
.opt.is-right { border-color: var(--good); background: var(--good-wash); }
.opt.is-right .opt__k { border-color: var(--good); color: var(--good); }
.opt.is-wrong { border-color: var(--bad); background: var(--bad-wash); }
.opt.is-wrong .opt__k { border-color: var(--bad); color: var(--bad); }
.opt.is-dim { opacity: 0.45; }
.opt.is-right::after, .opt.is-wrong::after {
  margin-left: auto; font-weight: 700; font-size: 1rem; font-family: "Inter", sans-serif;
}
.opt.is-right::after { content: "✓"; color: var(--good); }
.opt.is-wrong::after { content: "✕"; color: var(--bad); }

/* Picture options (story tiles) */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  position: relative; display: flex; flex-direction: column; text-align: left; width: 100%;
  background: var(--bg-elevated); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; overflow: hidden;
  color: var(--text-primary); font: inherit; cursor: pointer; padding: 0;
  transition: border-color 0.2s, transform 0.15s, opacity 0.3s;
}
.tile:hover:not([disabled]) { border-color: var(--gold-glow); transform: translateY(-2px); }
.tile:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.tile[disabled] { cursor: default; }
.tile__pic { aspect-ratio: 16 / 9; background: var(--bg-card); overflow: hidden; }
.tile__pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile__t { padding: 10px 12px 12px; font-size: 0.86rem; line-height: 1.35; font-weight: 500; }
.tile__k {
  position: absolute; top: 8px; left: 8px; width: 24px; height: 24px; border-radius: 7px;
  display: grid; place-items: center; font-size: 0.72rem; font-weight: 700;
  background: rgba(6, 6, 10, 0.72); color: var(--text-secondary);
}
.tile__y {
  position: absolute; top: 8px; right: 8px; padding: 3px 9px; border-radius: 100px;
  background: rgba(6, 6, 10, 0.8); color: var(--gold-light); font-size: 0.78rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.tile.is-right { border-color: var(--good); box-shadow: 0 0 0 1px var(--good) inset; }
.tile.is-wrong { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad) inset; }
.tile.is-dim { opacity: 0.45; }

/* Yes / no style pair */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pair .opt { justify-content: center; text-align: center; font-weight: 600; }

/* ---------- Verdict ---------- */
.verdict {
  margin-top: 16px; padding: 14px 18px; border-radius: 12px; font-size: 0.94rem; line-height: 1.55;
  animation: vin 0.35s ease both;
}
.verdict strong { color: var(--heading); }
.verdict.good { background: var(--good-wash); border: 1px solid rgba(95, 208, 138, 0.35); }
.verdict.bad { background: var(--bad-wash); border: 1px solid rgba(239, 122, 108, 0.32); }
.verdict .plus { color: var(--gold); font-weight: 700; margin-left: 6px; }
.verdict p { color: var(--text-secondary); margin-top: 4px; }
@keyframes vin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Buttons ---------- */
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; align-items: center; }
.gbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 11px; border: 1px solid transparent;
  font: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.gbtn--gold { background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%); color: #14110a; }
.gbtn--gold:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(232, 184, 74, 0.28); }
.gbtn--ghost { background: transparent; border-color: rgba(255, 255, 255, 0.12); color: var(--text-secondary); }
.gbtn--ghost:hover { border-color: var(--gold-glow); color: var(--gold); }
.gbtn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.gbtn[disabled] { opacity: 0.5; cursor: default; transform: none; box-shadow: none; }
.khint { color: var(--text-muted); font-size: 0.75rem; margin-left: auto; }
@media (hover: none) { .khint, .opt__k, .tile__k { display: none; } }

/* ---------- Results ---------- */
.result { text-align: center; }
.result .glabel { justify-content: center; }
.result .glabel::before { display: none; }
.bigscore { font-family: "Inter", sans-serif; font-weight: 700; letter-spacing: -0.02em; font-size: clamp(2.4rem, 8vw, 3.2rem); color: var(--gold); line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.bigscore small { font-size: 0.45em; color: var(--text-muted); }
.result p { max-width: 46ch; margin: 10px auto 0; }
.result .btnrow { justify-content: center; }
.grid-share { font-size: 1.5rem; letter-spacing: 4px; margin: 14px 0 4px; }

/* The collectible card earned at the end of a story game */
.cc {
  --tier: var(--tier-2);
  width: min(270px, 78vw); margin: 22px auto 6px; border-radius: 16px; padding: 8px;
  background: linear-gradient(150deg, var(--tier) 0%, rgba(255, 255, 255, 0.08) 45%, var(--tier) 100%);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5), 0 0 40px color-mix(in srgb, var(--tier) 25%, transparent);
  animation: ccin 0.7s cubic-bezier(.2, .9, .3, 1.2) both;
  text-align: left;
}
.cc__in { background: #0d0d14; border-radius: 10px; overflow: hidden; }
.cc__pic { aspect-ratio: 4 / 3; overflow: hidden; }
.cc__pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc__txt { padding: 12px 14px 14px; }
.cc__rank { font-size: 0.66rem; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; color: var(--tier); }
.cc__title { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.2rem; font-weight: 600; color: var(--heading); line-height: 1.2; margin-top: 4px; }
.cc__meta { display: flex; justify-content: space-between; color: var(--text-muted); font-size: 0.74rem; margin-top: 8px; }
.cc[data-tier="0"] { --tier: var(--tier-0); }
.cc[data-tier="1"] { --tier: var(--tier-1); }
.cc[data-tier="2"] { --tier: var(--tier-2); }
.cc[data-tier="3"] { --tier: var(--tier-3); }
.cc[data-tier="4"] { --tier: var(--tier-4); position: relative; background: linear-gradient(125deg, #7a5414 0%, #f8dc8e 22%, #c9922c 44%, #fff1c4 62%, #b07a1f 82%, #f2c75c 100%); background-size: 220% 220%; animation: ccin 0.7s cubic-bezier(.2, .9, .3, 1.2) both, ccfoil 5s ease-in-out infinite; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5), 0 0 60px rgba(242, 199, 92, 0.45); }
.cc__stamp { position: absolute; top: 16px; left: 16px; z-index: 2; padding: 5px 11px; border-radius: 100px; background: linear-gradient(135deg, #f8dc8e, #c9922c); color: #1a1205; font: 800 0.66rem/1 Inter, sans-serif; letter-spacing: 0.18em; text-transform: uppercase; box-shadow: 0 4px 14px rgba(0,0,0,0.45); }
.cc__level { display: inline-block; margin-left: 6px; padding: 2px 7px; border-radius: 100px; border: 1px solid var(--tier); color: var(--tier); font-size: 0.6rem; letter-spacing: 1px; }
@keyframes ccfoil { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.levels { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 6px auto 0; }
.levels span { padding: 3px 9px; border-radius: 100px; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid rgba(255,255,255,0.12); color: var(--text-muted); }
.levels span.on { color: #14110a; border-color: transparent; }

/* "Play something else": the next step at the end of every game */
.mg { margin: 30px auto 0; max-width: 560px; text-align: left; }
.mg__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.mg__head span { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); }
.mg__head a { color: var(--gold); font-size: 0.85rem; font-weight: 600; }
.mg__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mg__tile { position: relative; display: flex; align-items: flex-end; aspect-ratio: 4 / 3.2; overflow: hidden; border-radius: 14px; border: 1px solid var(--border, rgba(232,184,74,0.16)); isolation: isolate; transition: transform 0.2s, border-color 0.2s; }
.mg__tile:hover { transform: translateY(-3px); border-color: var(--gold-glow); }
.mg__tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.mg__tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 30%, rgba(6,6,10,0.92) 90%); }
.mg__tile span { padding: 9px 10px; line-height: 1.2; }
.mg__tile b { display: block; color: var(--heading); font-size: 0.86rem; }
.mg__tile small { display: block; color: var(--text-secondary); font-size: 0.7rem; margin-top: 2px; }
@media (max-width: 520px) { .mg__tile small { display: none; } .mg__tile b { font-size: 0.78rem; } }
.cc-note { color: var(--gold); font-size: 0.85rem; font-weight: 600; }
@keyframes ccin { from { opacity: 0; transform: translateY(16px) rotate(-3deg) scale(0.92); } to { opacity: 1; transform: none; } }

/* ---------- Timeline (order the stories) ---------- */
.tl { display: grid; gap: 10px; }
.tl-item {
  position: relative; touch-action: auto; user-select: none; -webkit-user-select: none;
  display: grid; grid-template-columns: 22px 96px 1fr auto; align-items: center; gap: 14px;
  background: var(--bg-elevated); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px;
  padding: 8px 12px 8px 8px; transition: border-color 0.2s, transform 0.25s, background 0.2s;
}
.tl-item__pic { width: 96px; aspect-ratio: 16 / 10; border-radius: 9px; overflow: hidden; background: var(--bg-card); }
.tl-item__pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-item__t { font-size: 0.92rem; line-height: 1.35; font-weight: 500; min-width: 0; }
.tl-item__y { display: block; color: var(--gold-light); font-size: 0.8rem; font-weight: 600; margin-top: 3px; font-variant-numeric: tabular-nums; }
.tl-move { display: flex; flex-direction: column; gap: 4px; }
.tl-move button {
  width: 36px; height: 30px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent; color: var(--text-secondary); font-size: 0.9rem; cursor: pointer;
}
.tl-move button:hover:not([disabled]) { border-color: var(--gold); color: var(--gold); }
.tl-move button[disabled] { opacity: 0.25; cursor: default; }
.tl-item.is-right { border-color: var(--good); }
.tl-item.is-wrong { border-color: var(--bad); }
.tl-item.flash { background: var(--gold-wash); }
.tl-ends { display: flex; justify-content: space-between; color: var(--text-muted); font-size: 0.72rem; letter-spacing: 1.6px; text-transform: uppercase; margin: 2px 4px 8px; }

/* ---------- Which came first ---------- */
.vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; }
.vs__or {
  align-self: center; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--gold-glow); color: var(--gold); font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 1.1rem;
  background: var(--bg-card);
}
.vs .tile__t { font-size: 0.95rem; padding: 12px 14px 4px; }
.vs .tile__hook { padding: 0 14px 14px; color: var(--text-muted); font-size: 0.8rem; line-height: 1.45; }

@media (max-width: 600px) {
  .gwrap { padding: 14px 12px 70px; }
  .gstage { border-radius: 18px; }
  .gstage__body { padding: 6px 18px 24px; }
  .gstage__body--top { padding-top: 22px; }
  .gstage__pic { aspect-ratio: 16 / 9; }
  .gbar__inner { padding: 10px 14px; }
  .gbar__sep, .gbar__label { display: none; }
  .opts--2 { grid-template-columns: 1fr 1fr; }
  .opt--year { font-size: 1.1rem; }
  .tiles { gap: 8px; }
  .tile__t { font-size: 0.8rem; padding: 8px 10px 10px; }
  .tl-item { grid-template-columns: 20px 70px 1fr auto; gap: 10px; }
  .tl-item__pic { width: 70px; }
  .vs { grid-template-columns: 1fr 1fr; gap: 8px; }
  .vs__or { display: none; }
  .rounds li { grid-template-columns: 30px 1fr; }
  .rounds em { grid-column: 2; }
  .gbtn { padding: 13px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .cc, .verdict { animation: none; }
  .opt, .tile, .tl-item { transition: none; }
}
.gstage h1, .gstage h2, .cc__title { font-variant-numeric: lining-nums; }

/* ---------- Badge medals and toast ---------- */
.medal {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 0.78rem; color: #2a1d05; letter-spacing: -0.02em;
  background: radial-gradient(circle at 35% 30%, #fff1c2 0%, var(--gold-light) 25%, var(--gold) 60%, #a77a1c 100%);
  box-shadow: inset 0 -3px 6px rgba(0,0,0,0.25), 0 0 0 3px rgba(232,184,74,0.18);
}
.medal.locked { background: var(--bg-elevated); color: var(--text-muted); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1); }
.gtoast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  display: flex; align-items: center; gap: 14px; max-width: min(420px, 92vw);
  padding: 12px 18px 12px 12px; border-radius: 16px;
  background: rgba(16,16,24,0.96); border: 1px solid var(--gold-glow); box-shadow: 0 18px 50px rgba(0,0,0,0.6);
  transform: translate(-50%, 140%); transition: transform 0.45s cubic-bezier(.2,.9,.3,1.15);
}
.gtoast.in { transform: translate(-50%, 0); }
.gtoast small { display: block; font-size: 0.64rem; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.gtoast b { display: block; color: var(--heading); font-size: 0.98rem; }
.gtoast em { display: block; font-style: normal; color: var(--text-muted); font-size: 0.8rem; }
@media (prefers-reduced-motion: reduce) { .gtoast { transition: none; } }

/* ---------- Game feel ---------- */
.gsound { width: 34px; height: 34px; border-radius: 9px; border: 1px solid rgba(255,255,255,0.1); background: transparent; color: var(--text-secondary); display: grid; place-items: center; cursor: pointer; }
.gsound:hover { color: var(--gold); border-color: var(--gold-glow); }
.fx-good { animation: fxgood 0.5s ease; }
.fx-bad { animation: fxbad 0.42s ease; }
@keyframes fxgood { 0% { transform: scale(1); } 35% { transform: scale(1.04); box-shadow: 0 0 0 6px rgba(95,208,138,0.18); } 100% { transform: scale(1); } }
@keyframes fxbad { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.gbtn.is-auto { position: relative; overflow: hidden; }
.gbtn.is-auto::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: rgba(20,17,10,0.45); transform-origin: left; animation: autobar var(--auto, 1500ms) linear forwards; }
@keyframes autobar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.tsecs { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 0.85rem; color: var(--text-secondary); min-width: 2ch; text-align: right; }
.tsecs.low { color: var(--bad); }
.timerwrap { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; margin: 0 0 18px; }
.timerwrap .timer { margin: 0; }
.scorepop { display: inline-block; animation: pop 0.45s cubic-bezier(.2,.9,.3,1.4); }
@keyframes pop { from { transform: scale(1.6); opacity: 0.4; } to { transform: none; opacity: 1; } }
.learn { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.08); color: var(--text-secondary); font-size: 0.86rem; line-height: 1.5; }
.learn em { color: var(--gold-light); font-style: normal; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .fx-good, .fx-bad, .scorepop { animation: none; } .gbtn.is-auto::after { animation: none; display: none; } }

.tl-grip { display: grid; gap: 3px; padding: 10px 4px; cursor: grab; touch-action: none; }
.tl-grip i { display: block; width: 14px; height: 2px; border-radius: 2px; background: var(--text-muted); }
.tl-item.dragging { z-index: 5; box-shadow: 0 16px 40px rgba(0,0,0,0.55); border-color: var(--gold); cursor: grabbing; transition: none; }
.tl-item:not(.dragging) { transition: transform 0.2s ease, border-color 0.2s, background 0.2s; }
.tl-item__n { font-weight: 700; text-align: center; }
.tl-item.is-right .tl-item__n { color: var(--good); }
.tl-item.is-wrong .tl-item__n { color: var(--bad); }
.tl-item__fix { color: var(--bad); font-weight: 600; margin-left: 6px; font-size: 0.74rem; }
@media (hover: hover) { .tl-item:not(.dragging):hover { border-color: var(--gold-glow); cursor: grab; } }
