/* Bar Down Bears - colours sampled from the team jersey */
:root {
  --ink: #14181a;        /* collar */
  --slate-800: #33474f;
  --slate-600: #5d7a84;
  --slate-500: #7e9aa3;  /* jersey body */
  --slate-300: #a9c5ce;
  --slate-100: #e4edf0;
  --ice: #a9ddf0;        /* light-blue claw marks */
  --sand: #f3d4a6;       /* sleeves */
  --sand-100: #fcf3e3;
  --blue: #1b86c8;       /* crest ring */
  --crimson: #d8335d;    /* crest lettering */
  --navy: #2b3587;       /* sunglasses */
  --card: #ffffff;
  --text: #1c2529;
  --muted: #5b6d74;
  --line: #d3dfe3;
  --radius: 14px;
  --display: "Barlow Condensed", "Arial Narrow", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--text); font: 16px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, var(--slate-300) 0, var(--slate-100) 420px) no-repeat var(--slate-100);
  min-height: 100vh;
}
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--display); text-transform: uppercase; letter-spacing: .02em; line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: 2.2rem; } h2 { font-size: 1.6rem; } h3 { font-size: 1.2rem; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 22px; padding-bottom: 60px; }

/* header: black collar with the ice-blue trim stripe */
.site-head { background: var(--ink); color: #fff; border-bottom: 4px solid var(--ice); box-shadow: 0 4px 0 var(--ink); position: sticky; top: 0; z-index: 30; }
.site-head .wrap { display: flex; align-items: center; gap: 14px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; margin-right: auto; }
.brand img { height: 56px; width: auto; }
.brand b { font: 700 1.45rem/1 var(--display); text-transform: uppercase; letter-spacing: .03em; display: block; }
.brand small { color: var(--ice); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.nav a, .nav button { color: #fff; text-decoration: none; padding: 8px 12px; border-radius: 8px; font: 600 1.05rem var(--display); text-transform: uppercase; letter-spacing: .05em; background: none; border: 0; cursor: pointer; }
.nav a:hover, .nav button:hover { background: #2a3236; }
.nav a.on { background: var(--sand); color: var(--ink); }
.nav a.coach { border: 1.5px solid var(--ice); color: var(--ice); }
.nav a.coach.on { background: var(--ice); color: var(--ink); }
.nav form { display: inline; }
.subnav { background: var(--slate-800); }
.subnav .wrap { display: flex; gap: 2px; overflow-x: auto; }
.subnav a { color: #dcebf0; text-decoration: none; padding: 9px 14px; font: 600 1rem var(--display); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; border-bottom: 3px solid transparent; }
.subnav a.on, .subnav a:hover { color: #fff; border-color: var(--sand); }

.card { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: 0 1px 2px rgba(20,24,26,.08), 0 8px 24px rgba(51,71,79,.10); margin-bottom: 20px; }
.card.sand { background: var(--sand-100); border: 1px solid var(--sand); }
.grid { display: grid; gap: 20px; }
@media (min-width: 860px) { .grid.two { grid-template-columns: 1.4fr 1fr; } .grid.half { grid-template-columns: 1fr 1fr; } .grid.three { grid-template-columns: repeat(3, 1fr); } }
.muted { color: var(--muted); } .small { font-size: .88rem; } .right { text-align: right; } .center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }

/* next-event hero: the jersey front */
.hero { position: relative; overflow: hidden; color: #fff; border-radius: 20px; padding: 28px; margin-bottom: 22px;
  background: linear-gradient(180deg, #6f8b95 0, #86a4ae 55%, #9cc1cb 100%); box-shadow: 0 10px 30px rgba(51,71,79,.25); border-top: 6px solid var(--ink); }
.hero::before, .hero::after { content: ""; position: absolute; width: 340px; height: 250px; background: no-repeat center/contain; pointer-events: none; }
.hero::before { background-image: url(../img/claws-sand.svg); left: -60px; top: -40px; opacity: .9; }
.hero::after { background-image: url(../img/claws-ice.svg); right: -40px; bottom: -50px; opacity: .8; }
.hero > * { position: relative; z-index: 1; }
.hero .tag { display: inline-block; background: var(--ink); color: var(--ice); font: 700 .95rem var(--display); letter-spacing: .14em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; }
.hero .tag.live { background: var(--crimson); color: #fff; }
.hero h1 { font-size: clamp(2rem, 5.2vw, 3.5rem); margin: 12px 0 4px; text-shadow: 0 2px 0 rgba(20,24,26,.35); }
.hero .vs { color: var(--sand); }
.hero .when { font: 600 1.5rem var(--display); letter-spacing: .03em; }
.hero .where { opacity: .95; }
.hero .where a { color: #fff; }
.hero-body { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.hero .crest { width: auto; height: auto; max-width: min(320px, 38vw); max-height: 240px; filter: drop-shadow(0 6px 14px rgba(20,24,26,.4)); flex: none; }
.countdown { display: flex; gap: 10px; margin-top: 16px; }
.countdown div { background: rgba(20,24,26,.82); border-radius: 10px; padding: 8px 12px; min-width: 66px; text-align: center; }
.countdown b { display: block; font: 700 1.8rem/1 var(--display); color: var(--sand); }
.countdown span { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ice); }

.btn { display: inline-block; background: var(--blue); color: #fff; border: 0; border-radius: 9px; padding: 9px 16px; font: 600 1.05rem var(--display); letter-spacing: .05em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn.red { background: var(--crimson); } .btn.dark { background: var(--ink); } .btn.sand { background: var(--sand); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--slate-800); border: 1.5px solid var(--slate-500); }
.btn.sm { padding: 5px 10px; font-size: .92rem; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font: 700 .8rem var(--display); letter-spacing: .08em; text-transform: uppercase; }
.pill.game { background: var(--crimson); color: #fff; } .pill.practice { background: var(--ice); color: var(--ink); } .pill.event { background: var(--sand); color: var(--ink); }
.pill.W { background: #1e9e62; color: #fff; } .pill.L { background: var(--slate-600); color: #fff; } .pill.T { background: var(--sand); color: var(--ink); }

/* schedule list */
.sched { list-style: none; margin: 0; padding: 0; }
.sched li { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.sched li:last-child { border-bottom: 0; }
.sched li.past { opacity: .72; }
.sched li.next { background: var(--sand-100); border-radius: 10px; padding: 12px; border: 1px solid var(--sand); opacity: 1; }
.datebox { background: var(--slate-800); color: #fff; border-radius: 10px; text-align: center; padding: 6px 0; font-family: var(--display); line-height: 1.05; }
.datebox b { display: block; font-size: 1.55rem; } .datebox span { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ice); }
.sched .title { font: 600 1.2rem var(--display); letter-spacing: .02em; }
.sched .score { font: 700 1.5rem var(--display); white-space: nowrap; text-align: right; }
.month-head { font: 700 1.05rem var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--slate-600); margin: 18px 0 4px; }
.filter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.chip { border: 1.5px solid var(--slate-300); background: #fff; border-radius: 999px; padding: 4px 13px; cursor: pointer; font: 600 .95rem var(--display); letter-spacing: .05em; text-transform: uppercase; color: var(--slate-800); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

table.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tbl th { font: 700 .85rem var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: center; padding: 6px 8px; border-bottom: 2px solid var(--ink); }
.tbl td { padding: 8px; border-bottom: 1px solid var(--line); text-align: center; }
.tbl th:nth-child(2), .tbl td:nth-child(2) { text-align: left; }
.tbl tr.us td { background: var(--sand-100); font-weight: 700; box-shadow: inset 4px 0 0 var(--crimson); }
.tbl td.pts { font-weight: 700; }
.scroll-x { overflow-x: auto; }

.live-frame { position: relative; padding-top: 56.25%; background: var(--ink); border-radius: 12px; overflow: hidden; }
.live-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.live-empty { background: var(--ink); color: #fff; border-radius: 12px; padding: 40px 20px; text-align: center; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gallery figure { margin: 0; position: relative; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; background: var(--slate-100); }
.gallery figcaption { font-size: .8rem; color: var(--muted); padding: 3px 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery form { position: absolute; top: 6px; right: 6px; }
.gallery .rm { border: 0; border-radius: 7px; padding: 4px 9px; background: rgba(20,24,26,.82); color: #fff; font: 600 .8rem var(--display); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.gallery .rm:hover { background: var(--crimson); }
.lightbox { position: fixed; inset: 0; background: rgba(10,12,13,.92); display: none; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.lightbox.on { display: flex; } .lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }

label { display: block; font: 600 .82rem var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1.5px solid var(--slate-300); border-radius: 8px; background: #fff; width: 100%; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.field { margin-bottom: 12px; }
.fields { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 12px; }
.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-weight: 600; }
.flash.ok { background: #dff5e9; color: #145c3a; } .flash.err { background: #fde4ea; color: #8f1836; }
.login { max-width: 400px; margin: 40px auto; text-align: center; }
.login img { max-width: 200px; max-height: 140px; }
details > summary { cursor: pointer; font-weight: 600; }
.site-foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 0 16px 30px; }

/* lineup */
.lines { display: grid; gap: 14px; }
.line { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.line h3 { margin: 0; background: var(--slate-800); color: #fff; padding: 8px 14px; font-size: 1.05rem; letter-spacing: .08em; }
.line.d h3 { background: var(--navy); } .line.g h3 { background: var(--ink); }
.line .slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; padding: 14px; background: var(--sand-100); }
.rot { font-size: .85rem; color: var(--muted); padding: 0 14px 12px; background: var(--sand-100); }

/* drills */
.cat-skating { --c: #1b86c8; } .cat-puck { --c: #7a4fc2; } .cat-passing { --c: #1e9e62; } .cat-shooting { --c: #d8335d; }
.cat-contact { --c: #c2681b; } .cat-breakout { --c: #2b3587; } .cat-backcheck { --c: #0f8a94; } .cat-dzone { --c: #5d7a84; }
.cat-compete { --c: #b3862b; } .cat-games { --c: #d0489b; } .cat-goalie { --c: #14181a; } .cat-warmup { --c: #6a9a2b; } .cat-block { --c: #7e9aa3; }
.drill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.drill-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(20,24,26,.12); border-top: 5px solid var(--c, var(--slate-500)); cursor: pointer; display: flex; flex-direction: column; }
.drill-card .rink { background: #fff; min-height: 110px; }
.drill-card .body { padding: 10px 12px 12px; }
.drill-card h3 { font-size: 1.1rem; margin-bottom: 2px; }
.badge { display: inline-block; font: 700 .74rem var(--display); letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--c, var(--slate-500)); padding: 1px 8px; border-radius: 999px; }
.mins { font: 700 .95rem var(--display); color: var(--slate-800); white-space: nowrap; }
svg.rink { display: block; width: 100%; height: auto; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); margin-top: 6px; }
.legend svg { vertical-align: middle; }
.modal { position: fixed; inset: 0; background: rgba(20,24,26,.7); display: none; align-items: flex-start; justify-content: center; z-index: 90; padding: 3vh 12px; overflow: auto; }
.modal.on { display: flex; }
.modal .box { background: #fff; border-radius: 16px; max-width: 860px; width: 100%; padding: 20px; border-top: 6px solid var(--c, var(--ink)); }
.modal ul { margin: 6px 0 0; padding-left: 20px; }

/* practice planner */
.planner { display: grid; gap: 18px; }
@media (min-width: 980px) { .planner { grid-template-columns: minmax(300px, 380px) 1fr; align-items: start; } .lib { position: sticky; top: 84px; max-height: calc(100vh - 100px); display: flex; flex-direction: column; } }
.lib { background: #fff; border-radius: var(--radius); padding: 14px; box-shadow: 0 8px 24px rgba(51,71,79,.10); }
.lib-list { overflow-y: auto; max-height: 60vh; margin-top: 8px; padding-right: 4px; flex: 1; }
.lib-item, .plan-item { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--c, var(--slate-500)); border-radius: 9px; padding: 7px 9px; margin-bottom: 6px; cursor: grab; user-select: none; }
.lib-item .nm, .plan-item .nm { flex: 1; min-width: 0; font-weight: 600; line-height: 1.2; }
.lib-item .nm small, .plan-item .nm small { display: block; font-weight: 400; color: var(--muted); }
.icon-btn { border: 0; background: var(--slate-100); border-radius: 7px; width: 30px; height: 30px; cursor: pointer; font-size: 1rem; flex: none; color: var(--slate-800); }
.icon-btn:hover { background: var(--ice); }
.plan { min-height: 240px; border: 2px dashed var(--slate-300); border-radius: 12px; padding: 10px; background: var(--slate-100); }
.plan:empty::after { content: "Drag drills here (or tap +) to build the practice"; color: var(--muted); display: block; text-align: center; padding: 90px 10px; }
.plan-item { padding: 9px 10px; }
.plan-item .t { font: 700 .95rem var(--display); color: var(--slate-600); width: 92px; flex: none; }
.plan-item input.m { width: 58px; text-align: center; padding: 5px; flex: none; }
.plan-item input.note { flex: 1.2; min-width: 90px; font-size: .88rem; padding: 5px 8px; }
.sortable-ghost { opacity: .35; }
.meter { height: 16px; border-radius: 999px; background: var(--slate-100); overflow: hidden; display: flex; border: 1px solid var(--line); }
.meter i { display: block; height: 100%; background: var(--c); }
.meter-label { font: 700 1.25rem var(--display); }
.meter-label.over { color: var(--crimson); } .meter-label.full { color: #1e9e62; }
.print-only { display: none; }
@media print {
  .site-head, .subnav, .site-foot, .no-print, .lib { display: none !important; }
  body { background: #fff; } .card { box-shadow: none; padding: 0; } main.wrap { padding: 0; max-width: none; }
  .planner { display: block; } .print-only { display: block; }
  .print-drill { display: grid; grid-template-columns: 300px 1fr; gap: 14px; break-inside: avoid; border-bottom: 1px solid #bbb; padding: 10px 0; }
  .line .slots, .rot { background: #fff; } select, input { border: 0 !important; -webkit-appearance: none; appearance: none; font-weight: 700; }
}
@media (max-width: 620px) {
  .hero { padding: 20px; } .hero::before { opacity: .4; }.hero .crest { max-width: 70vw; max-height: 150px; margin: 0 auto; }
  .sched li { grid-template-columns: 54px 1fr; } .sched .score { grid-column: 2; text-align: left; }
  .plan-item { flex-wrap: wrap; } .plan-item input.note { flex-basis: 100%; }
}

.armed, .gallery .rm.armed, .btn.armed, .icon-btn.armed { background: var(--crimson) !important; color: #fff !important; border-color: var(--crimson) !important; width: auto; padding-left: 10px; padding-right: 10px; }

/* planner: drill list is collapsed until the coach opens it */
.lib-toggle { display: flex; justify-content: space-between; align-items: center; width: 100%; background: none; border: 0; padding: 2px 0; cursor: pointer; font: 600 1.2rem var(--display); letter-spacing: .04em; text-transform: uppercase; color: var(--text); text-align: left; }
.lib-toggle .chev { transition: transform .15s; font-size: 1.1rem; color: var(--slate-600); }
.planner:not(.lib-closed) .lib-toggle .chev { transform: rotate(180deg); }
.lib-body { margin-top: 10px; display: flex; flex-direction: column; min-height: 0; flex: 1; }
.planner.lib-closed { grid-template-columns: 1fr; }
.planner.lib-closed .lib { position: static; max-height: none; padding: 10px 14px; background: var(--sand-100); border: 1px solid var(--sand); }
.planner.lib-closed .lib-body { display: none; }
.plan:empty::after { content: "No drills yet. Open Add drills above, then drag drills here or tap +"; }

/* Manage site: update-from-Spordle steps */
.step { background: #fff; border: 1px solid var(--sand); border-radius: 12px; padding: 14px; margin-top: 12px; }
.step h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.step .num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--ice); font-size: 1rem; }
.step p { margin: 0 0 10px; }
.filebtn { position: relative; overflow: hidden; color: #fff; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.scoreline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.scoreline:last-of-type { border-bottom: 0; }
.scoreline .when { flex-basis: 100%; }
.scoreline label { flex: 1 1 120px; margin: 0; text-transform: none; letter-spacing: 0; font: 600 .9rem system-ui, sans-serif; color: var(--text); }
.scoreline label input { margin-top: 3px; text-align: center; font-size: 1.2rem; padding: 6px; }
.scoreline .at { padding-bottom: 9px; color: var(--muted); }
