/* NOVA Lions parent app. Tokens copied from the challenges app (challenges.novalions.org)
   so every NOVA Lions app looks like one family. Every color is a variable; state is class names. */

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin-opsz-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #17181a; --green: #14a05e; --greenD: #0e7f4a; --greenT: #0a6339; --greenBg: #e7f2ea;
  --bg: #f6f3ee; --card: #fff; --line: #ece7de; --txt: #17181a; --muted: #6f6c66; --muted2: #86837e;
  --yel: #f5cc1a; --yelT: #8a6a00; --yelIcon: #c98a00; --yelBg: #fbf1d8; --yelInk: #4a3a00;
  --red: #a12; --redBg: #fdecec;
  --fill: rgba(120, 118, 112, .12);
  --seg: #efebe3;
  --sh: 0 1px 2px rgba(23, 24, 26, .05), 0 10px 22px -14px rgba(23, 24, 26, .16);
  --serif: "Newsreader", "New York", Georgia, serif;
  --sans: -apple-system, "SF Pro Text", BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box }
html, body { margin: 0 }
body {
  font-family: var(--sans); background: var(--bg); color: var(--txt); line-height: 1.5;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.015em; margin: 0 }
a { color: var(--greenD) }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }

.demo-strip {
  background: var(--yelBg); color: var(--yelInk); text-align: center; font-size: 13px; font-weight: 600;
  padding: 8px 16px; padding-top: max(8px, env(safe-area-inset-top));
}

/* ---------- app pages ---------- */
.page { padding-bottom: calc(84px + env(safe-area-inset-bottom)) }
header.top {
  padding: 26px 20px 4px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
}
header.top .crest { width: 54px; height: 54px; display: block }
.dateline { font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted) }
header.top h1 { font-size: 34px; line-height: 1.1 }
.monthnav { display: flex; align-items: center; gap: 4px }
.monthnav a, .monthnav span.off {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--ink);
}
.monthnav a:active { background: var(--fill) }
.monthnav span.off { color: #d3cec4 }

.wrap { max-width: 520px; margin: 0 auto; padding: 16px 20px 28px; display: flex; flex-direction: column; gap: 16px }
.card {
  background: var(--card); border-radius: 20px; padding: 18px; box-shadow: var(--sh);
  display: flex; flex-direction: column; gap: 14px;
}
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted) }
.section-title { font-family: var(--serif); font-size: 24px; font-weight: 500; letter-spacing: -.015em; margin: 8px 2px -4px }
.muted { color: var(--muted) }
.small { font-size: 14px }

