:root {
  --bg: #0a0c10;
  --surface: #11151c;
  --surface-2: #171c25;
  --surface-3: #202631;
  --border: rgba(255,255,255,.085);
  --border-strong: rgba(255,255,255,.14);
  --text: #f5f2eb;
  --secondary: #c9c8c2;
  --muted: #858b96;
  --accent: #34d399;
  --accent-2: #10b981;
  --accent-soft: rgba(52,211,153,.13);
  --lavender: #b9abf7;
  --bad: #f38ba8;
  --gold: #f2c86b;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; background: var(--bg); }
body.dashboard-page {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Public Sans", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; z-index: 1000; inset: 12px auto auto 12px; padding: 10px 14px;
  border-radius: 10px; background: var(--accent); color: #06120d; transform: translateY(-180%);
}
.skip-link:focus { transform: none; }
.dashboard-main { min-height: 100vh; overflow: hidden; }
.astra-dashboard { min-height: 100vh; background: var(--bg); }
.panel {
  border: 1px solid var(--border);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(24,29,38,.98), rgba(15,18,24,.99));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025), 0 18px 50px rgba(0,0,0,.14);
}
.cinematic-hero { position: relative; overflow: hidden; isolation: isolate; background: #0a0c10; }
.dashboard-hero { --hero-x: 0px; --hero-y: 0px; --hero-copy-x: 0px; --hero-copy-y: 0px; min-height: 252px; border-bottom: 1px solid var(--border); perspective: 1000px; }
.hero-image { position: absolute; inset: -2%; z-index: -3; width: 104%; height: 104%; object-fit: cover; object-position: 65% 49%; transform: translate3d(var(--hero-x),var(--hero-y),0) scale(1.035); transition: transform .22s ease-out; will-change: transform; }
.hero-shade {
  position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(90deg,#0a0c10 0%,#0a0c10e8 25%,#0a0c106b 57%,transparent 80%),
    linear-gradient(0deg,rgba(10,12,16,.45),transparent 35%);
}
.hero-light {
  position: absolute; z-index: -1; width: 65%; height: 140%; right: -15%; top: -20%;
  background: radial-gradient(ellipse,rgba(52,211,153,.08),transparent 68%); pointer-events: none;
  animation: dashboard-light 12s ease-in-out infinite alternate;
}
@keyframes dashboard-light { to { transform: translate3d(-3%,2%,0) scale(1.05); opacity: .72; } }
.hero-content { position: relative; padding: 27px 33px; transform: translate3d(var(--hero-copy-x),var(--hero-copy-y),0); transition: transform .25s ease-out; }
.hero-greeting { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; color: #a6abb7; font-size: 10px; letter-spacing: .015em; }
.hero-greeting > span:first-child { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px rgba(52,211,153,.35); }
.hero-content h1 { margin: 0; color: var(--text); font-size: clamp(32px,4vw,37px); line-height: 1.22; font-weight: 550; letter-spacing: -.04em; }
.hero-content h1 span { color: var(--accent); }
.hero-content > p { max-width: 440px; margin: 12px 0 0; color: #a6abb7; font-size: 11px; line-height: 1.7; }
.hero-actions { display: flex; align-items: center; gap: 23px; margin-top: 21px; }
.btn {
  min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 16px; border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--surface-2); color: var(--text); font-size: 10px; font-weight: 750;
  text-decoration: none; cursor: pointer; transition: border-color .18s, transform .18s, background .18s;
}
.btn:hover { border-color: rgba(52,211,153,.42); transform: translateY(-1px); }
.btn-primary { border-color: var(--accent); background: var(--accent); color: #06120d; }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: transparent; color: var(--secondary); }
.hero-secondary { display: inline-flex; gap: 9px; align-items: center; padding: 10px 0; color: #e3e1d8; font-size: 10px; font-weight: 700; text-decoration: none; }
.hero-secondary:hover { color: var(--accent); }
.dashboard-content { width: 100%; max-width: 1640px; margin: 0 auto; padding: 25px 31px 40px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; color: var(--text); font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.metrics-heading h2 { font-size: 16px; }
.segmented { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.segmented button { min-height: 30px; padding: 5px 12px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 9px; cursor: pointer; }
.segmented button.selected { background: var(--accent-soft); color: var(--accent); }
.metrics-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 15px; margin-bottom: 19px; }
.metric-panel { height: 109px; display: flex; flex-direction: column; padding: 16px 19px 11px; overflow: hidden; transition: transform .28s cubic-bezier(.2,.8,.2,1), border-color .28s, box-shadow .28s; }
.metric-panel:hover { border-color: rgba(52,211,153,.28); transform: translateY(-4px); box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 20px 45px rgba(0,0,0,.24); }
.metric-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--secondary); font-size: 10px; }
.metric-label i { color: var(--muted); font-style: normal; }
.metric-value-row { display: flex; align-items: baseline; gap: 11px; margin-top: 8px; }
.metric-value { color: var(--text); font-size: 28px; line-height: 1.1; font-weight: 650; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.metric-value small { margin-left: 2px; color: var(--muted); font-size: 13px; }
.metric-delta { color: var(--accent); font-size: 9px; font-weight: 750; }
.metric-lavender .metric-delta { color: var(--lavender); }
.metric-bottom { min-height: 24px; display: flex; align-items: flex-end; justify-content: space-between; margin-top: 4px; color: var(--muted); font-size: 9px; }
.sparkline { width: 72px; height: 26px; overflow: visible; }
.sparkline path { stroke-dasharray: 180; stroke-dashoffset: 180; animation: line-reveal .9s .2s cubic-bezier(.2,.8,.2,1) forwards; }
.dashboard-primary-grid { display: grid; grid-template-columns: minmax(0,1.97fr) minmax(260px,1fr); gap: 19px; margin-bottom: 19px; }
.rating-panel, .weekly-panel { min-height: 274px; padding: 18px 21px; }
.chart-summary { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.chart-current { display: flex; align-items: baseline; gap: 9px; }
.chart-current > span:first-child { font-size: 25px; font-weight: 650; letter-spacing: -.03em; }
.chart-growth { color: var(--accent); font-size: 9px; }
.chart-best { display: grid; justify-items: end; color: var(--muted); font-size: 8px; }
.chart-best strong { color: var(--secondary); font-size: 11px; }
.interactive-chart { min-height: 158px; margin-top: 8px; }
.interactive-chart svg { width: 100%; height: 158px; display: block; overflow: visible; }
.chart-area { opacity: 0; animation: chart-area-in .65s .18s ease-out forwards; }
.chart-line { stroke-dasharray: var(--chart-length, 1100); stroke-dashoffset: var(--chart-length, 1100); animation: line-reveal 1.05s cubic-bezier(.2,.8,.2,1) forwards; }
.chart-dot { opacity: 0; transform-box: fill-box; transform-origin: center; animation: chart-dot-in .3s cubic-bezier(.2,.8,.2,1) forwards; }
.chart-dot-current { filter: drop-shadow(0 0 6px rgba(52,211,153,.7)); animation: chart-dot-in .3s ease-out forwards, chart-pulse 2.2s .5s ease-in-out infinite; }
.chart-gridline { stroke: rgba(255,255,255,.06); }
.chart-axis { fill: var(--muted); font-size: 8px; }
.chart-footer { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 8px; }
.chart-empty { min-height: 150px; display: grid; place-items: center; color: var(--muted); font-size: 10px; text-align: center; }
.icon-btn { min-width: 32px; min-height: 32px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); color: var(--muted); cursor: pointer; }
.weekly-progress { display: flex; align-items: center; gap: 15px; margin: 4px 0 15px; }
.progress-ring { position: relative; width: 94px; height: 94px; flex: 0 0 auto; }
.progress-ring svg { width: 100%; height: 100%; }
.ring-content { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; }
.ring-content strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.ring-content strong small { color: var(--muted); font-size: 11px; }
.ring-content > span { color: var(--muted); font-size: 8px; }
.weekly-progress h3 { margin: 0 0 7px; font-size: 13px; }
.weekly-progress p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.week-days { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; margin-bottom: 13px; }
.week-day { display: grid; justify-items: center; gap: 5px; color: var(--muted); font-size: 8px; }
.day-marker { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; color: var(--muted); font-size: 9px; }
.week-day.active .day-marker { border-color: rgba(52,211,153,.45); background: var(--accent-soft); color: var(--accent); }
.week-day.today .day-marker { box-shadow: 0 0 0 1px var(--accent); }
.streak-row { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.streak-row > div { display: grid; gap: 3px; }
.streak-row strong { font-size: 10px; }
.streak-row span:last-child { color: var(--muted); font-size: 8px; }
.streak-row a { margin-left: auto; color: var(--accent); text-decoration: none; }
.repertoire-panel, .games-panel { margin-bottom: 19px; padding: 20px 21px; }
.kicker { display: block; margin-bottom: 6px; color: var(--accent); font-size: 8px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.small-muted { color: var(--muted); font-size: 9px; line-height: 1.55; }
.opening-heading-actions { display: flex; align-items: center; gap: 14px; }
.opening-side-seg { flex: 0 0 auto; }
.repertoire-list { display: grid; grid-template-columns: minmax(310px,390px) minmax(0,1fr); gap: 24px; align-items: start; margin-top: 21px; }
.repertoire-cards { display: grid; gap: 11px; align-content: start; }
.repertoire-card { --glow-x:50%; --glow-y:50%; position: relative; isolation: isolate; display: flex; align-items: center; gap: 14px; min-width: 0; width: 100%; min-height: 98px; overflow: hidden; padding: 12px 14px 12px 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); color: inherit; text-align: left; cursor: pointer; transition: transform .25s cubic-bezier(.2,.8,.2,1),border-color .25s,box-shadow .25s,background .25s; }
.repertoire-card::before { content:""; position:absolute; inset:0; z-index:-1; opacity:0; background:radial-gradient(190px circle at var(--glow-x) var(--glow-y),rgba(52,211,153,.22),transparent 68%); transition:opacity .25s ease; }
.repertoire-card:hover::before,.repertoire-card:focus-visible::before { opacity:1; }
.repertoire-card:hover { transform: translateY(-2px); border-color: rgba(52,211,153,.38); box-shadow:0 16px 40px rgba(0,0,0,.2); }
.repertoire-card:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.repertoire-card.selected { border-color: rgba(52,211,153,.58); background: linear-gradient(135deg,rgba(52,211,153,.12),var(--surface-2)); box-shadow:0 0 0 3px rgba(52,211,153,.06),0 18px 44px rgba(0,0,0,.22); }
.opening-mini-board { flex:0 0 74px; width:74px; aspect-ratio:1; overflow:hidden; border-radius:9px; box-shadow:0 0 0 1px var(--border),0 12px 24px rgba(0,0,0,.24); transition:transform .28s cubic-bezier(.2,.8,.2,1); pointer-events:none; }
.repertoire-card:hover .opening-mini-board { transform:scale(1.035); }
.opening-mini-board>span,.opening-mini-board .cg-mount { display:block; width:100%; height:100%; }
.opening-card-copy { min-width:0; flex:1; }
.opening-card-title { display:block; overflow:hidden; color:var(--text); font-size:13px; font-weight:750; text-overflow:ellipsis; white-space:nowrap; }
.opening-card-meta { display:block; margin-top:5px; color:var(--muted); font-size:10px; }
.opening-card-rate { display:flex; align-items:center; gap:9px; margin-top:11px; }
.opening-card-rate>i { height:5px; flex:1; overflow:hidden; border-radius:99px; background:var(--surface-3); }
.opening-card-rate>i>b { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,rgba(52,211,153,.5),var(--accent)); transition:width .65s cubic-bezier(.2,.8,.2,1); }
.opening-card-rate>strong { min-width:63px; color:var(--accent); font-size:9px; text-align:right; }
.opening-card-chevron { color:var(--muted); font-size:22px; opacity:0; transform:translateX(-5px); transition:opacity .2s,transform .2s,color .2s; }
.repertoire-card:hover .opening-card-chevron,.repertoire-card.selected .opening-card-chevron { color:var(--accent); opacity:1; transform:none; }
.opening-stage { min-height:420px; padding:22px; overflow:hidden; border:1px solid var(--border); border-radius:19px; background:radial-gradient(circle at 22% 18%,rgba(52,211,153,.12),transparent 39%),#0d1117; box-shadow:0 26px 70px rgba(0,0,0,.2); }
.opening-detail-layout { display:grid; grid-template-columns:minmax(230px,300px) minmax(190px,1fr); gap:25px; align-items:center; }
.opening-board-column { min-width:0; }
.opening-board-shell { position:relative; isolation:isolate; width:100%; max-width:300px; aspect-ratio:1; overflow:hidden; border-radius:13px; box-shadow:0 1px 0 rgba(255,255,255,.11) inset,0 30px 65px rgba(0,0,0,.42),0 75px 130px -55px rgba(52,211,153,.35); }
.opening-board-shell::after { content:""; position:absolute; inset:-12%; z-index:-1; border-radius:50%; background:rgba(52,211,153,.14); filter:blur(42px); }
#openingBoard,#quickReviewBoard { width:100%; aspect-ratio:1; }
.opening-stage-copy { min-width:0; }
.opening-stage-copy h3 { margin:7px 0 10px; color:var(--text); font:600 24px/1.15 "DM Serif Display",Georgia,serif; }
.opening-stage-copy>p { margin:0; color:var(--muted); font-size:11px; line-height:1.6; }
.opening-progress { height:3px; margin-top:13px; overflow:hidden; border-radius:99px; background:var(--surface-3); }
.opening-progress i { display:block; width:0; height:100%; border-radius:inherit; background:var(--accent); transition:width .25s ease-out; }
.opening-move { display:block; min-height:16px; margin-top:8px; color:var(--accent); font-size:10px; font-variant-numeric:tabular-nums; }
.opening-summary { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:18px; }
.opening-summary>span { padding:11px; border:1px solid var(--border); border-radius:10px; background:var(--surface-2); }
.opening-summary small { display:block; color:var(--muted); font-size:8px; letter-spacing:.09em; text-transform:uppercase; }
.opening-summary strong { display:block; margin-top:4px; color:var(--text); font:600 20px/1 "DM Serif Display",Georgia,serif; }
.opening-result-bars { display:grid; gap:10px; margin-top:18px; }
.opening-result-bars>div { display:grid; grid-template-columns:63px 1fr 34px; align-items:center; gap:9px; color:var(--muted); font-size:9px; }
.opening-result-bars i { height:6px; overflow:hidden; border-radius:99px; background:var(--surface-3); }
.opening-result-bars b { display:block; width:0; height:100%; border-radius:inherit; background:var(--accent); transition:width .65s cubic-bezier(.2,.8,.2,1); }
.opening-result-bars>div:nth-child(2) b { background:#cba55c; }
.opening-result-bars>div:nth-child(3) b { background:var(--bad); }
.opening-result-bars strong { color:var(--secondary); text-align:right; }
.opening-analysis-link { display:inline-flex; margin-top:20px; font-size:11px; }
.empty-card { min-height: 76px; display: grid; place-items: center; grid-column: 1/-1; border: 1px dashed var(--border); border-radius: 11px; color: var(--muted); font-size: 10px; text-align: center; }
.text-link { color: var(--accent); font-size: 9px; font-weight: 750; text-decoration: none; }
.games-table-wrap { overflow-x: auto; }
.games-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.games-table th { padding: 0 14px 13px 0; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 10px; font-weight: 600; text-align: left; }
.games-table td { padding: 15px 14px 15px 0; border-bottom: 1px solid var(--border); color: var(--secondary); font-size: 12px; }
.games-table tr:last-child td { border-bottom: 0; }
.opponent { display:flex; align-items:center; gap:11px; color:inherit; text-decoration:none; }
.game-avatar { width:36px; height:36px; display:grid; place-items:center; border:1px solid var(--border); border-radius:50%; background:var(--surface-3); font-size:10px; font-weight:800; }
.opponent strong { display: block; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.opponent small { color:var(--muted); font-size:9px; }
.result-pill { display:inline-flex; padding:5px 9px; border-radius:99px; font-size:9px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
.result-pill.win { color: var(--accent); background: var(--accent-soft); }
.result-pill.loss { color: var(--bad); background: rgba(243,139,168,.12); }
.result-pill.draw, .result-pill.unknown { color: var(--muted); background: var(--surface-3); }
.game-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; }
.game-open { min-height:34px; padding:0 11px; border:1px solid rgba(52,211,153,.2); border-radius:8px; background:var(--accent-soft); color:var(--accent); font-size:9px; font-weight:700; cursor:pointer; transition:transform .18s,background .18s; }
.game-open:hover { transform:translateY(-1px); background:rgba(52,211,153,.2); }
.game-analysis-link { min-height:34px; display:inline-flex; align-items:center; gap:5px; padding:0 11px; border:1px solid var(--border); border-radius:8px; color:var(--secondary); font-size:9px; font-weight:700; text-decoration:none; transition:border-color .18s,color .18s,transform .18s; }
.game-analysis-link:hover { color:var(--accent); border-color:rgba(52,211,153,.35); transform:translateX(1px); }
.games-table tbody tr { transition: background .18s; }
.games-table tbody tr:hover { background: rgba(255,255,255,.018); }
.quick-review-open { overflow:hidden; }
.quick-review { position:fixed; inset:0; z-index:120; display:flex; justify-content:flex-end; }
.quick-review-backdrop { position:absolute; inset:0; border:0; background:rgba(6,8,12,.68); backdrop-filter:blur(7px); animation:review-backdrop .3s ease both; cursor:default; }
.quick-review-drawer { position:relative; width:min(540px,100%); height:100%; overflow-y:auto; padding:23px 26px 28px; border-left:1px solid var(--border); background:radial-gradient(circle at 30% 5%,rgba(52,211,153,.1),transparent 30%),#0b0f15; box-shadow:-35px 0 80px rgba(0,0,0,.38); animation:review-open .42s cubic-bezier(.22,1,.36,1) both; }
.quick-review-board { width:100%; max-width:440px; margin:5px auto 20px; overflow:hidden; border-radius:13px; box-shadow:0 1px 0 rgba(255,255,255,.1) inset,0 28px 65px rgba(0,0,0,.42); }
.quick-review-copy { min-width:0; display:flex; flex-direction:column; }
.quick-review-head { display:flex; justify-content:space-between; gap:15px; }
.quick-review-head h3 { margin:4px 0 0; font:600 27px/1.15 "DM Serif Display",Georgia,serif; }
.quick-review-copy>p { margin:10px 0 18px; color:var(--muted); font-size:11px; }
.move-strip { display:flex; flex-wrap:wrap; gap:6px; max-height:190px; overflow:auto; padding:11px; border:1px solid var(--border); border-radius:11px; background:rgba(0,0,0,.18); }
.move-chip { padding:7px 9px; border:0; border-radius:7px; background:transparent; color:var(--muted); font-size:11px; cursor:pointer; }
.move-chip:hover, .move-chip.current { background: var(--accent-soft); color: var(--accent); }
.quick-review-actions { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:auto; padding-top:20px; }
.review-stepper { display: flex; align-items: center; gap: 8px; }
.review-stepper button { width:38px; height:38px; border:1px solid var(--border); border-radius:50%; background:var(--surface-2); color:var(--secondary); cursor:pointer; }
.review-stepper button:disabled { opacity: .35; cursor: default; }
.review-stepper span { min-width:62px; color:var(--muted); font-size:10px; text-align:center; }

@keyframes line-reveal { to { stroke-dashoffset: 0; } }
@keyframes chart-area-in { to { opacity: 1; } }
@keyframes chart-dot-in { from { opacity: 0; transform: scale(.25); } to { opacity: 1; transform: scale(1); } }
@keyframes chart-pulse { 50% { transform: scale(1.45); opacity: .75; } }
@keyframes review-backdrop { from { opacity:0; } to { opacity:1; } }
@keyframes review-open { from { opacity:0; transform:translateX(100%); } to { opacity:1; transform:none; } }
@keyframes dashboard-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.dashboard-content.is-ready .metrics-heading, .dashboard-content.is-ready .dashboard-primary-grid, .dashboard-content.is-ready .repertoire-panel, .dashboard-content.is-ready .games-panel { animation: dashboard-rise .55s cubic-bezier(.2,.8,.2,1) both; }
.dashboard-content.is-ready .metric-panel { animation: dashboard-rise .52s cubic-bezier(.2,.8,.2,1) both; }
.dashboard-content.is-ready .metric-panel:nth-child(2) { animation-delay: .07s; }
.dashboard-content.is-ready .metric-panel:nth-child(3) { animation-delay: .14s; }
.dashboard-content.is-ready .metric-panel:nth-child(4) { animation-delay: .21s; }
.dashboard-content.is-ready .dashboard-primary-grid { animation-delay: .2s; }
.dashboard-content.is-ready .repertoire-panel { animation-delay: .27s; }
.dashboard-content.is-ready .games-panel { animation-delay: .34s; }
.dashboard-bottom-grid { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1.25fr); gap: 19px; }
.activity-panel, .insights-panel, .achievement-panel, .coach-plan-panel { padding: 20px; }
.activity-months { display: flex; justify-content: space-between; margin: 21px 0 9px; color: var(--muted); font-size: 8px; }
.activity-heatmap { display: grid; grid-template-rows: repeat(7,1fr); grid-auto-flow: column; gap: 4px; }
.heat-cell, .heat-legend i { aspect-ratio: 1; border: 1px solid rgba(255,255,255,.025); border-radius: 2px; background: var(--surface-3); }
.heat-cell.heat-1, .heat-legend .heat-1 { background: #273b31; }
.heat-cell.heat-2, .heat-legend .heat-2 { background: #365e47; }
.heat-cell.heat-3, .heat-legend .heat-3 { background: #56886a; }
.heat-cell.heat-4, .heat-legend .heat-4 { background: #96c9a8; }
.heatmap-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; color: var(--muted); font-size: 8px; }
.heatmap-footer b { color: var(--text); }
.heat-legend { display: flex; align-items: center; gap: 3px; }
.heat-legend i { width: 8px; height: 8px; }
.insights-panel #recommendationLead { margin: 15px 0; color: var(--secondary); font-size: 11px; line-height: 1.7; }
.signal-status, .comparison-badge { padding: 5px 8px; border: 1px solid rgba(52,211,153,.25); border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 8px; font-weight: 800; white-space: nowrap; }
.insight-evidence { display: grid; grid-template-columns: repeat(3,1fr); margin: 16px 0; border-block: 1px solid var(--border); }
.insight-evidence span { padding: 12px 8px; color: var(--muted); font-size: 8px; }
.insight-evidence b { display: block; margin-bottom: 4px; color: var(--text); font-size: 15px; }
.insight-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.achievement-panel:empty { display: none !important; }
.coach-plan-panel { margin-top: 19px; }
.personal-recall { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 20px; padding: 13px; border: 1px solid rgba(52,211,153,.25); border-radius: 10px; background: var(--accent-soft); }
.personal-recall > div { display: grid; gap: 4px; }
.personal-recall span, .personal-recall small { color: var(--muted); font-size: 8px; }
.learning-path { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; margin: 20px 0; padding: 0; list-style: none; }
.learning-path li { min-height: 90px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--muted); font-size: 9px; }
.learning-path li.done, .learning-path li.current, .learning-path li.scheduled { color: var(--text); }
.learning-path strong, .learning-path small { display: block; margin-bottom: 5px; }
.plan-actions { display: grid; gap: 5px; margin-top: 8px; }
.plan-actions a, .plan-actions button { padding: 0; border: 0; background: none; color: var(--accent); font-size: 8px; text-align: left; cursor: pointer; }
.dashboard-state { min-height: 100vh; display: grid; place-content: center; justify-items: center; padding: 40px; text-align: center; }
.dashboard-state > span { color: var(--accent); font-size: 42px; }
.dashboard-state h1 { max-width: 650px; margin: 8px 0; font-size: clamp(28px,5vw,48px); }
.dashboard-state p:not(.eyebrow) { max-width: 540px; margin: 8px 0 24px; color: var(--muted); }
.eyebrow { color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.dashboard-loading { min-height: 100vh; padding: 24px 31px; }
.dashboard-skeleton { border: 1px solid var(--border); border-radius: 15px; background: linear-gradient(100deg,var(--surface) 20%,var(--surface-2) 38%,var(--surface) 56%); background-size: 220% 100%; animation: skeleton 1.5s infinite; }
.dashboard-skeleton-hero { height: 252px; margin-bottom: 19px; }
.dashboard-skeleton-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 15px; }
.dashboard-skeleton-grid i { height: 109px; border-radius: 15px; background: var(--surface); }
@keyframes skeleton { to { background-position-x: -220%; } }
.modal-backdrop { position: fixed; z-index: 400; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.72); backdrop-filter: blur(8px); }
.dashboard-modal { width: min(440px,100%); padding: 25px; border: 1px solid var(--border-strong); border-radius: 16px; background: var(--surface); box-shadow: 0 30px 90px rgba(0,0,0,.5); }
.dashboard-modal h2 { margin: 0; font-size: 20px; }
.dashboard-modal p { color: var(--muted); font-size: 11px; line-height: 1.6; }
.goal-options { margin: 12px 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.dashboard-toast { position: fixed; z-index: 500; inset: auto 24px 24px auto; max-width: 350px; padding: 13px 16px; border: 1px solid var(--border-strong); border-radius: 11px; background: var(--surface-2); color: var(--text); box-shadow: 0 18px 60px rgba(0,0,0,.45); font-size: 10px; }
:is(button,a):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (min-width: 1400px) {
  .dashboard-hero { min-height: 300px; }
  .hero-content { padding: 38px 45px; }
  .hero-content h1 { font-size: 44px; }
  .dashboard-content { padding-inline: 40px; }
  .metric-panel { height: 128px; padding: 20px 23px; }
}
@media (max-width: 1050px) {
  .metrics-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-primary-grid { grid-template-columns: minmax(0,1.7fr) minmax(230px,1fr); gap: 14px; }
  .repertoire-list { grid-template-columns: 1fr; }
  .repertoire-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-bottom-grid { gap: 14px; }
}
@media (max-width: 760px) {
  .dashboard-hero { min-height: 315px; }
  .hero-content { padding: 31px 21px 30px; }
  .hero-shade { background: linear-gradient(90deg,#0a0c10f2 0%,#0a0c10b8 40%,#0a0c1036 100%),linear-gradient(0deg,#0a0c109a,transparent 48%); }
  .hero-image { object-position: 71% 50%; }
  .hero-content h1 { font-size: 34px; }
  .hero-content > p { max-width: 245px; }
  .dashboard-content { padding: 23px 17px 36px; }
  .dashboard-primary-grid, .dashboard-bottom-grid { grid-template-columns: 1fr; gap: 15px; }
  .rating-panel, .weekly-panel { min-height: 0; }
  .opening-heading-actions { align-items:flex-end; flex-direction:column; gap:8px; }
  .opening-detail-layout { grid-template-columns:minmax(210px,280px) minmax(170px,1fr); }
  .quick-review-drawer { width:min(520px,100%); }
  .games-table th:nth-child(3), .games-table td:nth-child(3) { display: none; }
  .learning-path { grid-template-columns: 1fr; }
}
@media (max-width: 470px) {
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 5px; }
  .metrics-heading { align-items: flex-start; flex-direction: column; }
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric-panel { height: 112px; padding: 14px; }
  .metric-value { font-size: 25px; }
  .repertoire-panel>.section-heading { align-items:flex-start; flex-direction:column; }
  .opening-heading-actions { width:100%; align-items:flex-start; }
  .opening-detail-layout { grid-template-columns:1fr; }
  .opening-stage { padding:16px; }
  .opening-board-shell, .quick-review-board { margin-inline: auto; }
  .repertoire-cards { grid-template-columns: 1fr; }
  .quick-review-drawer { padding:19px 17px 23px; }
  .quick-review-actions { align-items: stretch; flex-direction: column; }
  .quick-review-actions .btn { width: 100%; }
  .games-table th:nth-child(5), .games-table td:nth-child(5) { display: none; }
  .heatmap-footer { align-items: flex-start; flex-direction: column; }
  .dashboard-modal { padding: 20px; }
  .goal-options { display: grid; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
