@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: dark;
  --bg: #060806;
  --shell: #090c0a;
  --surface: #101512;
  --surface-2: #151c17;
  --surface-3: #1a231d;
  --ink: #f4f8f4;
  --muted: #8d9990;
  --muted-2: #5f6b62;
  --line: rgba(255,255,255,.085);
  --lime: #b7ff00;
  --lime-dark: #82c900;
  --orange: #ff9a43;
  --red: #ff5570;
  --blue: #54a8ff;
  --shadow: 0 24px 70px rgba(0,0,0,.42);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #edf1ec;
  --shell: #f6f8f5;
  --surface: #ffffff;
  --surface-2: #f0f4ef;
  --surface-3: #e8eee7;
  --ink: #101510;
  --muted: #687269;
  --muted-2: #8b958d;
  --line: rgba(18,28,20,.11);
  --shadow: 0 22px 55px rgba(31,48,35,.12);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); scroll-behavior: smooth; }
body { min-width: 320px; min-height: 100vh; margin: 0; overflow-x: hidden; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { color: inherit; -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
[hidden] { display: none !important; }

.app-shell { width: 100%; max-width: 960px; min-height: 100vh; margin: 0 auto; background: var(--shell); }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; height: calc(64px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 15px 0; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--shell) 92%, transparent); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; cursor: pointer; }
.brand img { width: 30px; height: 30px; object-fit: contain; }
.brand span { font-family: "Barlow Condensed", sans-serif; font-size: 24px; font-weight: 800; letter-spacing: .8px; }
.brand b { color: var(--lime); }
.top-actions { display: flex; align-items: center; gap: 7px; }
.icon-button { height: 38px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.icon-button { position: relative; display: grid; width: 38px; place-items: center; padding: 0; border-radius: 12px; }
.icon-button svg { width: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.notification-dot { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); }

main { padding: 14px 13px calc(88px + env(safe-area-inset-bottom)); }
.view { display: none; animation: view-in 180ms ease both; }
.view.is-active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(5px); } }
@keyframes blink { 50% { opacity: .35; } }

