/* AUREA AI — AI Training Kit page (/ai-training).
   Shared page pieces (hero, chips, cards, steps, Q&A, download card,
   coming-soon pill) come from ai-local.css (.ail-* / .cs-pill); this
   sheet only adds the spec table used by the "What PC do you need?"
   section. */
.atk-tablewrap {
  overflow-x: auto;
  margin: 12px 0 6px;
  border: 1px solid rgba(255, 215, 0, .45);
  border-radius: 14px;
  background: rgba(147, 51, 234, .04);
  box-shadow: 0 0 18px rgba(147, 51, 234, .18), 0 0 22px rgba(255, 215, 0, .08);
}
.atk-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.atk-table th {
  text-align: left;
  padding: 12px 14px;
  color: var(--gold-light, #FFE873);
  background: rgba(147, 51, 234, .14);
  border-bottom: 1px solid rgba(255, 215, 0, .35);
  font-size: .95rem;
  white-space: nowrap;
}
.atk-table td {
  padding: 11px 14px;
  border-bottom: 1px dashed var(--border);
  line-height: 1.55;
  vertical-align: top;
}
.atk-table tbody tr:last-child td { border-bottom: none; }
/* Contribute section (#contribute) — the form itself reuses the
   .ail-dlcard card and the .biz-form field styles (biz.css); only
   the JSONL paste area and the consent row need page-local rules. */
.atc-jsonl { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88rem; min-height: 180px; }
.atc-consent {
  display: flex; gap: 9px; align-items: flex-start; margin-top: 16px;
  font-size: 0.93rem; line-height: 1.55; cursor: pointer;
}
.atc-consent input { margin-top: 4px; accent-color: #FFD700; flex: 0 0 auto; }

.atk-table td:first-child { font-weight: 700; white-space: nowrap; }
.atk-table td:nth-child(2), .atk-table td:nth-child(3) { white-space: nowrap; }

/* Scale yardstick table (#scale in #grow): famous models' published
   training volumes vs the community-grown specialist corpus. The AUREA
   row is highlighted; its token cell wraps (live number + suffix). */
.scale-table tr.scale-aurea td {
  background: rgba(255, 215, 0, .09);
  color: #FFE9A8;
}
.scale-table tr.scale-aurea td:first-child { color: #F5C542; }
.scale-table td.scale-aurea-tok { white-space: normal; }
.scale-table td.scale-aurea-tok #scaleAureaTokens { font-weight: 800; }

/* ---- Grow the dragon (community training pool) ---- */
.grow-card{
  margin-top:18px; padding:22px; display:flex; gap:22px; align-items:center;
  background:linear-gradient(160deg, rgba(124,58,237,.14), rgba(10,15,30,.4));
  border:1px solid #7C3AED; border-radius:16px;
  box-shadow:0 0 22px rgba(124,58,237,.28), inset 0 0 18px rgba(245,197,66,.06);
}
.grow-card img{ width:300px; max-width:44%; aspect-ratio:16/9; object-fit:cover; border-radius:12px; border:1px solid #39415F; }
.grow-info{ flex:1; min-width:220px; }
.grow-stage-line{ font-size:13px; letter-spacing:.14em; color:#A7ACC2; text-transform:uppercase; }
.grow-stage-name{ font-size:clamp(30px, 5vw, 44px); font-weight:800; line-height:1.15; margin:4px 0 6px;
  background:linear-gradient(90deg, #F5C542, #FFE9A8); -webkit-background-clip:text; background-clip:text; color:transparent; }
.grow-desc{ color:#A7ACC2; font-size:15px; line-height:1.7; margin:0 0 14px; }
.grow-next{ display:flex; gap:22px; flex-wrap:wrap; margin-bottom:12px; }
.grow-next-lab{ font-size:12px; letter-spacing:.12em; color:#A7ACC2; text-transform:uppercase; }
.grow-next-val{ font-size:22px; font-weight:700; }
.grow-next-val b{ color:#4ADE80; font-size:26px; }
.grow-bar{ height:14px; border-radius:99px; background:rgba(255,255,255,.08); border:1px solid #39415F; overflow:hidden; }
.grow-bar-fill{ height:100%; width:0; border-radius:99px;
  background:linear-gradient(90deg, #7C3AED, #4ADE80);
  box-shadow:0 0 12px rgba(74,222,128,.55); transition:width .8s ease; }
.grow-stats{ display:grid; grid-template-columns:repeat(4, 1fr); gap:14px; margin-top:16px; }
.grow-stat{
  padding:18px 14px; text-align:center; border-radius:14px;
  background:#101830; border:1px solid #F5C542;
  box-shadow:0 0 14px rgba(245,197,66,.18);
}
.grow-stat-num{ font-size:clamp(24px, 4vw, 36px); font-weight:800; color:#F5C542; line-height:1.1; }
.grow-stat-lab{ font-size:12.5px; color:#A7ACC2; margin-top:6px; letter-spacing:.06em; }
.grow-strip{ display:grid; grid-template-columns:repeat(7, 1fr); gap:10px; margin-top:16px; }
.grow-stage{
  padding:8px 6px 10px; text-align:center; border-radius:12px;
  background:#101830; border:1px solid #39415F; opacity:.45;
}
.grow-stage img{ width:100%; aspect-ratio:16/9; object-fit:cover; border-radius:8px; display:block; }
.grow-stage span{ display:block; margin-top:7px; font-size:12.5px; font-weight:600; color:#A7ACC2; }
.grow-stage.done{ opacity:.85; border-color:#F5C542; }
.grow-stage.done span{ color:#F5C542; }
.grow-stage.now{ opacity:1; border-color:#4ADE80; box-shadow:0 0 16px rgba(74,222,128,.45); }
.grow-stage.now span{ color:#4ADE80; }
.grow-stage.next{ opacity:.75; border-color:#7C3AED; }
.grow-stage.next span{ color:#E8EAF2; }
.grow-status-done{ color:#F5C542; font-weight:700; white-space:nowrap; }
.grow-status-now{ color:#4ADE80; font-weight:700; white-space:nowrap; }
.grow-status-next{ color:#C4B5FD; font-weight:700; white-space:nowrap; }
.grow-status-todo{ color:#8B90A5; white-space:nowrap; }
/* Stage strip cards: the current stage carries a gold frame + glow and a
   "NOW" badge, so the viewer's place in the roadmap reads at a glance.
   The .done/.now/.next classes are toggled from ai-growth.json on every
   poll by ai-training-growth.js — nothing is hard-coded. */
.grow-strip-card{
  position:relative; padding:8px 6px 10px; text-align:center; border-radius:12px;
  background:#101830; border:1px solid #39415F; opacity:.5;
}
.grow-strip-card img{ width:100%; aspect-ratio:16/9; object-fit:cover; border-radius:8px; display:block; }
.grow-strip-name{ margin:7px 0 0; font-size:12.5px; font-weight:600; color:#A7ACC2; }
.grow-strip-at{ margin:2px 0 0; font-size:11.5px; color:#8B90A5; }
.grow-strip-card.done{ opacity:.85; border-color:rgba(245,197,66,.55); }
.grow-strip-card.done .grow-strip-name{ color:#F5C542; }
.grow-strip-card.now{
  opacity:1; border:2px solid #FFD700; background:#141B36;
  box-shadow:0 0 18px rgba(255,215,0,.55), inset 0 0 12px rgba(255,215,0,.08);
}
.grow-strip-card.now .grow-strip-name{ color:#FFD700; }
.grow-strip-card.now .grow-strip-at{ color:#E8EAF2; }
.grow-strip-card.next{ opacity:.8; border-color:#7C3AED; }
.grow-strip-card.next .grow-strip-name{ color:#E8EAF2; }
.grow-strip-now-badge{
  display:none; position:absolute; top:12px; left:10px; z-index:2;
  padding:3px 9px; border-radius:999px; font-size:10.5px; font-weight:800; letter-spacing:.08em;
  color:#231A00; background:linear-gradient(120deg, #FFD700, #F5C542);
  box-shadow:0 0 10px rgba(255,215,0,.65);
}
.grow-strip-card.now .grow-strip-now-badge{ display:inline-block; }
.grow-strip-remain{ display:none; margin:4px 0 0; font-size:11.5px; font-weight:700; color:#FFE97A; }
.grow-strip-card.now .grow-strip-remain{ display:block; }
@media (max-width:900px){ .grow-strip{ grid-template-columns:repeat(4, 1fr); } }
@media (max-width:640px){
  .grow-card{ flex-direction:column; align-items:stretch; }
  .grow-card img{ width:100%; max-width:100%; }
  .grow-stats{ grid-template-columns:repeat(2, 1fr); }
  .grow-strip{ grid-template-columns:repeat(2, 1fr); }
}

/* ---- Campaign callout: everyone's shared pool ---- */
.grow-asset{
  margin:16px 0 4px; padding:16px 18px; border-radius:14px;
  border:1px solid #F5C542;
  background:linear-gradient(120deg, rgba(245,197,66,.12), rgba(124,58,237,.14));
  box-shadow:0 0 16px rgba(245,197,66,.16);
}
.grow-asset-t{ font-size:clamp(18px, 2.6vw, 24px); font-weight:800; color:#F5C542; margin:0 0 6px; }
.grow-asset-note{ margin-top:8px; }

/* ---- Stage-clear gifts ---- */
.stage-rew-card{ margin-top:16px; }

/* ---- Contribute: JSONL guide + mission rewards ---- */
.atc-guide{ margin-top:18px; }
.atc-code{
  background:#0A0F1E; border:1px solid #39415F; border-radius:10px;
  padding:12px 14px; margin:6px 0 14px; overflow-x:auto;
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size:.8rem; line-height:1.6; color:#E8EAF2; white-space:pre;
}
.atc-prompts{ margin:8px 0 0; padding-left:20px; line-height:1.7; color:#C9CEDE; }
.atc-prompts li{ margin-bottom:6px; }
.rew-card{ margin-top:18px; }
.rew-head{ display:flex; gap:18px; align-items:center; }
.rew-head img{
  width:118px; height:118px; flex:0 0 auto; object-fit:cover;
  border-radius:14px; border:1px solid #F5C542;
  box-shadow:0 0 14px rgba(245,197,66,.25);
}
.rew-rate{ font-size:clamp(19px, 3vw, 26px); font-weight:800; color:#4ADE80; margin:8px 0 0; }
.rew-rules{ margin:10px 0; padding-left:20px; line-height:1.7; color:#C9CEDE; }
.rew-rules li{ margin-bottom:4px; }
@media (max-width:640px){ .rew-head{ flex-direction:column; align-items:flex-start; } }

/* ---- Comparison figures ---- */
.cmp-figs{ display:grid; grid-template-columns:repeat(3, 1fr); gap:14px; margin:18px 0 6px; }
.cmp-figs figure{ margin:0; }
.cmp-figs img{ width:100%; aspect-ratio:16/10; object-fit:cover; object-position:top center; border-radius:12px; border:1px solid #39415F; display:block; }
.cmp-figs figcaption{ font-size:12.5px; color:#A7ACC2; margin-top:7px; line-height:1.55; }
.cmp-table td:first-child{ font-weight:700; white-space:nowrap; }
@media (max-width:640px){ .cmp-figs{ grid-template-columns:1fr; } .cmp-table td:first-child{ white-space:normal; } }

/* === Treasure counters: plain gold stat cards (numbers in a plain,
   readable sans — decorative fonts are not used for figures) === */
.grow-stat{
  position:relative; overflow:hidden;
  background:linear-gradient(180deg, #1B1440 0%, #101830 55%, #0C1226 100%);
  border:1px solid #F5C542;
  box-shadow:0 0 18px rgba(245,197,66,.35), 0 0 42px rgba(124,58,237,.25),
    inset 0 1px 0 rgba(255,236,170,.35), inset 0 0 24px rgba(245,197,66,.08);
}
.grow-stat::before{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(ellipse 80% 45% at 50% 0%, rgba(245,197,66,.22), transparent 70%);
}
.grow-stat-num{
  font-family:'Manrope', 'Helvetica Neue', Arial, sans-serif; font-weight:800;
  font-variant-numeric:tabular-nums; font-feature-settings:"tnum" 1;
  font-size:clamp(28px, 5vw, 44px); line-height:1.15; letter-spacing:0;
  color:#F5C542;
}

/* === The dragon lives: idle float, growth reaction, evolution flash === */
.grow-stage-media{ position:relative; }
.grow-stage-media img{ animation:dragonFloat 4.2s ease-in-out infinite; }
@keyframes dragonFloat{ 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-7px); } }
.grow-stage-media.react img{ animation:dragonJump .9s ease; }
@keyframes dragonJump{
  0%{ transform:translateY(0) scale(1); }
  30%{ transform:translateY(-16px) scale(1.04) rotate(-1.5deg); }
  55%{ transform:translateY(2px) scale(1.01); }
  100%{ transform:translateY(0) scale(1); }
}
.grow-stage-media.evolve img{ animation:dragonEvolve 1.6s ease; }
@keyframes dragonEvolve{
  0%{ transform:scale(1); filter:brightness(1); }
  35%{ transform:scale(1.06); filter:brightness(2.1) saturate(1.4); }
  70%{ transform:scale(1.02); filter:brightness(1.35); }
  100%{ transform:scale(1); filter:brightness(1); }
}
.burst-p{
  position:absolute; left:50%; top:38%; z-index:3; pointer-events:none;
  font-size:15px; color:#F5C542; text-shadow:0 0 8px rgba(245,197,66,.8);
  animation:burstFly 1.1s ease-out forwards;
}
.burst-p.bp0{ --dx:-90px; --dy:-70px; } .burst-p.bp1{ --dx:80px; --dy:-85px; }
.burst-p.bp2{ --dx:-120px; --dy:-10px; } .burst-p.bp3{ --dx:115px; --dy:-25px; }
.burst-p.bp4{ --dx:0px; --dy:-110px; }
@keyframes burstFly{
  0%{ transform:translate(0,0) scale(.5); opacity:0; }
  15%{ opacity:1; }
  100%{ transform:translate(var(--dx), var(--dy)) scale(1.25); opacity:0; }
}

/* === Campaign quality callout === */
.grow-quality{
  margin-top:10px; padding:12px 14px; border-radius:12px;
  border:1px solid rgba(74,222,128,.55); background:rgba(74,222,128,.07);
  color:#D9FBE7; font-size:14.5px; line-height:1.65;
}

/* === Dragon speech bubble over the contribution form === */
.atc-bubble{
  display:flex; gap:10px; align-items:flex-start; margin:4px 0 10px;
  padding:10px 12px; border-radius:12px; position:relative;
  border:1px solid rgba(74,222,128,.55); background:rgba(74,222,128,.06);
}
.atc-bubble img{ border-radius:50%; flex:none; }
.atc-bubble p{ font-size:13.5px; color:#D9FBE7; line-height:1.55; }

/* === Your record + ranking === */
.grow-personal{ margin-top:16px; }
.my-stats{ display:grid; grid-template-columns:repeat(auto-fit, minmax(96px, 1fr)); gap:10px; margin-top:10px; }
.my-stat{
  padding:10px 8px; text-align:center; border-radius:10px;
  background:#101830; border:1px solid #39415F;
}
.my-stat-num{ display:block; font-size:20px; font-weight:800; color:#F5C542; }
.my-stat-lab{ display:block; margin-top:3px; font-size:11px; color:#A7ACC2; letter-spacing:.04em; }
.rank-empty{ font-size:14.5px; color:#D9FBE7; margin-top:8px; }
.rank-list{ margin:10px 0 0; padding:0; list-style:none; }
.rank-row{
  display:flex; align-items:center; gap:10px; padding:8px 10px;
  border:1px solid #39415F; border-radius:10px; margin-top:6px; background:#101830;
}
.rank-no{
  flex:none; width:24px; height:24px; border-radius:50%; text-align:center;
  line-height:24px; font-weight:800; font-size:12.5px; color:#0A0F1E; background:#F5C542;
}
.rank-name{ flex:1; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rank-val{ font-weight:800; color:#F5C542; }

/* Compare table: coming-soon pill for the agent column */
.cmp-soon{
  display:inline-block; padding:1px 8px; border-radius:99px; font-size:11px;
  font-weight:700; color:#0A0F1E; background:#4ADE80; vertical-align:middle;
}

@media (prefers-reduced-motion: reduce){
  .grow-stage-media img, .grow-stage-media.react img, .grow-stage-media.evolve img{ animation:none; }
  .burst-p{ display:none; }
}

/* === AUR burn bar === */
.burn-bar{
  display:flex; gap:14px; align-items:flex-start; margin-top:14px;
  padding:16px; border-radius:14px;
  background:linear-gradient(180deg, #241238 0%, #101830 70%);
  border:1px solid #F5C542;
  box-shadow:0 0 16px rgba(245,197,66,.28), inset 0 0 22px rgba(245,197,66,.06);
}
.burn-emblem{ flex:none; filter:drop-shadow(0 0 8px rgba(245,197,66,.5)); }
.burn-t{ font-weight:800; font-size:17px; color:#FFE98A; }
.burn-nums{ margin-top:5px; font-size:14.5px; color:#A7ACC2; }
.burn-nums b{ color:#F5C542; font-size:17px; }
.burn-pct{ color:#A7ACC2; font-size:13px; }
.burn-sep{ margin:0 4px; }
@media (max-width:640px){ .burn-bar{ flex-direction:column; } }
.burn-rates{ width:100%; margin-top:10px; border-collapse:collapse; font-size:12.5px; }
.burn-rates th{ text-align:left; color:#FFE98A; padding:4px 6px; }
.burn-rates td{ padding:4px 6px; border-top:1px solid #39415F; color:#A7ACC2; }

/* ---- 3-loop key visual band + training kit explainer + participant milestones (2026-12-03) ---- */
.loop-band-sec{text-align:center}
.loop-band-sec .rw-sub{margin-left:auto;margin-right:auto}
.loop-band{display:grid;grid-template-columns:1fr auto 1fr auto 1fr;gap:14px;align-items:stretch;margin:22px 0 4px;text-align:left}
.loop-card{border:1px solid #39415F;border-radius:16px;padding:16px;background:rgba(13,18,36,.85);box-shadow:0 0 0 1px rgba(245,197,66,.12),0 0 22px rgba(124,58,237,.18)}
.loop-card img{width:100%;height:130px;object-fit:cover;border-radius:10px;display:block}
.loop-card img.loop-emblem,.loop-card img.loop-coin{width:110px;height:110px;object-fit:contain;margin:10px auto}
.loop-card h3{margin:12px 0 8px;color:#F5C542}
.loop-arrow{align-self:center;font-size:30px;font-weight:800;color:#F5C542;text-shadow:0 0 14px rgba(245,197,66,.7)}
.loop-cycle{font-size:30px;color:#C9B8FF;margin:2px 0 0;animation:loopspin 9s linear infinite}
@keyframes loopspin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}
.loop-cta{justify-content:center;margin-top:10px}
.kit-flow{font-size:17px;font-weight:700;color:#EDEFF7;line-height:1.7}
.grow-stat-unit{margin:2px 0 0;color:#A7ACC2;font-size:13px}
.pm-nowline{font-size:16px;color:#EDEFF7;margin:10px 0 4px}
.pm-nowline strong{color:#F5C542}
.pm-carousel{display:flex;align-items:center;gap:10px;margin:16px 0 8px}
.pm-viewport{flex:1;overflow:hidden;border-radius:14px}
.pm-track{display:flex;transition:transform .45s ease}
.pm-slide{flex:0 0 100%;text-align:center;padding:20px 16px;border:1px solid #39415F;border-radius:14px;background:rgba(20,26,48,.85)}
.pm-slide.is-next{border-color:#F5C542;box-shadow:0 0 20px rgba(245,197,66,.35)}
.pm-slide.is-done{border-color:#35D07F}
.pm-mile{margin:0;font-size:30px;color:#fff}
.pm-mile strong{background:linear-gradient(92deg,#FFE9A8,#F5C542 55%,#D9A62E);-webkit-background-clip:text;background-clip:text;color:transparent}
.pm-gift{margin:8px 0 10px;font-size:17px;font-weight:700;color:#EDEFF7}
.pm-status{margin:0}
.pm-arrow{flex:0 0 auto;width:42px;height:42px;border-radius:50%;border:1px solid #4A5480;background:rgba(20,26,48,.9);color:#F5C542;font-size:26px;line-height:1;cursor:pointer}
.pm-arrow:hover{border-color:#F5C542}
.pm-dots{display:flex;gap:7px;justify-content:center;margin:4px 0 12px}
.pm-dot{width:9px;height:9px;border-radius:50%;border:1px solid #4A5480;background:transparent;cursor:pointer;padding:0}
.pm-dot.on{background:#F5C542;border-color:#F5C542}
@media (max-width:760px){
  .loop-band{grid-template-columns:1fr}
  .loop-arrow{transform:rotate(90deg);justify-self:center}
}
@media (prefers-reduced-motion: reduce){
  .loop-cycle{animation:none}
  .pm-track{transition:none}
}

/* === Ways-to-help hub (#ways): action cards — do / helps / reward === */
.ways-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:16px;margin-top:20px;text-align:left}
.way-card{border:1px solid #39415F;border-radius:16px;padding:16px;background:rgba(13,18,36,.85);box-shadow:0 0 0 1px rgba(245,197,66,.12),0 0 22px rgba(124,58,237,.18);display:flex;flex-direction:column}
.way-img{width:100%;height:120px;object-fit:cover;border-radius:10px;display:block}
.way-trow{display:flex;align-items:flex-start;gap:10px;margin:12px 0 2px}
.way-trow h3{flex:1;margin:0;color:#F5C542;font-size:1.06rem;line-height:1.4}
.way-pill-live{display:inline-block;padding:3px 11px;border-radius:999px;font-size:.72rem;font-weight:800;letter-spacing:.08em;color:#4ADE80;background:rgba(74,222,128,.08);border:1px solid rgba(74,222,128,.7);box-shadow:0 0 10px rgba(74,222,128,.22);vertical-align:middle;white-space:nowrap}
.way-row{margin-top:9px}
.way-lab{display:block;font-size:.72rem;font-weight:800;letter-spacing:.1em;color:#FFE873;text-transform:uppercase;margin-bottom:2px}
.way-row p{margin:0;color:#C9CEDE;line-height:1.65;font-size:.94rem}
.way-card .ail-so-btns{margin-top:auto;padding-top:14px}
.way-card .rw-note{margin-top:10px}
#ways .grow-quality{margin-top:18px;text-align:left}

/* === Wide tables stack vertically on phones (user rule, 2026-12-03) ===
   At <=700px the .atk-table tables (on /ai-training: the #scale
   yardstick, the growth-milestone table and the comparison table;
   on /training-kit: the PC spec table and the brain spec table) stop
   being wide tables: the header row is hidden, each row becomes a
   block whose first cell is the heading, and every other cell shows
   its column label (.atk-lab — a span carrying the same i18n key as
   the <th>) above the value. No sideways scrolling; the desktop
   table is unchanged. Rows hidden with .rw-hidden stay hidden
   (display:none !important in rewards.css beats the block rule). */
.atk-lab{ display:none; }
@media (max-width:700px){
  .atk-table{ min-width:0; }
  .atk-table thead{ display:none; }
  .atk-table tbody, .atk-table tr, .atk-table td{ display:block; }
  .atk-table tr{ padding:10px 0 12px; border-bottom:1px dashed var(--border); }
  .atk-table tbody tr:last-child{ border-bottom:none; }
  .atk-table td, .atk-table td:first-child, .atk-table td:nth-child(2), .atk-table td:nth-child(3){
    border-bottom:none; padding:2px 12px; white-space:normal;
  }
  .atk-table td:first-child{ font-size:1.04rem; padding-bottom:4px; }
  .atk-lab{
    display:block; margin-top:7px;
    font-size:.72rem; font-weight:800; letter-spacing:.09em; text-transform:uppercase;
    color:var(--gold-light, #FFE873);
  }
}

/* ---- Token battle: Team Operator vs Team Everyone ---- */
.battle-card{margin:22px 0 6px;padding:18px;border:1px solid var(--border);border-radius:16px;background:linear-gradient(160deg,rgba(88,28,135,.16),rgba(10,15,30,.35));box-shadow:0 0 0 1px rgba(168,85,247,.12),0 0 22px rgba(168,85,247,.10)}
.battle-media{position:relative;margin:-18px -18px 14px;border-radius:16px 16px 0 0;overflow:hidden;border-bottom:1px solid var(--border)}
.battle-media img{display:block;width:100%;height:auto}
.battle-title{margin:0 0 6px;font-size:1.25rem;color:var(--gold,#F5C451)}
.battle-row{position:relative;margin-top:14px}
.battle-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap}
.battle-team{font-weight:800;color:var(--text)}
.battle-members{font-weight:400;font-size:.82rem;color:var(--muted)}
.battle-hp{font-size:.9rem;color:var(--muted)}
.battle-hp strong{font-size:1.15rem;color:var(--text);font-variant-numeric:tabular-nums}
.battle-bar{height:20px;margin-top:6px;border-radius:999px;background:rgba(255,255,255,.07);border:1px solid var(--border);overflow:hidden}
.battle-fill{height:100%;border-radius:999px;transition:width .8s ease}
.battle-fill-ops{background:linear-gradient(90deg,#7c3aed,#c026d3);box-shadow:0 0 12px rgba(192,38,211,.55)}
.battle-fill-users{background:linear-gradient(90deg,#d97706,#F5C451);box-shadow:0 0 12px rgba(245,196,81,.55)}
.battle-num{margin:5px 0 0;font-size:.92rem;color:var(--muted)}
.battle-num strong{font-size:1.05rem;color:var(--text);font-variant-numeric:tabular-nums}
.battle-vs{margin:10px auto 0;width:52px;height:52px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:900;font-size:1.05rem;color:#1a1000;background:radial-gradient(circle at 35% 30%,#ffe9a8,#F5C451 55%,#b8860b);border:2px solid #ffe9a8;box-shadow:0 0 18px rgba(245,196,81,.6);animation:vsPulse 2.8s ease-in-out infinite}
@keyframes vsPulse{0%,100%{box-shadow:0 0 13px rgba(245,196,81,.45)}50%{box-shadow:0 0 27px rgba(245,196,81,.85)}}
.battle-zero{margin-top:14px;padding:10px 12px;border:1px dashed rgba(245,196,81,.55);border-radius:10px;color:var(--text);background:rgba(245,196,81,.07)}
@media (max-width:700px){.battle-card{padding:14px}.battle-media{margin:-14px -14px 12px}.battle-title{font-size:1.1rem}.battle-bar{height:16px}}

/* ---- Battle effects: fired by ai-training-growth.js ONLY when a side's
   real token count grew between polls (the popup number is the actual
   delta). The sparks over the banner and the VS pulse are the only idle
   decoration, and they stay subtle. ---- */
.battle-sparks{position:absolute;inset:0;pointer-events:none}
.battle-sparks span{position:absolute;width:5px;height:5px;border-radius:50%;background:#ffe9a8;box-shadow:0 0 8px 2px rgba(245,196,81,.7);opacity:0;animation:sparkTw 3.6s ease-in-out infinite}
.battle-sparks span:nth-child(1){left:12%;top:22%}
.battle-sparks span:nth-child(2){left:26%;top:64%;animation-delay:.7s}
.battle-sparks span:nth-child(3){left:41%;top:16%;animation-delay:1.3s}
.battle-sparks span:nth-child(4){left:55%;top:72%;animation-delay:.4s}
.battle-sparks span:nth-child(5){left:68%;top:28%;animation-delay:1.8s}
.battle-sparks span:nth-child(6){left:79%;top:58%;animation-delay:1.1s}
.battle-sparks span:nth-child(7){left:89%;top:20%;animation-delay:2.2s}
.battle-sparks span:nth-child(8){left:47%;top:44%;animation-delay:2.7s}
@keyframes sparkTw{0%,100%{opacity:0;transform:translateY(0) scale(.55)}50%{opacity:.85;transform:translateY(-9px) scale(1)}}
.battle-pop{position:absolute;right:8px;top:-10px;z-index:4;pointer-events:none;font-weight:900;font-size:1.3rem;line-height:1.1;color:#F5C451;font-variant-numeric:tabular-nums;text-shadow:0 2px 10px rgba(0,0,0,.7),0 0 14px rgba(245,196,81,.55);opacity:0;white-space:nowrap}
.battle-pop.show{animation:popRise 1.5s ease-out forwards}
.battle-pop.crit{font-size:1.65rem;color:#ffd94d;text-shadow:0 2px 12px rgba(0,0,0,.75),0 0 22px rgba(255,217,77,.85)}
.battle-pop.crit.show{animation:popRiseCrit 2.2s ease-out forwards}
@keyframes popRise{0%{opacity:0;transform:translateY(10px) scale(.65)}16%{opacity:1;transform:translateY(0) scale(1.15)}30%{transform:translateY(-2px) scale(1)}72%{opacity:1}100%{opacity:0;transform:translateY(-30px) scale(1)}}
@keyframes popRiseCrit{0%{opacity:0;transform:translateY(12px) scale(.5) rotate(-3deg)}14%{opacity:1;transform:translateY(0) scale(1.3) rotate(1.5deg)}28%{transform:translateY(-3px) scale(1.08) rotate(0)}74%{opacity:1}100%{opacity:0;transform:translateY(-38px) scale(1.05)}}
.battle-row.hit .battle-bar{animation:barShake .45s ease}
.battle-row.crit-hit .battle-bar{animation:barShake .65s ease}
.battle-row.hit .battle-fill{animation:barFlash .6s ease}
.battle-row.crit-hit .battle-fill{animation:barFlash .95s ease}
.battle-row.attacking .battle-fill{animation:barSurge .7s ease}
.battle-row.crit-attacking .battle-fill{animation:barSurge 1s ease}
@keyframes barShake{0%,100%{transform:translateX(0)}18%{transform:translateX(-5px)}38%{transform:translateX(4px)}58%{transform:translateX(-3px)}78%{transform:translateX(2px)}}
@keyframes barFlash{0%{filter:brightness(2.3)}100%{filter:brightness(1)}}
@keyframes barSurge{0%{filter:brightness(1)}30%{filter:brightness(1.75)}100%{filter:brightness(1)}}
.battle-card.crit-flash{animation:cardCrit 1.05s ease}
@keyframes cardCrit{0%{box-shadow:0 0 0 2px rgba(245,196,81,.95),0 0 46px rgba(245,196,81,.55)}100%{box-shadow:0 0 0 1px rgba(168,85,247,.12),0 0 22px rgba(168,85,247,.10)}}

/* ---- Game-style press feedback on this page's buttons ---- */
.btn{transition:transform .08s ease,box-shadow .2s ease,filter .2s ease}
.btn:hover{filter:brightness(1.1)}
.btn:active{transform:translateY(2px) scale(.985)}
.btn-primary{box-shadow:0 0 0 1px rgba(245,196,81,.35),0 4px 14px rgba(0,0,0,.35)}
.btn-primary:hover{box-shadow:0 0 0 1px rgba(245,196,81,.85),0 0 18px rgba(245,196,81,.35)}
.btn-primary:active{box-shadow:0 0 0 1px rgba(245,196,81,.95),0 1px 4px rgba(0,0,0,.45)}

@media (prefers-reduced-motion: reduce){
  .battle-vs{animation:none}
  .battle-sparks{display:none}
  .battle-pop{display:none}
  .battle-row.hit .battle-bar,.battle-row.crit-hit .battle-bar,
  .battle-row.hit .battle-fill,.battle-row.crit-hit .battle-fill,
  .battle-row.attacking .battle-fill,.battle-row.crit-attacking .battle-fill,
  .battle-card.crit-flash{animation:none}
  .battle-fill{transition:none}
  .btn{transition:none}
  .btn:active{transform:none}
}

/* Section visuals (image enrichment 2026-12-03) */
.sec-visual{margin:16px 0 20px}
.sec-visual img{width:100%;height:auto;display:block;border-radius:12px;border:1px solid var(--border)}
.kit-folder-img{float:right;width:148px;height:auto;border-radius:10px;border:1px solid var(--border);margin:2px 0 10px 16px}
@media(max-width:640px){.kit-folder-img{float:none;display:block;margin:10px 0}}

/* ---- Notebook / knowledge vault (#contribute tabs) ----
   The contribute card and the notebook card are switched by a
   two-tab bar. Notes themselves are local-only (localStorage);
   these rules are presentation only. */
.atn-tabs {
  display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 0;
}
.atn-tab {
  font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer;
  padding: 10px 18px; border-radius: 999px;
  color: var(--text, #EDEFF7);
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .18);
}
.atn-tab:hover { border-color: rgba(255, 215, 0, .55); }
.atn-tab.is-active {
  color: #141828;
  background: linear-gradient(135deg, var(--gold, #F5C542), var(--gold-light, #FFE873));
  border-color: rgba(255, 215, 0, .8);
  box-shadow: 0 0 14px rgba(255, 215, 0, .25);
}
.atn-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.atn-item {
  border: 1px solid var(--border, #39415F); border-radius: 12px;
  background: rgba(255, 255, 255, .03); padding: 14px 16px;
}
.atn-meta { font-size: .8rem; color: var(--faint, #8B90A5); margin-bottom: 6px; }
.atn-body { margin: 0; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.atn-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.atn-btn { font-size: .85rem; padding: 7px 14px; }
.atn-edit {
  width: 100%; box-sizing: border-box;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 10px;
  color: var(--text, #EDEFF7); padding: 10px 12px; font: inherit; font-size: .95rem;
  resize: vertical;
}
.atn-edit:focus {
  outline: none; border-color: rgba(255, 215, 0, .65);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, .15);
}

/* Per-language learning volume (#langs) — rows rendered by
   ai-training-lang.js from ai-lang.json. */
.lang-list{ display:flex; flex-direction:column; gap:8px; margin:18px 0 10px; }
.lang-row{ display:flex; align-items:center; gap:12px; padding:9px 14px;
  border:1px solid #39415F; border-radius:12px; background:rgba(255,255,255,.03); }
.lang-name{ flex:0 0 9.5em; font-weight:600; color:var(--gold-light,#FFE873); }
.lang-bar{ flex:1 1 auto; height:10px; border-radius:99px; overflow:hidden;
  background:rgba(255,255,255,.08); border:1px solid #39415F; }
.lang-bar-fill{ display:block; height:100%; border-radius:99px;
  background:linear-gradient(90deg, var(--gold,#F5C542), var(--gold-light,#FFE873)); }
.lang-num{ flex:0 0 auto; font-variant-numeric:tabular-nums; color:#E8EAF2; }
.lang-badge{ flex:0 0 auto; font-size:.78em; font-weight:700; padding:3px 10px;
  border-radius:99px; color:#1A1405;
  background:linear-gradient(135deg, var(--gold,#F5C542), var(--gold-light,#FFE873));
  box-shadow:0 0 10px rgba(245,197,66,.35); }
.lang-row-unknown{ opacity:.65; }
@media (max-width:700px){
  .lang-row{ flex-wrap:wrap; }
  .lang-name{ flex:1 1 45%; }
  .lang-bar{ order:3; flex:1 1 100%; }
}

/* Chatbot induction card (added 2026-12-04) */
.atk-bot { display: flex; gap: 20px; align-items: center; padding: 20px;
  border: 1px solid #7C3AED; border-radius: 16px; background: rgba(124,58,237,.07);
  box-shadow: 0 0 22px rgba(124,58,237,.25); }
.atk-bot-img { width: 128px; height: 128px; flex: 0 0 auto; border-radius: 14px; object-fit: cover;
  border: 1px solid rgba(255,215,0,.55); }
.atk-bot-body .section-title { margin-top: 0; }
.atk-bot-body .btn { margin-top: 10px; }
@media (max-width: 640px) {
  .atk-bot { flex-direction: column; text-align: center; }
}
