/* Event-day screen (UX-ONE-SCHEDULE). Sunlight rules (spec §3): dark background, pure white
   body text, grey only for other teams' and finished rows, 15px+ text, 19px+ key facts, 44px+
   tap targets. Colours mean one thing everywhere: green next/advancing, red being played,
   yellow ref duty, blue waiting / "now". .ed--public re-points the tokens at the club theme. */
.ed { --ed-bg:#0b0f14; --ed-card:#151d27; --ed-head:#1d2733; --ed-line:#2c3a4a; --ed-text:#fff; --ed-sub:#cfd8e3; --ed-dim:#9aa6b2;
      --ed-green:#3ddc84; --ed-green-ink:#04210f; --ed-green-bg:#123d22; --ed-red:#ff5252; --ed-red-bg:#3a0f0f;
      --ed-yellow:#ffd666; --ed-yellow-ink:#2a2108; --ed-yellow-bg:#2a2108; --ed-blue:#9fd0ff; --ed-blue-ink:#06223d; --ed-blue-bg:#0e1a26;
      background:var(--ed-bg); color:var(--ed-text); max-width:560px; margin:0 auto; box-sizing:border-box;
      font:16px/1.35 -apple-system,system-ui,sans-serif; }
.ed * { box-sizing:border-box; }
body.ed-body { margin:0; background:#0b0f14; }
.ed--page { min-height:100vh; padding:12px 12px 96px; }
.ed-top { display:flex; justify-content:space-between; align-items:flex-start; gap:8px; margin-bottom:8px; }
.ed-title { font-size:19px; font-weight:900; }
.ed-team { font-size:15px; color:var(--ed-sub); font-weight:800; margin-top:2px; }
.ed-top a { color:var(--ed-blue); font-size:15px; font-weight:800; min-height:44px; display:inline-flex; align-items:center; white-space:nowrap; }
.ed-chips { display:flex; gap:8px; overflow-x:auto; margin-bottom:10px; }
.ed-chip { min-height:44px; padding:0 14px; border-radius:22px; border:2px solid var(--ed-line); background:var(--ed-card); color:var(--ed-text); font-size:15px; font-weight:800; white-space:nowrap; }
.ed-chip.on { border-color:var(--ed-green); background:var(--ed-green-bg); }
.ed-error { background:#4a1010; border:2px solid var(--ed-red); border-radius:10px; padding:10px 12px; font-size:16px; font-weight:700; margin-bottom:10px; }
.ed-loading { text-align:center; padding:30px 0; font-size:16px; color:var(--ed-sub); }
.ed-now { border-radius:14px; padding:12px; margin-bottom:12px; border:2px solid var(--ed-blue); background:var(--ed-blue-bg); }
.ed-now .k { font-size:13px; font-weight:900; letter-spacing:.07em; text-transform:uppercase; color:var(--ed-blue); }
.ed-now .t { font-size:19px; font-weight:900; margin-top:4px; overflow-wrap:anywhere; }
.ed-now .s { font-size:16px; margin-top:4px; overflow-wrap:anywhere; }
.ed-now.tone-red { border-color:var(--ed-red); background:var(--ed-red-bg); } .ed-now.tone-red .k { color:#ffb3b3; }
.ed-now.tone-yellow { border-color:var(--ed-yellow); background:var(--ed-yellow-bg); } .ed-now.tone-yellow .k { color:var(--ed-yellow); }
.ed-now.tone-grey { border-color:var(--ed-line); background:var(--ed-card); } .ed-now.tone-grey .k { color:var(--ed-sub); }
.ed-btn { display:block; width:100%; min-height:52px; margin-top:10px; border:0; border-radius:12px; background:var(--ed-green); color:var(--ed-green-ink);
          font-size:19px; font-weight:900; text-align:center; text-decoration:none; line-height:52px; }
.ed-sec { border:2px solid var(--ed-line); border-radius:12px; overflow:hidden; margin-bottom:10px; }
.ed-sh { width:100%; min-height:48px; display:flex; justify-content:space-between; align-items:center; gap:8px; padding:8px 12px;
         background:var(--ed-head); color:var(--ed-text); border:0; font-size:16px; font-weight:900; text-align:left; }
.ed-sh .sum { font-size:14px; color:var(--ed-sub); font-weight:800; text-align:right; }
.ed-row { display:grid; grid-template-columns:64px 1fr auto; gap:8px; align-items:center; padding:10px 12px; border-top:1px solid var(--ed-line);
          font-size:16px; font-weight:800; min-height:44px; }
.ed-row .lb { font-size:15px; } .ed-row .tx { overflow-wrap:anywhere; } .ed-row .rs { text-align:right; white-space:nowrap; }
.ed-row.k-other, .ed-row.k-path { font-size:14px; font-weight:600; color:var(--ed-dim); padding:5px 12px; min-height:0; }
.ed-row.t-done { color:var(--ed-sub); } .ed-row.k-other.t-done { color:var(--ed-dim); }
.ed-row.t-next { background:var(--ed-green-bg); } .ed-row.t-ref { background:var(--ed-yellow-bg); }
.ed-row.t-live { background:var(--ed-red-bg); color:var(--ed-text); }
.ed-row.is-now { box-shadow:inset 5px 0 0 var(--ed-blue); }
.ed-row[role=button] { cursor:pointer; }
.tag { font-size:12px; font-weight:900; padding:2px 6px; border-radius:5px; margin-right:6px; }
.tag-next { background:var(--ed-green); color:var(--ed-green-ink); } .tag-ref { background:var(--ed-yellow); color:var(--ed-yellow-ink); }
.tag-live { background:var(--ed-red); color:#fff; } .tag-deck { background:var(--ed-blue); color:var(--ed-blue-ink); }
.ed-path { padding:6px 12px 10px 84px; font-size:15px; line-height:1.45; border-top:1px dashed var(--ed-line); }
.ed-card { border:2px solid var(--ed-line); border-radius:12px; margin-bottom:10px; overflow:hidden; }
.ed-card h3 { margin:0; padding:9px 12px; background:var(--ed-head); font-size:16px; font-weight:900; }
.ed-card .b { padding:10px 12px; font-size:16px; line-height:1.45; }
.ed-card .b p { margin:0 0 6px; }
.ed-card .kv { display:flex; justify-content:space-between; gap:10px; padding:4px 0; border-bottom:1px solid var(--ed-head); }
.ed-card .kv span:first-child { color:var(--ed-sub); font-weight:700; }
.ed-card .note { font-size:13px; color:var(--ed-blue); font-weight:800; padding:0 12px 10px; }
.ed-card .b a { color:var(--ed-blue); }
.ed-nav { position:fixed; left:0; right:0; bottom:0; display:flex; background:#0f151d; border-top:2px solid var(--ed-line); padding-bottom:env(safe-area-inset-bottom); z-index:20; }
.ed-nav button { flex:1; min-height:60px; border:0; background:none; color:var(--ed-sub); font-size:14px; font-weight:800; }
.ed-nav button i { display:block; font-style:normal; font-size:20px; }
.ed-nav button.on { color:#fff; background:var(--ed-head); box-shadow:inset 0 3px 0 var(--ed-green); }
.ed-foot { text-align:center; margin-top:12px; }
.ed .live-refresh-label { font-size:13px; color:var(--ed-sub); }
[x-cloak] { display:none !important; }
@media (max-width:360px) { .ed-row { grid-template-columns:52px 1fr auto; } .ed-path { padding-left:72px; } }
/* Full Event (spec §3.2) */
.ed-divh { font-size:17px; font-weight:900; margin:14px 2px 8px; }
.ed-rnd { border:2px solid #3a4a5c; border-radius:14px; margin-bottom:10px; overflow:hidden; }
.ed-rh { width:100%; min-height:50px; display:flex; justify-content:space-between; align-items:center; gap:8px; padding:9px 12px;
         background:#24303d; color:var(--ed-text); border:0; font-size:16px; font-weight:900; text-align:left; }
.ed-rh .badge { font-size:12px; font-weight:900; padding:3px 7px; border-radius:6px; white-space:nowrap; }
.b-live { background:var(--ed-red); color:#fff; } .b-later { background:#3a4a5c; color:#fff; } .b-done { background:var(--ed-green-bg); color:var(--ed-green); }
.ed-rb { padding:8px; }
.ed-note { margin:4px 4px 8px; font-size:16px; color:var(--ed-sub); }
.ed-pool { border:2px solid var(--ed-line); border-radius:10px; margin-bottom:8px; overflow:hidden; }
.ed-pool.mine { border-color:var(--ed-green); }
.ed-ph { width:100%; min-height:46px; display:flex; justify-content:space-between; align-items:center; gap:8px; padding:8px 10px;
         background:var(--ed-head); color:var(--ed-text); border:0; font-size:15px; font-weight:900; text-align:left; }
.ed-ph .sum { font-size:14px; color:var(--ed-sub); font-weight:800; text-align:right; }
.ed-tr { display:grid; grid-template-columns:24px 1fr 48px 48px; gap:4px; padding:7px 10px; font-size:15px; border-top:1px solid var(--ed-line); }
.ed-tr .w, .ed-tr .pd { text-align:right; } .ed-tr .n { overflow-wrap:anywhere; }
.ed-tr.me { background:var(--ed-green-bg); font-weight:800; }
.ed-tr.adv { box-shadow:inset 4px 0 0 var(--ed-green); } .ed-tr.adv .r { color:var(--ed-green); font-weight:900; } /* green = advancing; names stay white */
.ed-tr.cut { border-bottom:3px dashed var(--ed-green); }
.ed-subh { display:flex; justify-content:space-between; font-size:12px; color:var(--ed-sub); font-weight:900; text-transform:uppercase; letter-spacing:.05em; padding:7px 10px 4px; border-top:1px solid var(--ed-line); }
.ed-scroll { position:relative; max-height:176px; overflow-y:auto; background:#0f151d; -webkit-overflow-scrolling:touch; }
.ed-mr { display:grid; grid-template-columns:52px 1fr auto; gap:6px; padding:7px 10px; font-size:15px; border-top:1px solid var(--ed-head); color:#e3e9f0; }
.ed-mr .n { color:var(--ed-sub); font-weight:800; } .ed-mr .rs { text-align:right; white-space:nowrap; }
.ed-mr.dim { color:var(--ed-dim); } .ed-mr.hl { background:var(--ed-red-bg); color:#fff; }
.ed-bracket { position:relative; border:2px solid var(--ed-line); border-radius:10px; background:#0f151d; }
.ed-zoom { position:absolute; right:6px; top:6px; display:flex; gap:6px; z-index:2; }
.ed-zoom button { width:44px; height:44px; border-radius:10px; border:2px solid var(--ed-line); background:var(--ed-head); color:#fff; font-size:22px; font-weight:900; }
.ed-bscroll { overflow:auto; touch-action:pan-x pan-y; -webkit-overflow-scrolling:touch; padding:56px 8px 10px; }
.ed-binner { display:flex; gap:14px; width:max-content; }
.ed-bcol { display:flex; flex-direction:column; width:168px; }
.ed-bcol-h { font-size:13px; font-weight:900; color:var(--ed-sub); text-transform:uppercase; letter-spacing:.05em; margin-bottom:6px; }
.ed-bcol-b { flex:1; display:flex; flex-direction:column; justify-content:space-around; gap:10px; }
.ed-bcard { position:relative; border:2px solid var(--ed-line); border-radius:8px; background:var(--ed-card); }
.ed-bcard::after { content:''; position:absolute; right:-16px; top:50%; width:14px; border-top:2px solid var(--ed-line); }
.ed-bcol:last-child .ed-bcard::after, .ed-third .ed-bcard::after { display:none; }
.ed-bcard.mine { border-color:var(--ed-green); box-shadow:0 0 0 2px var(--ed-green); }
.ed-bcard.live { border-color:var(--ed-red); background:var(--ed-red-bg); }
.ed-bl { font-size:12px; color:var(--ed-sub); font-weight:800; padding:3px 8px 0; }
.ed-bt { display:flex; justify-content:space-between; gap:6px; padding:5px 8px; font-size:15px; }
.ed-bt span { overflow-wrap:anywhere; } .ed-bt.won { font-weight:900; } .ed-bt.won b { color:var(--ed-green); }
.ed-bcard.done .ed-bt:not(.won) { color:var(--ed-dim); }
.ed-third { padding:0 8px 10px; width:184px; }

/* Score sheet */
body.ed-locked { overflow:hidden; }
.ed-sheet { position:fixed; inset:0; z-index:50; overflow-y:auto; background:#0b0f14; -webkit-overflow-scrolling:touch; }
.ed-sheet-close { position:sticky; top:0; z-index:2; display:block; margin-left:auto; min-height:44px; padding:0 16px; border:0;
                  background:#1d2733; color:#fff; font-size:16px; font-weight:900; border-bottom-left-radius:12px; }
.ed-sheet .ps { min-height:auto; }
/* Public results (phase 4): same layout on the club's page, in its light or dark mode. The org
   page's own tokens are too faint for sunlight (0.08-alpha borders, ~3:1 muted text), so the
   colours are set here. Surfaces match tokens.css; text >= 7:1, secondary / finished >= 4.5:1,
   lines and the live / advancing edges >= 3:1 on every surface they sit on. Pinned by
   tests/js/event_day_contrast.test.mjs: change a value there and here together. */
.ed--public { --ed-bg:transparent; --ed-card:#1e293b; --ed-head:#334155; --ed-bracket:#0f172a; --ed-line:#7c8aa0;
              --ed-text:#f8fafc; --ed-sub:#cbd5e1; --ed-dim:#a7b3c4;
              --ed-green:#3ddc84; --ed-green-bg:#123d22; --ed-red:#dc2626; --ed-red-bg:#3a0f0f;
              max-width:none; padding:0; font-size:16px; }
.vbm-light .ed--public { --ed-card:#ffffff; --ed-head:#e2e8f0; --ed-bracket:#e9eef4; --ed-line:#6b7a90;
              --ed-text:#0f172a; --ed-sub:#334155; --ed-dim:#475569;
              --ed-green:#166534; --ed-green-bg:#dcfce7; --ed-red:#dc2626; --ed-red-bg:#fee2e2; }
.ed--public .ed-rnd { border-color:var(--ed-line); background:var(--ed-card); }
.ed--public .ed-rh { background:var(--ed-head); color:var(--ed-text); }
.ed--public .ed-pool { background:var(--ed-card); }
.ed--public .ed-scroll, .ed--public .ed-bracket { background:var(--ed-bracket); }
.ed--public .ed-zoom button { background:var(--ed-head); color:var(--ed-text); }