.matchday-hero { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: end; min-height: 218px; overflow: hidden; padding: 23px 20px; border: 1px solid rgba(183,255,0,.22); border-radius: 24px; background: radial-gradient(circle at 95% 10%, rgba(183,255,0,.17), transparent 42%), linear-gradient(145deg, #151e16, #0b100c 72%); box-shadow: var(--shadow); }
.matchday-hero::after { content: ""; position: absolute; width: 210px; height: 210px; right: -103px; top: -94px; border: 42px solid rgba(183,255,0,.055); border-radius: 50%; }
.hero-copy { position: relative; z-index: 1; }
.kicker, .section-head > div > span, .page-header > span, .feature-card > div > span, .device-card > div > span { color: var(--lime); font-size: 9px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.matchday-hero h1 { margin: 13px 0 9px; font-family: "Barlow Condensed", sans-serif; font-size: clamp(43px, 12vw, 66px); line-height: .87; letter-spacing: -.8px; text-transform: uppercase; }
.matchday-hero h1 em { color: var(--lime); font-style: normal; }
.matchday-hero p { max-width: 330px; margin: 0; color: #aab5ac; font-size: 11px; line-height: 1.5; }
:root[data-theme="light"] .matchday-hero p { color: #b8c1ba; }
.hero-count { position: relative; z-index: 1; display: grid; justify-items: end; align-self: start; min-width: 66px; padding: 9px 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: rgba(4,8,5,.68); }
.hero-count strong { color: var(--lime); font-family: "Barlow Condensed", sans-serif; font-size: 34px; line-height: 1; }
.hero-count span { color: #9ca79f; font-size: 8px; font-weight: 800; text-transform: uppercase; }

.install-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; margin-top: 11px; padding: 11px 12px; border: 1px solid rgba(84,168,255,.2); border-radius: 17px; background: linear-gradient(100deg, rgba(84,168,255,.08), transparent), var(--surface); }
.install-mark { display: grid; width: 36px; height: 36px; place-items: center; overflow: hidden; border-radius: 10px; background: #101810; }
.install-mark img { width: 34px; height: 34px; }
.install-card > div:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.install-card strong { font-size: 10px; }
.install-card span { overflow: hidden; color: var(--muted); font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
.small-button, .link-button { border: 0; color: var(--lime); font-size: 9px; font-weight: 800; cursor: pointer; }
.small-button { min-height: 33px; padding: 0 11px; border: 1px solid rgba(183,255,0,.25); border-radius: 10px; background: rgba(183,255,0,.08); }
.link-button { padding: 5px 0; background: transparent; }

.section { margin-top: 25px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 0 2px 11px; }
.section-head h2 { margin: 4px 0 0; font-family: "Barlow Condensed", sans-serif; font-size: 25px; line-height: 1; text-transform: uppercase; }
.section-head small { padding-bottom: 2px; color: var(--muted); font-size: 8px; }
.sport-tabs { display: flex; gap: 7px; overflow-x: auto; padding: 2px 1px 6px; scrollbar-width: none; }
.sport-tabs::-webkit-scrollbar { display: none; }
.sport-tab { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--muted); cursor: pointer; }
.sport-tab span { font-size: 14px; }
.sport-tab b { font-size: 9.5px; }
.sport-tab i { display: grid; min-width: 18px; height: 18px; place-items: center; border-radius: 6px; background: var(--surface-3); font-size: 8px; font-style: normal; }
.sport-tab.is-active { border-color: rgba(183,255,0,.5); background: rgba(183,255,0,.085); color: var(--ink); box-shadow: inset 0 -2px var(--lime); }
.sport-tab.is-active i { background: var(--lime); color: #111800; }
.filter-tabs { display: flex; gap: 5px; overflow-x: auto; margin: 7px 0 12px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); scrollbar-width: none; }
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tabs button { flex: 1 0 auto; min-width: 58px; min-height: 33px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 9px; font-weight: 800; cursor: pointer; }
.filter-tabs button.is-active { background: var(--surface-3); color: var(--ink); box-shadow: inset 0 -2px var(--lime); }

.match-list { display: grid; gap: 9px; }
.match-card { position: relative; overflow: hidden; padding: 13px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg, var(--surface-2), var(--surface)); box-shadow: inset 0 1px rgba(255,255,255,.025); }
.match-card.is-clickable { cursor: pointer; }
.match-card.is-live { border-left: 3px solid var(--lime); }
.match-card.is-highlighted { animation: highlight 1.1s ease; }
@keyframes highlight { 50% { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(183,255,0,.12); } }
.match-meta { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.competition { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .45px; text-transform: uppercase; }
.competition span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.competition i { color: var(--lime); font-style: normal; }
.match-state { display: flex; flex: 0 0 auto; align-items: center; gap: 5px; padding: 5px 7px; border-radius: 8px; background: var(--surface-3); color: var(--muted); font-size: 8px; font-weight: 800; }
.match-state.live { background: rgba(183,255,0,.1); color: var(--lime); }
.match-state.live::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.match-body { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 7px; padding: 14px 0 9px; }
.team { display: grid; justify-items: center; gap: 7px; min-width: 0; text-align: center; }
.team-crest { position: relative; display: grid; width: 43px; height: 43px; place-items: center; flex: 0 0 auto; }
.team-crest > img { position: absolute; inset: 0; width: 43px; height: 43px; padding: 3px; border-radius: 50%; object-fit: contain; background: var(--surface-2); }
.team-avatar { width: 43px; height: 43px; border-radius: 50%; background: rgba(255,255,255,.045); }
.team-avatar { display: grid; place-items: center; padding: 0; color: var(--lime); font-family: "Barlow Condensed", sans-serif; font-size: 17px; font-weight: 800; }
.team strong { width: 100%; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.score-block { display: grid; min-width: 83px; justify-items: center; }
.score { display: flex; align-items: center; gap: 7px; font-family: "Barlow Condensed", sans-serif; font-size: 36px; font-weight: 800; white-space: nowrap; }
.score i { color: var(--muted-2); font-size: 17px; font-style: normal; }
.match-card.is-live .score { color: var(--lime); }
.score.versus { color: var(--muted); font-size: 12px; letter-spacing: 1px; }
.score-block small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.match-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.match-footer > span { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.match-actions { display: flex; flex: 0 0 auto; gap: 6px; }
.match-actions button { display: grid; width: 30px; height: 30px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-3); color: var(--muted); cursor: pointer; }
.match-actions button.is-favorite { border-color: rgba(183,255,0,.3); color: var(--lime); }
.match-actions svg { width: 14px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.empty-state { display: grid; justify-items: center; min-height: 185px; place-content: center; padding: 25px 20px; border: 1px dashed rgba(183,255,0,.2); border-radius: 18px; background: var(--surface); text-align: center; }
.empty-state > span { display: grid; width: 44px; height: 44px; place-items: center; margin-bottom: 10px; border-radius: 14px; background: rgba(183,255,0,.08); color: var(--lime); font-size: 20px; }
.empty-state h3 { margin: 0 0 5px; font-family: "Barlow Condensed", sans-serif; font-size: 22px; text-transform: uppercase; }
.empty-state p { max-width: 290px; margin: 0 0 13px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.empty-state-actions { display: flex; gap: 7px; }

.watchlist { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.watch-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; padding: 12px; border-bottom: 1px solid var(--line); }
.watch-row:last-child { border-bottom: 0; }
.watch-time { min-width: 38px; color: var(--lime); font-family: "Barlow Condensed", sans-serif; font-size: 17px; }
.watch-copy { display: grid; gap: 3px; min-width: 0; }
.watch-copy strong { overflow: hidden; font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.watch-copy span, .watch-row > span { color: var(--muted); font-size: 8px; }

.page-header { padding: 17px 3px 14px; }
.page-header h1 { margin: 4px 0; font-family: "Barlow Condensed", sans-serif; font-size: 44px; line-height: 1; text-transform: uppercase; }
.page-header p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.feature-card, .device-card { position: relative; display: grid; gap: 14px; overflow: hidden; padding: 20px; border: 1px solid rgba(183,255,0,.24); border-radius: 22px; background: radial-gradient(circle at 100% 0, rgba(183,255,0,.12), transparent 42%), var(--surface); }
.feature-icon, .device-icon { display: grid; width: 58px; height: 58px; place-items: center; border: 1px solid rgba(183,255,0,.24); border-radius: 18px; background: rgba(183,255,0,.08); font-size: 23px; }
.device-icon img { width: 50px; height: 50px; }
.feature-card h2, .device-card h2 { margin: 4px 0 5px; font-family: "Barlow Condensed", sans-serif; font-size: 29px; line-height: 1; text-transform: uppercase; }
.feature-card p, .device-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.primary-button { min-height: 42px; padding: 0 15px; border: 1px solid var(--lime); border-radius: 12px; background: var(--lime); color: #111700; font-size: 10px; font-weight: 800; cursor: pointer; box-shadow: 0 10px 28px rgba(183,255,0,.1); }
.primary-button:disabled { cursor: wait; opacity: .55; }
.full-button { width: 100%; }
.target-card { margin-top: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.target-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.target-head > div > span { color: var(--lime); font-size: 8px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.target-head h2 { margin: 4px 0; font-family: "Barlow Condensed", sans-serif; font-size: 24px; line-height: 1; text-transform: uppercase; }
.target-head p { max-width: 270px; margin: 0; color: var(--muted); font-size: 8.5px; line-height: 1.45; }
.target-head > strong { flex: 0 0 auto; padding: 6px 8px; border: 1px solid rgba(183,255,0,.22); border-radius: 9px; background: rgba(183,255,0,.07); color: var(--lime); font-size: 8px; }
.scope-tabs, .target-type-tabs { display: grid; grid-template-columns: repeat(2,1fr); gap: 4px; margin-top: 13px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--shell); }
.scope-tabs button, .target-type-tabs button { min-height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 8.5px; font-weight: 800; cursor: pointer; }
.scope-tabs button.is-active, .target-type-tabs button.is-active { background: var(--surface-3); color: var(--ink); box-shadow: inset 0 -2px var(--lime); }
.target-picker.is-disabled { opacity: .42; pointer-events: none; }
.target-type-tabs { grid-template-columns: repeat(3,1fr); margin-top: 9px; }
.target-search { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 7px; margin-top: 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--shell); color: var(--muted); }
.target-search input { width: 100%; min-height: 38px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 9px; }
.target-search input::placeholder { color: var(--muted-2); }
.target-options { display: grid; gap: 6px; max-height: 260px; overflow-y: auto; margin-top: 8px; }
.target-option { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; min-height: 48px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); text-align: left; cursor: pointer; }
.target-option > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: var(--surface-3); color: var(--lime); font-size: 12px; }
.target-option > div { display: grid; gap: 2px; min-width: 0; }
.target-option b, .target-option small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.target-option b { font-size: 9px; }
.target-option small { color: var(--muted); font-size: 7.5px; }
.target-option i { display: grid; width: 20px; height: 20px; place-items: center; border: 1px solid var(--line); border-radius: 7px; color: transparent; font-size: 10px; font-style: normal; }
.target-option.is-selected { border-color: rgba(183,255,0,.35); background: rgba(183,255,0,.065); }
.target-option.is-selected i { border-color: var(--lime); background: var(--lime); color: #111700; }
.target-empty { padding: 18px 10px; color: var(--muted); font-size: 8.5px; text-align: center; }
.settings-list, .menu-list { display: grid; overflow: hidden; margin-top: 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.settings-list label { position: relative; display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 11px; padding: 11px 13px; border-bottom: 1px solid var(--line); cursor: pointer; }
.settings-list label:last-child { border-bottom: 0; }
.settings-list label > span { display: grid; grid-template-columns: 34px 1fr; min-width: 0; }
.settings-list label i { grid-row: 1/3; display: grid; width: 32px; height: 32px; place-items: center; margin-right: 9px; border-radius: 10px; background: var(--surface-3); font-size: 12px; font-style: normal; }
.settings-list b { font-size: 10px; }
.settings-list small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.settings-list input { position: absolute; opacity: 0; pointer-events: none; }
.settings-list em { position: relative; flex: 0 0 auto; width: 38px; height: 22px; border-radius: 99px; background: #29312b; transition: background 150ms; }
.settings-list em::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #748078; transition: transform 150ms, background 150ms; }
.settings-list input:checked + em { background: rgba(183,255,0,.26); }
.settings-list input:checked + em::after { background: var(--lime); transform: translateX(16px); }
.sound-card { margin-top: 12px; overflow: hidden; border: 1px solid rgba(183,255,0,.19); border-radius: 19px; background: radial-gradient(circle at 100% 0,rgba(183,255,0,.07),transparent 34%),var(--surface); }
.sound-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 15px 15px 12px; border-bottom: 1px solid var(--line); }
.sound-head > div > span { color: var(--lime); font-size: 8px; font-weight: 800; letter-spacing: .9px; text-transform: uppercase; }
.sound-head h2 { margin: 4px 0; font-family: "Barlow Condensed",sans-serif; font-size: 25px; line-height: 1; text-transform: uppercase; }
.sound-head p { max-width: 290px; margin: 0; color: var(--muted); font-size: 8.5px; line-height: 1.45; }
.sound-head > i { display: grid; width: 37px; height: 37px; place-items: center; border: 1px solid rgba(183,255,0,.22); border-radius: 12px; background: rgba(183,255,0,.08); color: var(--lime); font-size: 18px; font-style: normal; }
.sound-list { display: grid; }
.sound-list label { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 9px; min-height: 65px; padding: 10px 13px; border-bottom: 1px solid var(--line); }
.sound-list label:last-child { border-bottom: 0; }
.sound-list label > span { display: grid; gap: 3px; min-width: 0; }
.sound-list b { font-size: 9.5px; }
.sound-list small { color: var(--muted); font-size: 7.5px; }
.sound-list button { min-height: 29px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-3); color: var(--ink); font-size: 7.5px; font-weight: 800; cursor: pointer; }
.sound-list input { position: absolute; opacity: 0; pointer-events: none; }
.sound-list em { position: relative; width: 34px; height: 20px; border-radius: 99px; background: #29312b; }
.sound-list em::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #748078; transition: transform 150ms,background 150ms; }
.sound-list input:checked + em { background: rgba(183,255,0,.26); }
.sound-list input:checked + em::after { background: var(--lime); transform: translateX(14px); }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; margin-top: 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.metrics div { display: grid; justify-items: center; gap: 2px; padding: 15px 4px; border-right: 1px solid var(--line); }
.metrics div:last-child { border-right: 0; }
.metrics strong { color: var(--lime); font-family: "Barlow Condensed", sans-serif; font-size: 25px; }
.metrics span { color: var(--muted); font-size: 8px; }
.menu-list button { display: grid; grid-template-columns: 34px 1fr auto; min-height: 58px; align-items: center; padding: 0 13px; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; }
.menu-list button:last-child { border-bottom: 0; }
.menu-list button > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 10px; background: var(--surface-3); color: var(--lime); }
.menu-list b { font-size: 10px; text-align: left; }
.menu-list i { color: var(--muted); font-size: 8px; font-style: normal; }
.menu-list .danger-row > span, .menu-list .danger-row i { color: var(--red); }

.bottom-nav { position: fixed; z-index: 35; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(4,1fr); height: calc(68px + env(safe-area-inset-bottom)); padding: 5px max(7px,env(safe-area-inset-left)) env(safe-area-inset-bottom) max(7px,env(safe-area-inset-right)); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--shell) 96%, transparent); backdrop-filter: blur(18px); }
.bottom-nav button { position: relative; display: grid; place-items: center; align-content: center; gap: 3px; border: 0; background: none; color: var(--muted-2); font-size: 8px; font-weight: 800; cursor: pointer; }
.bottom-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.bottom-nav button.is-active { color: var(--lime); }
.bottom-nav button.is-active::before { content: ""; position: absolute; top: -5px; width: 27px; height: 2px; border-radius: 3px; background: var(--lime); box-shadow: 0 0 11px rgba(183,255,0,.5); }
.bottom-nav button > i { position: absolute; top: 5px; right: calc(50% - 17px); width: 5px; height: 5px; border-radius: 50%; background: var(--red); }

.modal { position: fixed; z-index: 70; inset: 0; display: grid; align-items: end; visibility: hidden; opacity: 0; transition: opacity 180ms, visibility 180ms; }
.modal.is-open { visibility: visible; opacity: 1; }
.modal-scrim { position: absolute; inset: 0; border: 0; background: rgba(0,0,0,.74); backdrop-filter: blur(5px); }
.bottom-sheet { position: relative; width: 100%; max-height: 92vh; overflow-y: auto; padding: 11px 20px calc(22px + env(safe-area-inset-bottom)); border: 1px solid var(--line); border-bottom: 0; border-radius: 25px 25px 0 0; background: var(--surface); text-align: center; transform: translateY(18px); transition: transform 180ms ease; }
.modal.is-open .bottom-sheet { transform: none; }
.match-sheet { padding: 11px 14px calc(18px + env(safe-area-inset-bottom)); text-align: left; }
.match-detail-head { padding: 2px 37px 0; text-align: center; }
.match-detail-kicker { display: block; overflow: hidden; color: var(--lime); font-size: 8px; font-weight: 800; letter-spacing: .8px; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.match-detail-head h2 { margin: 4px 0 14px; font-size: 28px; }
.detail-scoreboard { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 10px; padding: 15px 8px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg,var(--surface-2),var(--shell)); }
.detail-team { display: grid; justify-items: center; gap: 7px; min-width: 0; }
.detail-team .team-crest, .detail-team .team-crest > img, .detail-team .team-avatar { width: 51px; height: 51px; }
.detail-team strong { width: 100%; overflow: hidden; font-size: 9px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.detail-score { display: grid; min-width: 90px; justify-items: center; }
.detail-score > b { display: flex; align-items: center; gap: 8px; margin-top: 7px; color: var(--ink); font-family: "Barlow Condensed",sans-serif; font-size: 39px; line-height: 1; }
.detail-score > b i { color: var(--muted-2); font-size: 19px; font-style: normal; }
.detail-score > b small { color: var(--muted); font-size: 13px; letter-spacing: 1px; }
.detail-score > small { margin-top: 4px; color: var(--muted); font-size: 7.5px; }
.detail-score .match-state.live + b { color: var(--lime); }
.match-detail-tabs { display: grid; grid-template-columns: repeat(3,1fr); gap: 4px; margin: 11px 0; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--shell); }
.match-detail-tabs button { min-height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 8.5px; font-weight: 800; cursor: pointer; }
.match-detail-tabs button i { display: inline-grid; min-width: 17px; height: 17px; place-items: center; margin-left: 3px; border-radius: 6px; background: var(--surface-3); font-size: 7px; font-style: normal; }
.match-detail-tabs button.is-active { background: var(--surface-3); color: var(--ink); box-shadow: inset 0 -2px var(--lime); }
.match-detail-panel { min-height: 235px; }
.detail-overview, .detail-data-section { display: grid; gap: 10px; }
.detail-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.detail-facts > div { display: grid; gap: 3px; min-height: 55px; align-content: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.detail-facts span { color: var(--muted); font-size: 7px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.detail-facts strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.detail-preview, .detail-data-section { padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.detail-section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.detail-section-title > span { color: var(--ink); font-size: 9px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.detail-section-title button, .detail-section-title small { border: 0; background: none; color: var(--lime); font-size: 7.5px; font-weight: 800; }
.detail-stat-list { display: grid; gap: 13px; }
.detail-stat { display: grid; gap: 6px; margin-bottom: 10px; }
.detail-stat:last-child { margin-bottom: 0; }
.detail-stat > div:first-child { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 6px; }
.detail-stat b { font-size: 9px; }
.detail-stat b:last-child { text-align: right; }
.detail-stat span { color: var(--muted); font-size: 7.5px; font-weight: 700; text-align: center; }
.detail-stat-track { position: relative; height: 5px; overflow: hidden; border-radius: 5px; background: #39413c; }
.detail-stat-track i { display: block; height: 100%; border-right: 2px solid var(--surface-2); border-radius: 5px 0 0 5px; background: var(--lime); box-shadow: 0 0 12px rgba(183,255,0,.22); }
.detail-alert-button { display: flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; border: 1px solid rgba(183,255,0,.28); border-radius: 12px; background: rgba(183,255,0,.07); color: var(--lime); font-size: 8.5px; font-weight: 800; cursor: pointer; }
.detail-alert-button.is-selected { background: var(--lime); color: #111700; }
.detail-alert-button svg { width: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.detail-empty { display: grid; min-height: 220px; justify-items: center; place-content: center; padding: 25px; border: 1px dashed rgba(183,255,0,.2); border-radius: 15px; background: var(--surface-2); text-align: center; }
.detail-empty i { display: grid; width: 42px; height: 42px; place-items: center; margin-bottom: 9px; border-radius: 13px; background: rgba(183,255,0,.08); color: var(--lime); font-size: 17px; font-style: normal; }
.detail-empty strong { font-size: 10px; }
.detail-empty span { max-width: 270px; margin-top: 5px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.detail-event-list { display: grid; }
.detail-event { display: grid; grid-template-columns: 35px 39px 1fr; align-items: center; gap: 9px; min-height: 64px; border-bottom: 1px solid var(--line); }
.detail-event:last-child { border-bottom: 0; }
.detail-event time { color: var(--lime); font-family: "Barlow Condensed",sans-serif; font-size: 16px; font-weight: 800; }
.event-avatar { position: relative; display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; background: linear-gradient(145deg,var(--surface-3),var(--surface-2)); box-shadow: 0 5px 14px rgba(0,0,0,.2); color: var(--text); overflow: visible; }
.side-home .event-avatar { border-color: rgba(183,255,0,.25); }
.side-away .event-avatar { border-color: rgba(97,166,255,.3); }
.event-avatar-fallback { font-family: "Barlow Condensed",sans-serif; font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.event-avatar > img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: center top; background: var(--surface-3); }
.event-type-badge { position: absolute; right: -4px; bottom: -3px; z-index: 2; display: grid; min-width: 16px; height: 16px; place-items: center; padding: 0 3px; border: 2px solid var(--surface); border-radius: 999px; background: var(--lime); color: #071006; font-family: "Barlow Condensed",sans-serif; font-size: 8px; font-style: normal; font-weight: 900; line-height: 1; }
.event-type-badge.type-yellow-card,.event-type-badge.type-red-card { min-width: 11px; width: 11px; height: 14px; padding: 0; border-radius: 3px; }
.event-type-badge.type-yellow-card { background: #ffd84a; }
.event-type-badge.type-red-card { background: var(--red); }
.event-type-badge.type-substitution { background: #61a6ff; color: #06111d; font-size: 10px; }
.event-type-badge.type-var { background: #e8edf0; color: #111713; font-size: 6px; }
.event-player { display: flex; align-items: center; gap: 8px; min-width: 0; }
.event-player > span { display: grid; gap: 3px; min-width: 0; }
.event-player b, .event-player small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-player b { font-size: 8.5px; }
.event-player small { color: var(--muted); font-size: 7px; }
.sheet-handle { width: 39px; height: 4px; margin: 0 auto 12px; border-radius: 4px; background: var(--muted-2); }
.modal-close { position: absolute; top: 17px; right: 16px; display: grid; width: 33px; height: 33px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-3); color: var(--muted); font-size: 20px; cursor: pointer; }
.sheet-app-icon { display: grid; width: 62px; height: 62px; place-items: center; margin: 4px auto 13px; overflow: hidden; border: 1px solid rgba(183,255,0,.25); border-radius: 18px; background: rgba(183,255,0,.07); }
.sheet-app-icon img { width: 56px; height: 56px; }
.bottom-sheet h2 { margin: 6px 0 7px; font-family: "Barlow Condensed", sans-serif; font-size: 33px; line-height: 1; text-transform: uppercase; }
.bottom-sheet > p { max-width: 390px; margin: 0 auto; color: var(--muted); font-size: 10px; line-height: 1.55; }
.pair-form { display: grid; gap: 9px; margin: 18px 0 9px; }
.pair-form label { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.pair-form input { width: 100%; min-height: 60px; border: 1px solid rgba(183,255,0,.3); border-radius: 15px; background: var(--shell); color: var(--lime); font-family: "Barlow Condensed", sans-serif; font-size: 34px; font-weight: 800; letter-spacing: 7px; text-align: center; }
.pair-form input::placeholder { color: var(--muted-2); }
.sheet-status { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 8px; }
.sheet-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); }
.connected-actions { display: grid; gap: 9px; margin-top: 18px; }
.connected-actions small { color: var(--muted); font-size: 8px; line-height: 1.5; }
.install-steps { display: grid; gap: 8px; margin: 18px 0; padding: 0; list-style: none; text-align: left; }
.install-steps li { display: grid; grid-template-columns: 29px 1fr; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.install-steps li span { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 9px; background: rgba(183,255,0,.1); color: var(--lime); font-size: 9px; font-weight: 800; }
.install-steps li div { display: grid; gap: 2px; }
.install-steps b { font-size: 9px; }
.install-steps small { color: var(--muted); font-size: 8px; }
.toast { position: fixed; z-index: 100; bottom: calc(78px + env(safe-area-inset-bottom)); left: 50%; max-width: calc(100vw - 26px); padding: 10px 13px; border: 1px solid rgba(183,255,0,.24); border-radius: 12px; background: var(--surface-3); box-shadow: var(--shadow); color: var(--ink); font-size: 9px; font-weight: 700; opacity: 0; pointer-events: none; transform: translate(-50%,10px); transition: opacity 160ms, transform 160ms; white-space: nowrap; }
.toast.is-visible { opacity: 1; transform: translate(-50%,0); }

@media (min-width: 700px) {
  body { padding: 20px 0; }
  .app-shell { min-height: calc(100vh - 40px); overflow: hidden; border: 1px solid var(--line); border-radius: 28px; box-shadow: 0 30px 90px rgba(0,0,0,.42); }
  .topbar { padding-right: 26px; padding-left: 26px; }
  main { padding: 20px 26px 105px; }
  .matchday-hero { min-height: 275px; padding: 35px; }
  .matchday-hero h1 { font-size: 69px; }
  .match-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .match-list-page .empty-state, .match-list .empty-state { grid-column: 1/-1; }
  .feature-card, .device-card { grid-template-columns: auto 1fr auto; align-items: center; }
  .settings-list, .menu-list { max-width: 690px; }
  .bottom-nav { left: 50%; bottom: 16px; width: min(540px,calc(100% - 76px)); height: 62px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 18px; transform: translateX(-50%); box-shadow: 0 17px 45px rgba(0,0,0,.45); }
  .bottom-sheet { width: 455px; margin: 0 auto 18px; padding: 12px 28px 24px; border-bottom: 1px solid var(--line); border-radius: 25px; }
  .toast { bottom: 90px; }
}

@media (max-width: 370px) {
  .matchday-hero { min-height: 208px; padding: 21px 17px; }
  .matchday-hero h1 { font-size: 42px; }
  .connection-copy small { max-width: 185px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