/* segmented control: player switcher, RSVP buttons */
.seg-ctl { display: flex; gap: 4px; padding: 4px; background: var(--fill); border-radius: 15px }
.seg-ctl > a, .seg-ctl > button {
  flex: 1 1 0; min-height: 44px; border: none; border-radius: 11px; background: transparent; color: #45433f;
  font-family: var(--sans); font-size: 15px; font-weight: 500; cursor: pointer; text-decoration: none;
  display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 8px;
}
.seg-ctl > .sel { background: #fff; color: var(--txt); font-weight: 600; box-shadow: 0 1px 3px rgba(23, 24, 26, .18) }
.seg-ctl > .sel.going { background: var(--greenD); color: #fff }
.seg-ctl > button:disabled { opacity: .45; cursor: not-allowed }
.seg-ctl .tag { font-size: 11px; font-weight: 600; color: var(--yelT); background: var(--yelBg); border-radius: 99px; padding: 1px 7px }

/* buttons */
.btn {
  width: 100%; min-height: 54px; border: none; border-radius: 16px; background: var(--greenD); color: #fff;
  font-family: var(--sans); font-size: 17px; font-weight: 600; letter-spacing: -.01em; cursor: pointer;
  display: flex; align-items: center; justify-content: center; text-decoration: none; padding: 0 18px;
  box-shadow: 0 8px 18px -10px rgba(14, 127, 74, .85);
}
.btn:active { background: #0a5c36 }
.btn.ghost { background: var(--greenBg); color: var(--greenD); box-shadow: none; min-height: 48px; font-size: 16px }
.linkbtn {
  white-space: nowrap; background: none; border: none; color: var(--greenD); font-family: var(--sans); font-size: 15px; font-weight: 600;
  cursor: pointer; padding: 10px 0; min-height: 44px;
}

/* balance */
.bal { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px }
.bal .n { font-family: var(--serif); font-size: 46px; font-weight: 500; line-height: 1; letter-spacing: -.02em }
.bal .sub { font-size: 14px; color: var(--muted); margin-top: 4px }
.bal .n + .sub { margin-top: 8px }
.paidup { display: flex; align-items: center; gap: 14px }
.ring {
  flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--greenBg); color: var(--greenD);
  display: grid; place-items: center;
}
.paidup h2 { font-size: 26px }
details.fallback { font-size: 14px; color: var(--muted) }
details.fallback summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--muted); font-weight: 500 }
details.fallback .box { background: var(--fill); border-radius: 13px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; margin-top: 4px }
details.fallback .row { display: flex; justify-content: space-between; gap: 10px; align-items: center }
details.fallback b { color: var(--txt) }
.copy { background: #fff; border: none; border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--greenD); cursor: pointer; min-height: 32px }

/* events */
.event { gap: 12px }
.event.cancelled { opacity: .7 }
.event .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px }
.event h3 { font-family: var(--sans); font-size: 17px; font-weight: 600; letter-spacing: -.01em }
.event.cancelled h3 { text-decoration: line-through }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--muted); margin-top: 3px }
.meta span { display: inline-flex; align-items: center; gap: 5px }
.badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end }
.badge { font-size: 12px; font-weight: 600; border-radius: 99px; padding: 3px 10px; white-space: nowrap; background: var(--fill); color: #45433f }
.badge.paid, .badge.roster { background: var(--greenBg); color: var(--greenT) }
.badge.due { background: var(--yelBg); color: var(--yelInk) }
.badge.covered { background: #eaf0f7; color: #26476b }
.badge.cancelled { background: var(--redBg); color: var(--red) }

/* capacity: one cell per spot, like the challenges app's tracker */
.cap { display: flex; flex-direction: column; gap: 8px }
.cap .line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px }
.cap .head { font-weight: 600; font-size: 15px }
.cap.almost .head { color: var(--yelT) }
.cap.full .head { color: var(--muted) }
.cells { display: flex; gap: 3px }
.cells i { flex: 1 1 0; height: 8px; border-radius: 4px; background: var(--seg) }
.cells i.on { background: var(--greenD) }
.cap.almost .cells i.on { background: var(--yel) }
.cap.full .cells i.on { background: #b9b4aa }
.who { font-size: 14px; color: var(--muted); line-height: 1.45 }
.who b { color: var(--txt); font-weight: 600 }
details.roster summary { cursor: pointer; font-size: 14px; color: var(--muted); min-height: 32px; display: flex; align-items: center }
details.roster ul { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px }
details.roster li { font-size: 13px; background: var(--fill); border-radius: 99px; padding: 3px 10px }


.empty { text-align: center; color: var(--muted); font-size: 15px; padding: 8px 0 }
.note { font-size: 14px; color: var(--muted); text-align: center; line-height: 1.45 }

/* sessions tab */
.tiles { display: flex; gap: 10px }
.tile {
  flex: 1 1 0; background: var(--card); border-radius: 20px; box-shadow: var(--sh); padding: 14px 8px 13px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.tile .n { font-family: var(--serif); font-size: 34px; font-weight: 500; line-height: 1.05; letter-spacing: -.02em }
.tile .l { font-size: 12px; font-weight: 500; color: var(--muted) }
.tile.due .n { color: var(--yelT) }
.list { padding: 4px 18px }
.list .item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 0 }
.list .item + .item { border-top: 1px solid var(--line) }
.list .item .t { font-weight: 600; font-size: 16px }
.list .item .d { font-size: 14px; color: var(--muted) }
.list .item .r { display: flex; flex-direction: column; align-items: flex-end; gap: 4px }
.list .item .price { font-weight: 600; font-size: 15px }

/* footer + tab bar */
.you {
  background: var(--card); border-radius: 20px; padding: 10px 18px; box-shadow: var(--sh);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.you span { font-size: 14px; color: var(--muted); overflow-wrap: anywhere }
.you b { color: var(--txt); font-weight: 600 }
.foot { text-align: center; font-size: 12.5px; line-height: 1.55; color: var(--muted2) }
nav.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
nav.tabs a {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 52px; justify-content: center;
  font-size: 12px; font-weight: 500; color: var(--muted); text-decoration: none;
}
nav.tabs a.on { color: var(--greenD); font-weight: 600 }

/* ---------- sign in ---------- */
.gate { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 32px 24px }
.gate .in { max-width: 360px; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center }
.gate .crest { width: 124px; height: 124px }
.gate h1 { font-size: 40px; letter-spacing: -.02em; line-height: 1.06 }
.gate .lede { margin: -10px 0 0; font-size: 16px; color: var(--muted); line-height: 1.45 }
.gate form { width: 100%; display: flex; flex-direction: column; gap: 12px; text-align: left }
.gate label { font-size: 14px; font-weight: 600; color: var(--muted); padding-left: 4px }
.gate input {
  width: 100%; height: 60px; padding: 0 20px; border: none; border-radius: 18px; background: #fff; color: var(--txt);
  font-family: var(--sans); font-size: 18px; font-weight: 500;
  box-shadow: 0 1px 2px rgba(23, 24, 26, .06), 0 10px 22px -14px rgba(23, 24, 26, .2);
}
.gate input:focus { outline: 2px solid var(--greenD); outline-offset: 0 }
.gate input.code { font-size: 28px; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums }
.gate .btn { min-height: 60px; font-size: 18px; border-radius: 18px }
.gate .hint { font-size: 14px; color: var(--muted); text-align: center; line-height: 1.45 }
.error { background: var(--redBg); color: var(--red); border-radius: 14px; padding: 12px 14px; font-size: 14px; text-align: left; width: 100% }
.demo-box { width: 100%; background: var(--yelBg); color: var(--yelInk); border-radius: 16px; padding: 14px 16px; font-size: 14px; text-align: left; display: flex; flex-direction: column; gap: 8px }
.demo-box b { font-size: 26px; letter-spacing: .2em; font-variant-numeric: tabular-nums }
.demo-box ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px }
.demo-box a { color: var(--yelInk); font-weight: 600; display: block; padding: 6px 0; min-height: 32px }
.demo-box .who { color: #6b5500; font-weight: 400; font-size: 13px }

/* ---------- tablet ---------- */
@media (min-width: 768px) {
  .wrap { max-width: 600px; padding: 22px 28px 32px }
  header.top { padding-top: 34px }
  nav.tabs { max-width: 600px; margin: 0 auto; border-radius: 20px 20px 0 0; border: 1px solid var(--line); border-bottom: none }
}

/* "Show more" */
details.more { display: flex; flex-direction: column }
details.more summary { list-style: none }
details.more summary::-webkit-details-marker { display: none }
details.more[open] summary { display: none }
.more-list { display: flex; flex-direction: column; gap: 16px }

/* To do card */
.todo { gap: 10px }
.todo-head { display: flex; align-items: center; gap: 14px }
.todo-head .count {
  flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--greenD); color: #fff;
  display: grid; place-items: center; font-family: var(--serif); font-size: 22px; font-weight: 500;
}
.todo-head h2 { font-size: 22px; line-height: 1.2 }
.todo-list { list-style: none; margin: 0; padding: 0 }
.todo-list li + li { border-top: 1px solid var(--line) }
.todo-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 8px 0;
  color: var(--txt); text-decoration: none;
}
.todo-list a > span { display: flex; flex-direction: column }
.todo-list b { font-weight: 600; font-size: 15px }
.todo-list svg { color: var(--muted); flex: none }
.badge.todo { background: var(--greenD); color: #fff }
.seg-ctl .bubble {
  min-width: 20px; height: 20px; border-radius: 10px; background: var(--greenD); color: #fff;
  font-size: 12px; font-weight: 600; display: inline-grid; place-items: center; padding: 0 6px;
}
/* jump links land the card below the top edge, not under it */
.event { scroll-margin-top: 16px }

/* Teams tab */
.team .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px }
.team h2 { font-size: 26px; line-height: 1.15; margin-top: 4px }
.group { display: flex; flex-direction: column; gap: 8px }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px }
.chips li { font-size: 14px; background: var(--fill); border-radius: 99px; padding: 5px 12px }
.chips li.me { background: var(--greenBg); color: var(--greenT); font-weight: 600 }
.games { list-style: none; margin: 0; padding: 0 }
.games li { padding: 0 }
.games .gamelink { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; min-height: 52px; color: var(--txt); text-decoration: none }
.games .gamelink svg { flex: none }
.games .gamelink > svg { color: var(--muted) }
.games li + li { border-top: 1px solid var(--line) }
.games li b { font-weight: 600 }
.games li.cancelled b { text-decoration: line-through; color: var(--muted) }
/* coach note, same as the challenges app */
.coachnote { background: var(--fill); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px }
.coachnote .top { display: flex; align-items: center; gap: 10px }
.coachnote .av {
  flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--greenD); color: #fff;
  display: grid; place-items: center; font-size: 14px; font-weight: 600;
}
.coachnote .by { font-size: 13px; font-weight: 600 }
.coachnote .msg { font-size: 15.5px; line-height: 1.47; color: #2c2e31 }

/* Challenge tab: the challenges app's star grid */
.tile .l { display: flex; align-items: center; gap: 4px }
.tile .flame { color: #c0562a; display: flex }
.stars-h { font-size: 27px; margin-top: 4px }
.grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px }
.cell { aspect-ratio: 1; background: var(--seg); border-radius: 13px; display: flex; align-items: center; justify-content: center; color: #cfcabf }
.cell.on { background: var(--yelBg); color: var(--yelIcon) }
.weeks { display: flex; gap: 3px; border-radius: 14px; overflow: hidden }
.wk { flex: 1 1 0; padding: 11px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--seg) }
.wk .n { font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1 }
.wk .l { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #8b877f }
.wk.later .n { color: #b9b4aa }

.morelink {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px;
  font-size: 14px; font-weight: 600; color: var(--greenD); text-decoration: none; border-top: 1px solid var(--line); padding-top: 4px;
}

/* game page */
header.top { position: relative }
header.top .back {
  position: absolute; left: 12px; top: 22px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink);
}
.meta.big { font-size: 15px; gap: 6px 16px }

/* add to calendar */
.section-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 8px 2px -4px }
.section-row .section-title { margin: 0 }
.callink { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--greenD); text-decoration: none }
.box .url { font-size: 12.5px; overflow-wrap: anywhere; font-weight: 500 }

