/* ============================================================
   ICECOACH — Arena dark theme
   Spacing scale: 4 · 8 · 12 · 16 · 24 · 32 · 48 · 64
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-deep: #0e1018;
  --bg-base: #1a1a2e;
  --bg-card: #16213e;
  --bg-card-hover: #1c2a4d;
  --bg-panel: #111827;
  --bg-sidebar: #13182a;
  --bg-raise: rgba(255,255,255,0.04);

  --blue-line: #5b9be0;
  --red-line: #ef4f5c;
  --ice-blue: #4cc9f0;
  --ice-blue-dim: #266c87;
  --green: #48c78e;
  --gold: #f4a261;
  --white-ice: #e8f4f8;

  --text-primary: #e8f4f8;
  --text-secondary: #9fb0c2;
  --text-muted: #7487a0;

  --border: rgba(76,201,240,0.15);
  --border-hover: rgba(76,201,240,0.4);
  --border-active: #4cc9f0;

  --font-display: 'Bebas Neue', 'Oswald', sans-serif;
  --font-heading: 'Oswald', sans-serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 4px 24px rgba(0,0,0,0.5);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 20px rgba(76,201,240,0.18);

  --nav-height: 64px;
  --sidebar-width: 272px;
  --page-max: 1560px;
  --gutter: 24px;
  --tap: 40px;
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.no-scroll { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.4; }
a { color: var(--ice-blue); }
:focus-visible { outline: 2px solid var(--ice-blue); outline-offset: 2px; }
.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; }
[hidden] { display: none !important; }

.ic { width: 18px; height: 18px; flex: none; vertical-align: middle; }

.bg-noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}
/* No z-index here: a stacking context on .page would trap the fixed filter drawer under the app bar and footer */
.page, .site-footer { position: relative; }

h1, h2, h3 { font-family: var(--font-heading); letter-spacing: 0.03em; line-height: 1.2; }
.accent { color: var(--ice-blue); }
.hero-kicker { font-family: var(--font-heading); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ice-blue); margin-bottom: 8px; }

/* ── BUTTONS ── */
.btn-primary, .btn-secondary, .btn-danger, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading); font-size: 14px; font-weight: 500; letter-spacing: 0.05em;
  text-decoration: none; white-space: nowrap;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), color var(--transition);
}
.btn-primary { background: var(--ice-blue); border: 1px solid var(--ice-blue); color: #08131c; font-weight: 600; }
.btn-primary:hover:not(:disabled) { background: #6fd6f6; box-shadow: 0 0 16px rgba(76,201,240,0.35); }
.btn-secondary { background: var(--bg-raise); border: 1px solid var(--border-hover); color: var(--text-primary); }
.btn-secondary:hover:not(:disabled) { background: rgba(76,201,240,0.1); border-color: var(--ice-blue); }
.btn-danger { background: rgba(239,79,92,0.12); border: 1px solid rgba(239,79,92,0.45); color: #ff8791; }
.btn-danger:hover:not(:disabled) { background: rgba(239,79,92,0.22); border-color: var(--red-line); }
.btn-ghost { background: none; border: 1px dashed var(--border-hover); color: var(--ice-blue); }
.btn-ghost:hover { background: rgba(76,201,240,0.08); border-style: solid; }
.btn-block { width: 100%; }
.btn-link { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); color: var(--ice-blue); font-family: var(--font-heading); font-size: 14px; letter-spacing: 0.04em; text-decoration: none; padding: 0 4px; }
.btn-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--tap); height: var(--tap); flex: none;
  background: var(--bg-raise); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.icon-btn:hover:not(:disabled) { color: var(--text-primary); border-color: var(--border-hover); background: rgba(76,201,240,0.08); }

/* Segmented control */
.seg { display: inline-flex; background: rgba(0,0,0,0.25); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 2px; gap: 2px; }
.seg-btn {
  flex: 1; min-height: 32px; padding: 4px 10px;
  background: none; border: 0; border-radius: 4px;
  color: var(--text-secondary); font-family: var(--font-heading); font-size: 12px; letter-spacing: 0.04em; white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}
.seg-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.seg-btn.on { background: rgba(76,201,240,0.18); color: var(--ice-blue); box-shadow: inset 0 0 0 1px rgba(76,201,240,0.45); }

/* Stepper */
.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--border); border-radius: var(--radius-sm); background: rgba(255,255,255,0.03); overflow: hidden; }
.step-btn { width: 34px; min-height: 34px; display: grid; place-items: center; background: none; border: 0; color: var(--text-secondary); transition: background var(--transition), color var(--transition); }
.step-btn:hover { background: rgba(76,201,240,0.1); color: var(--ice-blue); }
.step-btn .ic { width: 16px; height: 16px; }
.step-field { display: flex; align-items: center; gap: 2px; padding: 0 6px; border-left: 1px solid var(--border); border-right: 1px solid var(--border); font-size: 12px; color: var(--text-muted); }
.step-input { width: 30px; background: none; border: 0; text-align: center; font-weight: 700; font-size: 14px; color: var(--text-primary); -moz-appearance: textfield; outline: none; }
.step-input::-webkit-outer-spin-button, .step-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper:focus-within { border-color: var(--ice-blue); }
.stepper-lg .step-btn { width: 40px; }
.stepper-lg .step-input { width: 100%; min-width: 48px; border-left: 1px solid var(--border); border-right: 1px solid var(--border); border-radius: 0; padding: 0; }

