﻿/* ============================================================
   绿茵造梦师 · Football Build Player
   ============================================================ */
:root {
  --bg: #07130f;
  --bg-2: #0a1f17;
  --panel: rgba(15, 40, 30, 0.72);
  --panel-solid: #0d261d;
  --panel-2: rgba(22, 52, 40, 0.6);
  --border: rgba(200, 255, 77, 0.14);
  --border-soft: rgba(255, 255, 255, 0.08);
  --text: #f4f1e6;
  --dim: #a4b8ac;
  --muted: #6e8578;
  --lime: #c8ff4d;
  --lime-2: #9be62f;
  --green: #2ee6a8;
  --gold: #f7c948;
  --gold-2: #e2a51d;
  --red: #ff6b5d;
  --blue: #5bd1ff;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  --radius: 22px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --display: 'Bebas Neue', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 600px at 15% -10%, rgba(46, 230, 168, 0.12), transparent 60%),
    radial-gradient(800px 500px at 95% 0%, rgba(247, 201, 72, 0.08), transparent 55%),
    linear-gradient(180deg, #07130f 0%, #081812 45%, #050c09 100%);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; }
::selection { background: rgba(200, 255, 77, 0.35); color: #06110b; }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.15em; height: 1.15em; flex: 0 0 auto; fill: currentColor; }

/* ---------- background pitch ---------- */
.pitch-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: 0.5;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
}
.pitch-line.half {
  position: absolute; left: 50%; top: 8%; bottom: 8%; width: 1px;
  background: rgba(200, 255, 77, 0.1);
}
.pitch-circle {
  position: absolute; left: 50%; top: 50%; width: min(56vw, 640px); aspect-ratio: 1;
  border: 1px solid rgba(200, 255, 77, 0.09);
  border-radius: 50%; transform: translate(-50%, -50%);
}
.pitch-box {
  position: absolute; top: 28%; height: 44%; width: min(16vw, 190px);
  border: 1px solid rgba(200, 255, 77, 0.07);
}
.pitch-box.box-left { left: 0; border-left: 0; }
.pitch-box.box-right { right: 0; border-right: 0; }

/* ---------- shell ---------- */
.app-shell {
  position: relative; z-index: 1;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0 22px 70px;
}

.topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
  background: linear-gradient(180deg, rgba(7,19,15,0.92), rgba(7,19,15,0.62) 70%, transparent);
  backdrop-filter: blur(12px);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  border: 0; background: none; padding: 4px; border-radius: 12px;
}
.brand-icon { width: 26px; height: 26px; color: var(--lime); }
.brand-text {
  font-family: var(--display); font-size: 1.35rem; letter-spacing: 0.08em;
}
.topbar-right { display: flex; align-items: center; gap: 10px; }
.data-chip {
  font-size: 11px; letter-spacing: 0.08em; color: var(--dim);
  border: 1px solid var(--border-soft); border-radius: 999px;
  padding: 5px 10px; background: rgba(255,255,255,0.03);
}
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px;
  border: 1px solid var(--border-soft); background: rgba(255,255,255,0.04);
  display: grid; place-items: center; color: var(--dim);
  transition: 0.2s ease;
}
.icon-btn:hover { color: var(--lime); border-color: var(--border); background: rgba(200,255,77,0.08); }

/* ---------- screens ---------- */
.screen { display: none; }
.screen.active { display: block; animation: screenIn 0.45s cubic-bezier(.2,.7,.2,1) both; }
@keyframes screenIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 30px; align-items: center;
  padding: 54px 0 38px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: 0.2em; font-weight: 700;
  color: var(--lime); text-transform: uppercase;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--lime);
  box-shadow: 0 0 0 4px rgba(200,255,77,0.12);
  animation: dotPulse 2.2s ease-in-out infinite;
}
@keyframes dotPulse { 50% { box-shadow: 0 0 0 8px rgba(200,255,77,0); } }

.hero-title {
  margin: 14px 0 12px;
  font-family: var(--display);
  font-size: clamp(3.6rem, 8vw, 6.6rem);
  line-height: 0.88;
  letter-spacing: 0.015em;
  font-weight: 400;
}
.hero-title span {
  background: linear-gradient(100deg, var(--lime) 0%, var(--green) 50%, var(--gold) 110%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 24px rgba(200,255,77,0.18));
}
.hero-sub { margin: 0; max-width: 560px; color: var(--dim); font-size: 15px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.hero-meta span {
  font-size: 11px; color: var(--dim); border: 1px solid var(--border-soft);
  padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,0.03);
}
.hero-meta b { color: var(--text); font-weight: 700; }

.hero-art { position: relative; min-height: 340px; display: grid; place-items: center; }
.hero-ball {
  width: 150px; height: 150px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--lime);
  background: radial-gradient(circle at 35% 30%, rgba(200,255,77,0.18), rgba(10,31,23,0.9) 65%);
  border: 1px solid rgba(200,255,77,0.24);
  box-shadow: 0 0 90px rgba(46,230,168,0.16), inset 0 0 40px rgba(200,255,77,0.06);
  animation: floatBall 6s ease-in-out infinite;
}
.hero-ball .icon { width: 76px; height: 76px; }
@keyframes floatBall { 50% { transform: translateY(-14px) rotate(8deg); } }
.hero-ring {
  position: absolute; border-radius: 50%; border: 1px solid rgba(200,255,77,0.12);
}
.ring-1 { width: 250px; height: 250px; transform: rotateX(66deg); }
.ring-2 { width: 330px; height: 330px; border-color: rgba(46,230,168,0.08); transform: rotateX(66deg) rotateZ(24deg); }
.hero-stat {
  position: absolute; display: grid; gap: 0; place-items: center;
  width: 82px; padding: 10px; border-radius: 16px;
  background: rgba(11,34,25,0.82); border: 1px solid var(--border-soft);
  box-shadow: var(--shadow);
}
.hero-stat b { font-family: var(--display); font-size: 2rem; line-height: 1; color: var(--lime); }
.hero-stat span { font-size: 9px; letter-spacing: 0.18em; color: var(--muted); }
.hero-stat-a { top: 28px; right: 18px; }
.hero-stat-b { bottom: 28px; left: 12px; }
.hero-stat-b b { color: var(--gold); }

/* ---------- mode cards ---------- */
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.mode-card {
  position: relative; overflow: hidden;
  text-align: left; padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background:
    radial-gradient(600px 240px at 100% 0%, rgba(200,255,77,0.12), transparent 60%),
    linear-gradient(160deg, rgba(18,48,36,0.9), rgba(8,24,17,0.9));
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.mode-card.mode-legend {
  background:
    radial-gradient(600px 240px at 100% 0%, rgba(247,201,72,0.13), transparent 60%),
    linear-gradient(160deg, rgba(48,38,18,0.9), rgba(19,15,8,0.92));
}
.mode-card::after {
  content: ''; position: absolute; right: -60px; bottom: -90px;
  width: 220px; height: 220px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.4s ease;
}
.mode-card:hover { transform: translateY(-4px); border-color: var(--border); box-shadow: 0 24px 70px rgba(0,0,0,0.45); }
.mode-card:hover::after { transform: scale(1.12); }
.mode-top { display: flex; align-items: center; justify-content: space-between; }
.mode-kicker { font-size: 10px; letter-spacing: 0.22em; color: var(--lime); }
.mode-legend .mode-kicker { color: var(--gold); }
.mode-icon { width: 30px; height: 30px; color: var(--lime); opacity: 0.9; }
.mode-legend .mode-icon { color: var(--gold); }
.mode-card h2 {
  margin: 14px 0 8px; font-size: 1.65rem; font-weight: 800; letter-spacing: 0.03em;
}
.mode-card p { margin: 0; color: var(--dim); font-size: 13.5px; max-width: 92%; }
.mode-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.mode-tags span {
  font-size: 10.5px; color: var(--dim); padding: 5px 9px; border-radius: 999px;
  border: 1px solid var(--border-soft); background: rgba(255,255,255,0.025);
}
.mode-cta {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 20px;
  font-size: 13px; font-weight: 700; color: var(--lime);
}
.mode-legend .mode-cta { color: var(--gold); }
.mode-cta .icon { width: 16px; height: 16px; transform: rotate(180deg); transition: transform 0.2s ease; }
.mode-card:hover .mode-cta .icon { transform: rotate(180deg) translateX(-3px); }

/* ---------- panels / home lower ---------- */
.home-lower { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 18px; margin-top: 18px; }
.panel {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-head h3 { margin: 0; font-size: 14px; letter-spacing: 0.08em; }
.panel-head > span { font-size: 11px; color: var(--muted); letter-spacing: 0.08em; }
.steps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; }
.steps b {
  font-family: var(--display); font-size: 1.7rem; line-height: 1; color: rgba(200,255,77,0.55);
}
.steps strong { font-size: 13.5px; }
.steps p { margin: 3px 0 0; color: var(--dim); font-size: 12.5px; }

.hall-body { margin-top: 14px; display: grid; gap: 10px; }
.hall-best {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; border-radius: 16px;
  background: linear-gradient(120deg, rgba(200,255,77,0.12), rgba(46,230,168,0.05));
  border: 1px solid var(--border);
}
.hall-best .ovr { font-family: var(--display); font-size: 2.6rem; line-height: 0.9; color: var(--lime); }
.hall-best .who { min-width: 0; }
.hall-best .who b { display: block; font-size: 14px; }
.hall-best .who span { font-size: 11px; color: var(--dim); }
.hall-list { display: grid; gap: 6px; }
.hall-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,0.025);
  font-size: 12px; color: var(--dim);
}
.hall-row b { color: var(--text); font-weight: 600; }
.hall-row em { font-style: normal; color: var(--lime); font-family: var(--display); font-size: 1.05rem; }
.empty-mini { color: var(--muted); font-size: 12px; padding: 10px 0; }
.text-btn {
  border: 0; background: none; padding: 2px; color: var(--muted); font-size: 11px;
  border-bottom: 1px dashed rgba(255,255,255,0.18);
}
.text-btn:hover { color: var(--lime); }
.home-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--border-soft);
  color: var(--muted); font-size: 10.5px;
}

/* ---------- section headings ---------- */
.section-head { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 18px; margin: 34px 0 20px; }
.section-title { margin: 6px 0 4px; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: 0.02em; }
.section-sub { margin: 0; color: var(--dim); font-size: 13px; }
.back-btn {
  display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px 0 8px;
  border-radius: 11px; border: 1px solid var(--border-soft); background: rgba(255,255,255,0.04);
  color: var(--dim); font-size: 12px; transition: 0.2s ease; white-space: nowrap;
}
.back-btn:hover { color: var(--lime); border-color: var(--border); }
.back-btn .icon { width: 18px; height: 18px; }

/* ---------- position ---------- */
.name-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px;
  margin-bottom: 20px; padding: 14px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft); background: var(--panel);
}
.name-row label { font-size: 12px; color: var(--dim); letter-spacing: 0.08em; }
.name-row input {
  flex: 1 1 220px; min-width: 0; height: 42px; padding: 0 12px;
  border-radius: 10px; border: 1px solid var(--border); outline: none;
  background: rgba(7,19,15,0.7); color: var(--text); font-size: 15px; font-weight: 700;
}
.name-row input:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(200,255,77,0.12); }
.name-hint { font-size: 11px; color: var(--muted); }

