/* =====================================================================
   VARSITY SKIN: loaded after styles.css. Cream + MBW gold + ink,
   sticker-style controls, varsity lettering.
   ===================================================================== */
body {
  font-family: var(--body-font); font-weight: 500;
  background: var(--bg) radial-gradient(rgba(20,18,16,.07) 1px, transparent 1.2px) 0 0 / 10px 10px;
}

/* Header band: gold with "sock stripes" */
.topbar { position: relative; overflow: hidden; background: var(--gold); color: var(--text); border-bottom: 4px solid var(--text); }
.topbar::after { content: ''; position: absolute; right: 300px; top: -20px; bottom: -20px; width: 110px; background: repeating-linear-gradient(90deg, var(--text) 0 13px, transparent 13px 25px); transform: skewX(-20deg); opacity: .9; pointer-events: none; }
.topbar > * { position: relative; z-index: 1; }
.coach-menu-wrap { z-index: 30; }
.topbar:has(.coach-menu:not([hidden])) { overflow: visible; }
.brand { font: 400 26px/1 var(--varsity); letter-spacing: .02em; text-shadow: 2px 2px 0 #fff; }
.logo { display: none; }
.tabs { gap: 6px; }
.tabs button { padding: 7px 14px 5px; border: 2.5px solid var(--text); border-radius: 999px; background: #fff; color: var(--text); font: 800 14px var(--body-font); text-transform: uppercase; letter-spacing: .05em; transition: transform .12s; }
.tabs button:hover { color: var(--text); transform: translateY(-2px); }
.tabs button.active { background: var(--text); color: var(--gold); }
.coach-menu-btn, .coach-btn { border: 2.5px solid var(--text); background: var(--text); color: #fff; border-radius: 999px; font-family: var(--body-font); font-weight: 700; }
.coach-menu-btn:hover, .coach-btn:hover { background: #2a2622; color: #fff; }
.coach-menu-btn small { color: var(--gold); }
.coach-menu-btn .dot.home { width: 14px; height: 14px; box-shadow: 0 0 0 2px #fff; }

/* Sticker surfaces */
.sidebar, .panel, .card-lg { border: 3px solid var(--text); border-radius: 16px; box-shadow: var(--shadow); }
.rink-wrap { border: 3px solid var(--text); border-radius: 18px; box-shadow: 5px 5px 0 var(--text); }
h3 { color: var(--text); font-weight: 800; }

/* Lists in the drawer / sidebar */
.list button { background: #fff; border: 2px solid var(--text); border-radius: 10px; font-weight: 600; box-shadow: 2px 2px 0 var(--text); transition: transform .1s, box-shadow .1s; }
.list button:hover { border-color: var(--text); transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--text); }
.list button.active { background: var(--gold); border-color: var(--text); font-weight: 800; }
.group-h { color: var(--text); font-weight: 800; }
.group-h.has-active { color: var(--text); background: var(--surface-2); }

/* Segmented controls: chunky, with a clear "on" state */
.seg { padding: 0; border: 2.5px solid var(--text); border-radius: 12px; background: #fff; box-shadow: 3px 3px 0 var(--text); overflow: hidden; }
.seg-label { align-self: stretch; display: flex; align-items: center; padding: 0 9px; background: var(--text); color: var(--gold); font: 800 11px var(--body-font); letter-spacing: .12em; }
.seg button { border-radius: 0; border-right: 2px solid var(--text); padding: 7px 11px 6px; font: 700 13.5px var(--body-font); text-transform: uppercase; letter-spacing: .03em; }
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--surface-2); }
.seg button.active { background: var(--gold); box-shadow: none; font-weight: 800; }
#optMode [data-val="good"].active { background: var(--good); color: #fff; }
#optMode [data-val="bad"].active { background: var(--bad); color: #fff; }
.btn { border: 2.5px solid var(--text); border-radius: 12px; background: #fff; font: 700 14px var(--body-font); text-transform: uppercase; letter-spacing: .03em; box-shadow: 3px 3px 0 var(--text); transition: transform .1s, box-shadow .1s; }
.btn:hover { border-color: var(--text); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--text); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--text); }
.btn.primary { background: var(--gold); border-color: var(--text); color: var(--text); }
.btn.home, .btn.away { border-color: var(--text); }
.btn.danger { color: var(--bad); }

/* "Coach says" callout under the rink */
.caption { position: relative; margin-top: 14px; border: 3px solid var(--text); border-radius: 14px; background: var(--gold-2); box-shadow: var(--shadow); transform: rotate(-.4deg); }
.caption::before { content: ''; position: absolute; left: 50%; top: -11px; width: 64px; height: 18px; margin-left: -32px; background: rgba(255,255,255,.7); border: 1px solid rgba(0,0,0,.08); transform: rotate(3deg); }
.caption-text { font-weight: 600; }
.caption-text::before { content: 'Coach says'; display: block; font: 400 13px var(--varsity); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.caption-text b { display: inline; font: 800 15px var(--body-font); text-transform: uppercase; letter-spacing: .03em; color: var(--text); margin: 0 6px 0 0; }
.caption-text b::after { content: ' ·'; }

/* Lesson bar */
.lesson-bar { border: 3px solid var(--text); border-radius: 14px; box-shadow: var(--shadow); }
.lb-title { font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.lb-dot { border-color: var(--text); }
.lb-dot.on, .lb-dot.done { background: var(--gold); }
.lb-return { background: var(--gold); border-color: var(--text); color: var(--text); }

/* Options panel: sticker cards with jersey-number badges */
.panel h3 { font: 400 15px var(--varsity); text-transform: uppercase; letter-spacing: .02em; }
.pressure { border: 2.5px solid var(--text); border-radius: 12px; background: #ffe2e4; font-weight: 600; }
.pressure.none { background: #dff3e7; }
.pressure.some { background: #fff1cc; }
.opts { gap: 10px; }
.opt { border: 2.5px solid var(--text); border-radius: 14px; background: #fff; box-shadow: 3px 3px 0 var(--text); grid-template-columns: 36px 1fr 40px; padding: 9px 10px; transition: transform .1s, box-shadow .1s; }
.opt:hover, .opt.hl { border-color: var(--text); background: #fff; transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--text); }
.opt .rank { grid-row: span 3; width: 32px; height: 36px; border: 2px solid var(--text); border-radius: 8px 8px 14px 14px; font: 400 16px var(--varsity); align-self: start; }
.opt .t { font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.opt .s { font: 400 20px var(--varsity); }
.opt .bar { height: 6px; border-radius: 3px; background: #efe6d2; }
.tag { border-radius: 5px; }
.alerts li { border: 2px solid var(--text); border-left-width: 6px; background: #fff; }
.alerts li.bad { border-left-color: var(--bad); }
.alerts li.good { border-left-color: var(--good); }
.card { border: 2px solid var(--text); background: #fff; }
.jobs li:hover, .jobs li.sel { background: var(--surface-2); }

/* Rink pieces */
.boards { stroke: var(--text); stroke-width: 1.1; }
.zone-label { fill: var(--text); font-family: var(--body-font); font-weight: 800; }
.player text { font-family: var(--varsity); font-weight: 400; }
.player .name-tag { font-family: var(--body-font); font-weight: 800; text-transform: uppercase; letter-spacing: .08px; }
.opt-badge text, .zone-tag { font-family: var(--body-font); }

/* Pulse on whoever has the puck */
.pulse { fill: none; stroke-width: .55; transform-box: fill-box; transform-origin: center; animation: puck-pulse 1.6s ease-out infinite; pointer-events: none; }
@keyframes puck-pulse { 0% { transform: scale(.9); opacity: .95; } 100% { transform: scale(2.1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; opacity: .5; } }

/* Overlays */
.verdict { border: 3px solid var(--bad); box-shadow: 6px 6px 0 var(--text); border-radius: 16px; }
.verdict.meh { border-color: var(--ok); }
.v-head { font-family: var(--varsity); font-weight: 400; }
.dlg { border: 3px solid var(--text); box-shadow: 6px 6px 0 var(--text); }
.coach-menu, .assign-menu { border: 2.5px solid var(--text); box-shadow: 5px 5px 0 var(--text); }
.toast { background: var(--text); color: #fff; border: 2.5px solid var(--text); box-shadow: 4px 4px 0 rgba(0,0,0,.25); font-family: var(--varsity); font-weight: 400; }
.toast.good { background: var(--good); }
.toast.bad { background: var(--bad); }
.pin-card { border-color: var(--text); background: var(--surface-2); }
.coach-page input, .coach-page select, .dlg input { border: 2px solid var(--text); }
.rotate-msg { background: var(--gold) !important; color: var(--text) !important; }
.rotate-msg h2 { font: 400 26px var(--varsity); }
.rotate-msg p { color: var(--text) !important; }
.rotate-msg button { color: var(--text) !important; border: 2.5px solid var(--text) !important; background: #fff !important; }

/* Tablet / phone tuning for the chunkier look */
@media (max-width: 1499px) {
  .seg-label { display: none; }
  .seg button { padding: 7px 10px 6px; font-size: 13px; }
  .topbar::after { right: 200px; width: 80px; }
  .brand { font-size: 22px; }
  .tabs button { padding: 6px 11px 4px; font-size: 13px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .topbar::after { display: none; }
  .brand { font-size: 0; text-shadow: none; }
  .tabs button { padding: 4px 9px 3px; font-size: 12px; border-width: 2px; }
  .caption { transform: none; }
  .caption::before { display: none; }
  .seg, .btn { box-shadow: 2px 2px 0 var(--text); }
}

/* =====================================================================
   FIT TO SCREEN (landscape: desktop, iPad, phone on its side).
   The page never scrolls: the rink takes whatever height is left, so the
   toolbar and the "Coach says" callout are always fully visible. The side
   lists scroll inside themselves.
   ===================================================================== */
@media (orientation: landscape) {
  html, body { height: 100%; }
  body { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }
  .topbar { flex: none; }
  .layout { flex: 1; min-height: 0; width: 100%; align-items: stretch; grid-template-rows: minmax(0, 1fr); }
  .layout[hidden] { display: none; }
  .coach-page { flex: 1; min-height: 0; overflow: auto; width: 100%; }
  .stage { display: flex; flex-direction: column; min-height: 0; }
  .toolbar, .lesson-bar, .caption, .hint { flex: none; }
  .rink-wrap { flex: 1 1 auto; min-height: 140px; display: flex; }
  #rink, body[data-tab="lessons"] #rink { width: 100%; height: 100%; max-height: none; min-height: 0; }
  .sidebar:not(#sidebar), .layout > #sidebar { max-height: 100%; overflow: auto; }
  .panel { max-height: 100%; overflow: auto; position: static; }
  .caption { margin-bottom: 2px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .rink-wrap { min-height: 90px; }
  .caption-text { font-size: 13px; line-height: 1.3; }
  .caption-text::before { font-size: 11px; margin-bottom: 0; }
}

/* Badge logo in the header */
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { height: 42px; width: auto; display: block; filter: drop-shadow(2px 2px 0 rgba(20,18,16,.25)); }
@media (max-width: 1499px) { .brand-logo { height: 36px; } }
@media (orientation: landscape) and (max-height: 520px) { .brand-logo { height: 28px; } }