/* arrival + match notes */
.meta .arrive { color: var(--greenT); font-weight: 600 }
.arrival-box { background: var(--greenBg); color: var(--greenT); border-radius: 13px; padding: 10px 14px; font-size: 15px }
.arrival-box b { font-weight: 700 }
.notes-tag { color: var(--yelT); font-weight: 600 }

/* match notes */
.notes .coachnote-top { display: flex; align-items: center; gap: 10px }
.notes .coachnote-top .av {
  flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--greenD); color: #fff;
  display: grid; place-items: center; font-size: 14px; font-weight: 600;
}
.notes .coachnote-top h2 { font-family: var(--sans); font-size: 16px; font-weight: 600; letter-spacing: 0 }
.notes-body { font-size: 15.5px; line-height: 1.5; color: #2c2e31 }
.notes-body h1 { font-size: 22px; margin: 4px 0 8px }
.notes-body h2 { font-size: 19px; margin: 14px 0 4px }
.notes-body h3, .notes-body h4 { font-family: var(--sans); font-size: 15px; font-weight: 700; margin: 12px 0 2px }
.notes-body p { margin: 6px 0 }
.notes-body ul, .notes-body ol { margin: 6px 0; padding-left: 22px }
.notes-body li { margin: 3px 0 }
.notes-body blockquote { margin: 8px 0; padding: 8px 12px; background: var(--fill); border-radius: 10px }
.notes-body table { border-collapse: collapse; width: 100%; font-size: 14px }
.notes-body th, .notes-body td { border-bottom: 1px solid var(--line); padding: 6px 4px; text-align: left }
.notes-body blockquote > p:first-child { font-weight: 600; margin-top: 0 }
.notes-body blockquote ul { margin-bottom: 0 }

/* lineup cards inside match notes */
.lineup { background: var(--bg); border-radius: 16px; padding: 14px; margin: 14px 0 6px; display: flex; flex-direction: column; gap: 10px }
.lu-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap }
.lu-head h3 { font-family: var(--serif); font-size: 21px; font-weight: 500; margin: 0 }
.lu-meta { display: flex; gap: 6px; flex-wrap: wrap }
.lu-meta span { font-size: 13px; font-weight: 600; background: #fff; border-radius: 99px; padding: 3px 10px; color: #45433f }
.lu-arrive { background: var(--greenBg); color: var(--greenT); border-radius: 12px; padding: 8px 12px; font-size: 14.5px }
.lu-label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 2px }
.lu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px }
.lu-row { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; padding: 8px 10px; min-height: 44px }
.lu-row .pos {
  flex: none; min-width: 34px; text-align: center; font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  color: var(--greenT); background: var(--greenBg); border-radius: 8px; padding: 3px 4px;
}
.lu-row .name { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.lu-row .cap-mark { margin-left: auto; font-size: 16px }
.notes-body .lineup .chips { margin: 0; padding: 0 }
.lineup .chips li { background: #fff }
.lu-legend { font-size: 12.5px; color: var(--muted) }
.btn.share { margin-top: 4px }
.share-hint { text-align: center; margin-top: -6px }

/* coach view */
.coach-bar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--ink); color: #fff; font-size: 13.5px; padding: 8px 14px; padding-top: max(8px, env(safe-area-inset-top));
}
.coach-bar b { font-weight: 700 }
.coach-actions { display: flex; gap: 6px; flex: none }
.coach-bar button {
  background: rgba(255, 255, 255, .14); color: #fff; border: none; border-radius: 99px; padding: 6px 12px;
  font-size: 13px; font-weight: 600; cursor: pointer; min-height: 32px;
}
.page.no-tabs { padding-bottom: 28px }
.coach-search { display: flex; gap: 8px }
.coach-search input {
  flex: 1; min-height: 48px; border: none; border-radius: 14px; padding: 0 14px; background: #fff; font-size: 16px;
  box-shadow: var(--sh); font-family: var(--sans);
}
.coach-search .btn { width: auto; min-height: 48px }
.coach-list { list-style: none; margin: 6px 0 0; padding: 0 }
.coach-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 0 }
.coach-row + .coach-row { border-top: 1px solid var(--line) }
.coach-row .t { font-weight: 600 }
.coach-row .d { font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere }
.coach-row .copy { background: var(--greenBg); min-height: 36px; padding: 6px 14px }