.position-grid { display: grid; gap: 18px; }
.pos-group { display: grid; gap: 8px; }
.pos-group h3 {
  margin: 0; font-size: 11px; letter-spacing: 0.18em; color: var(--muted);
  text-transform: uppercase; padding-left: 2px;
}
.pos-group-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pos-card {
  text-align: left; padding: 16px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-soft);
  background: linear-gradient(150deg, rgba(18,48,36,0.76), rgba(8,24,17,0.8));
  transition: 0.2s ease; position: relative; overflow: hidden;
}
.pos-card::after {
  content: ''; position: absolute; right: -24px; bottom: -34px;
  width: 80px; height: 80px; border-radius: 50%;
  border: 1px solid rgba(200,255,77,0.07);
}
.pos-card:hover { transform: translateY(-3px); border-color: var(--border); background: rgba(200,255,77,0.06); }
.pos-card .code { font-family: var(--display); font-size: 1.9rem; line-height: 1; color: var(--lime); }
.pos-card .name { display: block; margin-top: 4px; font-size: 13px; color: var(--text); }
.pos-card .role { display: block; margin-top: 6px; font-size: 10.5px; color: var(--muted); }
.pos-card.gk .code { color: var(--gold); }
.position-note {
  display: flex; align-items: center; gap: 8px; margin-top: 18px;
  color: var(--muted); font-size: 11.5px;
}
.position-note .icon { color: var(--gold); }

/* ---------- build head ---------- */
.build-head {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin: 26px 0 18px; padding: 18px 20px;
  border-radius: var(--radius); border: 1px solid var(--border-soft);
  background: var(--panel); box-shadow: var(--shadow);
}
.build-head-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.build-head-left h2 { margin: 5px 0 0; font-size: 1.55rem; }
.build-head-right { display: flex; align-items: center; gap: 18px; flex: 1; max-width: 520px; }
.ovr-ring { position: relative; width: 108px; height: 108px; flex: 0 0 auto; }
.ovr-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ovr-track { fill: none; stroke: rgba(255,255,255,0.07); stroke-width: 7; }
.ovr-fill {
  fill: none; stroke: var(--lime); stroke-width: 7; stroke-linecap: round;
  stroke-dasharray: 326.73; stroke-dashoffset: 326.73;
  transition: stroke-dashoffset 0.5s cubic-bezier(.2,.7,.2,1);
  filter: drop-shadow(0 0 8px rgba(200,255,77,0.45));
}
.ovr-ring-label {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
}
.ovr-ring-label b { font-family: var(--display); font-size: 2.5rem; line-height: 0.85; color: var(--lime); }
.ovr-ring-label span { font-size: 9px; letter-spacing: 0.2em; color: var(--muted); }
.progress-side { flex: 1; min-width: 0; }
.progress-label { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--dim); }
.progress-label span:last-child { color: var(--lime); font-weight: 700; }
.progress-track {
  height: 7px; margin-top: 8px; border-radius: 999px; overflow: hidden;
  background: rgba(255,255,255,0.07);
}
.progress-track i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--green), var(--lime));
  transition: width 0.4s ease; border-radius: inherit;
}
.progress-hint { margin-top: 8px; font-size: 11px; color: var(--muted); }

/* ---------- build layout ---------- */
.build-layout { display: grid; grid-template-columns: 370px minmax(0, 1fr); gap: 18px; align-items: start; }
.attrs-panel { position: sticky; top: 78px; }
.attr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.attr-slot {
  position: relative; min-height: 62px; padding: 9px 10px;
  border-radius: 12px; border: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.025);
  display: flex; flex-direction: column; justify-content: space-between;
  transition: 0.18s ease;
}
.attr-slot .slot-label { font-size: 10.5px; color: var(--muted); letter-spacing: 0.05em; }
.attr-slot .slot-val { font-family: var(--display); font-size: 1.3rem; line-height: 1; color: var(--dim); }
.attr-slot .slot-src {
  font-size: 9px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
.attr-slot.empty { border-style: dashed; }
.attr-slot.locked {
  background: linear-gradient(150deg, rgba(200,255,77,0.1), rgba(46,230,168,0.03));
  border-color: rgba(200,255,77,0.28);
}
.attr-slot.locked .slot-val { color: var(--lime); }
.attr-slot.clickable { cursor: pointer; border-color: rgba(200,255,77,0.45); background: rgba(200,255,77,0.07); }
.attr-slot.clickable:hover { transform: translateY(-2px); background: rgba(200,255,77,0.13); }
.attr-slot .slot-preview { font-size: 9.5px; color: var(--gold); }
.attr-slot .grade {
  position: absolute; right: 9px; top: 9px; font-family: var(--display);
  font-size: 0.95rem; line-height: 1; opacity: 0.9;
}
.attr-slot.pop { animation: slotPop 0.35s cubic-bezier(.2,1.6,.4,1); }
@keyframes slotPop { 0% { transform: scale(0.94); } 60% { transform: scale(1.03); } 100% { transform: scale(1); } }
.attrs-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; font-size: 9.5px; color: var(--muted); }
.attrs-legend span { display: inline-flex; align-items: center; gap: 4px; }
.grade-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.grade-dot.s { background: var(--gold); }
.grade-dot.a { background: var(--lime); }
.grade-dot.b { background: var(--blue); }
.grade-dot.c { background: var(--dim); }
.g-s { color: var(--gold); } .g-a { color: var(--lime); } .g-b { color: var(--blue); }
.g-c { color: var(--text); } .g-d { color: var(--dim); } .g-e { color: var(--red); }

