:root { --blue: #1b458f; --deep: #0b1f4d; --red: #d4202d; --white: #fff; --soft: #c5d1ea; --gold: #f2c230; --line: rgba(255,255,255,.14); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--white); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--deep); background-image: radial-gradient(ellipse at 50% -20%, #2a5bb5 0%, var(--deep) 65%);
  min-height: 100vh; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
button, input { font: inherit; }

.hero { text-align: center; padding: 18px 0 6px; }
.crest { width: 76px; height: 76px; border-radius: 18px; }
h1 { margin: 6px 0 0; font-size: 30px; letter-spacing: 4px; font-weight: 900; }
h1 span { color: var(--red); text-shadow: 0 0 1px #fff; }
.tag { display: inline-block; margin-top: 6px; padding: 2px 16px; background: var(--red); color: #fff; font-weight: 800; letter-spacing: 5px; font-size: 12px; border-radius: 3px; }
/* red-white-blue stripe */
.hero::after { content: ""; display: block; height: 6px; margin-top: 14px; background: linear-gradient(180deg, var(--red) 0 33%, #fff 33% 66%, var(--blue) 66%); }

main { max-width: 720px; margin: 0 auto; padding: 14px 14px 40px; }
h2 { font-size: 14px; letter-spacing: 3px; text-transform: uppercase; color: var(--soft); margin: 26px 2px 10px; }
.empty { text-align: center; color: var(--soft); padding: 18px; }

.card { background: linear-gradient(180deg, rgba(27,69,143,.9), rgba(11,31,77,.95)); border: 2px solid var(--blue); border-radius: 18px; padding: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.comp { text-align: center; color: var(--gold); font-weight: 800; letter-spacing: 2px; font-size: 12px; text-transform: uppercase; }
.vs { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 6px; }
.team { width: 34%; text-align: center; font-weight: 800; font-size: 16px; }
.team img { display: block; width: 64px; height: 64px; margin: 0 auto 6px; object-fit: contain; }
.mid { text-align: center; }
.mid .day { font-size: 13px; color: var(--soft); }
.mid .time { font-size: 32px; font-weight: 900; line-height: 1.1; }
.mid .cd { font-size: 15px; color: var(--gold); font-variant-numeric: tabular-nums; font-weight: 700; }
.venue { text-align: center; color: var(--soft); font-size: 13px; }

.watch { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.lbl { font-size: 11px; letter-spacing: 2px; color: var(--soft); margin-bottom: 8px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { border: 0; border-radius: 10px; padding: 8px 12px; background: #fff; color: var(--deep); font-weight: 800; font-size: 15px; text-align: left; }
.pill small { display: block; font-weight: 500; font-size: 11px; color: #51617f; }
.pill.on { box-shadow: 0 0 0 3px var(--gold); }
.pill.none { background: rgba(255,255,255,.16); color: #fff; }
.panel { display: none; margin-top: 10px; padding: 10px; border-radius: 12px; background: rgba(0,0,0,.25); }
.panel.open { display: block; }
.hint { color: var(--soft); font-size: 13px; padding: 3px 0; }
.play { display: inline-flex; align-items: center; gap: 6px; margin: 4px 6px 4px 0; padding: 10px 14px; border: 0; border-radius: 10px; background: #1fa64a; color: #fff; font-weight: 800; font-size: 15px; }
.play::before { content: "\25B6"; font-size: 12px; }
.vlcbtn { display: inline-block; margin: 4px 6px 4px 0; padding: 10px 12px; border-radius: 10px; background: #f08a00; color: #fff; font-weight: 800; font-size: 13px; text-decoration: none; }

.list { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(27,69,143,.5); width: 100%; border: 0; color: #fff; text-align: left; }
.when { width: 66px; flex: none; }
.when b { display: block; font-size: 12px; }
.when span { color: var(--gold); font-weight: 800; font-size: 16px; }
.row img { width: 30px; height: 30px; object-fit: contain; flex: none; }
.what { flex: 1; min-width: 0; }
.what b { display: block; font-size: 15px; }
.what span { color: var(--soft); font-size: 12px; }
.ch { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; max-width: 42%; }
.chip { background: #fff; color: var(--deep); font-weight: 800; font-size: 11px; padding: 2px 6px; border-radius: 5px; text-align: right; }
.chip.tbc { background: transparent; color: var(--soft); border: 1px solid var(--line); font-weight: 500; }
.rowwrap .panel { margin-top: 6px; }
.score { font-size: 18px; font-weight: 900; flex: none; }
.res { display: inline-block; width: 22px; text-align: center; border-radius: 4px; font-weight: 900; color: #fff !important; font-size: 13px !important; }
.res.W { background: #1fa64a; } .res.D { background: #8a96a8; } .res.L { background: var(--red); }

footer { margin-top: 26px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.btn { border: 0; border-radius: 10px; padding: 10px 14px; background: var(--blue); color: #fff; font-weight: 800; }
.btn.link { background: transparent; color: var(--soft); text-decoration: underline; font-weight: 500; }
.gold-btn { background: var(--gold); color: var(--deep); }
.status { color: var(--soft); font-size: 11px; line-height: 1.5; }

.setup { margin-bottom: 14px; padding: 14px; border-radius: 16px; border: 2px solid var(--gold); background: rgba(242,194,48,.12); }
.setup b.h { display: block; color: var(--gold); font-size: 17px; margin-bottom: 6px; }
.setup ol { margin: 6px 0 10px; padding-left: 20px; font-size: 14px; line-height: 1.4; }

.sheet { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; z-index: 10; }
.sheet[hidden] { display: none; }
.sheet-in { width: 100%; max-width: 720px; margin: 0 auto; background: var(--deep); border-top: 3px solid var(--red); border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 92vh; overflow: auto; }
.sheet h3 { margin: 0 0 6px; font-size: 20px; }
.muted { color: var(--soft); font-size: 13px; margin: 4px 0; }
.gold { color: var(--gold); font-size: 13px; margin: 4px 0 10px; }
label { display: block; font-size: 13px; color: var(--soft); margin-top: 10px; }
input { display: block; width: 100%; margin-top: 4px; padding: 12px; border-radius: 10px; border: 1px solid #3d5f99; background: #12306b; color: #fff; font-size: 16px; }
.row-btns { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.msg { margin-top: 10px; color: var(--gold); font-weight: 700; font-size: 14px; }

.player { position: fixed; inset: 0; background: #000; z-index: 20; display: flex; flex-direction: column; }
.player[hidden] { display: none; }
.pbar { display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px; background: #111; }
.pbar span { flex: 1; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vlc { background: #f08a00; text-decoration: none; font-size: 13px; }
video { flex: 1; width: 100%; background: #000; }
.pmsg { position: absolute; left: 12px; right: 12px; bottom: calc(70px + env(safe-area-inset-bottom)); text-align: center; color: #fff; background: rgba(27,69,143,.9); border-radius: 10px; padding: 10px; display: none; }
.pmsg.show { display: block; }