/* ── NAVIGATION ── */
.main-nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(14,16,24,0.94);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.nav-inner { max-width: var(--page-max); margin: 0 auto; height: var(--nav-height); padding: 0 var(--gutter); display: flex; align-items: center; gap: 24px; }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; min-height: 44px; }
.logo-mark { width: 30px; height: 30px; }
.logo-text { font-family: var(--font-display); font-size: 24px; letter-spacing: 0.08em; color: var(--text-primary); line-height: 1; }
.logo-accent { color: var(--ice-blue); }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link {
  position: relative; display: flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 8px 16px;
  text-decoration: none; color: var(--text-secondary);
  font-family: var(--font-heading); font-size: 14px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav-link::after { content: ''; position: absolute; bottom: 4px; left: 16px; right: 16px; height: 2px; background: var(--ice-blue); transform: scaleX(0); transition: transform var(--transition); border-radius: 2px; }
.nav-link:hover { color: var(--text-primary); background: rgba(76,201,240,0.07); }
.nav-link.active { color: var(--ice-blue); }
.nav-link.active::after { transform: scaleX(1); }
.plan-badge { background: var(--red-line); color: #fff; font-family: var(--font-body); font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 10px; min-width: 20px; text-align: center; line-height: 18px; letter-spacing: 0; }
.nav-plan-chip { display: none; position: relative; align-items: center; justify-content: center; width: 44px; height: 44px; margin-left: auto; border-radius: var(--radius-sm); color: var(--text-secondary); }
.nav-plan-chip.active { color: var(--ice-blue); }
.nav-plan-chip .ic { width: 22px; height: 22px; }
.nav-plan-chip .plan-badge { position: absolute; top: 2px; right: 0; }
.mobile-menu-btn { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; background: none; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); }
.mobile-menu-btn .ic { width: 22px; height: 22px; }
.mobile-nav { display: none; flex-direction: column; background: var(--bg-deep); padding: 8px var(--gutter) 16px; border-top: 1px solid var(--border); }
.mobile-nav.open { display: flex; }
.mobile-nav-link { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 8px; text-decoration: none; color: var(--text-secondary); font-family: var(--font-heading); font-size: 16px; letter-spacing: 0.06em; border-bottom: 1px solid var(--border); }
.mobile-nav-link:last-child { border-bottom: 0; }
.mobile-nav-link.active { color: var(--ice-blue); }
.mobile-nav-link:hover { color: var(--text-primary); }

/* ── PAGES ── */
.page { display: none; }
.page.active { display: block; }

/* ── HERO ── */
.hero { position: relative; background: linear-gradient(135deg, #0e1018 0%, #1a1a2e 40%, #0d1b33 100%); padding: 56px var(--gutter) 48px; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 70% 60% at 30% 50%, rgba(76,201,240,0.07) 0%, transparent 70%); }
.hero-rink-bg { position: absolute; right: -20px; top: 0; bottom: 0; width: 55%; opacity: 0.55; pointer-events: none; }
.hero-rink-svg { width: 100%; height: 100%; }
.hero-path { animation: dashMove 3s linear infinite; }
.hero-content { position: relative; max-width: var(--page-max); margin: 0 auto; z-index: 1; }
.hero-title { font-family: var(--font-display); font-size: clamp(44px, 7vw, 88px); line-height: 0.95; letter-spacing: 0.03em; margin-bottom: 16px; text-shadow: 0 2px 20px rgba(0,0,0,0.5); font-weight: 400; }
.hero-subtitle { font-size: clamp(15px, 1.6vw, 18px); color: var(--text-secondary); max-width: 560px; margin-bottom: 24px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.hero-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.hero-stat { display: flex; flex-direction: column-reverse; }
.stat-num { font-family: var(--font-display); font-size: 42px; line-height: 1; color: var(--ice-blue); }
.stat-label { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-top: 4px; }

/* ── DRILLS LAYOUT ── */
.drills-layout { display: flex; max-width: var(--page-max); margin: 0 auto; padding: var(--gutter); gap: var(--gutter); align-items: flex-start; }

.filters-sidebar {
  width: var(--sidebar-width); flex-shrink: 0;
  background: var(--bg-sidebar); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px; position: sticky; top: calc(var(--nav-height) + 16px);
  overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.filters-header { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.filters-title { font-family: var(--font-display); font-size: 22px; letter-spacing: 0.1em; font-weight: 400; margin-right: auto; }
.clear-filters-btn { background: none; border: 1px solid var(--border); color: var(--text-secondary); font-size: 12px; padding: 4px 12px; min-height: 30px; border-radius: 20px; transition: all var(--transition); }
.clear-filters-btn:hover { border-color: var(--red-line); color: #ff8791; }
.filters-close { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; background: var(--bg-raise); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); }
.filters-footer { display: none; }

.filter-group { margin-bottom: 20px; }
.filter-group:last-of-type { margin-bottom: 4px; }
.filter-group-label { display: block; font-family: var(--font-heading); font-size: 11px; letter-spacing: 0.14em; color: var(--text-muted); margin-bottom: 8px; }
.filter-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 13px; font-weight: 600;
  min-height: 32px; padding: 4px 10px 4px 12px; border-radius: 20px;
  transition: all var(--transition); white-space: nowrap;
}
.filter-pill:hover { border-color: var(--border-hover); color: var(--text-primary); background: rgba(76,201,240,0.07); }
.filter-pill.active { background: rgba(76,201,240,0.16); border-color: var(--border-active); color: var(--ice-blue); box-shadow: 0 0 8px rgba(76,201,240,0.15); }
.filter-pill.zero:not(.active) { opacity: 0.45; }
.age-range { font-size: 11px; opacity: 0.7; font-weight: 400; }
.pill-count { font-size: 11px; font-weight: 700; min-width: 18px; padding: 0 5px; border-radius: 9px; background: rgba(255,255,255,0.07); color: var(--text-muted); text-align: center; line-height: 18px; }
.filter-pill.active .pill-count { background: rgba(76,201,240,0.2); color: var(--ice-blue); }

.search-input-wrap { position: relative; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; width: 17px; height: 17px; }
.search-input {
  width: 100%; min-height: 40px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--text-primary);
  font-size: 14px; padding: 9px 40px 9px 38px; border-radius: var(--radius-sm); outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { border-color: var(--ice-blue); box-shadow: 0 0 0 3px rgba(76,201,240,0.12); }
.search-clear { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; background: none; border: 0; color: var(--text-muted); border-radius: 50%; }
.search-clear:hover { color: var(--text-primary); }

.filters-scrim { display: none; }

/* ── DRILLS MAIN ── */
.drills-main { flex: 1; min-width: 0; }
.drills-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar-left { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.library-title { font-family: var(--font-display); font-size: 28px; font-weight: 400; letter-spacing: 0.06em; }
.results-count { font-size: 13px; color: var(--text-muted); }
.toolbar-right { display: flex; align-items: center; gap: 8px; }
.sort-select {
  min-height: 40px; padding: 8px 36px 8px 12px;
  background: var(--bg-sidebar) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%239fb0c2' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 10px center / 16px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 14px;
  -webkit-appearance: none; appearance: none; cursor: pointer;
}
.sort-select:hover { border-color: var(--border-hover); }
.sort-select option { background: var(--bg-panel); }
.filters-toggle-btn { display: none; align-items: center; gap: 8px; min-height: 44px; background: rgba(76,201,240,0.1); border: 1px solid var(--border-hover); color: var(--ice-blue); font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: var(--radius-sm); }
.filter-count { background: var(--ice-blue); color: #08131c; font-size: 11px; font-weight: 700; min-width: 20px; line-height: 20px; border-radius: 10px; text-align: center; }

.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; align-items: center; }
.active-filter-tag { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; background: rgba(76,201,240,0.12); border: 1px solid rgba(76,201,240,0.35); color: var(--ice-blue); font-size: 13px; font-weight: 600; padding: 4px 10px 4px 12px; border-radius: 20px; transition: all var(--transition); }
.active-filter-tag .ic { width: 14px; height: 14px; }
.active-filter-tag:hover { background: rgba(239,79,92,0.14); border-color: var(--red-line); color: #ff8791; }
.clear-inline { background: none; border: 0; color: var(--text-secondary); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; min-height: 32px; padding: 0 6px; }
.clear-inline:hover { color: var(--text-primary); }

/* ── DRILL CARDS ── */
.drills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.drill-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), background var(--transition);
  animation: cardFadeIn 0.3s ease both;
}
@keyframes cardFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.drill-card:hover, .drill-card:focus-within { transform: translateY(-3px); border-color: var(--border-hover); box-shadow: var(--shadow-glow), var(--shadow-card); background: var(--bg-card-hover); }
.drill-card-rink { position: relative; width: 100%; aspect-ratio: 280 / 158; background: #1b2a3b; border-bottom: 1px solid var(--border); overflow: hidden; }
.drill-card-rink svg { width: 100%; height: 100%; display: block; }
.ice-chip { position: absolute; left: 10px; top: 10px; font-family: var(--font-heading); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-secondary); background: rgba(14,16,24,0.75); border: 1px solid var(--border); padding: 2px 8px; border-radius: 4px; }
.drill-card-body { display: flex; flex-direction: column; flex: 1; padding: 16px; }
.drill-card-name { font-family: var(--font-heading); font-size: 17px; font-weight: 600; margin-bottom: 6px; letter-spacing: 0.02em; }
.drill-open { background: none; border: 0; padding: 0; text-align: left; color: var(--text-primary); font: inherit; letter-spacing: inherit; }
.drill-open::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: var(--radius-lg); }
.drill-open:focus-visible { outline: none; }
.drill-open:focus-visible::after { outline: 2px solid var(--ice-blue); outline-offset: -2px; }
.drill-card-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.drill-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; padding: 3px 8px; border-radius: 4px; text-transform: uppercase; border: 1px solid transparent; line-height: 1.4; }
.tag-age { background: rgba(91,155,224,0.14); color: #8dbcf0; border-color: rgba(91,155,224,0.3); }
.tag-skill-Beginner { background: rgba(72,199,142,0.13); color: var(--green); border-color: rgba(72,199,142,0.3); }
.tag-skill-Intermediate { background: rgba(244,162,97,0.13); color: var(--gold); border-color: rgba(244,162,97,0.3); }
.tag-skill-Advanced { background: rgba(239,79,92,0.13); color: #ff8791; border-color: rgba(239,79,92,0.3); }
.tag-type { background: rgba(76,201,240,0.1); color: var(--ice-blue); border-color: rgba(76,201,240,0.25); }
.drill-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.drill-facts { display: flex; gap: 12px; font-size: 13px; color: var(--text-muted); flex-wrap: wrap; }
.drill-facts > span { display: inline-flex; align-items: center; gap: 4px; }
.drill-facts .ic { width: 15px; height: 15px; }
.btn-add-plan {
  position: relative; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; min-width: 88px; padding: 6px 14px;
  background: rgba(76,201,240,0.12); border: 1px solid rgba(76,201,240,0.4); border-radius: var(--radius-sm);
  color: var(--ice-blue); font-family: var(--font-heading); font-size: 13px; font-weight: 500; letter-spacing: 0.05em; white-space: nowrap;
  transition: all var(--transition);
}
.btn-add-plan .ic { width: 15px; height: 15px; }
.btn-add-plan:hover { background: rgba(76,201,240,0.22); border-color: var(--ice-blue); }
.btn-add-plan.added { background: rgba(72,199,142,0.14); border-color: rgba(72,199,142,0.45); color: var(--green); }
.btn-add-plan .lbl-in, .btn-add-plan .lbl-rm { display: inline-flex; align-items: center; gap: 6px; }
.btn-add-plan .lbl-rm { display: none; }
@media (hover: hover) {
  .btn-add-plan.added:hover { background: rgba(239,79,92,0.14); border-color: var(--red-line); color: #ff8791; }
  .btn-add-plan.added:hover .lbl-in { display: none; }
  .btn-add-plan.added:hover .lbl-rm { display: inline-flex; }
}
.btn-add-plan.move { color: var(--gold); border-color: rgba(244,162,97,0.45); background: rgba(244,162,97,0.1); }

.no-results, .plan-empty-state { text-align: center; padding: 56px 20px; color: var(--text-secondary); }
.empty-ic { width: 48px; height: 48px; color: var(--ice-blue); opacity: 0.8; margin-bottom: 12px; }
.no-results h3, .plan-empty-state h2 { font-size: 22px; color: var(--text-primary); margin-bottom: 8px; }
.no-results p, .plan-empty-state > p { margin: 0 auto 20px; max-width: 460px; }

/* ── OVERLAYS / SHEETS ── */
.overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(4,7,12,0.78); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; transition: opacity 0.2s ease;
}
.overlay.open { opacity: 1; }
.sheet {
  position: relative; display: flex; flex-direction: column;
  width: 100%; max-height: calc(100vh - 48px);
  background: var(--bg-card); border: 1px solid var(--border-hover); border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.7), var(--shadow-glow);
  transform: translateY(16px); transition: transform 0.22s ease; outline: none;
}
.overlay.open .sheet { transform: none; }
.sheet-drill { max-width: 880px; }
.sheet-picker { max-width: 640px; height: min(760px, calc(100vh - 48px)); }
.sheet-templates { max-width: 1120px; }
.sheet-print { max-width: 980px; height: calc(100vh - 48px); background: #2a3242; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); flex: none; }
.sheet-title { font-family: var(--font-heading); font-size: 18px; font-weight: 500; }
.sheet-nav { display: flex; align-items: center; gap: 8px; }
.sheet-counter { font-size: 13px; color: var(--text-muted); min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; }
.sheet-body { padding: 20px 24px 24px; overflow-y: auto; flex: 1; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.sheet-lede { color: var(--text-secondary); margin-bottom: 20px; max-width: 640px; }

/* Drill view */
.drill-rink-frame { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: #1b2a3b; }
.drill-rink { aspect-ratio: 712 / 312; width: 100%; }
.drill-rink svg { display: block; width: 100%; height: 100%; }
.rink-legend-pop { position: absolute; inset: 0; background: rgba(9,13,22,0.94); padding: 16px 20px; overflow-y: auto; }
.rink-legend-pop h3 { font-family: var(--font-heading); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ice-blue); margin-bottom: 10px; }
.rink-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 12px 0 20px; }
.ctrl-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; background: var(--bg-raise); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 13px; font-weight: 600; transition: all var(--transition); }
.ctrl-btn:hover { border-color: var(--border-hover); background: rgba(76,201,240,0.08); }
.ctrl-btn[aria-pressed="true"], .ctrl-btn[aria-expanded="true"] { border-color: var(--ice-blue); color: var(--ice-blue); }
.ctrl-btn .ic { width: 16px; height: 16px; }
.seg-speed .seg-btn { min-width: 44px; }
.rink-state { margin-left: auto; font-size: 12px; color: var(--text-muted); }
.modal-drill-name { font-family: var(--font-display); font-size: clamp(28px, 4vw, 36px); font-weight: 400; letter-spacing: 0.04em; margin-bottom: 10px; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.modal-meta-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.modal-meta-item { background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; }
.modal-meta-item dt { display: flex; align-items: center; gap: 6px; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; font-family: var(--font-heading); }
.modal-meta-item dt .ic { width: 14px; height: 14px; color: var(--ice-blue); }
.modal-meta-item dd { font-size: 15px; font-weight: 600; line-height: 1.4; }
.modal-columns { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; }
.modal-section { margin-bottom: 20px; }
.modal-section-title { font-family: var(--font-heading); font-size: 13px; letter-spacing: 0.1em; color: var(--ice-blue); text-transform: uppercase; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid rgba(76,201,240,0.15); font-weight: 500; }
.modal-section-body { font-size: 15px; color: var(--text-secondary); line-height: 1.7; }
.modal-tips-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.modal-tips-list li { display: flex; gap: 10px; font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.modal-tips-list li::before { content: ''; flex: none; width: 6px; height: 6px; margin-top: 8px; border-radius: 50%; background: var(--ice-blue); box-shadow: 0 0 6px var(--ice-blue); }
.plan-box { margin-top: 4px; padding: 16px; border: 1px solid var(--border-hover); border-radius: var(--radius); background: linear-gradient(135deg, rgba(76,201,240,0.07), rgba(76,201,240,0.02)); }
.plan-box-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.plan-box-title .ok { color: var(--green); }
.plan-box-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.seg-wide { display: flex; width: 100%; max-width: 520px; margin-bottom: 12px; }
.seg-wide .seg-btn { min-height: 38px; font-size: 13px; }
.plan-box-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

/* Picker */
.picker-tools { padding: 16px 16px 8px; border-bottom: 1px solid var(--border); flex: none; }
.picker-chips { display: flex; gap: 6px; overflow-x: auto; padding: 12px 0 6px; scrollbar-width: none; }
.picker-chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 32px; padding: 4px 12px; border-radius: 16px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--text-secondary); font-size: 13px; font-weight: 600; white-space: nowrap; transition: all var(--transition); }
.chip:hover { border-color: var(--border-hover); color: var(--text-primary); }
.chip.on { background: rgba(76,201,240,0.16); border-color: var(--ice-blue); color: var(--ice-blue); }
.picker-list { list-style: none; overflow-y: auto; flex: 1; padding: 8px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.picker-row { display: flex; align-items: center; gap: 12px; padding: 4px 8px 4px 4px; border-radius: var(--radius-sm); }
.picker-row:hover { background: rgba(255,255,255,0.03); }
.picker-info { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; text-align: left; background: none; border: 0; padding: 8px; border-radius: var(--radius-sm); min-height: 44px; }
.picker-info:hover .picker-name { color: var(--ice-blue); }
.picker-name { font-family: var(--font-heading); font-size: 15px; font-weight: 500; color: var(--text-primary); }
.picker-meta { font-size: 12px; color: var(--text-muted); }
.picker-in { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--green); white-space: nowrap; padding: 0 8px; }
.picker-in .ic { width: 15px; height: 15px; }
.picker-empty { padding: 32px 16px; text-align: center; color: var(--text-muted); }

/* Templates */
.template-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; text-align: left; margin-bottom: 24px; }
@media (max-width: 1099px) { .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .template-grid { grid-template-columns: minmax(0, 1fr); } }
.template-card { display: flex; flex-direction: column; background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; transition: border-color var(--transition), transform var(--transition); }
.template-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.template-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.template-top h3 { font-size: 17px; font-weight: 600; }
.template-min { font-family: var(--font-display); font-size: 22px; color: var(--ice-blue); white-space: nowrap; }
.template-group { font-size: 12px; color: var(--text-muted); letter-spacing: 0.04em; margin-bottom: 8px; }
.template-blurb { font-size: 14px; color: var(--text-secondary); margin-bottom: 12px; }
.template-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; margin-bottom: 12px; }
.tb-seg.warmup, .tc-seg.warmup, .sw.warmup { background: var(--green); }
.tb-seg.main, .tc-seg.main, .sw.main { background: var(--ice-blue); }
.tb-seg.cooldown, .tc-seg.cooldown, .sw.cooldown { background: var(--gold); }
.template-drills { list-style: none; font-size: 12px; color: var(--text-muted); margin-bottom: 16px; display: grid; gap: 4px; flex: 1; }
.template-drills b { color: var(--text-secondary); font-weight: 700; margin-right: 4px; }

/* Print preview */
.print-actions { display: flex; align-items: center; gap: 8px; }
.print-stage { flex: 1; overflow: auto; padding: 24px; background: #2a3242; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.paper { background: #fff; color: #1d2430; max-width: 820px; margin: 0 auto; padding: 40px 44px; border-radius: 4px; box-shadow: 0 10px 40px rgba(0,0,0,0.45); font-family: var(--font-body); }

/* Confirm */
.confirm-dialog { background: var(--bg-card); border: 1px solid var(--border-hover); border-radius: var(--radius-lg); padding: 24px; max-width: 420px; width: 100%; box-shadow: 0 20px 50px rgba(0,0,0,0.7); outline: none; }
.confirm-dialog h3 { font-family: var(--font-heading); font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.confirm-dialog p { color: var(--text-secondary); font-size: 14px; margin-bottom: 20px; line-height: 1.6; }
.confirm-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }

/* ── PRACTICE PLAN PAGE ── */
.plan-page { max-width: var(--page-max); margin: 0 auto; padding: 40px var(--gutter) 64px; }
.plan-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 24px; }
.plan-title { font-family: var(--font-display); font-size: clamp(36px, 5vw, 56px); font-weight: 400; letter-spacing: 0.04em; line-height: 1; margin-bottom: 8px; }
.plan-subtitle { color: var(--text-secondary); }
.plan-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.plan-meta-bar { display: grid; grid-template-columns: 2fr 1.2fr 1fr 1.2fr; gap: 16px; margin-bottom: 24px; padding: 20px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.plan-meta-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.plan-meta-field label { font-size: 11px; font-family: var(--font-heading); letter-spacing: 0.12em; color: var(--text-muted); text-transform: uppercase; }
.plan-input { width: 100%; min-height: 42px; background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--text-primary); font-size: 15px; padding: 8px 12px; border-radius: var(--radius-sm); outline: none; transition: border-color var(--transition), box-shadow var(--transition); color-scheme: dark; }
.plan-input:focus { border-color: var(--ice-blue); box-shadow: 0 0 0 3px rgba(76,201,240,0.12); }
.stepper-lg { width: 100%; min-height: 42px; }
.stepper-lg .step-input { text-align: center; }

.plan-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--gutter); align-items: start; }
.plan-sections { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.plan-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.section-header { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: rgba(255,255,255,0.02); border-bottom: 1px solid var(--border); }
.section-badge { font-family: var(--font-display); font-size: 17px; font-weight: 400; letter-spacing: 0.12em; padding: 3px 14px; border-radius: 20px; border: 1px solid transparent; }
.section-badge.warmup { background: rgba(72,199,142,0.12); color: var(--green); border-color: rgba(72,199,142,0.3); }
.section-badge.main { background: rgba(76,201,240,0.12); color: var(--ice-blue); border-color: rgba(76,201,240,0.3); }
.section-badge.cooldown { background: rgba(244,162,97,0.12); color: var(--gold); border-color: rgba(244,162,97,0.3); }
.section-time { font-size: 13px; color: var(--text-muted); margin-right: auto; }
.section-add { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; background: none; border: 1px solid var(--border-hover); border-radius: var(--radius-sm); color: var(--ice-blue); font-family: var(--font-heading); font-size: 13px; letter-spacing: 0.04em; transition: all var(--transition); }
.section-add:hover { background: rgba(76,201,240,0.1); border-color: var(--ice-blue); }
.section-add .ic { width: 16px; height: 16px; }
.section-drills { padding: 12px; min-height: 84px; display: flex; flex-direction: column; gap: 12px; transition: background var(--transition); }
.section-drills.drag-over-zone { background: rgba(76,201,240,0.05); box-shadow: inset 0 0 0 2px rgba(76,201,240,0.35); }
.section-empty { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 12px; color: var(--text-muted); font-size: 14px; padding: 16px 8px; text-align: center; }
.section-empty-hint { font-size: 12px; }
.drop-marker { height: 3px; border-radius: 2px; background: var(--ice-blue); box-shadow: 0 0 10px var(--ice-blue); margin: -6px 0; }

.plan-item {
  position: relative; display: grid; grid-template-columns: 20px 132px minmax(0, 1fr) auto; gap: 14px; align-items: start;
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px 12px 8px;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.plan-item:hover { border-color: var(--border-hover); }
.plan-item.dragging { opacity: 0.45; }
.plan-item.flash { animation: flash 1.2s ease; }
@keyframes flash { 0%, 100% { box-shadow: none; } 25% { box-shadow: 0 0 0 2px var(--ice-blue), 0 0 24px rgba(76,201,240,0.35); } }
.pi-grip { align-self: center; display: grid; place-items: center; height: 100%; min-height: 60px; color: var(--text-muted); cursor: grab; border-radius: 4px; }
.pi-grip:hover { color: var(--ice-blue); background: rgba(76,201,240,0.06); }
.pi-thumb { display: block; width: 132px; aspect-ratio: 280 / 158; padding: 0; background: #1b2a3b; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; transition: border-color var(--transition); }
.pi-thumb:hover { border-color: var(--ice-blue); }
.pi-thumb svg { display: block; width: 100%; height: 100%; }
.pi-main { min-width: 0; }
.pi-meta { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--text-muted); margin-bottom: 2px; font-variant-numeric: tabular-nums; }
.pi-time { color: var(--ice-blue); font-weight: 700; letter-spacing: 0.02em; }
.pi-num::before { content: '·'; margin-right: 10px; }
.pi-name-wrap { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.pi-name { background: none; border: 0; padding: 0; text-align: left; color: var(--text-primary); font: inherit; letter-spacing: 0.02em; }
.pi-name:hover { color: var(--ice-blue); text-decoration: underline; text-underline-offset: 3px; }
.pi-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.pi-tags .tag { font-size: 9.5px; padding: 2px 6px; }
.pi-notes { width: 100%; background: rgba(255,255,255,0.03); border: 1px solid var(--border); color: var(--text-secondary); font-size: 13px; padding: 7px 10px; border-radius: var(--radius-sm); resize: vertical; min-height: 40px; outline: none; transition: border-color var(--transition); }
.pi-notes:focus { border-color: var(--ice-blue); color: var(--text-primary); }
.pi-notes::placeholder { color: var(--text-muted); font-style: italic; }
.pi-controls { display: flex; flex-direction: column; align-items: stretch; gap: 8px; width: 216px; }
.pi-controls .stepper { align-self: stretch; justify-content: space-between; }
.pi-controls .step-field { flex: 1; justify-content: center; }
.pi-order { display: flex; gap: 6px; }
.pi-order .icon-btn { flex: 1; width: auto; height: 34px; }
.pi-order .pi-remove:hover:not(:disabled) { color: #ff8791; border-color: var(--red-line); background: rgba(239,79,92,0.1); }
.seg-section { display: flex; }
.seg-section .seg-btn { padding: 4px 6px; font-size: 11.5px; min-height: 30px; }

/* Plan summary */
.plan-aside { position: sticky; top: calc(var(--nav-height) + 20px); display: flex; flex-direction: column; gap: 16px; max-height: calc(100vh - 120px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.summary-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; }
.summary-title { display: flex; align-items: center; gap: 8px; font-family: var(--font-heading); font-size: 13px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 12px; }
.summary-title .ic { color: var(--ice-blue); width: 16px; height: 16px; }
.summary-sub { margin-left: auto; font-family: var(--font-body); letter-spacing: 0; text-transform: none; font-size: 12px; color: var(--text-muted); }
.time-headline { font-family: var(--font-display); font-size: 20px; color: var(--text-secondary); letter-spacing: 0.04em; }
.time-headline strong { font-size: 44px; color: var(--text-primary); font-weight: 400; margin-right: 2px; }
.time-status { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; min-height: 20px; }
.time-status.spare { color: var(--ice-blue); }
.time-status.ok { color: var(--green); }
.time-status.over { color: #ff8791; }
.time-chart { position: relative; padding-top: 22px; margin-bottom: 12px; }
.tc-track { position: relative; display: flex; height: 26px; border-radius: 6px; background: repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0 6px, rgba(255,255,255,0.07) 6px 12px); }
.tc-seg { height: 100%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #08131c; min-width: 0; overflow: hidden; transition: width 0.35s ease; border-right: 2px solid var(--bg-card); }
.tc-seg:first-child { border-radius: 6px 0 0 6px; }
.tc-seg:last-of-type { border-right: 0; }
.tc-goal { position: absolute; top: -6px; bottom: -6px; width: 0; border-left: 2px dashed #fff; }
.tc-goal span { position: absolute; bottom: 100%; left: 0; transform: translateX(-50%); font-size: 11px; font-weight: 700; color: #fff; white-space: nowrap; margin-bottom: 2px; }
.tc-axis { position: relative; height: 18px; margin-top: 6px; border-top: 1px solid rgba(255,255,255,0.15); }
.tc-tick { position: absolute; top: 2px; transform: translateX(-50%); font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.tc-tick:first-child { transform: none; }
.tc-tick:last-child { transform: translateX(-100%); }
.tc-unit { text-align: right; font-size: 10px; color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; }
.time-legend { list-style: none; display: grid; gap: 6px; font-size: 13px; }
.time-legend li { display: grid; grid-template-columns: 12px 1fr auto 40px 56px; align-items: center; gap: 8px; color: var(--text-secondary); }
.sw { width: 12px; height: 12px; border-radius: 3px; }
.lg-val { color: var(--text-primary); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.lg-pct, .lg-n { text-align: right; color: var(--text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.run-list { list-style: none; font-size: 13px; }
.run-sec { font-family: var(--font-heading); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; padding: 8px 0 4px; }
.run-sec:first-child { padding-top: 0; }
.run-sec.warmup { color: var(--green); }
.run-sec.main { color: var(--ice-blue); }
.run-sec.cooldown { color: var(--gold); }
.run-row { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 8px; border-left: 2px solid var(--border); padding-left: 10px; margin-left: 4px; }
.run-time, .run-end .run-time { color: var(--text-muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.run-name { background: none; border: 0; text-align: left; color: var(--text-primary); padding: 6px 0; min-height: 32px; font-size: 13px; }
.run-name:hover { color: var(--ice-blue); text-decoration: underline; text-underline-offset: 3px; }
.run-min { color: var(--text-muted); font-size: 12px; }
.run-end { display: grid; grid-template-columns: 64px 1fr; gap: 8px; padding: 8px 0 0 16px; margin-top: 4px; border-top: 1px solid var(--border); color: var(--text-secondary); font-weight: 600; }
.run-empty { color: var(--text-muted); font-size: 13px; }
.gear-list { list-style: none; display: grid; gap: 4px; }
.gear-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px; margin: 0 -8px; border-radius: var(--radius-sm); cursor: pointer; min-height: 44px; }
.gear-item:hover { background: rgba(255,255,255,0.03); }
.gear-item input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gear-box { flex: none; width: 20px; height: 20px; margin-top: 1px; border: 1.5px solid var(--border-hover); border-radius: 5px; display: grid; place-items: center; color: transparent; transition: all var(--transition); }
.gear-box .ic { width: 14px; height: 14px; }
.gear-item input:focus-visible + .gear-box { outline: 2px solid var(--ice-blue); outline-offset: 2px; }
.gear-item.on .gear-box { background: var(--green); border-color: var(--green); color: #08131c; }
.gear-text { display: flex; flex-direction: column; min-width: 0; }
.gear-name { font-size: 14px; color: var(--text-primary); }
.gear-item.on .gear-name { color: var(--text-muted); text-decoration: line-through; }
.gear-who { font-size: 12px; color: var(--text-muted); }

.plan-empty-state { display: none; padding-top: 32px; }
.plan-empty-state.visible { display: block; }
.plan-empty-state .template-grid { max-width: 1240px; margin: 0 auto 24px; }

/* ── ABOUT PAGE ── */
.about-page { max-width: 1200px; margin: 0 auto; padding: 56px var(--gutter) 64px; }
.about-hero { text-align: center; margin-bottom: 40px; }
.about-title { font-family: var(--font-display); font-size: clamp(40px, 6vw, 68px); font-weight: 400; letter-spacing: 0.04em; margin-bottom: 12px; }
.about-sub { font-size: 18px; color: var(--text-secondary); max-width: 640px; margin: 0 auto; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 32px; }
.step { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.step-num { font-family: var(--font-display); font-size: 40px; line-height: 1; color: var(--ice-blue); }
.step h2 { font-size: 19px; font-weight: 600; }
.step p { font-size: 14px; color: var(--text-secondary); flex: 1; }
.about-columns { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; margin-bottom: 32px; }
.about-panel { background: var(--bg-sidebar); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.about-panel-title { font-family: var(--font-heading); font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.about-panel-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.legend-list { list-style: none; display: grid; gap: 12px; margin-top: 12px; }
.legend-list li { display: flex; gap: 14px; align-items: center; }
.legend-sym { flex: none; width: 56px; height: 36px; display: grid; place-items: center; background: #1b2a3b; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.legend-sym svg { width: 44px; height: 28px; }
.legend-text { display: flex; flex-direction: column; font-size: 13px; color: var(--text-secondary); line-height: 1.45; }
.legend-text b { color: var(--text-primary); font-size: 14px; }
.legend-list.compact { gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0; }
.legend-list.compact .legend-sym { width: 48px; height: 30px; }
.legend-list.compact .legend-text span { font-size: 12px; }
.bar-chart { font-size: 13px; }
.bc-rows { display: grid; gap: 8px; }
.bc-row, .bc-axis { display: grid; grid-template-columns: 120px 1fr 28px; gap: 10px; align-items: center; }
.bc-label { color: var(--text-secondary); text-align: right; white-space: nowrap; }
.bc-track { height: 18px; background: rgba(255,255,255,0.04); border-radius: 4px; overflow: hidden; }
.bc-bar { display: block; height: 100%; background: linear-gradient(90deg, var(--ice-blue-dim), var(--ice-blue)); border-radius: 4px; }
.bc-val { font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.bc-axis { margin-top: 6px; }
.bc-ticks { position: relative; height: 18px; border-top: 1px solid rgba(255,255,255,0.15); }
.bc-ticks span { position: absolute; top: 2px; transform: translateX(-50%); font-size: 11px; color: var(--text-muted); }
.bc-unit { text-align: center; font-size: 11px; color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 4px; padding-left: 130px; }
.about-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 40px; }
.about-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition); }
.about-card:hover { transform: translateY(-3px); border-color: var(--border-hover); box-shadow: var(--shadow-glow); }
.about-card-icon { width: 32px; height: 32px; color: var(--ice-blue); margin-bottom: 12px; }
.about-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.about-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.65; }
.about-footer-note { text-align: center; color: var(--text-muted); font-size: 14px; border-top: 1px solid var(--border); padding-top: 24px; }
.about-version { font-size: 12px; margin-top: 4px; font-family: ui-monospace, Menlo, monospace; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 24px; left: 50%; z-index: 3000;
  display: flex; align-items: center; gap: 12px;
  max-width: min(560px, calc(100vw - 32px)); width: max-content;
  transform: translate(-50%, 20px);
  background: #1d2a4a; border: 1px solid var(--border-hover); color: var(--text-primary);
  font-size: 14px; padding: 10px 10px 10px 18px; border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5), var(--shadow-glow);
  opacity: 0; visibility: hidden; transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast-msg { padding: 4px 0; }
.toast-action { flex: none; min-height: 36px; padding: 4px 12px; background: rgba(76,201,240,0.15); border: 1px solid rgba(76,201,240,0.45); border-radius: var(--radius-sm); color: var(--ice-blue); font-weight: 700; font-size: 13px; }
.toast-action:hover { background: rgba(76,201,240,0.25); }

/* ── FOOTER ── */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 20px var(--gutter); background: rgba(0,0,0,0.3); }
.footer-inner { max-width: var(--page-max); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; }
.footer-logo { font-family: var(--font-display); font-size: 18px; letter-spacing: 0.08em; color: var(--text-secondary); }
.footer-links { display: flex; gap: 4px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--text-secondary); text-decoration: none; font-size: 14px; }
.footer-links a:hover { color: var(--ice-blue); }
.footer-credit { font-size: 13px; color: var(--text-muted); }

/* ── RINK SVG ANIMATIONS ── */
@keyframes dashMove { to { stroke-dashoffset: -100; } }
@keyframes pathDraw { from { stroke-dashoffset: 500; opacity: 0.3; } to { stroke-dashoffset: 0; opacity: 1; } }
@keyframes shotLine { from { stroke-dashoffset: 300; opacity: 0; } to { stroke-dashoffset: 0; opacity: 1; } }
.player-circle { animation: cardFadeIn 0.4s ease both; }
@media (prefers-reduced-motion: reduce) {
  .drill-card-rink *, .pi-thumb *, .hero-path { animation: none !important; }
  .drill-card, .plan-item { animation: none; transition: none; }
}

/* ── PRINT SHEET (preview and print) ── */
.pp-head { border-bottom: 2px solid #1d2430; padding-bottom: 14px; margin-bottom: 18px; }
.pp-brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-heading); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: #4a5568; margin-bottom: 6px; }
.pp-brand svg { width: 22px; height: 22px; }
.pp-team { font-family: var(--font-display); font-size: 40px; font-weight: 400; letter-spacing: 0.03em; color: #0e1018; line-height: 1.05; margin-bottom: 10px; }
.pp-facts { display: grid; grid-template-columns: repeat(4, auto); gap: 4px 24px; justify-content: start; margin-bottom: 10px; }
.pp-facts dt { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: #718096; font-family: var(--font-heading); }
.pp-facts dd { font-size: 14px; font-weight: 600; color: #1d2430; }
.pp-split { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; color: #4a5568; }
.pp-split b { color: #1d2430; }
.pp-gear { font-size: 13px; color: #4a5568; margin-top: 6px; }
.pp-gear b { color: #1d2430; }
.pp-sec { margin-bottom: 8px; }
.pp-sec-title { font-family: var(--font-heading); font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase; color: #1d2430; padding: 6px 10px; margin: 14px 0 8px; border-left: 4px solid #4cc9f0; background: #f2f6f9; }
.pp-sec-title.warmup { border-color: #2f9e6e; }
.pp-sec-title.cooldown { border-color: #d9822b; }
.pp-sec-title span { float: right; font-family: var(--font-body); font-size: 13px; letter-spacing: 0; text-transform: none; color: #4a5568; }
.pp-drill { display: grid; grid-template-columns: 64px minmax(0, 1fr) 190px; gap: 14px; padding: 12px 0; border-bottom: 1px solid #e2e8f0; break-inside: avoid; page-break-inside: avoid; }
.pp-time { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.pp-time b { font-size: 16px; color: #0e1018; }
.pp-time span { font-size: 12px; color: #718096; }
.pp-body h3 { font-family: var(--font-heading); font-size: 16px; font-weight: 600; color: #0e1018; margin-bottom: 2px; letter-spacing: 0.02em; }
.pp-meta { font-size: 11.5px; color: #718096; margin-bottom: 6px; }
.pp-desc { font-size: 12.5px; color: #2d3748; line-height: 1.55; margin-bottom: 6px; }
.pp-tips { font-size: 12px; color: #2d3748; padding-left: 16px; margin-bottom: 6px; }
.pp-note { font-size: 12.5px; background: #fff8e1; border-left: 3px solid #e0a100; padding: 6px 10px; color: #2d3748; }
.pp-diagram { border-radius: 6px; overflow: hidden; background: #1b2a3b; align-self: start; aspect-ratio: 332 / 192; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pp-diagram svg { display: block; width: 100%; height: 100%; }
.pp-empty { color: #718096; }
.pp-foot { text-align: center; font-size: 11px; color: #a0aec0; margin-top: 18px; }

.print-only { display: none; }

@media print {
  @page { margin: 12mm; }
  html, body { background: #fff !important; color: #000 !important; }
  body > * { display: none !important; }
  body > #print-content { display: block !important; }
  #print-content { font-family: 'Source Sans 3', sans-serif; }
}

/* ── RESPONSIVE ── */
@media (min-width: 1700px) {
  :root { --page-max: 1680px; }
  .plan-layout { grid-template-columns: minmax(0, 1fr) 400px; }
}

@media (max-width: 1280px) {
  .plan-layout { grid-template-columns: minmax(0, 1fr) 320px; }
  .plan-item { grid-template-columns: 20px minmax(0, 1fr) auto; }
  .pi-thumb { display: none; }
  .about-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  /* Time card first, then the sections, then run of show and equipment side by side */
  .plan-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .plan-aside { display: contents; }
  .plan-aside .summary-card:first-child { grid-column: 1 / -1; order: -1; }
  .plan-sections { grid-column: 1 / -1; }
  .plan-aside .summary-card { order: 2; }
  .plan-meta-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-columns { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  :root { --tap: 44px; --gutter: 20px; }
  .drills-layout { display: block; padding: 16px var(--gutter) var(--gutter); }
  .filters-sidebar {
    position: fixed; left: 0; bottom: 0; z-index: 1500;
    width: min(400px, 100%); max-height: none; border-radius: 0 var(--radius-lg) var(--radius-lg) 0; border-left: 0;
    display: flex; flex-direction: column; padding: 0;
    transform: translateX(-102%); transition: transform 0.25s ease; visibility: hidden;
  }
  .filters-sidebar.sidebar-open { transform: none; visibility: visible; box-shadow: 0 0 60px rgba(0,0,0,0.6); }
  .filters-header { padding: 12px 16px; margin: 0; }
  .filters-sidebar > .filter-group { padding: 0 16px; }
  .filters-sidebar > .filter-group:first-of-type { padding-top: 16px; }
  .filters-sidebar { overflow-y: auto; }
  .filters-close { display: inline-flex; }
  .filters-footer { display: block; position: sticky; bottom: 0; margin-top: auto; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--bg-sidebar); border-top: 1px solid var(--border); }
  .filters-scrim { display: block; position: fixed; inset: 0; z-index: 1400; background: rgba(4,7,12,0.6); }
  .filters-toggle-btn { display: inline-flex; }
  .filter-pill { min-height: 44px; padding: 6px 12px 6px 14px; font-size: 14px; }
  .clear-filters-btn { min-height: 44px; }
  .search-input, .sort-select { min-height: 44px; }
  .active-filter-tag, .clear-inline { min-height: 44px; }
  .btn-add-plan { min-height: 44px; }
  .seg-btn { min-height: 44px; }
  .step-btn { width: 44px; min-height: 44px; }
  .section-add { min-height: 44px; }
  .ctrl-btn { min-height: 44px; }
  .chip { min-height: 44px; }
  .run-name { min-height: 44px; }
  .seg-wide .seg-btn, .seg-section .seg-btn { min-height: 44px; }
  .plan-input { min-height: 44px; }
  .stepper-lg .step-btn { width: 44px; flex: none; }
  .stepper-lg .step-input { flex: 1; min-width: 0; }
  .step-input { width: 44px; height: 44px; }
  .chip { min-width: 44px; }
  /* Drill names in the plan: a 44px tap area without changing the layout */
  .pi-name { display: inline-block; padding: 13px 0; margin: -13px 0; }
  .hero { padding: 40px var(--gutter) 36px; }
  .hero-rink-bg { opacity: 0.22; width: 100%; right: 0; }
  .hero-stats { gap: 24px; }
  .modal-columns { grid-template-columns: 1fr; gap: 0; }
  .legend-list.compact { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-plan-chip { display: inline-flex; }
  .mobile-menu-btn { display: inline-flex; }
  .nav-inner { gap: 8px; }
  .drills-toolbar { align-items: stretch; }
  .toolbar-left { width: 100%; justify-content: space-between; }
  .toolbar-right { width: 100%; }
  .toolbar-right .sort-wrap { flex: 1; }
  .sort-select { width: 100%; }
  .plan-header { align-items: stretch; }
  .plan-actions { width: 100%; }
  .plan-actions > * { flex: 1 1 auto; }
  .btn-icon-only { flex: 0 0 auto !important; }
  .overlay { padding: 0; align-items: stretch; }
  #confirm-overlay { padding: 16px; align-items: center; }
  .sheet { max-height: none; height: 100%; border-radius: 0; border: 0; }
  .sheet-picker, .sheet-print { height: 100%; }
  .print-stage { border-radius: 0; padding: 12px; }
  .paper { padding: 20px 18px; }
  .pp-drill { grid-template-columns: 52px minmax(0, 1fr); }
  .pp-diagram { grid-column: 2; max-width: 280px; }
  .pp-facts { grid-template-columns: repeat(2, auto); }
  .sheet-body { padding: 16px; }
  .about-grid { grid-template-columns: 1fr; }
  .toast { bottom: calc(16px + env(safe-area-inset-bottom)); }
}

@media (max-width: 700px) {
  .plan-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .rink-legend-pop { position: static; border-top: 1px solid var(--border); }
  .plan-meta-bar { grid-template-columns: 1fr 1fr; padding: 16px; gap: 12px; }
  .plan-meta-team { grid-column: 1 / -1; }
  .plan-section .section-header { flex-wrap: wrap; padding: 10px 12px; gap: 6px 10px; }
  .section-add { margin-left: auto; }
  .section-time { margin-right: 0; }
  .section-drills { padding: 10px; }
  .plan-item { grid-template-columns: minmax(0, 1fr); padding: 12px; gap: 10px; }
  .pi-grip { display: none; }
  .pi-main { padding-right: 52px; }
  .pi-controls { width: 100%; display: grid; grid-template-columns: auto 1fr; gap: 8px; }
  .pi-controls .stepper { align-self: auto; }
  .pi-order { justify-content: flex-end; }
  .pi-order .icon-btn { flex: 0 0 44px; height: 44px; }
  .pi-order .pi-remove { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; }
  .seg-section { grid-column: 1 / -1; }
  .seg-section .seg-btn { font-size: 13px; min-height: 44px; }
  .time-legend li { grid-template-columns: 12px 1fr auto 36px; }
  .lg-n { display: none; }
  .modal-drill-name { font-size: 30px; }
  .rink-state { width: 100%; margin-left: 0; order: 9; }
  .hero-actions > * { flex: 1 1 auto; }
  .bc-row, .bc-axis { grid-template-columns: 104px 1fr 24px; }
  .bc-unit { padding-left: 110px; }
}

@media (max-width: 480px) {
  .drills-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 16px 28px; }
  .stat-num { font-size: 34px; }
  .plan-actions .btn-secondary, .plan-actions .btn-primary { padding: 9px 12px; font-size: 13px; }
  .btn-icon-only .btn-label { display: none; }
  .btn-icon-only { width: 44px; padding: 0; }
  .modal-meta-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .modal-meta-item { padding: 8px 10px; }
  .footer-inner { justify-content: center; text-align: center; }
}

@media (max-width: 380px) {
  :root { --gutter: 14px; }
  .logo-text { font-size: 21px; }
  .seg-section .seg-btn { font-size: 12px; padding: 4px 2px; }
  .rink-controls { gap: 6px; }
  .ctrl-btn { padding: 6px 10px; }
}

/* Goal marker label stays inside the card when the goal is near the right edge */
.tc-goal.end span { transform: translateX(-100%); }