/* ---------- slot machine ---------- */
.build-main { display: grid; gap: 14px; min-width: 0; }
.slot-window {
  position: relative; height: 138px; margin-top: 12px; overflow: hidden;
  border-radius: 14px; border: 1px solid var(--border-soft);
  background:
    linear-gradient(180deg, rgba(0,0,0,0.24), rgba(0,0,0,0.05) 30%, rgba(0,0,0,0.05) 70%, rgba(0,0,0,0.24)),
    rgba(5,16,11,0.55);
}
.slot-reel { transition: transform 0.5s cubic-bezier(.12,.72,.1,1); will-change: transform; }
.slot-item {
  height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 0 18px; border-bottom: 1px solid rgba(255,255,255,0.035);
}
.slot-item span {
  font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.slot-item small { font-size: 10px; color: var(--muted); white-space: nowrap; }
.slot-item.is-target span { color: var(--lime); }
.slot-mask { position: absolute; left: 0; right: 0; height: 46px; pointer-events: none; z-index: 2; }
.slot-mask.top { top: 0; background: linear-gradient(180deg, rgba(7,19,15,0.96), transparent); }
.slot-mask.bottom { bottom: 0; background: linear-gradient(0deg, rgba(7,19,15,0.96), transparent); }
.slot-center {
  position: absolute; left: 10px; right: 10px; top: 46px; height: 46px;
  border-radius: 10px; border: 1px solid rgba(200,255,77,0.28);
  background: rgba(200,255,77,0.045); pointer-events: none; z-index: 1;
}
.slot-center::before, .slot-center::after {
  content: ''; position: absolute; top: 50%; width: 0; height: 0;
  border-top: 5px solid transparent; border-bottom: 5px solid transparent;
  transform: translateY(-50%);
}
.slot-center::before { left: -1px; border-left: 6px solid var(--lime); }
.slot-center::after { right: -1px; border-right: 6px solid var(--lime); }
.slot-actions { display: flex; gap: 10px; margin-top: 14px; }
.slot-hint { margin-top: 10px; font-size: 11px; color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 42px; padding: 0 16px; border-radius: 12px;
  border: 1px solid transparent; font-size: 13px; font-weight: 700;
  transition: 0.2s ease; white-space: nowrap;
}
.btn .icon { width: 16px; height: 16px; }
.btn:disabled { opacity: 0.35; filter: grayscale(0.4); }
.btn-primary {
  background: linear-gradient(135deg, var(--lime), var(--green));
  color: #06110b; box-shadow: 0 10px 28px rgba(200,255,77,0.18);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(200,255,77,0.26); }
.btn-ghost {
  background: rgba(255,255,255,0.04); border-color: var(--border-soft); color: var(--dim);
}
.btn-ghost:hover:not(:disabled) { color: var(--lime); border-color: var(--border); background: rgba(200,255,77,0.06); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #1a1303;
  box-shadow: 0 10px 28px rgba(247,201,72,0.18);
}
.btn-gold:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(247,201,72,0.26); }
.btn-lg { height: 50px; padding: 0 24px; font-size: 14px; border-radius: 14px; }
.btn-primary { flex: 1; }

/* ---------- roster ---------- */
.roster-area { min-width: 0; }
.roster-card {
  background: var(--panel); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
}
.roster-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.roster-head h3 { margin: 0; font-size: 16px; }
.roster-head p { margin: 3px 0 0; font-size: 11px; color: var(--muted); }
.roster-head .count {
  font-family: var(--display); font-size: 1.5rem; color: var(--lime);
  line-height: 1; white-space: nowrap;
}
.roster-list { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.roster-row {
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 10px 11px; border-radius: 11px;
  border: 1px solid var(--border-soft); background: rgba(255,255,255,0.025);
  transition: 0.16s ease; min-width: 0;
}
.roster-row:hover { border-color: var(--border); background: rgba(200,255,77,0.06); }
.roster-row.selected {
  border-color: var(--lime); background: rgba(200,255,77,0.12);
  box-shadow: 0 0 0 1px rgba(200,255,77,0.2) inset;
}
.roster-row .rr-main { flex: 1; min-width: 0; }
.roster-row .rr-name {
  display: block; font-size: 12.5px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.roster-row .rr-sub {
  display: block; font-size: 9.5px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.roster-row .rr-ovr { font-family: var(--display); font-size: 1.25rem; color: var(--lime); line-height: 1; }
.pos-badge {
  flex: 0 0 auto; font-size: 9px; font-weight: 700; letter-spacing: 0.04em;
  padding: 3px 6px; border-radius: 6px; color: var(--dim);
  background: rgba(255,255,255,0.05); border: 1px solid var(--border-soft);
}
.pos-badge.gk { color: var(--gold); border-color: rgba(247,201,72,0.25); }
.empty-state {
  padding: 26px 18px; text-align: center; color: var(--muted); font-size: 12.5px;
  border: 1px dashed var(--border-soft); border-radius: var(--radius);
  background: rgba(255,255,255,0.015);
}
.empty-state b { display: block; color: var(--dim); margin-bottom: 4px; }

/* ---------- player panel ---------- */
.player-panel { min-width: 0; }
.pp-card {
  background: var(--panel); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
}
.pp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.pp-name { margin: 0; font-size: 18px; }
.pp-sub { margin: 4px 0 0; font-size: 11px; color: var(--muted); }
.pp-ovr {
  display: grid; place-items: center; min-width: 64px; padding: 8px 10px;
  border-radius: 12px; border: 1px solid var(--border); background: rgba(200,255,77,0.08);
}
.pp-ovr b { font-family: var(--display); font-size: 1.8rem; line-height: 0.9; color: var(--lime); }
.pp-ovr span { font-size: 8px; letter-spacing: 0.16em; color: var(--muted); }
.pp-note {
  display: flex; align-items: center; gap: 6px; margin: 12px 0 0;
  font-size: 10.5px; color: var(--gold);
}
.pp-chips { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 7px; margin-top: 14px; }
.pp-chip {
  text-align: left; padding: 9px 10px; border-radius: 10px;
  border: 1px solid var(--border-soft); background: rgba(255,255,255,0.025);
  transition: 0.16s ease; position: relative;
}
.pp-chip .c-label { display: block; font-size: 9.5px; color: var(--muted); }
.pp-chip .c-val { display: block; font-family: var(--display); font-size: 1.15rem; line-height: 1; color: var(--text); }
.pp-chip .c-adj { display: block; font-size: 9px; color: var(--gold); margin-top: 2px; }
.pp-chip.clickable { cursor: pointer; border-color: rgba(200,255,77,0.3); background: rgba(200,255,77,0.055); }
.pp-chip.clickable:hover { border-color: var(--lime); background: rgba(200,255,77,0.12); transform: translateY(-2px); }
.pp-chip.locked { opacity: 0.35; }
.pp-chip .c-lock { position: absolute; right: 7px; top: 7px; width: 13px; height: 13px; color: var(--lime); }
.pp-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; font-size: 10px; color: var(--muted); }
.pp-foot span { padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,0.035); }

/* ---------- build footer ---------- */
.build-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 18px; color: var(--muted); font-size: 10.5px;
}

/* ---------- result ---------- */
.result-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 30px 0 18px; }
.result-actions-top { display: flex; gap: 8px; }
.result-card {
  position: relative; overflow: hidden;
  border-radius: 30px; border: 1px solid rgba(255,255,255,0.14);
  padding: 30px; box-shadow: 0 30px 90px rgba(0,0,0,0.5);
  background:
    radial-gradient(700px 300px at 100% 0%, rgba(255,255,255,0.16), transparent 60%),
    linear-gradient(140deg, #1b2a1c 0%, #0b1710 55%, #07110c 100%);
}
.result-card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.08) 45%, transparent 60%);
  transform: translateX(-30%);
}
.result-card.tier-s {
  background:
    radial-gradient(700px 320px at 100% 0%, rgba(255,240,170,0.28), transparent 60%),
    linear-gradient(140deg, #4a3a10 0%, #221a06 55%, #120d03 100%);
  border-color: rgba(247,201,72,0.4);
}
.result-card.tier-a {
  background:
    radial-gradient(700px 320px at 100% 0%, rgba(200,255,77,0.2), transparent 60%),
    linear-gradient(140deg, #1e3a24 0%, #0c1c12 55%, #07110c 100%);
  border-color: rgba(200,255,77,0.32);
}
.result-card.tier-b {
  background:
    radial-gradient(700px 320px at 100% 0%, rgba(91,209,255,0.18), transparent 60%),
    linear-gradient(140deg, #11303a 0%, #0a1a20 55%, #07110c 100%);
  border-color: rgba(91,209,255,0.3);
}
.result-card.tier-c, .result-card.tier-d { border-color: rgba(255,255,255,0.14); }
.tier-s .rc-ovr, .tier-s .rc-mode, .tier-s .rc-name { color: var(--gold); }
.tier-s .rc-ovr { text-shadow: 0 0 40px rgba(247,201,72,0.3); }
.tier-a .rc-ovr { color: var(--lime); }
.tier-b .rc-ovr { color: var(--blue); }
.tier-c .rc-ovr, .tier-d .rc-ovr { color: var(--text); }
.result-card .rc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rc-mode { font-size: 11px; letter-spacing: 0.18em; color: var(--lime); font-weight: 700; }
.tier-s .rc-mode { color: var(--gold); }
.rc-badge {
  font-size: 9px; letter-spacing: 0.2em; color: var(--muted);
  border: 1px solid var(--border-soft); border-radius: 999px; padding: 5px 9px;
}
.rc-main { display: grid; grid-template-columns: 1fr 0.9fr; gap: 20px; align-items: center; margin-top: 16px; }
.rc-ovr { font-family: var(--display); font-size: clamp(5.4rem, 14vw, 8.6rem); line-height: 0.78; }
.rc-name {
  display: block; width: 100%; margin-top: 10px; padding: 4px 0;
  border: 0; border-bottom: 1px dashed rgba(255,255,255,0.22);
  background: transparent; outline: none;
  font-size: 1.35rem; font-weight: 800; color: var(--text); letter-spacing: 0.02em;
}
.rc-name:focus { border-color: var(--lime); }
.rc-pos { margin-top: 8px; font-size: 12px; color: var(--dim); }
.rc-core { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.rc-core div {
  padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-soft);
}
.rc-core b { display: block; font-family: var(--display); font-size: 1.35rem; line-height: 1; }
.rc-core span { font-size: 9px; color: var(--muted); letter-spacing: 0.08em; }
.rc-radar { display: grid; place-items: center; min-width: 0; }
.rc-radar svg { width: 100%; max-width: 330px; height: auto; }
.rc-attrs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 20px; }
.rc-attr {
  padding: 8px 9px; border-radius: 10px; background: rgba(255,255,255,0.035);
  border: 1px solid var(--border-soft); min-width: 0;
}
.rc-attr .a-label { font-size: 9px; color: var(--muted); }
.rc-attr .a-val { font-family: var(--display); font-size: 1.15rem; line-height: 1.05; }
.rc-attr .a-src {
  font-size: 8.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.result-summary { display: grid; gap: 14px; margin-top: 14px; min-width: 0; }
.summary-panel {
  background: var(--panel); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
  min-width: 0;
}
.legend-summary > * { min-width: 0; }
.summary-panel h3 { margin: 0; font-size: 14px; letter-spacing: 0.06em; }
.summary-panel .sp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.summary-panel .sp-sub { margin: 4px 0 0; font-size: 11px; color: var(--muted); }
.score-big { font-family: var(--display); font-size: 3.2rem; line-height: 0.9; color: var(--lime); }
.score-big.gold { color: var(--gold); }
.score-big span { font-size: 0.9rem; color: var(--muted); letter-spacing: 0.1em; margin-left: 4px; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.stat-box {
  padding: 11px 12px; border-radius: 12px; background: rgba(255,255,255,0.035);
  border: 1px solid var(--border-soft);
}
.stat-box b { display: block; font-family: var(--display); font-size: 1.7rem; line-height: 1; color: var(--text); }
.stat-box span { font-size: 9.5px; color: var(--muted); letter-spacing: 0.06em; }
.timeline-wrap { margin-top: 16px; max-height: 340px; max-width: 100%; overflow: auto; border-radius: 12px; border: 1px solid var(--border-soft); }
.timeline { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.timeline th {
  position: sticky; top: 0; z-index: 1; text-align: left; font-weight: 500;
  color: var(--muted); background: #0b1d15; padding: 9px 10px; font-size: 10px;
  letter-spacing: 0.06em; border-bottom: 1px solid var(--border-soft);
}
.timeline td { padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,0.045); color: var(--dim); }
.timeline tr:last-child td { border-bottom: 0; }
.timeline td b { color: var(--text); font-weight: 600; }
.timeline .awards { color: var(--gold); font-size: 10.5px; }
.timeline .club-cell { white-space: nowrap; }
.timeline .num { font-family: var(--display); font-size: 1.05rem; color: var(--text); }

.legend-summary { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 16px; align-items: stretch; }
.goat-panel {
  display: grid; align-content: center; gap: 8px; text-align: center;
  background:
    radial-gradient(300px 180px at 50% 0%, rgba(247,201,72,0.18), transparent 70%),
    var(--panel);
}
.goat-panel .goat-label { font-size: 10px; letter-spacing: 0.2em; color: var(--gold); }
.goat-panel .goat-score { font-family: var(--display); font-size: 4.6rem; line-height: 0.85; color: var(--gold); }
.goat-panel .goat-title { font-size: 15px; font-weight: 800; }
.goat-panel .goat-rank { font-size: 11px; color: var(--dim); }
.sim-list { display: grid; gap: 8px; margin-top: 14px; }
.sim-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--dim); }
.sim-row b { color: var(--text); }
.sim-bar { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.07); overflow: hidden; flex: 1; }
.sim-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--lime)); }
.legend-quote {
  margin-top: 14px; padding: 12px 14px; border-radius: 12px;
  background: rgba(247,201,72,0.06); border: 1px solid rgba(247,201,72,0.16);
  font-size: 12px; color: var(--dim); line-height: 1.7;
}
.legend-quote b { color: var(--gold); }
.result-actions { display: flex; justify-content: center; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.result-actions .btn { flex: 0 1 220px; }
.result-foot { text-align: center; margin-top: 14px; color: var(--muted); font-size: 10px; }

/* ---------- toast / confetti ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 120;
  transform: translate(-50%, 18px); opacity: 0; pointer-events: none;
  max-width: min(560px, calc(100vw - 32px));
  padding: 11px 16px; border-radius: 12px;
  background: rgba(10, 28, 20, 0.96); border: 1px solid var(--border);
  color: var(--text); font-size: 12.5px; box-shadow: 0 16px 50px rgba(0,0,0,0.5);
  transition: 0.25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.confetti-layer { position: fixed; inset: 0; z-index: 110; pointer-events: none; overflow: hidden; }
.confetti-piece {
  position: absolute; top: -20px; width: 7px; height: 13px; border-radius: 2px;
  animation: confettiFall 2.8s cubic-bezier(.18,.6,.3,1) forwards;
}
@keyframes confettiFall {
  to { transform: translate3d(var(--dx), 110vh, 0) rotate(720deg); opacity: 0.9; }
}

/* ---------- poster canvas offscreen ---------- */
.poster-canvas { position: fixed; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ---------- topbar back / career setup / season hub ---------- */
.topbar-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.global-back {
  width: 38px; height: 38px; border-radius: 11px; flex: 0 0 auto;
  border: 1px solid var(--border-soft); background: rgba(255,255,255,0.04);
  color: var(--dim); display: none; place-items: center; transition: 0.2s ease;
}
.global-back.visible { display: grid; }
.global-back:hover { color: var(--lime); border-color: var(--border); background: rgba(200,255,77,0.08); }
.global-back .icon { width: 20px; height: 20px; }

.home-career { margin-bottom: 18px; }
.home-career:empty { display: none; }
.career-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 20px; border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(120deg, rgba(200,255,77,0.12), rgba(46,230,168,0.04));
  box-shadow: var(--shadow);
}
.career-banner .cb-label { font-size: 10px; letter-spacing: 0.2em; color: var(--lime); font-weight: 700; }
.career-banner b { display: block; margin-top: 4px; font-size: 16px; }
.career-banner small { display: block; margin-top: 2px; color: var(--dim); font-size: 11px; }
.career-banner .cb-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.setup-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 18px; align-items: start; }
.setup-slot { min-width: 0; }
.setup-side { min-width: 0; }
.setup-player { margin-top: 14px; }
.setup-player .sp-name { font-size: 22px; font-weight: 800; }
.setup-player .sp-meta { color: var(--dim); font-size: 12px; margin-top: 2px; }
.setup-player .sp-ovr-big { font-family: var(--display); font-size: 4.4rem; line-height: 0.85; color: var(--lime); margin: 8px 0; }
.setup-player .sp-attrs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.setup-player .sp-attr { padding: 8px; border-radius: 8px; background: rgba(255,255,255,0.035); font-size: 10px; color: var(--muted); }
.setup-player .sp-attr b { display: block; font-family: var(--display); font-size: 1.15rem; color: var(--text); line-height: 1.1; }
.setup-note { margin-top: 14px; font-size: 11px; color: var(--muted); line-height: 1.65; }

