:root {
  color-scheme: dark;
  --bg: #07100f;
  --panel: rgba(17, 31, 29, .92);
  --panel-2: rgba(24, 40, 37, .94);
  --line: rgba(180, 255, 215, .10);
  --text: #f4f8f6;
  --muted: #9aaba6;
  --accent: #5ce397;
  --accent-2: #32bd79;
  --track: #263733;
  --danger: #ff6b6b;
  --shadow: 0 16px 46px rgba(0, 0, 0, .28);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  touch-action: pan-x pan-y;
  -webkit-text-size-adjust: 100%;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% -10%, rgba(53, 160, 105, .18), transparent 38%),
    linear-gradient(155deg, #091513 0%, #050908 100%);
}
button { font: inherit; }
.glow { position: fixed; width: 240px; height: 240px; border-radius: 50%; filter: blur(90px); opacity: .13; pointer-events: none; }
.glow-one { background: #42e28c; top: -100px; left: -80px; }
.glow-two { background: #0f8a78; bottom: -100px; right: -100px; }
.app-shell { width: min(100%, 720px); margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) 14px calc(28px + env(safe-area-inset-bottom)); }
.loading-screen { min-height: 75vh; display: grid; place-content: center; justify-items: center; color: var(--muted); }
.brand-mark { display: block; width: 72px; height: 72px; object-fit: contain; filter: drop-shadow(0 10px 22px rgba(74, 222, 128, .28)); }
.topbar { display: flex; align-items: center; justify-content: space-between; margin: 2px 2px 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.3px; }
.brand .brand-mark { width: 44px; height: 44px; filter: drop-shadow(0 6px 14px rgba(74, 222, 128, .25)); }
.subtle { color: var(--muted); font-size: 12px; }
.ghost-button { border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text); border-radius: 12px; padding: 9px 12px; cursor: pointer; }
.hero { padding: 4px 2px 18px; }
.hero h1 { margin: 3px 0 6px; font-size: clamp(28px, 7vw, 42px); line-height: 1; letter-spacing: -1.4px; }
.hero p { margin: 0; color: var(--muted); font-size: 14px; }
.league-strip, .tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 22px 14px 34px; margin: -20px -14px -22px; }
.league-strip::-webkit-scrollbar, .tabs::-webkit-scrollbar { display: none; }
.chip, .tab { white-space: nowrap; border: 1px solid var(--line); background: rgba(255,255,255,.045); color: #bac6c2; border-radius: 999px; padding: 10px 14px; cursor: pointer; transition: .2s ease; }
.chip.active, .tab.active { color: #06190f; background: linear-gradient(135deg, #6ce9a5, #4fd58d); border-color: transparent; font-weight: 750; box-shadow: 0 8px 28px rgba(68, 214, 139, .18); }
.section-label { margin: 12px 3px 9px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.match-list { display: grid; gap: 10px; }
.match-row { width: 100%; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(25,42,39,.94), rgba(13,25,23,.96)); color: var(--text); border-radius: 19px; padding: 15px; cursor: pointer; text-align: left; box-shadow: var(--shadow); }
.match-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-bottom: 13px; }
.teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.team { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: 14px; font-weight: 700; }
.team:last-child { flex-direction: row-reverse; text-align: right; }
.team span { overflow: hidden; text-overflow: ellipsis; }
.team-logo { width: 38px; height: 38px; object-fit: contain; flex: 0 0 auto; filter: drop-shadow(0 5px 8px rgba(0,0,0,.24)); }
.versus { color: #61726c; font-size: 11px; font-weight: 800; }
.empty { border: 1px dashed var(--line); border-radius: 18px; padding: 28px 18px; color: var(--muted); text-align: center; }
.match-header { border: 1px solid var(--line); background: linear-gradient(145deg, rgba(26,43,39,.98), rgba(12,22,21,.98)); border-radius: 24px; padding: 16px; box-shadow: var(--shadow); }
.backline { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.back { background: transparent; border: 0; padding: 4px 0; color: #78eba9; cursor: pointer; font-weight: 700; }
.match-league { color: var(--muted); font-size: 12px; }
.match-header .teams { gap: 18px; }
.match-header .team { flex-direction: column; text-align: center; gap: 8px; font-size: 15px; }
.match-header .team:last-child { flex-direction: column; text-align: center; }
.match-header .team-logo { width: 64px; height: 64px; }
.kickoff { text-align: center; min-width: 68px; }
.kickoff strong { display: block; font-size: 14px; }
.kickoff span { display: block; color: var(--muted); margin-top: 3px; font-size: 11px; }

.tabs { margin: -6px -14px -20px; }
.tab { border-radius: 13px; padding: 10px 13px; font-size: 13px; }
.facts { display: grid; gap: 10px; padding-top: 7px; }
.pattern-section-title { grid-column: 1 / -1; margin: 12px 2px 2px; font-size: 15px; color: #dfeae6; letter-spacing: -.1px; }
.fact-card { position: relative; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(145deg, var(--panel-2), var(--panel)); border-radius: 18px; padding: 15px; box-shadow: 0 10px 28px rgba(0,0,0,.16); }
.fact-top { display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: center; }
.fact-icon { width: 42px; height: 42px; display: grid; place-items: center; background: rgba(255,255,255,.055); border-radius: 13px; font-size: 22px; }
.fact-title { font-size: 15px; font-weight: 760; line-height: 1.25; }
.fact-sample { color: var(--muted); font-size: 12px; margin-top: 3px; }
.fact-rate { color: var(--accent); font-weight: 850; font-size: 20px; font-variant-numeric: tabular-nums; min-width: 3.3ch; text-align: right; }
.progress { height: 7px; margin: 12px 0 0 53px; background: var(--track); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), #75efa9); box-shadow: 0 0 18px rgba(90,229,151,.25); }
.fact-details { margin: 10px 0 0 53px; color: #8ca19a; font-size: 11px; line-height: 1.45; }
.error { color: var(--danger); text-align: center; padding: 60px 20px; }
@media (min-width: 620px) {
  .app-shell { padding-top: 24px; }
  .match-list { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
}

.fact-card.clickable { cursor: pointer; transition: transform .15s ease, border-color .15s ease; -webkit-tap-highlight-color: transparent; }
.fact-card.clickable:active { transform: scale(.985); border-color: rgba(120, 235, 169, .35); }
.pattern-head { padding: 2px 2px 6px; }
.pattern-title { margin: 8px 0 12px; font-size: 22px; line-height: 1.2; letter-spacing: -.4px; }
.pattern-score { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.pattern-score strong { font-size: 30px; letter-spacing: -1px; }
.pattern-score span { color: var(--accent); font-weight: 850; font-size: 20px; }
.progress.flat { margin: 0 0 14px; }
.sample-lines { display: grid; gap: 7px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(145deg, var(--panel-2), var(--panel)); }
.sample-line { display: grid; grid-template-columns: 22px 1fr; gap: 6px; color: #c3d0cb; font-size: 14px; line-height: 1.4; }
.sample-line.strong { color: var(--text); font-weight: 800; }
.sample-line b { color: var(--text); }
.sample-list { display: grid; gap: 8px; padding-top: 2px; }
.sample-row { display: grid; grid-template-columns: auto 1fr 46px; align-items: center; gap: 12px; padding: 0 0 0 13px; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(145deg, rgba(24, 40, 37, .9), rgba(15, 28, 26, .94)); }
.sample-row.unknown { opacity: .55; }
.sample-mark { align-self: stretch; display: grid; place-items: center; font-size: 22px; font-weight: 800; background: rgba(255, 255, 255, .05); color: var(--muted); }
.sample-row.hit .sample-mark { background: rgba(76, 217, 130, .16); color: #5ce397; }
.sample-row.miss .sample-mark { background: rgba(255, 107, 107, .15); color: #ff7b7b; }
.sample-body { padding: 12px 0; min-width: 0; }
.sample-date { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.sample-teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; font-size: 14px; font-weight: 650; }
.sample-teams span:last-child { text-align: right; }
.sample-teams strong { font-size: 15px; letter-spacing: .02em; }
.sample-half { color: var(--muted); font-weight: 500; font-size: 12px; }
.sample-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.sample-value { color: #c3d0cb; font-size: 12px; }
.sample-value b { color: var(--accent); }
.tab-count { margin-left: 4px; opacity: .6; font-size: 11px; font-weight: 600; }
.tab.active .tab-count { opacity: .75; }
.pattern-head + .tabs { margin-top: 10px; }
.tabs.wrap { flex-wrap: wrap; overflow: visible; padding: 0; margin: 12px 0 4px; gap: 8px; }

/* Плавні появи сторінок і списків */
:root { --ease-out: cubic-bezier(.22, 1, .36, 1); }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to { opacity: 1; transform: none; }
}
@keyframes rise-soft {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes card-in {
  0% { opacity: 0; transform: translateY(28px) scale(.95); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
@keyframes fill {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 10px 22px rgba(74, 222, 128, .28)); }
  50% { transform: scale(1.07); filter: drop-shadow(0 14px 34px rgba(74, 222, 128, .5)); }
}
@keyframes dots {
  0% { opacity: .35; }
  50% { opacity: 1; }
  100% { opacity: .35; }
}

#app[data-enter="page"] > * { animation: rise .7s var(--ease-out) backwards; }
#app[data-enter="page"] > :nth-child(2) { animation-delay: .05s; }
#app[data-enter="page"] > :nth-child(3) { animation-delay: .1s; }
#app[data-enter="page"] > :nth-child(4) { animation-delay: .15s; }
#app[data-enter="page"] > :nth-child(5) { animation-delay: .2s; }
#app[data-enter="page"] .match-list > *,
#app[data-enter="page"] .facts > *,
#app[data-enter="page"] .sample-list > * { animation: card-in .85s var(--ease-out) backwards; animation-delay: calc(.22s + var(--i, 0) * 55ms); }
#app[data-enter="list"] .match-list > *,
#app[data-enter="list"] .facts > *,
#app[data-enter="list"] .sample-list > * { animation: card-in .8s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 70ms); }
#app .progress > span { will-change: transform; }
#app[data-enter="page"] .progress > span { animation: fill .9s cubic-bezier(.165, .84, .44, 1) backwards; animation-delay: calc(.37s + var(--bar, 0) * 55ms); }
#app[data-enter="list"] .progress > span { animation: fill .9s cubic-bezier(.165, .84, .44, 1) backwards; animation-delay: calc(.15s + var(--bar, 0) * 70ms); }

/* Завантаження */
.loading-screen .brand-mark { animation: pulse 1.6s ease-in-out infinite; }
.loading-screen p { animation: dots 1.6s ease-in-out infinite; letter-spacing: .04em; }

/* Дотики й наведення */
.match-row, .chip, .tab, .back { transition: transform .25s var(--ease-out), border-color .25s ease, background .25s ease, box-shadow .25s ease, color .25s ease; }
.match-row:active { transform: scale(.98); }
.chip:active, .tab:active { transform: scale(.94); }
@media (hover: hover) {
  .match-row:hover { transform: translateY(-2px); border-color: rgba(120, 235, 169, .3); box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
  .fact-card.clickable:hover { transform: translateY(-2px); border-color: rgba(120, 235, 169, .3); }
}

@media (prefers-reduced-motion: reduce) {
  #app *, .loading-screen * { animation: none !important; transition: none !important; }
}

/* Доступ, інформація, правові тексти */
.primary-button { border: 0; border-radius: 14px; padding: 13px 20px; color: #06190f; font-weight: 800; cursor: pointer; background: linear-gradient(135deg, #6ce9a5, #4fd58d); box-shadow: 0 10px 30px rgba(68, 214, 139, .22); transition: transform .2s var(--ease-out), opacity .2s ease; }
.primary-button.wide { width: 100%; }
.primary-button:active { transform: scale(.97); }
.primary-button:disabled { opacity: .55; }
.link-button { display: block; margin: 12px auto 0; background: transparent; border: 0; color: #78eba9; cursor: pointer; font-size: 14px; }
.fresh { margin-top: 6px !important; font-size: 12px !important; opacity: .75; }
.gate { margin-top: 14px; padding: 24px 20px; text-align: center; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(145deg, var(--panel-2), var(--panel)); box-shadow: var(--shadow); }
.gate-icon { font-size: 40px; margin-bottom: 8px; }
.gate h2 { margin: 0 0 8px; font-size: 21px; letter-spacing: -.4px; }
.gate p { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.gate b { color: var(--text); }
.plan-list { display: grid; gap: 8px; margin: 14px 0; }
.plan { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .04); font-size: 14px; text-align: left; }
.plan strong { color: var(--accent); white-space: nowrap; }
.legal { margin: 26px 4px 6px; color: #70827c; font-size: 11px; line-height: 1.5; text-align: center; }
.error { text-align: center; padding: 70px 22px; color: var(--text); }
.error-icon { font-size: 44px; margin-bottom: 10px; }
.error h2 { margin: 0 0 8px; }
.error p { color: var(--muted); line-height: 1.5; }
.error-actions { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.info-head h1 { margin: 6px 0 14px; font-size: 28px; letter-spacing: -1px; }
.info-card { margin-bottom: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(145deg, var(--panel-2), var(--panel)); }
.info-card h2 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.info-card p { margin: 0; color: #b4c3be; font-size: 13px; line-height: 1.55; }
.info-card .info-note { margin-top: 12px; color: var(--muted); font-size: 12px; }
.info-card.warning { border-color: rgba(255, 196, 87, .25); }
.info-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); font-size: 14px; }
.info-row:last-of-type { border-bottom: 0; }
.info-row strong { color: var(--text); text-align: right; }
.doc-row { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 13px 2px; background: transparent; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .05); color: var(--text); font-size: 15px; cursor: pointer; text-align: left; }
.doc-row:last-child { border-bottom: 0; }
.doc-row i { color: var(--muted); font-style: normal; font-size: 20px; }
.consent { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 20; display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: rgba(14, 26, 24, .96); box-shadow: 0 18px 50px rgba(0, 0, 0, .5); animation: rise .6s var(--ease-out) .8s backwards; transition: opacity .35s ease, transform .35s ease; }
.consent p { margin: 0; font-size: 12.5px; line-height: 1.5; color: #b4c3be; }
.consent p button { background: none; border: 0; padding: 0; color: #78eba9; font: inherit; text-decoration: underline; cursor: pointer; }
.consent.leaving { opacity: 0; transform: translateY(16px); }

/* Підписка, юридичні тексти, підтримка */
.plan-option { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; margin-bottom: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, .04); color: var(--text); text-align: left; cursor: pointer; transition: border-color .25s ease, background .25s ease, transform .25s var(--ease-out); }
.plan-option span { display: grid; gap: 3px; }
.plan-option small { color: var(--muted); font-size: 12px; }
.plan-option strong { color: var(--accent); white-space: nowrap; }
.plan-option.selected { border-color: rgba(108, 233, 165, .7); background: rgba(92, 227, 151, .09); box-shadow: 0 0 0 1px rgba(108, 233, 165, .25) inset; }
.plan-option:active { transform: scale(.985); }
.league-picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.consent-row { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; font-size: 13px; line-height: 1.5; color: #b4c3be; cursor: pointer; }
.consent-row input { margin-top: 3px; width: 18px; height: 18px; accent-color: #4fd58d; flex: none; }
.inline-link { background: none; border: 0; padding: 0; color: #78eba9; font: inherit; text-decoration: underline; cursor: pointer; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; margin-bottom: 12px; border-radius: 14px; background: rgba(255, 255, 255, .05); }
.segment { padding: 9px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 650; cursor: pointer; transition: background .25s ease, color .25s ease; }
.segment.active { background: linear-gradient(135deg, #6ce9a5, #4fd58d); color: #06190f; }
#support-text { width: 100%; margin-bottom: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(0, 0, 0, .22); color: var(--text); font: inherit; font-size: 14px; resize: vertical; outline: none; }
#support-text:focus { border-color: rgba(108, 233, 165, .55); }
.legal-text h3 { margin: 18px 0 6px; font-size: 15px; }
.legal-text h3:first-child { margin-top: 0; }
.legal-text p { margin: 0 0 6px; }
.legal-gap { height: 4px; }
.toast { position: fixed; left: 50%; bottom: max(28px, env(safe-area-inset-bottom)); z-index: 30; max-width: calc(100% - 32px); padding: 12px 18px; border: 1px solid var(--line); border-radius: 999px; background: rgba(14, 26, 24, .97); color: var(--text); font-size: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .45); transform: translateX(-50%); animation: toast-in .45s var(--ease-out) backwards; transition: opacity .4s ease, transform .4s ease; }
.toast.leaving { opacity: 0; transform: translate(-50%, 12px); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 18px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0); } }

.league-picker[hidden] { display: none; }
.league-picker:not([hidden]) { animation: rise-soft .45s var(--ease-out) backwards; }

.setting-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; }
.setting-row > span { display: grid; gap: 3px; }
.setting-row small { color: var(--muted); font-size: 12px; }
.select { max-width: 52%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, .25); color: var(--text); font: inherit; font-size: 13px; outline: none; }
.select:focus { border-color: rgba(108, 233, 165, .55); }

.setting-block { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .05); }
.setting-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 15px; }
.setting-title > span { display: grid; gap: 3px; }
.setting-title small { color: var(--muted); font-size: 12px; }
.setting-title strong { color: var(--accent); }
.chip.off { opacity: .45; text-decoration: line-through; }

.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; font-size: 15px; cursor: pointer; }
.switch-row > span:first-child { display: grid; gap: 3px; }
.switch-row small { color: var(--muted); font-size: 12px; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch { position: relative; flex: none; width: 46px; height: 28px; border-radius: 999px; background: var(--track); transition: background .25s ease; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #dfe9e5; transition: transform .3s var(--ease-out); }
.switch-row input:checked + .switch { background: var(--accent-2); }
.switch-row input:checked + .switch::after { transform: translateX(18px); }

.price { display: grid; justify-items: end; gap: 1px; font-size: 18px; line-height: 1.1; }
.price em { color: var(--muted); font-size: 11px; font-style: normal; font-weight: 600; }
.billing-note { margin: 14px 0 0; padding: 12px 14px; border: 1px solid rgba(108, 233, 165, .3); border-radius: 14px; background: rgba(92, 227, 151, .07); color: #cfe0d9; font-size: 13px; line-height: 1.5; animation: rise-soft .4s var(--ease-out) backwards; }
.billing-note[hidden] { display: none; }
.billing-note b { color: var(--text); }

/* Верхні кнопки, збережене, підсумки */
.topbar-actions { display: flex; gap: 8px; }
.icon-button { position: relative; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .04); color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; transition: transform .2s var(--ease-out), background .25s ease, border-color .25s ease; }
.icon-button:active { transform: scale(.92); }
.icon-button.active { border-color: rgba(108, 233, 165, .6); background: rgba(92, 227, 151, .12); }
.badge { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center; border-radius: 999px; background: linear-gradient(135deg, #6ce9a5, #4fd58d); color: #06190f; font-size: 11px; font-weight: 800; }
.badge[hidden] { display: none; }
.save-row { display: flex; justify-content: center; margin-top: 14px; }
.save-button { padding: 9px 18px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .05); color: var(--text); font-size: 14px; font-weight: 650; cursor: pointer; transition: transform .2s var(--ease-out), background .25s ease, border-color .25s ease, color .25s ease; }
.save-button:active { transform: scale(.95); }
.save-button.saved { border-color: rgba(108, 233, 165, .55); background: rgba(92, 227, 151, .12); color: #8ff0b9; }
.saved-head .backline { margin-bottom: 4px; }
.saved-list { display: grid; gap: 10px; }
.saved-card { padding: 15px; border: 1px solid var(--line); border-radius: 19px; background: linear-gradient(145deg, rgba(25, 42, 39, .94), rgba(13, 25, 23, .96)); box-shadow: var(--shadow); cursor: pointer; transition: transform .25s var(--ease-out), border-color .25s ease; -webkit-tap-highlight-color: transparent; }
.saved-card:active { transform: scale(.985); }
.saved-score { font-size: 24px; letter-spacing: -.5px; }
.saved-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; padding-top: 11px; border-top: 1px solid rgba(255, 255, 255, .06); }
.saved-status { color: var(--muted); font-size: 12.5px; }
.saved-result { padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: rgba(255, 255, 255, .06); }
.saved-result.good { color: #7ff0ac; background: rgba(76, 217, 130, .14); }
.saved-result.mid { color: #ffd479; background: rgba(255, 196, 87, .13); }
.saved-result.bad { color: #ff8f8f; background: rgba(255, 107, 107, .14); }
.review-summary { margin: 12px 0 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg, var(--panel-2), var(--panel)); display: grid; gap: 4px; }
.review-summary strong { font-size: 24px; letter-spacing: -.5px; }
.review-summary span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.review-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; font-size: 20px; font-weight: 800; }
.review-mark.hit { color: #5ce397; background: rgba(76, 217, 130, .16); }
.review-mark.miss { color: #ff7b7b; background: rgba(255, 107, 107, .15); }
.review-mark.unknown { color: var(--muted); background: rgba(255, 255, 255, .05); }
/* Патерни, що не зіграли, затемнюємо через вміст картки: так анімація появи самої картки не «стрибає» */
.fact-card.review.miss .fact-icon,
.fact-card.review.miss .fact-title,
.fact-card.review.miss .fact-sample,
.fact-card.review.miss .fact-rate,
.fact-card.review.miss .progress,
.fact-card.review.miss .fact-details { opacity: .4; }
.fact-top.with-mark { grid-template-columns: auto 1fr auto auto; }
.fact-card.review.plain { opacity: 1; }

.saved-card { position: relative; }
.saved-card .match-meta { padding-right: 30px; }
.saved-remove { position: absolute; top: 14px; right: 13px; width: 18px; height: 18px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px; background: rgba(255, 255, 255, .07); font-size: 9px; line-height: 1; opacity: .8; cursor: pointer; transition: transform .2s var(--ease-out), background .2s ease, opacity .2s ease; }
.saved-remove::after { content: ""; position: absolute; inset: -10px; }
.saved-remove:hover { opacity: 1; background: rgba(255, 107, 107, .2); }
.saved-remove:active { transform: scale(.85); opacity: 1; background: rgba(255, 107, 107, .3); }


/* Плавне видалення картки зі збереженого: рух задає app.js (Web Animations) */
.saved-card { overflow: hidden; }
.empty { animation: rise-soft .5s var(--ease-out) backwards; }

/* Індикатор завантаження: екран лишається активним, поки тягнеться наступний */
.busy-bar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 40; overflow: hidden; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.busy-bar::before { content: ""; position: absolute; inset: 0; width: 45%; background: linear-gradient(90deg, transparent, #6ce9a5, transparent); animation: busy-slide 1.1s ease-in-out infinite; }
html.busy .busy-bar { opacity: 1; transition-delay: .12s; }
@keyframes busy-slide { from { transform: translateX(-100%); } to { transform: translateX(240%); } }
#app > .topbar { animation: none !important; }

/* Анімація збереження: сердечко відлітає до шапки */
.save-heart { display: inline-block; margin-right: 7px; transform-origin: center; }
.fly-heart { position: fixed; z-index: 60; font-size: 22px; line-height: 1; pointer-events: none; will-change: transform, opacity; }

/* Скелетони завантаження */
@keyframes sk-shimmer { from { background-position: 160% 0; } to { background-position: -60% 0; } }
.sk { background: linear-gradient(100deg, rgba(255, 255, 255, .05) 30%, rgba(255, 255, 255, .13) 50%, rgba(255, 255, 255, .05) 70%); background-size: 220% 100%; animation: sk-shimmer 1.3s linear infinite; border-radius: 10px; }
.sk-list { display: grid; gap: 10px; margin-top: 14px; }
.sk-card { padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg, var(--panel-2), var(--panel)); animation: rise-soft .45s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 50ms); }
.sk-row { display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: center; }
.sk-icon { width: 42px; height: 42px; border-radius: 13px; }
.sk-col { display: grid; gap: 8px; }
.sk-line { height: 13px; }
.sk-line.wide { width: 70%; }
.sk-line.short { width: 42%; height: 10px; }
.sk-pill { width: 46px; height: 22px; border-radius: 8px; }
.sk-bar { height: 7px; margin: 14px 0 0 53px; border-radius: 999px; }
.sk-tabs { display: flex; gap: 8px; margin: 14px 0 4px; overflow: hidden; }
.sk-tab { height: 40px; border-radius: 13px; flex: none; }
.sk-block { height: 74px; border-radius: 16px; }

.pattern-score span { font-variant-numeric: tabular-nums; min-width: 4.4ch; }
.pattern-score strong { font-variant-numeric: tabular-nums; }
/* Плашка згоди не перекриває кінець списку: під неї залишається вільне місце */
body.has-consent .app-shell { padding-bottom: 170px; }

/* Серії поспіль: замість 100% показуємо довжину серії */
.fact-rate.streak { display: grid; justify-items: end; gap: 1px; min-width: 0; line-height: 1.05; }
.fact-rate.streak b { font-size: 22px; font-weight: 850; }
.fact-rate.streak small { color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .01em; }

.flag { width: 20px; height: 14px; margin-right: 7px; border-radius: 3px; object-fit: cover; vertical-align: -2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14); }

/* Вибір ліги випадним списком */
.league-select { position: relative; z-index: 5; margin-bottom: 4px; }
.league-trigger { width: 100%; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, .05); color: var(--text); font-size: 15px; font-weight: 700; text-align: left; cursor: pointer; transition: border-color .25s ease, background .25s ease; }
.league-select.open .league-trigger { border-color: rgba(108, 233, 165, .5); background: rgba(92, 227, 151, .08); }
.league-trigger .league-current { flex: 1; min-width: 0; }
.league-trigger svg { flex: none; color: var(--muted); transition: transform .3s var(--ease-out); }
.league-select.open .league-trigger svg { transform: rotate(180deg); }
.league-count { color: var(--muted); font-size: 12.5px; font-weight: 650; }
.league-menu { position: absolute; left: 0; right: 0; top: calc(100% + 8px); max-height: 56vh; overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 18px; background: rgba(13, 24, 22, .98); box-shadow: 0 24px 60px rgba(0, 0, 0, .55); animation: rise-soft .22s var(--ease-out) backwards; }
.league-menu[hidden] { display: none; }
.league-item { display: flex; align-items: center; width: 100%; padding: 12px; border: 0; border-radius: 12px; background: transparent; color: var(--text); font-size: 15px; text-align: left; cursor: pointer; transition: background .2s ease; }
.league-item .league-count { margin-left: auto; padding-left: 12px; }
.league-item.active { background: rgba(92, 227, 151, .14); color: #8ff0b9; }
.league-item:active { background: rgba(255, 255, 255, .08); }

/* Ліги невеликими плитками */
.league-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-bottom: 4px; }
.league-tile { display: grid; gap: 6px; align-content: start; min-height: 62px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .045); color: var(--text); text-align: left; cursor: pointer; transition: background .25s ease, border-color .25s ease, color .25s ease, transform .2s var(--ease-out); }
.league-tile:active { transform: scale(.96); }
.league-tile .tile-top { display: flex; justify-content: space-between; align-items: center; min-height: 16px; font-size: 14px; line-height: 1; }
.league-tile .tile-icon { display: inline-flex; align-items: center; }
.league-tile .flag { margin-right: 0; }
.league-tile .tile-count { color: var(--muted); font-size: 12px; font-weight: 700; }
.league-tile .tile-name { font-size: 13px; font-weight: 700; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.league-tile.active { border-color: transparent; background: linear-gradient(135deg, #6ce9a5, #4fd58d); color: #06190f; box-shadow: 0 8px 24px rgba(68, 214, 139, .22); }
.league-tile.active .tile-count { color: rgba(6, 25, 15, .7); }

/* Плитки ліг: прапор і назва по центру, лічильник у куті */
.league-tile { position: relative; justify-items: center; text-align: center; padding: 14px 8px 10px; }
.league-tile .tile-top { justify-content: center; min-height: 18px; }
.league-tile .tile-count { position: absolute; top: 7px; right: 9px; }
.league-tile .tile-name { text-align: center; }

.plan-option:disabled { opacity: .5; cursor: default; }
.plan-option:disabled:active { transform: none; }
.chip:disabled { opacity: .45; cursor: default; }

/* Керування підпискою: скасування — тихе сіре посилання, а не кнопка */
.sub-lines { margin-top: 10px; display: grid; gap: 8px; }
.sub-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.quiet-link { flex: none; padding: 4px 0; border: 0; background: none; color: #78867f; font: inherit; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.quiet-link:active { color: var(--text); }
.quiet-link.danger { display: block; width: 100%; margin-top: 8px; padding: 10px 0 2px; text-align: center; color: #9a7b7b; }
.sheet { position: fixed; inset: 0; z-index: 50; display: grid; align-items: end; animation: rise-soft .25s ease backwards; transition: opacity .25s ease; }
.sheet.leaving { opacity: 0; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); }
.sheet-card { position: relative; width: min(100%, 720px); margin: 0 auto; padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); border: 1px solid var(--line); border-radius: 22px 22px 0 0; background: #0e1a18; box-shadow: 0 -20px 60px rgba(0, 0, 0, .5); }
.sheet-card h3 { margin: 0 0 8px; font-size: 19px; }
.sheet-card p { margin: 0 0 18px; color: #b4c3be; font-size: 14px; line-height: 1.55; }
.sheet-card b { color: var(--text); }

.info-hint { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 14px 0 0; padding: 4px 0 4px 12px; border-left: 3px solid rgba(255, 214, 102, .55); color: #c3cfca; font-size: 13px; line-height: 1.45; }
.info-hint .quiet-link { color: #9fd9bb; white-space: nowrap; }
.sheet-steps { margin: 0 0 18px; padding-left: 20px; color: #b4c3be; font-size: 14px; line-height: 1.7; }
.sheet-card .quiet-link { display: block; width: 100%; margin-top: 8px; padding: 10px 0 2px; text-align: center; font-size: 13px; }

/* Підказка під усією інформацією на екрані підписки */
.info-hint.tip { margin: 6px 4px 8px; padding: 6px 0 6px 12px; font-size: 12.5px; color: #9eb0a9; }

/* Підказка в окремому блоці, як решта карток */
.info-hint.tip { margin: 0 0 12px; padding: 13px 16px; border: 1px solid var(--line); border-left: 3px solid rgba(255, 214, 102, .6); border-radius: 18px; background: linear-gradient(145deg, var(--panel-2), var(--panel)); color: #b4c3be; font-size: 13px; }

.old-price { opacity: .55; font-weight: 400; margin-right: 4px; }
.sheet.centered { align-items: center; padding: 0 16px; }
.sheet.centered .sheet-card { width: min(100%, 380px); padding: 26px 20px 20px; border-radius: 22px; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
body.sheet-open, body.sheet-open html { overflow: hidden; }
html:has(body.sheet-open) { overflow: hidden; overscroll-behavior: none; }
.sheet { touch-action: none; overscroll-behavior: contain; }
