/* ============================================================
   WILLOW — server-rendered re-skin, scoped under body.willow
   Ported from the Willow prototype, adapted for the real app
   (no phone frame; centered mobile-width content column).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,400..900;1,400..700&family=Spline+Sans+Mono:wght@400;500;600&display=swap');

body.willow {
  /* surfaces — warm paper */
  --paper: oklch(0.985 0.006 90);
  --paper-2: oklch(0.965 0.008 88);
  --card: oklch(1 0 0);
  --ink: oklch(0.245 0.012 160);
  --ink-2: oklch(0.42 0.012 160);
  --ink-3: oklch(0.58 0.010 150);
  --hair: oklch(0.905 0.010 100);
  --hair-2: oklch(0.93 0.008 100);
  --pitch: oklch(0.52 0.105 152);
  --pitch-deep: oklch(0.30 0.045 158);
  --pitch-ink: oklch(0.225 0.028 160);
  --pitch-soft: oklch(0.95 0.030 150);
  --ondark: oklch(0.97 0.012 150);
  --ball: oklch(0.55 0.165 26);
  --ball-soft: oklch(0.945 0.035 30);
  --gold: oklch(0.76 0.115 78);
  --gold-soft: oklch(0.95 0.045 85);
  --sky: oklch(0.60 0.090 232);
  --sky-soft: oklch(0.95 0.030 232);
  --q-elite: oklch(0.70 0.135 70);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-card: 0 1px 2px oklch(0.3 0.02 160 / 0.04), 0 4px 14px oklch(0.3 0.02 160 / 0.05);
  --mono: 'Spline Sans Mono', ui-monospace, monospace;
  --sans: 'Archivo', system-ui, sans-serif;

  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(120% 60% at 50% -10%, oklch(0.95 0.012 150) 0%, transparent 60%),
    oklch(0.915 0.010 100);
  -webkit-font-smoothing: antialiased;
}

html[data-theme="dark"] body.willow {
  --paper: oklch(0.205 0.012 162);
  --paper-2: oklch(0.245 0.014 162);
  --card: oklch(0.245 0.015 164);
  --ink: oklch(0.955 0.008 120);
  --ink-2: oklch(0.78 0.012 140);
  --ink-3: oklch(0.60 0.012 145);
  --hair: oklch(0.32 0.013 162);
  --hair-2: oklch(0.285 0.012 162);
  --pitch: oklch(0.74 0.135 152);
  --pitch-deep: oklch(0.24 0.035 160);
  --pitch-ink: oklch(0.32 0.045 160);
  --pitch-soft: oklch(0.33 0.055 152);
  --ball: oklch(0.66 0.16 28);
  --ball-soft: oklch(0.33 0.07 28);
  --gold: oklch(0.82 0.12 80);
  --gold-soft: oklch(0.34 0.06 80);
  --sky-soft: oklch(0.32 0.05 232);
  --q-elite: oklch(0.82 0.13 78);
  --shadow-card: 0 1px 2px oklch(0 0 0 / 0.30), 0 4px 14px oklch(0 0 0 / 0.30);
  background:
    radial-gradient(120% 60% at 50% -10%, oklch(0.27 0.02 160) 0%, transparent 60%),
    oklch(0.135 0.012 162);
}

/* content column — mobile-width, centered (the "app" feel).
   Only the true app screens (home, settings) opt into the narrow column via
   .willow-app; dense content pages (team/player) keep their full width. */
body.willow-app main.container {
  max-width: 540px;
  padding: 8px 0 60px;
}
body.willow .pad,
body.willow .section { padding-left: 18px; padding-right: 18px; }
body.willow .section { margin-top: 26px; }

body.willow h1, body.willow h2, body.willow h3 { font-family: var(--sans); }
body.willow a { color: var(--pitch); }

/* headings */
body.willow .eyebrow {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3);
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
body.willow .eyebrow::after { content: ''; flex: 1; height: 1px; background: var(--hair); }
body.willow h1.title { font-size: 28px; font-weight: 900; letter-spacing: -0.03em; line-height: 1.04; margin: 0; }
body.willow h2.subtitle { font-size: 13px; font-weight: 600; color: var(--ink-3); margin: 4px 0 0; }

/* card */
body.willow .card { background: var(--card); border: 1px solid var(--hair); border-radius: var(--radius); box-shadow: var(--shadow-card); }