.age-layout { display: grid; grid-template-columns: 1fr 0.8fr; gap: 18px; align-items: start; }
.age-panel { text-align: center; padding: 34px 26px; }
.age-big { display: inline-flex; align-items: baseline; gap: 4px; }
.age-big b { font-family: var(--display); font-size: 6rem; line-height: 0.82; color: var(--lime); }
.age-big span { color: var(--muted); font-size: 14px; }
.age-slider { width: 100%; margin: 24px 0 8px; accent-color: var(--lime); height: 4px; }
.age-scale { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.age-panel .btn { margin-top: 24px; width: 100%; }
.age-info { min-width: 0; }
.decline-rules { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.decline-rules li {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 12px 14px; border-radius: 10px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border-soft); font-size: 12px;
}
.decline-rules b { color: var(--lime); white-space: nowrap; }
.decline-rules span { color: var(--dim); text-align: right; }

.league-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.league-tab {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.03); color: var(--dim); font-size: 12px; transition: 0.18s ease;
}
.league-tab:hover { color: var(--lime); border-color: var(--border); }
.league-tab.active { color: #06110b; background: linear-gradient(135deg, var(--lime), var(--green)); border-color: transparent; font-weight: 700; }
.club-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.club-card {
  text-align: left; padding: 14px; border-radius: 14px;
  border: 1px solid var(--border-soft); background: var(--panel);
  transition: 0.2s ease; min-width: 0;
}
.club-card:hover { border-color: var(--border); background: rgba(200,255,77,0.06); transform: translateY(-2px); }
.club-card .cc-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.club-card .cc-league { font-size: 10px; color: var(--muted); margin-top: 2px; }
.club-card .cc-ovr { font-family: var(--display); font-size: 1.8rem; color: var(--lime); margin-top: 8px; line-height: 1; }
.club-card .cc-label { font-size: 9px; color: var(--muted); letter-spacing: 0.08em; }
.club-card .cc-top { font-size: 10px; color: var(--dim); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.season-head {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 18px 22px; margin: 26px 0 14px; flex-wrap: wrap;
}
.season-head-main { min-width: 0; }
.season-head-main .section-title { margin: 5px 0 0; }
.season-sub { margin: 4px 0 0; color: var(--dim); font-size: 12px; }
.season-player {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  border-radius: 14px; background: rgba(200,255,77,0.07); border: 1px solid var(--border);
}
.season-player .sp-ovr { font-family: var(--display); font-size: 2.2rem; line-height: 0.9; color: var(--lime); }
.season-player b { display: block; font-size: 13px; }
.season-player span { display: block; font-size: 10px; color: var(--muted); }
.season-controls { display: flex; gap: 8px; }
.season-controls .btn { height: 40px; }
.season-ticker {
  min-height: 54px; padding: 12px 18px; border-radius: 14px;
  border: 1px solid var(--border-soft); background: var(--panel);
  color: var(--dim); font-size: 12px; display: flex; align-items: center; gap: 12px;
}
.season-ticker .tick-score { font-family: var(--display); font-size: 1.7rem; color: var(--lime); white-space: nowrap; }
.season-ticker .tick-main { flex: 1; min-width: 0; }
.season-ticker .tick-title { color: var(--text); font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.season-ticker .tick-sub { color: var(--muted); font-size: 10.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tick-pop { animation: tickerIn 0.3s ease; }
@keyframes tickerIn { from { opacity: 0.2; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.season-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 10px; }
.season-tab {
  padding: 8px 13px; border-radius: 10px; border: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.03); color: var(--dim); font-size: 12px;
}
.season-tab:hover { color: var(--lime); border-color: var(--border); }
.season-tab.active { color: var(--lime); border-color: var(--border); background: rgba(200,255,77,0.08); }
.season-content { min-height: 200px; min-width: 0; }
.season-empty { padding: 30px 18px; text-align: center; color: var(--muted); font-size: 12.5px; border: 1px dashed var(--border-soft); border-radius: var(--radius); background: rgba(255,255,255,0.015); }
.fixtures-wrap { max-height: 560px; overflow: auto; border-radius: 14px; }
.fixtures-list { display: grid; gap: 6px; }
.fixture-row {
  display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-soft);
  background: var(--panel);
}
.fixture-row.is-latest { border-color: var(--border); background: rgba(200,255,77,0.07); }
.fixture-round { font-size: 10px; color: var(--muted); }
.fixture-main { min-width: 0; }
.fixture-main b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fixture-main span { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fixture-score { font-family: var(--display); font-size: 1.35rem; color: var(--text); white-space: nowrap; }
.fixture-score.win { color: var(--lime); }
.fixture-score.loss { color: var(--red); }
.fixture-score.draw { color: var(--dim); }
.fixture-pending { color: var(--muted); font-size: 11px; }

.table-hint { display: none; font-size: 10px; color: var(--muted); margin-bottom: 6px; }
.league-table-wrap, .squad-wrap {
  overflow: auto; border-radius: 14px; border: 1px solid var(--border-soft);
  background: var(--panel); max-width: 100%;
}
.league-table, .squad-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.league-table { min-width: 640px; }
.squad-table { min-width: 520px; }
.league-table th, .squad-table th {
  position: sticky; top: 0; z-index: 1; text-align: left;
  background: #0b1d15; color: var(--muted); font-size: 10px;
  padding: 10px 8px; border-bottom: 1px solid var(--border-soft); font-weight: 500;
}
.league-table td, .squad-table td {
  padding: 8px; border-bottom: 1px solid rgba(255,255,255,0.04); color: var(--dim);
}
.league-table tr:last-child td, .squad-table tr:last-child td { border-bottom: 0; }
.league-table tr.is-user td, .squad-table tr.is-user td { background: rgba(200,255,77,0.08); color: var(--text); }
.league-table .pos { font-family: var(--display); font-size: 1.1rem; color: var(--text); }
.league-table .club { font-weight: 700; color: var(--text); white-space: nowrap; }
.league-table .pts { font-family: var(--display); font-size: 1.15rem; color: var(--lime); }
.league-table .num, .squad-table .num { font-family: var(--display); font-size: 1.05rem; color: var(--text); }
.league-table .champion td { color: var(--gold); }
.league-table .champion .club { color: var(--gold); }
.squad-table .pos-badge { font-size: 9px; }
.squad-others {
  margin-top: 10px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--border-soft); background: var(--panel);
}
.squad-others summary { cursor: pointer; color: var(--dim); font-size: 11.5px; }
.squad-others summary:hover { color: var(--lime); }

.scorers-list { display: grid; gap: 6px; }
.scorer-row {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-soft);
  background: var(--panel);
}
.scorer-row.is-user { border-color: var(--border); background: rgba(200,255,77,0.08); }
.scorer-rank { font-family: var(--display); font-size: 1.2rem; color: var(--muted); }
.scorer-name b { display: block; font-size: 12.5px; }
.scorer-name span { font-size: 10px; color: var(--muted); }
.scorer-goals { font-family: var(--display); font-size: 1.5rem; color: var(--lime); }

.honors-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.honor-card {
  padding: 14px; border-radius: 12px; border: 1px solid var(--border-soft);
  background: var(--panel); position: relative; overflow: hidden;
}
.honor-card::after {
  content: ''; position: absolute; right: -20px; bottom: -30px;
  width: 80px; height: 80px; border-radius: 50%; border: 1px solid rgba(247,201,72,0.12);
}
.honor-card .hc-year { font-size: 10px; color: var(--muted); }
.honor-card .hc-title { font-size: 14px; font-weight: 800; color: var(--gold); margin-top: 4px; }
.honor-card .hc-detail { font-size: 10.5px; color: var(--dim); margin-top: 4px; }
.honor-card .hc-icon { width: 18px; height: 18px; color: var(--gold); float: right; }

.season-summary-panel {
  padding: 18px; border-radius: var(--radius); border: 1px solid var(--border);
  background: linear-gradient(120deg, rgba(247,201,72,0.1), rgba(200,255,77,0.04));
  margin-bottom: 12px;
}
.season-summary-panel .ss-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.season-summary-panel h3 { margin: 0; font-size: 15px; }
.season-summary-panel .ss-sub { margin: 4px 0 0; color: var(--dim); font-size: 11.5px; }
.season-summary-panel .ss-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.season-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }

.offseason-layout { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 18px; align-items: start; }
.points-badge {
  margin-left: auto; text-align: center; padding: 10px 18px; border-radius: 14px;
  border: 1px solid var(--border); background: rgba(200,255,77,0.08); flex: 0 0 auto;
}
.points-badge b { display: block; font-family: var(--display); font-size: 2.6rem; line-height: 0.9; color: var(--lime); }
.points-badge span { font-size: 9px; letter-spacing: 0.1em; color: var(--muted); }
.offseason-attrs { min-width: 0; }
.offseason-list { display: grid; gap: 7px; margin-top: 14px; }
.attr-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: 10px; border: 1px solid var(--border-soft); background: rgba(255,255,255,0.025);
}
.attr-row .ar-label { flex: 1; font-size: 12px; }
.attr-row .ar-grade { font-size: 10px; color: var(--muted); }
.attr-row .ar-val { font-family: var(--display); font-size: 1.3rem; color: var(--text); min-width: 34px; text-align: right; }
.attr-row .ar-plus {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border);
  background: rgba(200,255,77,0.1); color: var(--lime); font-size: 18px; line-height: 1;
}
.attr-row .ar-plus:hover:not(:disabled) { background: rgba(200,255,77,0.2); }
.attr-row .ar-plus:disabled { opacity: 0.25; }
.decline-log { display: grid; gap: 6px; margin: 14px 0; }
.decline-item {
  display: flex; justify-content: space-between; gap: 8px; padding: 9px 11px;
  border-radius: 9px; background: rgba(255,93,93,0.06);
  border: 1px solid rgba(255,93,93,0.14); font-size: 11px; color: var(--dim);
}
.decline-item b { color: var(--red); }
.decline-empty { color: var(--muted); font-size: 11px; padding: 8px 0; }
#next-season-btn { width: 100%; margin-top: 14px; }
.retire-hero { display: flex; align-items: center; gap: 18px; padding: 22px; border-radius: var(--radius); border: 1px solid var(--border); background: linear-gradient(120deg, rgba(247,201,72,0.1), rgba(46,230,168,0.04)); }
.retire-hero .rh-ovr { font-family: var(--display); font-size: 4.6rem; line-height: 0.85; color: var(--gold); }
.retire-hero h3 { margin: 0; font-size: 20px; }
.retire-hero p { margin: 4px 0 0; color: var(--dim); font-size: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; gap: 10px; padding-top: 34px; }
  .hero-art { min-height: 240px; }
  .hero-ball { width: 120px; height: 120px; }
  .ring-1 { width: 200px; height: 200px; }
  .ring-2 { width: 270px; height: 270px; }
  .hero-stat-a { top: 8px; right: 10%; }
  .hero-stat-b { bottom: 8px; left: 10%; }
  .home-lower { grid-template-columns: 1fr; }
  .build-layout { grid-template-columns: 1fr; }
  .attrs-panel { position: static; order: 2; }
  .build-main { order: 1; }
  .result-card .rc-main { grid-template-columns: 0.8fr 1.2fr; }
}

@media (max-width: 760px) {
  .app-shell { padding: 0 14px 54px; }
  .topbar { padding: 10px 0; }
  .data-chip { display: none; }
  .mode-grid { grid-template-columns: 1fr; }
  .mode-card { padding: 22px; }
  .pos-group-grid { grid-template-columns: repeat(3, 1fr); }
  .build-head { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px; }
  .build-head-right { max-width: none; }
  .build-head-left { justify-content: space-between; }
  .roster-list { grid-template-columns: 1fr; }
  .pp-chips { grid-template-columns: 1fr 1fr; }
  .rc-attrs { grid-template-columns: repeat(3, 1fr); }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .legend-summary { grid-template-columns: 1fr; }
  .result-head { flex-direction: column; align-items: flex-start; }
  .result-card { padding: 22px; border-radius: 24px; }
  .result-card .rc-main { grid-template-columns: 1fr; gap: 8px; }
  .result-card .rc-radar { order: 2; }
  .rc-radar svg { max-width: 250px; }
  .rc-core { display: none; }
  .rc-ovr { font-size: 5.4rem; }
  .timeline { min-width: 0; font-size: 10.5px; }
  .timeline th, .timeline td { padding: 7px 6px; }
  .timeline th:nth-child(2), .timeline td:nth-child(2),
  .timeline th:nth-child(4), .timeline td:nth-child(4) { display: none; }
  .section-head { gap: 12px; }
  .section-title { font-size: 1.5rem; }
}

@media (max-width: 520px) {
  .hero-title { font-size: 3.4rem; }
  .pos-group-grid { grid-template-columns: repeat(2, 1fr); }
  .attr-grid { grid-template-columns: 1fr 1fr; }
  .rc-attrs { grid-template-columns: 1fr 1fr; }
  .result-actions .btn { flex: 1 1 100%; }
  .name-row input { flex-basis: 100%; }
  .build-foot { flex-direction: column; align-items: flex-start; }
  .topbar-right { gap: 6px; }
}

@media (max-width: 1000px) {
  .setup-grid, .age-layout, .offseason-layout { grid-template-columns: 1fr; }
  .club-grid { grid-template-columns: repeat(3, 1fr); }
  .honors-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .topbar-left { gap: 6px; }
  .brand-text { font-size: 1.15rem; }
  .club-grid { grid-template-columns: repeat(2, 1fr); }
  .season-head { align-items: flex-start; }
  .season-head-main { width: 100%; }
  .season-player { width: 100%; justify-content: flex-start; }
  .season-controls { width: 100%; }
  .season-controls .btn { flex: 1; }
  .season-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .season-tab { white-space: nowrap; }
  .honors-grid { grid-template-columns: 1fr; }
  .season-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .league-table { min-width: 510px; }
  .squad-table { min-width: 460px; }
  .table-hint { display: block; }
  .career-banner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
  .club-grid { grid-template-columns: 1fr 1fr; }
  .setup-player .sp-attrs { grid-template-columns: repeat(2, 1fr); }
  .points-badge { padding: 8px 14px; }
  .points-badge b { font-size: 2.1rem; }
  .age-big b { font-size: 5rem; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- scrollbars ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); }
::-webkit-scrollbar-thumb { background: rgba(200,255,77,0.18); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(200,255,77,0.3); }

/* ---------- focus ---------- */
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

/* ============================================================
   Theme refresh · cream / orange H5 style (reference inspired)
   ============================================================ */
:root {
  --bg: #faf5eb;
  --bg-2: #fffaf2;
  --panel: #fffaf2;
  --panel-solid: #fffaf2;
  --panel-2: #fff5e8;
  --bg-card: #fffaf2;
  --bg-elevated: #fff0e0;
  --border: #f0e0cc;
  --border-soft: #e8d5bc;
  --text: #2d1f0e;
  --dim: #8a7a66;
  --muted: #baa992;
  --lime: #ff6b35;
  --lime-2: #ff8a5c;
  --green: #2ec4b6;
  --gold: #f7a600;
  --gold-2: #c48a00;
  --red: #e63946;
  --blue: #2f80ed;
  --orange: #ff6b35;
  --orange-light: #ff8a5c;
  --orange-dim: rgba(255,107,53,0.10);
  --orange-bg: rgba(255,107,53,0.06);
  --shadow: 0 2px 12px rgba(45,31,14,0.08);
  --shadow-lg: 0 4px 24px rgba(45,31,14,0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --display: 'Fredoka', 'Noto Sans SC', sans-serif;
  --body: 'Nunito', 'Noto Sans SC', sans-serif;
}

html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(620px 420px at 50% -80px, rgba(255,107,53,0.08), transparent 65%),
    radial-gradient(520px 340px at 0% 100%, rgba(46,196,182,0.05), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--body);
}
.pitch-bg { display: none; }
.app-shell { width: min(560px, 100%); padding: 0 16px 56px; }