/* segmented control (tabs) */
body.willow .segmented { display: flex; gap: 4px; padding: 4px; background: var(--paper-2); border: 1px solid var(--hair); border-radius: 13px; }
body.willow .segmented a, body.willow .segmented button {
  flex: 1; border: none; background: transparent; text-decoration: none; text-align: center;
  font-family: var(--sans); font-size: 13.5px; font-weight: 700; color: var(--ink-3);
  padding: 9px 6px; border-radius: 9px; cursor: pointer;
}
body.willow .segmented a.active, body.willow .segmented button.active {
  background: var(--card); color: var(--ink); box-shadow: 0 1px 2px oklch(0.3 0.02 160 / 0.12);
}

/* stat grid */
body.willow .statgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--hair); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--hair); }
body.willow .statgrid .cell { background: var(--card); padding: 14px 10px; text-align: center; }
body.willow .statgrid .cell .n { font-size: 24px; font-weight: 900; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
body.willow .statgrid .cell .l { font-family: var(--mono); font-size: 9.5px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin-top: 7px; }
body.willow .tone-pos { color: var(--pitch); }
body.willow .tone-neg { color: var(--ball); }
body.willow .tone-gold { color: var(--gold); }

/* squad / leader rows */
body.willow .squad { display: flex; flex-direction: column; gap: 8px; }
body.willow .prow {
  display: grid; grid-template-columns: 44px 1fr auto 16px; align-items: center; gap: 13px;
  padding: 11px 14px 11px 12px; background: var(--card); border: 1px solid var(--hair);
  border-radius: 15px; cursor: pointer; text-decoration: none; color: inherit;
}
body.willow .prow:hover { border-color: oklch(0.84 0.02 150); box-shadow: var(--shadow-card); }
body.willow .avatar { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; font-size: 15px; letter-spacing: -0.02em; color: var(--ondark); background: var(--pitch-ink); }
body.willow .prow .who { min-width: 0; }
body.willow .prow .who .nm { font-size: 15.5px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.willow .prow .who .role { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.05em; }
body.willow .prow .metric { text-align: right; }
body.willow .prow .metric .mn { font-size: 19px; font-weight: 900; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
body.willow .prow .metric .ml { font-family: var(--mono); font-size: 9.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }
body.willow .prow .chev { color: var(--ink-3); display: grid; place-items: center; }

/* role mini badge */
body.willow .rb { display: inline-flex; width: 15px; height: 15px; border-radius: 4px; align-items: center; justify-content: center; font-size: 9px; font-weight: 800; color: var(--ondark); }
body.willow .rb.bat { background: var(--pitch); }
body.willow .rb.bowl { background: var(--ball); }
body.willow .rb.keep { background: var(--gold); color: oklch(0.3 0.05 80); }

/* result dot */
body.willow .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
body.willow .dot.w { background: var(--pitch); }
body.willow .dot.l { background: var(--ball); }
body.willow .dot.a { background: var(--ink-3); }
body.willow .form-dots { display: flex; gap: 4px; }

/* HOME — My Teams cards */
body.willow .home-head { padding: 6px 18px 14px; }
body.willow .greeting { font-family: var(--mono); font-size: 11px; letter-spacing: 0.10em; text-transform: uppercase; color: var(--ink-3); }
body.willow .home-title { font-size: 30px; font-weight: 900; letter-spacing: -0.035em; line-height: 1; margin: 4px 0 0; }
body.willow .searchbar { display: flex; align-items: center; gap: 10px; margin: 0 18px; padding: 12px 15px; background: var(--card); border: 1px solid var(--hair); border-radius: 14px; }
body.willow .searchbar input { border: none; background: transparent; outline: none; font-family: var(--sans); font-size: 15px; color: var(--ink); width: 100%; margin: 0; }
body.willow .team-list { display: flex; flex-direction: column; gap: 12px; }
body.willow .team-card { display: block; text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--hair); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 16px; position: relative; }
body.willow .team-card.primary { background: radial-gradient(130% 130% at 88% -10%, oklch(0.36 0.06 158) 0%, transparent 55%), var(--pitch-deep); color: var(--ondark); border-color: transparent; }
body.willow .tc-top { display: flex; align-items: flex-start; gap: 12px; }
body.willow .tc-badge { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-family: var(--mono); font-weight: 600; font-size: 12px; flex: 0 0 auto; background: var(--pitch-ink); color: var(--ondark); }
body.willow .team-card.primary .tc-badge { background: oklch(1 0 0 / 0.12); }
body.willow .tc-name { font-size: 17px; font-weight: 900; letter-spacing: -0.025em; }
body.willow .tc-club { font-size: 12px; opacity: 0.72; margin-top: 3px; font-weight: 600; }
body.willow .tc-foot { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
body.willow .tc-rec { display: flex; gap: 12px; }
body.willow .tc-rec .x { font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; }
body.willow .tc-rec .x small { font-family: var(--mono); font-size: 9px; font-weight: 500; opacity: 0.7; text-transform: uppercase; display: block; margin-top: 4px; letter-spacing: 0.06em; }
body.willow .tc-pos { margin-left: auto; text-align: right; }
body.willow .tc-pos .p { font-size: 18px; font-weight: 900; line-height: 1; }
body.willow .tc-pos .pl { font-family: var(--mono); font-size: 9px; opacity: 0.7; text-transform: uppercase; margin-top: 4px; letter-spacing: 0.06em; }
body.willow .add-card { display: flex; align-items: center; gap: 13px; padding: 16px; border: 1.5px dashed var(--hair); border-radius: var(--radius); cursor: pointer; color: var(--ink-2); font-weight: 700; font-size: 15px; background: transparent; text-decoration: none; }
body.willow .add-card:hover { border-color: var(--pitch); color: var(--pitch); }
body.willow .add-card .plus { width: 40px; height: 40px; border-radius: 11px; background: var(--pitch-soft); color: var(--pitch); display: grid; place-items: center; flex: 0 0 auto; font-size: 22px; line-height: 1; }

/* the favourite star inside Willow cards */
body.willow .tc-star { margin-left: auto; flex: 0 0 auto; background: none; border: none; cursor: pointer; color: var(--ink-3); font-size: 22px; line-height: 1; padding: 0; }
body.willow .team-card.primary .tc-star { color: oklch(1 0 0 / 0.5); }
body.willow .tc-star.fav-active { color: var(--gold); }

/* PLAYER hero (dark) */
body.willow .phero { background: radial-gradient(120% 120% at 85% -20%, oklch(0.38 0.06 158) 0%, transparent 55%), var(--pitch-deep); color: var(--ondark); padding: 18px 22px 26px; border-radius: 0 0 26px 26px; margin: 0 -0 0; }
body.willow .phero .pid { display: flex; align-items: center; gap: 15px; }
body.willow .phero .pavatar { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; font-size: 21px; font-weight: 900; letter-spacing: -0.03em; background: oklch(1 0 0 / 0.12); border: 1px solid oklch(1 0 0 / 0.16); flex: 0 0 auto; }
body.willow .phero .pname { font-size: 25px; font-weight: 900; letter-spacing: -0.03em; line-height: 1; }
body.willow .phero .pteam { font-size: 12.5px; color: oklch(0.85 0.03 150); margin-top: 6px; font-weight: 600; }
body.willow .phero .verdict { margin-top: 16px; font-size: 15.5px; line-height: 1.45; font-weight: 500; color: oklch(0.94 0.01 150); }
body.willow .phero .verdict b { font-weight: 800; color: #fff; }
body.willow .phero .hstat { display: flex; gap: 22px; margin-top: 18px; flex-wrap: wrap; }
body.willow .phero .hstat .hn { font-size: 26px; font-weight: 900; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
body.willow .phero .hstat .hl { font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.07em; color: oklch(0.80 0.03 150); margin-top: 6px; }

/* form sparkline */
body.willow .spark { width: 100%; height: 72px; display: block; overflow: visible; }

/* distribution / position bars */
body.willow .posbars { display: flex; align-items: flex-end; gap: 6px; height: 96px; padding-top: 6px; }
body.willow .posbar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
body.willow .posbar .bar { width: 100%; border-radius: 5px 5px 3px 3px; background: var(--pitch-soft); min-height: 3px; }
body.willow .posbar.hot .bar { background: var(--pitch); }
body.willow .posbar.best .bar { background: var(--gold); }
body.willow .posbar .cap { font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
body.willow .posbar .val { font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* insight */
body.willow .insight { display: flex; gap: 13px; align-items: flex-start; padding: 15px 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--hair); box-shadow: var(--shadow-card); }
body.willow .insight + .insight { margin-top: 9px; }
body.willow .insight .ic { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--pitch-soft); color: var(--pitch); font-size: 20px; }
body.willow .insight .ic.gold { background: var(--gold-soft); color: var(--gold); }
body.willow .insight .tx { font-size: 14.5px; line-height: 1.42; font-weight: 500; color: var(--ink); }
body.willow .insight .tx b { font-weight: 800; }

/* ladder */
body.willow .ladder { width: 100%; border-collapse: collapse; font-size: 13px; }
body.willow .ladder th { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); font-weight: 500; text-align: right; padding: 8px 6px; }
body.willow .ladder th:nth-child(2) { text-align: left; }
body.willow .ladder td { padding: 9px 6px; text-align: right; font-variant-numeric: tabular-nums; border-top: 1px solid var(--hair-2); }
body.willow .ladder td:nth-child(2) { text-align: left; font-weight: 600; }
body.willow .ladder td:first-child { color: var(--ink-3); font-family: var(--mono); }
body.willow .ladder tr.me td { background: var(--pitch-soft); font-weight: 800; }
body.willow .ladder tr.me td:nth-child(2) { color: var(--pitch); }

/* fixtures */
body.willow .fix { display: flex; flex-direction: column; gap: 7px; }
body.willow .fixrow { display: grid; grid-template-columns: 40px 1fr auto auto; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--hair); border-radius: 13px; text-decoration: none; color: inherit; }
body.willow .fixrow .fr { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
body.willow .fixrow .fopp { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.willow .fixrow .fdate { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
body.willow .fixrow .fsc { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13px; text-align: right; }
body.willow .fixrow .fres { font-family: var(--mono); font-size: 10.5px; font-weight: 600; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; letter-spacing: 0.03em; }
body.willow .fres.won { background: var(--pitch-soft); color: var(--pitch); }
body.willow .fres.lost { background: var(--ball-soft); color: var(--ball); }
body.willow .fres.abn { background: var(--paper-2); color: var(--ink-3); }

/* buttons */
body.willow .btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-family: var(--sans); font-weight: 800; font-size: 15px; padding: 13px 18px; border-radius: 14px; cursor: pointer; border: 1px solid transparent; width: 100%; text-decoration: none; }
body.willow .btn-primary { background: var(--pitch-ink); color: var(--paper); }
html[data-theme="dark"] body.willow .btn-primary { color: oklch(0.16 0.01 160); background: var(--pitch); }
body.willow .btn-ghost { background: var(--card); color: var(--ink); border-color: var(--hair); }

/* settings */
body.willow .set-group { margin: 0 18px; }
body.willow .set-label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.10em; color: var(--ink-3); margin: 24px 4px 10px; }
body.willow .set-card { background: var(--card); border: 1px solid var(--hair); border-radius: var(--radius); overflow: hidden; }
body.willow .set-row { display: flex; align-items: center; gap: 13px; padding: 15px 16px; border-bottom: 1px solid var(--hair-2); }
body.willow .set-card .set-row:last-child { border-bottom: none; }
body.willow .set-row .si { width: 34px; height: 34px; border-radius: 9px; background: var(--paper-2); display: grid; place-items: center; color: var(--ink-2); flex: 0 0 auto; font-size: 17px; }
body.willow .set-row > .grow { flex: 1; min-width: 0; }
body.willow .set-row .st { font-size: 15px; font-weight: 700; text-decoration: none; color: var(--ink); }
body.willow .set-row .ss { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
body.willow .set-row .sx { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--ink-3); }
body.willow .theme-seg { display: flex; gap: 4px; padding: 4px; background: var(--paper-2); border: 1px solid var(--hair); border-radius: 13px; }
body.willow .theme-seg button { flex: 1; border: none; background: transparent; font-family: var(--sans); font-weight: 700; font-size: 13.5px; color: var(--ink-3); padding: 9px 6px; border-radius: 9px; cursor: pointer; box-shadow: none; width: auto; margin: 0; }
body.willow .theme-seg button.active { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px oklch(0.3 0.02 160 / 0.12); }

/* search results reuse */
body.willow .result-badge.tracked { background: var(--pitch-soft); color: var(--pitch); }

body.willow .note { font-size: 12px; color: var(--ink-3); line-height: 1.4; margin-top: 10px; }
body.willow .row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ============================================================
   BASE-ELEMENT LAYER — applies the Willow look to generic Pico
   markup so EVERY page is cohesive without per-template rewrites.
   ============================================================ */

/* headings */
body.willow main h1 { font-size: 26px; font-weight: 900; letter-spacing: -0.03em; line-height: 1.08; }
body.willow main h2 { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; margin-top: 1.8rem; }
body.willow main h3 { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; }
body.willow main h4 { font-size: 13px; font-weight: 800; }
body.willow small { color: var(--ink-3); }

/* Pico cards */
body.willow article {
  background: var(--card); border: 1px solid var(--hair);
  border-radius: var(--radius); box-shadow: var(--shadow-card); color: var(--ink);
}
body.willow article > header,
body.willow article > footer { background: transparent; border: none; color: var(--ink-3); }
body.willow .stat-big { font-size: 28px; font-weight: 900; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
body.willow .stat-big.win { color: var(--pitch); }
body.willow .stat-big.loss { color: var(--ball); }

/* tables */
body.willow table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
body.willow thead th {
  font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--ink-3); font-weight: 500; background: transparent; border: none;
  border-bottom: 1px solid var(--hair); padding: 8px 6px;
}
body.willow tbody td {
  padding: 9px 6px; border-top: 1px solid var(--hair-2); border-bottom: none;
  background: transparent; font-variant-numeric: tabular-nums;
}
body.willow tbody tr:hover td { background: var(--paper-2); }
body.willow td.position-used { color: var(--pitch); font-weight: 800; }
body.willow tr.win td:last-child { color: var(--pitch); font-weight: 700; }
body.willow tr.loss td:last-child { color: var(--ball); }
body.willow figure { overflow-x: auto; }

/* forms & buttons */
body.willow main button,
body.willow main [role="button"],
body.willow main input[type="submit"] { border-radius: 12px; font-family: var(--sans); font-weight: 700; }
body.willow input, body.willow select, body.willow textarea {
  border-radius: 12px; border: 1px solid var(--hair); background: var(--card); color: var(--ink);
}
body.willow input:focus, body.willow select:focus, body.willow textarea:focus { border-color: var(--pitch); box-shadow: none; }
body.willow details summary { font-weight: 700; color: var(--ink-2); }

/* team sub-nav -> segmented control */
body.willow .team-subnav { padding: 0; margin: 0 0 1.25rem; }
body.willow .team-subnav ul {
  display: flex; gap: 4px; padding: 4px; margin: 0; list-style: none; flex-wrap: wrap;
  background: var(--paper-2); border: 1px solid var(--hair); border-radius: 13px;
}
body.willow .team-subnav li { margin: 0; padding: 0; }
body.willow .team-subnav a {
  display: block; text-decoration: none; padding: 8px 13px; border-radius: 9px;
  font-size: 13px; font-weight: 700; color: var(--ink-3);
}
body.willow .team-subnav a.active-nav {
  background: var(--card); color: var(--ink); box-shadow: 0 1px 2px oklch(0.3 0.02 160 / 0.12);
}

/* leaderboard rank badges keep working on the warm palette */
body.willow .rank-badge { background: var(--paper-2); color: var(--ink-2); }
body.willow .rank-badge.rank-gold { background: var(--gold-soft); color: var(--q-elite); }

/* ===== AWARDS / SEASON REVIEW ===== */
body.willow .rev-hero {
  position: relative; overflow: hidden; color: var(--ondark);
  background: radial-gradient(110% 90% at 80% -10%, oklch(0.42 0.07 150) 0%, transparent 55%), var(--pitch-deep);
  padding: 18px 22px 24px; border-radius: 0 0 26px 26px;
}
body.willow .rev-eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.10em; text-transform: uppercase; color: var(--gold); }
body.willow .rev-team { font-size: 28px; font-weight: 900; letter-spacing: -0.035em; line-height: 1.02; margin-top: 8px; }
body.willow .rev-champ { display: flex; align-items: center; gap: 13px; margin-top: 18px; padding: 13px 15px; background: rgba(255,255,255,.10); border: 1px solid oklch(0.76 0.115 78 / 0.35); border-radius: 14px; }
body.willow .rev-champ .rc-ic { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 11px; background: var(--gold); color: oklch(0.30 0.05 80); display: grid; place-items: center; font-size: 20px; }
body.willow .rev-champ .rc-t { font-size: 16px; font-weight: 900; letter-spacing: -0.02em; }
body.willow .rev-champ .rc-s { font-size: 12px; opacity: 0.82; margin-top: 2px; }
body.willow .rev-rec { display: flex; gap: 22px; margin-top: 20px; flex-wrap: wrap; }
body.willow .rev-rec .rn { font-size: 24px; font-weight: 900; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
body.willow .rev-rec .rl { font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.07em; opacity: 0.78; margin-top: 6px; }

body.willow .award { display: flex; align-items: center; gap: 14px; padding: 15px 14px; background: var(--card); border: 1px solid var(--hair); border-radius: var(--radius); box-shadow: var(--shadow-card); margin-bottom: 9px; text-decoration: none; color: inherit; }
body.willow .aw-medal { width: 50px; height: 50px; flex: 0 0 auto; border-radius: 14px; display: grid; place-items: center; font-size: 24px; }
body.willow .aw-medal.gold { background: var(--gold-soft); color: var(--q-elite); }
body.willow .aw-medal.pitch { background: var(--pitch-soft); color: var(--pitch); }
body.willow .aw-medal.sky { background: var(--sky-soft); color: var(--sky); }
body.willow .aw-name { font-family: var(--mono); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); }
body.willow .aw-player { font-size: 18px; font-weight: 900; letter-spacing: -0.025em; margin-top: 5px; }
body.willow .aw-player .aw-stat { font-size: 13px; font-weight: 700; color: var(--pitch); margin-left: 6px; }
body.willow .aw-cite { font-size: 12.5px; color: var(--ink-2); margin-top: 5px; line-height: 1.4; }

body.willow .xi-row { display: grid; grid-template-columns: 26px 38px 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: inherit; }
body.willow .xi-row:hover { background: var(--paper-2); }
body.willow .xi-num { font-family: var(--mono); font-size: 12px; color: var(--ink-3); text-align: center; }
body.willow .xi-av { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--ondark); background: var(--pitch-ink); }
body.willow .xi-nm { font-size: 15px; font-weight: 800; letter-spacing: -0.02em; }
body.willow .xi-role { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
body.willow .xi-sub { font-family: var(--mono); font-size: 11px; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }

body.willow .fun-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
body.willow .fun-tile { background: var(--card); border: 1px solid var(--hair); border-radius: 14px; padding: 14px; }
body.willow .fun-tile .fn { font-size: 26px; font-weight: 900; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1; }
body.willow .fun-tile .fl { font-size: 13px; font-weight: 700; margin-top: 8px; }
body.willow .fun-tile .fw { font-size: 11px; color: var(--ink-3); margin-top: 4px; line-height: 1.3; }

body.willow .review-banner { display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; text-decoration: none; padding: 15px 16px; border: none; border-radius: var(--radius); color: var(--ondark); background: radial-gradient(120% 130% at 88% -10%, oklch(0.42 0.07 150) 0%, transparent 55%), var(--pitch-deep); }
body.willow .review-banner .rbi { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 11px; background: var(--gold); color: oklch(0.30 0.05 80); display: grid; place-items: center; font-size: 20px; }
body.willow .review-banner .rbt { font-size: 16px; font-weight: 900; letter-spacing: -0.02em; }
body.willow .review-banner .rbs { font-size: 12px; opacity: 0.82; margin-top: 2px; }

/* ===== ADD-TEAM WIZARD ===== */
body.willow .stepper { display: flex; align-items: center; gap: 8px; padding: 4px 18px 18px; }
body.willow .step { display: flex; align-items: center; gap: 8px; }
body.willow .step .sd { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--paper-2); color: var(--ink-3); border: 1px solid var(--hair); }
body.willow .step.active .sd { background: var(--pitch); color: #fff; border-color: var(--pitch); }
body.willow .step.done .sd { background: var(--pitch-soft); color: var(--pitch); border-color: transparent; }
body.willow .step .sl { font-size: 12px; font-weight: 700; color: var(--ink-3); }
body.willow .step.active .sl { color: var(--ink); }
body.willow .step-line { flex: 1; height: 1.5px; background: var(--hair); }

body.willow .result-row { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--card); border: 1px solid var(--hair); border-radius: 13px; margin-bottom: 8px; text-decoration: none; color: inherit; }
body.willow .result-row:hover { border-color: var(--pitch); }
body.willow .result-row .rb2 { width: 40px; height: 40px; border-radius: 11px; background: var(--pitch-ink); color: var(--ondark); display: grid; place-items: center; font-family: var(--mono); font-size: 12px; font-weight: 600; flex: 0 0 auto; }
body.willow .result-row .rn { font-size: 15px; font-weight: 800; letter-spacing: -0.015em; }
body.willow .result-row .rc { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

body.willow .sync-hero { text-align: center; padding: 30px 18px 8px; }
body.willow .sync-ring { width: 84px; height: 84px; margin: 0 auto 20px; position: relative; }
body.willow .sync-ring .r1 { position: absolute; inset: 0; border: 4px solid var(--pitch-soft); border-top-color: var(--pitch); border-radius: 50%; animation: wspin 1s linear infinite; }
body.willow .sync-ring .ic { position: absolute; inset: 0; display: grid; place-items: center; color: var(--pitch); font-size: 30px; }
@keyframes wspin { to { transform: rotate(360deg); } }
body.willow .sync-title { font-size: 22px; font-weight: 900; letter-spacing: -0.03em; }
body.willow .sync-sub { font-size: 14px; color: var(--ink-3); margin-top: 8px; line-height: 1.45; }

/* ============================================================
   DESKTOP SHELL — sidebar + topbar + wide content (responsive)
   ============================================================ */
body.willow { overflow: hidden; }                 /* .main scrolls, not body */
body.willow .app { display: grid; grid-template-columns: 264px 1fr; height: 100vh; overflow: hidden; }
body.willow .sb-backdrop { display: none; }   /* mobile-only overlay; must never be a grid column */

/* sidebar */
body.willow .sidebar { background: var(--pitch-deep); color: var(--ondark); display: flex; flex-direction: column; overflow: hidden; z-index: 50; }
body.willow .sb-brand { display: flex; align-items: center; gap: 11px; padding: 20px 20px 16px; font-weight: 900; font-size: 20px; letter-spacing: -0.03em; color: var(--ondark); text-decoration: none; }
body.willow .sb-seam { width: 24px; height: 24px; border-radius: 50%; background: var(--ball); flex: 0 0 auto; box-shadow: inset 0 0 0 2px oklch(1 0 0/0.25); }
body.willow .sb-brand small { font-family: var(--mono); font-weight: 500; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.6; display: block; margin-top: 2px; }
body.willow .sb-scroll { flex: 1; overflow-y: auto; padding: 6px 12px 12px; }
body.willow .sb-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.5; padding: 16px 12px 8px; }
body.willow .sb-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 14.5px; font-weight: 600; color: oklch(0.9 0.02 150); text-decoration: none; }
body.willow .sb-item:hover { background: oklch(1 0 0/0.07); color: #fff; }
body.willow .sb-item.active { background: oklch(1 0 0/0.12); color: #fff; }
body.willow .sb-item svg { width: 18px; height: 18px; flex: 0 0 auto; opacity: 0.85; }
body.willow .sb-item .cnt { margin-left: auto; font-family: var(--mono); font-size: 11px; opacity: 0.55; }
body.willow .sb-team { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 9px; cursor: pointer; text-decoration: none; color: var(--ondark); }
body.willow .sb-team:hover { background: oklch(1 0 0/0.07); }
body.willow .sb-team .tg { width: 26px; height: 26px; border-radius: 7px; background: oklch(1 0 0/0.12); display: grid; place-items: center; font-family: var(--mono); font-size: 9px; font-weight: 600; flex: 0 0 auto; }
body.willow .sb-team .tn { font-size: 13.5px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
body.willow .sb-team .sb-star { color: var(--gold); flex: 0 0 auto; }
body.willow .sb-foot { padding: 12px; border-top: 1px solid oklch(1 0 0/0.10); }
body.willow .sb-theme { display: flex; gap: 3px; padding: 3px; background: oklch(0 0 0/0.22); border-radius: 9px; }
body.willow .sb-theme button { flex: 1; border: none; background: transparent; color: oklch(0.85 0.02 150); font-size: 14px; font-weight: 700; padding: 6px; border-radius: 7px; cursor: pointer; }
body.willow .sb-theme button.active { background: oklch(1 0 0/0.16); color: #fff; }

/* main + topbar */
body.willow .main { overflow-y: auto; position: relative; }
body.willow .topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 14px 40px; background: var(--paper); border-bottom: 1px solid var(--hair); }
body.willow .crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); font-weight: 600; flex-wrap: wrap; }
body.willow .crumb a { color: var(--ink-3); text-decoration: none; }
body.willow .crumb a:hover { color: var(--pitch); }
body.willow .crumb .sep { opacity: 0.5; }
body.willow .crumb .here { color: var(--ink); }
body.willow .topbar .sp { flex: 1; }
body.willow .tb-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 11px; border: 1px solid var(--hair); background: var(--card); color: var(--ink); font-weight: 700; font-size: 13.5px; cursor: pointer; text-decoration: none; }
body.willow .tb-btn:hover { border-color: var(--pitch); }
body.willow .tb-btn.primary { background: var(--pitch-ink); color: var(--ondark); border-color: transparent; }
html[data-theme="dark"] body.willow .tb-btn.primary { background: var(--pitch); color: oklch(0.16 0.01 160); }
body.willow .tb-hamburger { display: none; background: none; border: none; cursor: pointer; font-size: 22px; line-height: 1; color: var(--ink); padding: 0 4px; }

body.willow .content { padding: 30px 40px 80px; max-width: 1240px; }
body.willow.willow-app .content { max-width: 900px; }

/* desktop grids */
body.willow .grid { display: grid; gap: 16px; }
body.willow .g2 { grid-template-columns: 1fr 1fr; }
body.willow .g3 { grid-template-columns: repeat(3, 1fr); }
body.willow .g4 { grid-template-columns: repeat(4, 1fr); }
body.willow .tiles { display: grid; gap: 14px; grid-template-columns: repeat(4, 1fr); }
body.willow .tile { background: var(--card); border: 1px solid var(--hair); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-card); }
body.willow .tile .n { font-size: 32px; font-weight: 900; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1; }
body.willow .tile .l { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-3); margin-top: 10px; }
body.willow .tile .x { font-size: 12px; color: var(--ink-3); margin-top: 5px; }