/* top bar */
.topbar {
  padding: 12px 0;
  background: rgba(250,245,235,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}
.topbar-left { gap: 10px; }
.brand { gap: 8px; }
.brand-icon { width: 24px; height: 24px; color: var(--orange); }
.brand-text { font-family: var(--display); font-size: 1.28rem; letter-spacing: 0.04em; color: var(--text); }
.data-chip { display: none; }
.global-back {
  background: var(--bg-card); border: 2px solid var(--border); color: var(--dim);
}
.global-back:hover { color: var(--orange); border-color: var(--orange); background: var(--orange-bg); }
.icon-btn {
  background: var(--bg-card); border: 2px solid var(--border); color: var(--dim);
}
.icon-btn:hover { color: var(--orange); border-color: var(--orange); background: var(--orange-bg); }

/* hero */
.hero {
  display: block; text-align: center;
  padding: 28px 8px 18px; min-height: 0;
}
.hero-art { display: none; }
.hero-copy { min-width: 0; }
.eyebrow {
  display: flex; justify-content: flex-start; color: var(--orange);
  font-family: var(--display); letter-spacing: 0.2em;
}
.eyebrow .dot { background: var(--orange); box-shadow: 0 0 0 4px rgba(255,107,53,0.12); }
.hero-title {
  margin: 10px 0 8px;
  font-family: var(--display);
  font-size: clamp(34px, 8.6vw, 50px);
  line-height: 1.06;
  letter-spacing: 0.01em;
  font-weight: 700;
  color: var(--text);
}
.hero-title span {
  background: none; -webkit-background-clip: border-box; background-clip: border-box;
  color: var(--orange); -webkit-text-fill-color: var(--orange); filter: none;
}
.hero-sub {
  margin: 0 auto; max-width: 340px; color: var(--dim);
  font-size: 14px; line-height: 1.6;
}
.hero-meta { justify-content: center; margin-top: 14px; }
.hero-meta span {
  background: var(--bg-card); border: 1px solid var(--border); color: var(--dim);
  padding: 5px 10px;
}
.hero-meta b { color: var(--text); }

/* mode cards */
.mode-grid { display: flex; flex-direction: column; gap: 12px; }
.mode-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px 18px;
  box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.mode-card.mode-career { border-top: 3px solid var(--green); background: linear-gradient(160deg, #fffdf8, #fffaf2); }
.mode-card.mode-legend { border-top: 3px solid var(--gold); background: linear-gradient(160deg, #fffaf2, #fff5e8); }
.mode-card::after { border-color: rgba(255,107,53,0.08); }
.mode-card:hover { transform: translateY(-2px); border-color: var(--orange); box-shadow: var(--shadow-lg); }
.mode-card:active { transform: scale(0.98); }
.mode-kicker {
  display: inline-block; padding: 4px 12px; border-radius: 20px;
  background: var(--orange-dim); color: var(--orange);
  font-family: var(--display); font-size: 12px; letter-spacing: 0.08em;
}
.mode-legend .mode-kicker { background: rgba(247,166,0,0.13); color: var(--gold); }
.mode-icon { width: 28px; height: 28px; color: var(--orange); opacity: 1; }
.mode-legend .mode-icon { color: var(--gold); }
.mode-card h2 {
  font-family: var(--display); font-size: 26px; line-height: 1.1;
  margin: 12px 0 4px; color: var(--text);
}
.mode-card p { color: var(--dim); font-size: 14px; max-width: 100%; line-height: 1.55; }
.mode-tags { margin-top: 14px; gap: 6px; }
.mode-tags span {
  background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--dim); font-size: 10.5px;
}
.mode-cta {
  display: flex; align-items: center; justify-content: center;
  width: 100%; margin-top: 16px; padding: 12px 20px;
  border-radius: 12px; background: var(--orange); color: #fff;
  font-family: var(--display); font-size: 15px; font-weight: 600;
  box-shadow: 0 4px 0 #c94d1e, 0 6px 12px rgba(255,107,53,0.22);
  transition: transform .1s ease, box-shadow .1s ease;
}
.mode-legend .mode-cta { color: #2d1f0e; background: var(--gold); box-shadow: 0 4px 0 #c48a00, 0 6px 12px rgba(247,166,0,0.2); }
.mode-card:hover .mode-cta { transform: translateY(-1px); }
.mode-card:hover .mode-cta .icon { transform: translateX(3px); }
.mode-cta .icon { display: none; }

/* panels / home */
.panel {
  background: var(--bg-card); border: 2px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  backdrop-filter: none;
}
.panel-head h3 { color: var(--text); }
.panel-head > span { color: var(--muted); }
.steps b { color: var(--orange); }
.steps p { color: var(--dim); }
.hall-best { background: var(--orange-bg); border-color: var(--border); }
.hall-best .ovr { color: var(--orange); }
.hall-row { background: var(--bg-elevated); color: var(--dim); }
.hall-row b { color: var(--text); }
.hall-row em { color: var(--orange); }
.empty-mini { color: var(--muted); }
.text-btn { color: var(--muted); border-bottom-color: var(--border); }
.text-btn:hover { color: var(--orange); }
.home-foot { color: var(--muted); border-top-color: var(--border); }
.career-banner {
  background: linear-gradient(120deg, rgba(255,107,53,0.10), rgba(46,196,182,0.05));
  border: 2px solid var(--border); box-shadow: var(--shadow);
}
.career-banner .cb-label { color: var(--orange); }
.career-banner b { color: var(--text); }
.career-banner small { color: var(--dim); }

/* section headings / position */
.section-head { margin: 24px 0 18px; }
.section-title { color: var(--text); font-family: var(--display); display: inline-block; padding-bottom: 5px; border-bottom: 3px solid var(--orange); }
.section-sub { color: var(--dim); }
.position-grid { gap: 14px; }
.pos-group h3 { color: var(--muted); }
.pos-card {
  background: var(--bg-card); border: 2px solid var(--border); color: var(--text);
  box-shadow: 0 2px 0 rgba(45,31,14,0.025);
}
.pos-card:hover { background: var(--orange-bg); border-color: var(--orange); }
.pos-card .code { color: var(--orange); font-family: var(--display); }
.pos-card.gk .code { color: var(--gold); }
.pos-card .name { color: var(--text); }
.pos-card .role { color: var(--muted); }
.pos-card::after { border-color: rgba(255,107,53,0.1); }
.name-row { background: var(--bg-card); border: 2px solid var(--border); }
.name-row label { color: var(--dim); }
.name-row input {
  background: #fffdf8; border: 2px solid var(--border); color: var(--text);
  font-family: var(--body); font-weight: 700;
}
.name-row input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-dim); }
.name-hint { color: var(--muted); }
.position-note { color: var(--muted); }
.position-note .icon { color: var(--gold); }

/* build head */
.build-head {
  background: var(--bg-card); border: 2px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.build-head-left h2 { color: var(--text); font-family: var(--display); }
.ovr-track { stroke: var(--border); }
.ovr-fill { filter: none; }
.ovr-ring-label b { color: var(--orange); font-family: var(--display); }
.ovr-ring-label span { color: var(--muted); }
.progress-label { color: var(--dim); }
.progress-label span:last-child { color: var(--orange); }
.progress-track { background: var(--bg-elevated); }
.progress-track i { background: linear-gradient(90deg, var(--orange), var(--gold)); }
.progress-hint { color: var(--muted); }
.attrs-panel { background: var(--bg-card); }
.attr-slot { background: #fffaf2; border: 1.5px solid var(--border); }
.attr-slot .slot-label { color: var(--muted); }
.attr-slot .slot-val { color: var(--text); font-family: var(--display); }
.attr-slot .slot-src { color: var(--muted); }
.attr-slot.empty { border-style: dashed; }
.attr-slot.locked { background: var(--orange-bg); border-color: var(--orange); }
.attr-slot.locked .slot-val { color: var(--orange); }
.attr-slot.clickable { border-color: var(--orange); background: var(--orange-bg); }
.attr-slot.clickable:hover { background: var(--orange-dim); }
.attr-slot .slot-preview { color: var(--gold); }
.attrs-legend { color: var(--muted); }
.g-s { color: var(--gold); } .g-a { color: var(--orange); } .g-b { color: var(--blue); }
.g-c { color: var(--text); } .g-d { color: var(--dim); } .g-e { color: var(--red); }

/* slot machine */
.slot-window {
  background: linear-gradient(180deg, #fff5e8, #fffaf2 32%, #fffaf2 68%, #fff5e8);
  border: 2px solid var(--border);
}
.slot-item { border-bottom-color: var(--border); }
.slot-item span { color: var(--text); }
.slot-item small { color: var(--muted); }
.slot-item.is-target span { color: var(--orange); }
.slot-mask.top { background: linear-gradient(180deg, #fffaf2, transparent); }
.slot-mask.bottom { background: linear-gradient(0deg, #fffaf2, transparent); }
.slot-center { border-color: var(--orange); background: var(--orange-bg); }
.slot-center::before { border-left-color: var(--orange); }
.slot-center::after { border-right-color: var(--orange); }
.slot-hint { color: var(--muted); }

/* buttons */
.btn {
  border: 0; border-radius: 12px; min-height: 46px;
  font-family: var(--display); font-weight: 600; font-size: 14px;
  padding: 12px 20px; height: auto;
}
.btn-primary {
  background: var(--orange); color: #fff;
  box-shadow: 0 4px 0 #c94d1e, 0 6px 12px rgba(255,107,53,0.2);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 5px 0 #c94d1e, 0 8px 16px rgba(255,107,53,0.24); }
.btn-primary:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #c94d1e, 0 3px 8px rgba(255,107,53,0.15); }
.btn-ghost {
  background: var(--bg-card); color: var(--text); border: 2px solid var(--border);
  box-shadow: 0 3px 0 var(--border);
}
.btn-ghost:hover:not(:disabled) { color: var(--orange); border-color: var(--orange); background: var(--orange-bg); }
.btn-ghost:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--border); }
.btn-gold {
  background: var(--gold); color: #2d1f0e;
  box-shadow: 0 4px 0 #c48a00, 0 6px 12px rgba(247,166,0,0.2);
}
.btn-gold:hover:not(:disabled) { transform: translateY(-1px); }
.btn-gold:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #c48a00; }
.btn:disabled { opacity: .4; }

/* roster */
.roster-card { background: var(--bg-card); border: 2px solid var(--border); box-shadow: var(--shadow); }
.roster-head h3 { color: var(--text); }
.roster-head p { color: var(--muted); }
.roster-head .count { color: var(--orange); }
.roster-row {
  background: #fffaf2; border: 1.5px solid var(--border);
}
.roster-row:hover { border-color: var(--orange); background: var(--orange-bg); }
.roster-row.selected { border-color: var(--orange); background: var(--orange-dim); box-shadow: inset 0 0 0 1px var(--orange); }
.roster-row .rr-name { color: var(--text); }
.roster-row .rr-sub { color: var(--muted); }
.roster-row .rr-ovr { color: var(--orange); }
.pos-badge { background: var(--bg-elevated); border-color: var(--border); color: var(--dim); }
.pos-badge.gk { color: var(--gold); border-color: rgba(247,166,0,0.3); }
.empty-state { border-color: var(--border); background: var(--bg-card); color: var(--muted); }
.empty-state b { color: var(--text); }

/* player panel */
.pp-card { background: var(--bg-card); border: 2px solid var(--border); box-shadow: var(--shadow); }
.pp-name { color: var(--text); }
.pp-sub { color: var(--muted); }
.pp-ovr { background: var(--orange-bg); border-color: var(--orange); }
.pp-ovr b { color: var(--orange); }
.pp-note { color: var(--gold); }
.pp-chip { background: #fffaf2; border: 1.5px solid var(--border); }
.pp-chip .c-label { color: var(--muted); }
.pp-chip .c-val { color: var(--text); }
.pp-chip .c-adj { color: var(--gold); }
.pp-chip.clickable { border-color: var(--orange); background: var(--orange-bg); }
.pp-chip.clickable:hover { border-color: var(--orange); background: var(--orange-dim); }
.pp-chip.locked { opacity: .45; }
.pp-chip .c-lock { color: var(--orange); }
.pp-foot span { background: var(--bg-elevated); color: var(--muted); }

/* result card */
.result-card {
  background: linear-gradient(140deg, #fffaf2, #fff5e8);
  border: 2px solid var(--border); color: var(--text);
  box-shadow: var(--shadow-lg);
}
.result-card::before { background: linear-gradient(115deg, transparent 30%, rgba(255,107,53,0.06) 45%, transparent 60%); }
.result-card.tier-s { background: linear-gradient(140deg, #fff7d9, #ffeecb 55%, #fffaf2); border-color: var(--gold); }
.result-card.tier-a { background: linear-gradient(140deg, #fffaf2, #fff0e8 55%, #fffaf2); border-color: var(--orange); }
.result-card.tier-b { background: linear-gradient(140deg, #f5fbff, #e4f3ff 55%, #fffaf2); border-color: var(--blue); }
.result-card.tier-c, .result-card.tier-d { border-color: var(--border); }
.tier-s .rc-ovr { color: var(--gold); text-shadow: none; }
.tier-a .rc-ovr { color: var(--orange); }
.tier-b .rc-ovr { color: var(--blue); }
.tier-c .rc-ovr, .tier-d .rc-ovr { color: var(--text); }
.rc-mode { color: var(--orange); }
.tier-s .rc-mode { color: var(--gold); }
.rc-badge { color: var(--muted); border-color: var(--border); background: #fffaf2; }
.rc-ovr { font-size: clamp(4.6rem, 13vw, 7.2rem); text-shadow: none; font-family: var(--display); }
.rc-name { color: var(--text); border-bottom-color: var(--border); }
.rc-name:focus { border-color: var(--orange); }
.tier-s .rc-name { color: var(--text); }
.rc-pos { color: var(--dim); }
.rc-core div { background: #fffaf2; border-color: var(--border); }
.rc-core b { color: var(--text); }
.rc-core span { color: var(--muted); }
.rc-attr { background: #fffaf2; border-color: var(--border); }
.rc-attr .a-label { color: var(--muted); }
.rc-attr .a-val { color: var(--text); }
.rc-attr .a-src { color: var(--muted); }
.result-summary { min-width: 0; }
.summary-panel { background: var(--bg-card); border: 2px solid var(--border); box-shadow: var(--shadow); }
.summary-panel h3 { color: var(--text); }
.summary-panel .sp-sub { color: var(--muted); }
.score-big { color: var(--orange); }
.score-big.gold { color: var(--gold); }
.stat-box { background: #fffaf2; border-color: var(--border); }
.stat-box b { color: var(--text); }
.stat-box span { color: var(--muted); }
.timeline-wrap { border-color: var(--border); }
.timeline th { background: #fff5e8; color: var(--muted); border-bottom-color: var(--border); }
.timeline td { border-bottom-color: var(--border); color: var(--dim); }
.timeline td b { color: var(--text); }
.timeline .awards { color: var(--gold); }
.timeline .num { color: var(--text); }
.legend-summary { min-width: 0; }
.goat-panel { background: linear-gradient(120deg, #fff7d9, #fffaf2); }
.goat-panel .goat-label { color: var(--gold); }
.goat-panel .goat-score { color: var(--gold); }
.goat-panel .goat-title { color: var(--text); }
.goat-panel .goat-rank { color: var(--dim); }
.sim-row { color: var(--dim); }
.sim-row b { color: var(--text); }
.sim-bar { background: var(--bg-elevated); }
.sim-bar i { background: linear-gradient(90deg, var(--gold), var(--orange)); }
.legend-quote { background: rgba(247,166,0,0.08); border-color: rgba(247,166,0,0.25); color: var(--dim); }
.legend-quote b { color: var(--gold); }
.result-foot { color: var(--muted); }
.career-steps { color: var(--dim); }

/* season hub */
.season-head { background: var(--bg-card); border: 2px solid var(--border); box-shadow: var(--shadow); }
.season-sub { color: var(--dim); }
.season-player { background: var(--orange-bg); border-color: var(--orange); }
.season-player .sp-ovr { color: var(--orange); }
.season-player b { color: var(--text); }
.season-player span { color: var(--muted); }
.season-ticker { background: var(--bg-card); border: 2px solid var(--border); color: var(--dim); }
.season-ticker .tick-score { color: var(--orange); }
.season-ticker .tick-score.win { color: var(--green); }
.season-ticker .tick-score.loss { color: var(--red); }
.season-ticker .tick-score.draw { color: var(--dim); }
.season-ticker .tick-title { color: var(--text); }
.season-ticker .tick-sub { color: var(--muted); }
.season-tab { background: var(--bg-card); border-color: var(--border); color: var(--dim); }
.season-tab:hover { color: var(--orange); border-color: var(--orange); }
.season-tab.active { color: var(--orange); border-color: var(--orange); background: var(--orange-bg); }
.season-content { min-width: 0; }
.season-empty { border-color: var(--border); background: var(--bg-card); color: var(--muted); }
.table-hint { color: var(--muted); }
.league-table-wrap, .squad-wrap { background: var(--bg-card); border-color: var(--border); }
.league-table th, .squad-table th { background: #fff5e8; color: var(--muted); border-bottom-color: var(--border); }
.league-table td, .squad-table td { color: var(--dim); border-bottom-color: var(--border); }
.league-table tr.is-user td, .squad-table tr.is-user td { background: var(--orange-bg); color: var(--text); }
.league-table .pos { color: var(--text); font-family: var(--display); }
.league-table .club { color: var(--text); }
.league-table .pts { color: var(--orange); }
.league-table .champion td { color: var(--gold); }
.league-table .champion .club { color: var(--gold); }
.fixture-row { background: var(--bg-card); border-color: var(--border); }
.fixture-row.is-latest { border-color: var(--orange); background: var(--orange-bg); }
.fixture-round { color: var(--muted); }
.fixture-main b { color: var(--text); }
.fixture-main span { color: var(--muted); }
.fixture-score { color: var(--text); }
.fixture-score.win { color: var(--green); }
.fixture-score.loss { color: var(--red); }
.fixture-score.draw { color: var(--dim); }
.fixture-pending { color: var(--muted); }
.scorer-row { background: var(--bg-card); border-color: var(--border); }
.scorer-row.is-user { border-color: var(--orange); background: var(--orange-bg); }
.scorer-rank { color: var(--muted); }
.scorer-name b { color: var(--text); }
.scorer-name span { color: var(--muted); }
.scorer-goals { color: var(--orange); }
.squad-others { background: var(--bg-card); border-color: var(--border); }
.squad-others summary { color: var(--dim); }
.squad-others summary:hover { color: var(--orange); }
.honor-card { background: var(--bg-card); border-color: var(--border); }
.honor-card .hc-year { color: var(--muted); }
.honor-card .hc-title { color: var(--gold); }
.honor-card .hc-detail { color: var(--dim); }
.honor-card .hc-icon { color: var(--gold); }
.honor-card::after { border-color: rgba(247,166,0,0.15); }
.season-summary-panel { background: linear-gradient(120deg, #fff7d9, #fffaf2); border-color: var(--border); }
.season-summary-panel h3 { color: var(--text); }
.season-summary-panel .ss-sub { color: var(--dim); }
.summary-grid, .season-summary-grid { color: var(--text); }

/* setup / age / club */
.setup-note { color: var(--muted); }
.setup-player .sp-name { color: var(--text); }
.setup-player .sp-meta { color: var(--dim); }
.setup-player .sp-ovr-big { color: var(--orange); font-family: var(--display); }
.setup-player .sp-attr { background: var(--bg-elevated); color: var(--muted); }
.setup-player .sp-attr b { color: var(--text); }
.age-panel { background: var(--bg-card); }
.age-big b { color: var(--orange); font-family: var(--display); }
.age-big span { color: var(--muted); }
.age-slider { accent-color: var(--orange); }
.age-scale { color: var(--muted); }
.age-info { background: var(--bg-card); }
.decline-rules li { background: var(--bg-elevated); border-color: var(--border); color: var(--dim); }
.decline-rules b { color: var(--orange); }
.decline-rules span { color: var(--dim); }
.league-tab { background: var(--bg-card); border-color: var(--border); color: var(--dim); }
.league-tab:hover { color: var(--orange); border-color: var(--orange); }
.league-tab.active { background: var(--orange); color: #fff; border-color: var(--orange); }
.club-card { background: var(--bg-card); border-color: var(--border); }
.club-card:hover { background: var(--orange-bg); border-color: var(--orange); }
.club-card .cc-name { color: var(--text); }
.club-card .cc-league { color: var(--muted); }
.club-card .cc-ovr { color: var(--orange); }
.club-card .cc-label { color: var(--muted); }
.club-card .cc-top { color: var(--dim); }

/* offseason / retire */
.points-badge { background: var(--orange-bg); border-color: var(--orange); }
.points-badge b { color: var(--orange); }
.points-badge span { color: var(--muted); }
.attr-row { background: #fffaf2; border-color: var(--border); }
.attr-row .ar-label { color: var(--text); }
.attr-row .ar-grade { color: var(--muted); }
.attr-row .ar-val { color: var(--text); }
.attr-row .ar-plus { background: var(--orange-bg); border-color: var(--orange); color: var(--orange); }
.attr-row .ar-plus:hover:not(:disabled) { background: var(--orange-dim); }
.decline-item { background: rgba(230,57,70,0.06); border-color: rgba(230,57,70,0.18); color: var(--dim); }
.decline-item b { color: var(--red); }
.decline-empty { color: var(--muted); }
.retire-hero { background: linear-gradient(120deg, rgba(247,166,0,0.12), rgba(255,107,53,0.05)); border-color: var(--border); }
.retire-hero .rh-ovr { color: var(--gold); }
.retire-hero h3 { color: var(--text); }
.retire-hero p { color: var(--dim); }

/* misc */
.toast { background: #2d1f0e; color: #fffaf2; border-color: rgba(255,107,53,0.5); }
.toast.show { color: #fffaf2; }
::-webkit-scrollbar-track { background: rgba(45,31,14,0.04); }
::-webkit-scrollbar-thumb { background: rgba(255,107,53,0.24); }
::-webkit-scrollbar-thumb:hover { background: rgba(255,107,53,0.4); }
:focus-visible { outline-color: var(--orange); }

/* 560px H5 layout: one-column at all desktop widths */
.timeline { font-size: 10.5px; }
.timeline th, .timeline td { padding: 7px 6px; }
.timeline th:nth-child(2), .timeline td:nth-child(2),
.timeline th:nth-child(4), .timeline td:nth-child(4) { display: none; }
.table-hint { display: block; }
.league-table { min-width: 510px; }
.squad-table { min-width: 460px; }

@media (min-width: 561px) {
  .hero { display: block; text-align: center; }
  .hero-copy { text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .mode-grid { grid-template-columns: 1fr; }
  .home-lower { grid-template-columns: 1fr; }
  .build-layout { grid-template-columns: 1fr; }
  .attrs-panel { position: static; order: 2; }
  .build-main { order: 1; }
  .build-head { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px; }
  .build-head-right { max-width: none; }
  .build-head-left { justify-content: space-between; }
  .roster-list { grid-template-columns: 1fr; }
  .pp-chips { grid-template-columns: 1fr 1fr; }
  .pos-group-grid { grid-template-columns: repeat(3, 1fr); }
  .result-head { flex-direction: column; align-items: flex-start; }
  .result-card { padding: 22px; border-radius: 24px; }
  .result-card .rc-main { grid-template-columns: 1fr; gap: 8px; }
  .result-card .rc-radar { order: 2; }
  .rc-radar svg { max-width: 260px; }
  .rc-core { display: grid; }
  .rc-ovr { font-size: 5.4rem; }
  .rc-attrs { grid-template-columns: 1fr 1fr; }
  .table-hint { display: none; }
  .summary-grid, .season-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .legend-summary { grid-template-columns: 1fr; }
  .honors-grid { grid-template-columns: 1fr; }
  .career-banner { flex-direction: column; align-items: flex-start; }
  .setup-grid, .age-layout, .offseason-layout { grid-template-columns: 1fr; }
  .club-grid { grid-template-columns: 1fr 1fr; }
  .season-head { flex-direction: column; align-items: stretch; }
  .season-head-main { width: 100%; }
  .season-player { width: 100%; justify-content: flex-start; }
  .season-controls { width: 100%; }
  .season-controls .btn { flex: 1; }
  .season-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .season-tab { white-space: nowrap; }
  .section-title { font-size: 1.6rem; }
  .app-shell { width: min(560px, 100%); }
}

@media (max-width: 560px) {
  .app-shell { padding-left: 12px; padding-right: 12px; }
  .hero { padding-top: 22px; }
  .mode-card { padding: 20px 18px 16px; }
  .club-grid { grid-template-columns: 1fr 1fr; }
  .season-controls { width: 100%; }
  .season-controls .btn { flex: 1; }
}





/* ---------- Reference build layout ---------- */
.build-head { display: block; text-align: center; padding: 16px 16px 14px; }
.build-title-wrap { text-align: center; }
.build-title-wrap .eyebrow { justify-content: center; }
.build-title-wrap .section-title { font-size: 1.7rem; margin: 6px 0 2px; }
.build-position-line { margin: 0 0 12px; font-size: 12px; color: var(--dim); }
.build-progress-top { width: 100%; }
.build-progress-row { display: flex; align-items: center; gap: 10px; }
.build-progress-row .progress-track { flex: 1; margin-top: 0; }
.progress-count { font-family: var(--display); font-size: 1.1rem; color: var(--orange); white-space: nowrap; }
.build-progress-top .progress-hint { text-align: left; margin-top: 6px; }
.build-layout { display: grid; grid-template-columns: 158px minmax(0, 1fr); gap: 12px; align-items: start; }
.attrs-panel { position: sticky; top: 74px; order: 0; padding: 12px; }
.build-main { order: 0; }
.ovr-box { display: grid; place-items: center; padding: 8px 4px 6px; border-radius: 10px; background: var(--orange-bg); border: 1px solid var(--border); margin-bottom: 10px; }
.ovr-box b { font-family: var(--display); font-size: 2rem; line-height: .9; color: var(--orange); }
.ovr-box span { font-size: 8px; letter-spacing: .18em; color: var(--muted); }
.attrs-panel-head { display: flex; justify-content: space-between; align-items: center; margin: 2px 2px 8px; }
.attrs-panel-head h3 { margin: 0; font-size: 12px; }
.attrs-panel-head span { font-size: 10px; color: var(--muted); }
.attr-list { display: grid; gap: 5px; max-height: 560px; overflow: auto; padding-right: 2px; }
.build-attr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 2px 6px; align-items: center; width: 100%; min-height: 38px; padding: 5px 8px; border: 1.5px solid var(--border); border-radius: 8px; background: #fffaf2; text-align: left; color: var(--text); font: inherit; }
.build-attr .ba-label { font-size: 11px; color: var(--dim); }
.build-attr .ba-value { font-family: var(--display); font-size: 1.1rem; color: var(--text); }
.build-attr .ba-plus { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; border: 1px solid var(--border); background: #fff; color: var(--muted); font-size: 14px; line-height: 1; }
.build-attr.clickable { border-color: var(--orange); background: var(--orange-bg); cursor: pointer; }
.build-attr.clickable:hover { background: var(--orange-dim); }
.build-attr.clickable .ba-plus { border-color: var(--orange); background: var(--orange); color: #fff; }
.build-attr.locked { border-color: var(--orange); background: var(--orange-bg); }
.build-attr.locked .ba-value { color: var(--orange); }
.build-attr .ba-source, .build-attr .ba-preview { grid-column: 1 / -1; font-size: 8.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.build-attr .ba-preview { color: var(--gold); }
.build-attr .ba-plus.done { background: var(--orange); color: #fff; border-color: var(--orange); }
.build-attr .ba-plus.disabled { opacity: .35; }
.build-attr.pop { animation: slotPop .35s cubic-bezier(.2,1.6,.4,1); }
.attrs-legend { gap: 6px; margin-top: 8px; font-size: 8.5px; }
.slot-hint { color: var(--muted); }
.slot-hint.warning { color: var(--red); }
.roster-head .count { display: none; }
.roster-list { grid-template-columns: 1fr; gap: 6px; }
.roster-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; min-width: 0; }
.rr-avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; color: #fff; font-weight: 700; font-size: 13px; }
.roster-row .rr-main { flex: 1; min-width: 0; }
.roster-row .rr-ovr { font-size: 1.35rem; }
.roster-row .rr-name { font-size: 13px; font-weight: 700; }
.roster-row .rr-sub { font-size: 9.5px; color: var(--muted); }
.position-grid { grid-template-columns: 1fr 1fr; }
@media (max-width: 479px) {
  .build-layout { grid-template-columns: 1fr; }
  .attrs-panel { position: static; order: 2; }
  .build-main { order: 1; }
  .attr-list { max-height: none; }
}
@media (min-width: 480px) {
  .build-layout { grid-template-columns: 158px minmax(0, 1fr); }
  .attrs-panel { position: sticky; top: 74px; order: 0; }
  .build-main { order: 0; }
}


.hero .eyebrow, .build-title-wrap .eyebrow { justify-content: center; }


/* ---------- Player reveal / team reveal / season overview ---------- */
.reveal-hero {
  position: relative; overflow: hidden; text-align: center;
  background: linear-gradient(160deg, #fffdf8, #fff0e0);
  border: 2px solid var(--border); border-radius: 24px;
  padding: 24px 20px 20px; box-shadow: var(--shadow-lg);
  animation: revealCardIn .5s cubic-bezier(.2,.8,.2,1) both;
}
.reveal-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(320px 200px at 50% 0%, rgba(255,107,53,.13), transparent 70%);
}
.reveal-hero.tier-s { border-color: var(--gold); background: linear-gradient(160deg, #fff8dd, #fff0e0); }
.reveal-hero.tier-a { border-color: var(--orange); }
.reveal-hero.tier-b { border-color: var(--blue); }
.reveal-kicker { position: relative; font-size: 10px; letter-spacing: .2em; color: var(--muted); }
.reveal-name {
  position: relative; display: block; width: 100%; margin: 8px auto 2px;
  border: 0; border-bottom: 1px dashed var(--border); background: transparent;
  text-align: center; font-family: var(--display); font-size: clamp(24px, 6vw, 32px);
  font-weight: 700; color: var(--text); outline: none; padding: 4px;
}
.reveal-name:focus { border-color: var(--orange); }
.reveal-ovr {
  position: relative; font-family: var(--display);
  font-size: clamp(5rem, 18vw, 7.5rem); line-height: .8;
  color: var(--orange); margin: 8px 0 2px;
  text-shadow: 0 10px 34px rgba(255,107,53,.2);
  animation: revealOvrIn .7s cubic-bezier(.2,.8,.2,1) both;
}
.tier-s .reveal-ovr { color: var(--gold); text-shadow: 0 10px 34px rgba(247,166,0,.22); }
.tier-b .reveal-ovr { color: var(--blue); }
.reveal-pos { position: relative; color: var(--dim); font-size: 13px; }

.reveal-panel {
  background: var(--bg-card); border: 2px solid var(--border);
  border-radius: 16px; padding: 12px; margin-top: 12px;
  box-shadow: var(--shadow);
}
.reveal-grades { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.reveal-grade {
  display: grid; place-items: center; gap: 2px; padding: 7px 2px;
  border: 1px solid var(--border); border-radius: 8px; background: #fffaf2;
  animation: gradeIn .42s cubic-bezier(.2,.8,.2,1) both;
  animation-delay: calc(var(--i) * 35ms);
}
.reveal-grade span { font-size: 9px; color: var(--muted); white-space: nowrap; }
.reveal-grade b { font-family: var(--display); font-size: 15px; line-height: 1; }
.tone-gold b { color: var(--gold); }
.tone-orange b { color: var(--orange); }
.tone-yellow b { color: #c99a00; }
.tone-green b { color: var(--green); }
.tone-blue b { color: var(--blue); }
.tone-red b { color: var(--red); }

.reveal-trait {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px; background: var(--orange-bg); border: 1.5px solid var(--orange);
  border-radius: 12px; color: var(--text); font-weight: 700; font-size: 14px;
  animation: slideUpIn .5s .25s both;
}
.reveal-trait .icon { color: var(--orange); }

.reveal-templates { padding: 14px; animation: slideUpIn .5s .35s both; }
.reveal-panel-title {
  display: flex; align-items: center; gap: 6px; color: var(--dim);
  font-size: 11px; letter-spacing: .1em; margin-bottom: 6px;
}
.reveal-panel-title .icon { color: var(--gold); }
.reveal-template-list { display: grid; gap: 2px; }
.reveal-template-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 4px;
  border-bottom: 1px solid var(--border);
  animation: rowIn .4s both; animation-delay: calc(var(--i) * 80ms + 300ms);
}
.reveal-template-row:last-child { border-bottom: 0; }
.reveal-template-name { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 12px; font-weight: 700; }
.reveal-template-name small { color: var(--muted); font-size: 9.5px; font-weight: 400; }
.reveal-template-sim { font-family: var(--display); color: var(--orange); font-size: 13px; }
.reveal-start { width: 100%; margin-top: 14px; animation: pulseGlow 2.6s ease-in-out infinite; }
#result-subtitle:empty { display: none; }

/* team reveal */
.team-hero { text-align: center; padding: 20px; margin-bottom: 14px; }
.team-season { font-size: 11px; color: var(--muted); letter-spacing: .06em; }
#team-club-name { margin: 6px 0 4px; font-family: var(--display); font-size: clamp(28px, 7vw, 38px); color: var(--text); }
#team-role-line { margin: 0 0 16px; color: var(--dim); font-size: 12px; }
#start-season-btn { width: 100%; max-width: 360px; animation: pulseGlow 2.6s ease-in-out infinite; }
.team-list-head {
  display: flex; align-items: center; gap: 6px; margin: 14px 4px 8px;
  font-size: 11px; color: var(--dim); letter-spacing: .08em;
}
.team-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.team-dot.red { background: var(--red); }
.team-dot.blue { background: var(--blue); }
.team-dot.gold { background: var(--gold); }
.team-roster-list { display: grid; gap: 5px; }
.team-player-row {
  display: grid; grid-template-columns: 36px 42px minmax(0, 1fr) auto;
  gap: 8px; align-items: center; padding: 7px 10px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card);
  animation: rowIn .35s both; animation-delay: calc(var(--i) * 22ms);
}
.team-player-row .rr-avatar { width: 32px; height: 32px; font-size: 12px; }
.team-pos { font-size: 10px; color: var(--muted); font-weight: 700; }
.team-name { font-size: 12.5px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-star { color: var(--gold); width: 12px; height: 12px; vertical-align: -1px; }
.team-ovr { font-family: var(--display); font-size: 1.15rem; color: var(--text); }
.team-player-row.is-user {
  border-color: var(--orange); background: var(--orange-bg);
  animation: rowIn .35s both, userRowPulse 2.4s .5s ease-in-out infinite;
}
.team-player-row.is-user .team-ovr { color: var(--orange); }

/* season overview */
.season-overview { padding: 14px; margin-bottom: 12px; }
.so-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.so-club { font-family: var(--display); font-size: 22px; color: var(--orange); }
.so-season { font-size: 11px; color: var(--muted); }
.so-record { text-align: right; }
.so-record b { display: block; font-family: var(--display); font-size: 1.8rem; color: var(--green); line-height: 1; }
.so-record span { font-size: 11px; color: var(--muted); }
.so-player { margin-top: 6px; font-size: 10.5px; color: var(--dim); text-align: center; }
.so-dots-wrap { margin-top: 12px; padding: 12px 8px 8px; border-radius: 12px; border: 1px solid var(--border); background: #fffaf2; }
.so-dots { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; justify-items: center; }
.result-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bg-elevated); display: inline-block; }
.result-dot.win { background: var(--green); }
.result-dot.loss { background: var(--red); }
.result-dot.draw { background: var(--gold); }
.result-dot.pending { background: var(--border); }
.result-dot.mid { box-shadow: 0 0 0 2px var(--gold); }
.result-dot.latest { animation: dotPulse 1s ease-in-out infinite; }
.so-dots-legend { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 10px; font-size: 9px; color: var(--muted); }
.so-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.so-stat { padding: 8px; border-radius: 8px; background: var(--bg-elevated); text-align: center; }
.so-stat b { display: block; font-family: var(--display); font-size: 1.3rem; color: var(--text); line-height: 1; }
.so-stat span { font-size: 9px; color: var(--muted); }
.so-best { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--orange-bg); border: 1px solid var(--orange); }
.so-best-title { font-size: 10.5px; color: var(--orange); font-weight: 700; }
.so-best-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.so-best-row b { font-family: var(--display); font-size: 1.8rem; color: var(--text); line-height: 1; }
.so-best-row span { font-size: 11px; color: var(--dim); }

/* home entrance */
.mode-card { animation: fadeUp .5s both; }
.mode-card:nth-child(2) { animation-delay: .08s; }
.home-lower .panel { animation: fadeUp .5s .15s both; }

@keyframes revealCardIn { from { opacity: 0; transform: scale(.95) translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes revealOvrIn { from { opacity: 0; transform: scale(.8); } to { opacity: 1; transform: scale(1); } }
@keyframes gradeIn { from { opacity: 0; transform: translateY(6px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes slideUpIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes rowIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@keyframes userRowPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,53,0); } 50% { box-shadow: 0 0 0 3px rgba(255,107,53,.13); } }
@keyframes pulseBtn { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1px); } }
@keyframes dotPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }

@media (max-width: 520px) {
  .reveal-grades { grid-template-columns: repeat(4, 1fr); }
  .so-dots { grid-template-columns: repeat(8, 1fr); }
  .so-stats { grid-template-columns: repeat(2, 1fr); }
  .team-player-row { grid-template-columns: 32px 36px minmax(0, 1fr) auto; padding: 6px 8px; }
  .reveal-name { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-delay: 0s !important; }
}


@keyframes pulseGlow { 0%,100% { box-shadow: 0 4px 0 #c94d1e, 0 6px 12px rgba(255,107,53,.2); } 50% { box-shadow: 0 4px 0 #c94d1e, 0 8px 22px rgba(255,107,53,.35); } }

#build-roster .roster-row, #build-roster .build-empty { animation: rowIn .3s both; }
#build-roster .roster-row:nth-child(2) { animation-delay: .04s; }
#build-roster .roster-row:nth-child(3) { animation-delay: .08s; }
#build-roster .roster-row:nth-child(4) { animation-delay: .12s; }
#build-roster .roster-row:nth-child(5) { animation-delay: .16s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0s !important;
    transition-duration: .001ms !important;
  }
}


.legend-career-start { margin-top: 12px; display: grid; gap: 6px; }
.legend-career-start .setup-note { text-align: center; }

.so-home-away { text-align: center; font-size: 10px; color: var(--muted); margin-top: 4px; letter-spacing: .03em; }