/* underline tabs */
body.willow .tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--hair); margin-bottom: 28px; flex-wrap: wrap; }
body.willow .tabs a, body.willow .tabs button { border: none; background: transparent; font-family: var(--sans); font-size: 14.5px; font-weight: 700; color: var(--ink-3); padding: 12px 16px; cursor: pointer; position: relative; text-decoration: none; }
body.willow .tabs a:hover, body.willow .tabs button:hover { color: var(--ink); }
body.willow .tabs a.active, body.willow .tabs button.active { color: var(--pitch); }
body.willow .tabs a.active::after, body.willow .tabs button.active::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2.5px; background: var(--pitch); border-radius: 2px; }

/* the page-header wide hero variant */
body.willow .hero-wide { padding: 26px 30px; border-radius: var(--radius); }

/* responsive: collapse to drawer under 920px */
@media (max-width: 920px) {
  body.willow .app { grid-template-columns: 1fr; }
  body.willow .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 264px; transform: translateX(-100%); transition: transform .2s ease; }
  body.willow .sidebar.open { transform: none; box-shadow: var(--shadow-pop, 0 14px 44px rgba(0,0,0,.5)); }
  body.willow .tb-hamburger { display: inline-block; }
  body.willow .topbar { padding: 12px 18px; }
  body.willow .content { padding: 20px 18px 70px; }
  body.willow .sb-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 49; }
  body.willow .tiles, body.willow .g4 { grid-template-columns: repeat(2, 1fr); }
  body.willow .g2, body.willow .g3 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body.willow .tiles, body.willow .g4 { grid-template-columns: 1fr 1fr; }
}

@media print {
  body.willow { overflow: visible; }
  body.willow .sidebar, body.willow .topbar { display: none; }
  body.willow .app { display: block; height: auto; }
  body.willow .main { overflow: visible; }
}
