:root{color-scheme:dark;--bg:#101513;--page-bg:#0b100d;--panel:#19211d;--text:#edf4ef;--muted:#a9b8ae;--line:#334139;--outer-line:#253029;--accent:#a9eb82;--accent-hover:#baf698;--button-text:#152010;--field:#111914;--field-focus:#16221a;--loss:#ff9999;--focus-glow:rgb(169 235 130 / .06);--button-glow:rgb(169 235 130 / .16);--button-glow-pressed:rgb(169 235 130 / .1);--install-hover-line:#65795e;--install-shadow:rgb(0 0 0 / .2);--sheen:rgb(255 255 255 / .24);font-family:'Segoe UI',Arial,sans-serif;font-size:16px}
:root[data-theme=dark]{--bg:#080809;--page-bg:#020203;--panel:#101012;--text:#f0f0f3;--muted:#aaaab2;--line:#2e2e33;--outer-line:#1d1d21;--field:#040405;--field-focus:#111114;--install-hover-line:#58585f}
:root[data-theme=light]{color-scheme:light;--bg:#ffffff;--page-bg:#eaf0ec;--panel:#f3f7f4;--text:#182b20;--muted:#52655a;--line:#cfdbd3;--outer-line:#d5e0d8;--accent:#286736;--accent-hover:#347c43;--button-text:#ffffff;--field:#f8fbf9;--field-focus:#ffffff;--loss:#b42f35;--focus-glow:rgb(40 103 54 / .09);--button-glow:rgb(40 103 54 / .2);--button-glow-pressed:rgb(40 103 54 / .12);--install-hover-line:#82998a;--install-shadow:rgb(35 68 47 / .12)}
*{box-sizing:border-box}
body{margin:0;background:var(--page-bg);color:var(--text);min-height:100dvh;display:flex;flex-direction:column;align-items:center;padding:36px 24px}
button,input{font:inherit}
button{cursor:pointer}
[hidden]{display:none!important}
.calculator{width:100%;min-width:0;max-width:1024px;flex-shrink:0;margin-block:auto;background:var(--bg);border:1px solid var(--outer-line);border-radius:16px;padding:32px}
.app-header{display:flex;flex-wrap:wrap;justify-content:space-between;gap:20px;align-items:center;margin-bottom:32px}
.eyebrow{font-size:.75rem;letter-spacing:.13em;text-transform:uppercase;color:var(--muted);margin:0 0 5px}
h1{margin:0;font-size:1.875rem;line-height:1.2;font-weight:500;letter-spacing:-.04em}
.header-actions{display:flex;gap:14px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.theme-switch{display:flex;gap:3px;padding:4px;border:1px solid var(--line);border-radius:10px;background:var(--panel)}
.theme-button{padding:8px 12px;min-height:36px;border:0;border-radius:6px;background:transparent;color:var(--muted);font-size:.875rem;font-weight:500}
.theme-button[aria-pressed=true]{background:var(--accent);color:var(--button-text)}
.theme-button:hover:not([aria-pressed=true]){background:var(--field);color:var(--text)}
.brand-mark{width:42px;height:42px;display:grid;place-items:center;border:1px solid var(--line);border-radius:10px;color:var(--accent);font-size:1.375rem}
.install-button{background:transparent;border:1px solid var(--line);color:var(--text);border-radius:7px;padding:9px 13px;font-size:.875rem}
.workspace{display:grid;grid-template-columns:minmax(0,1fr) 238px;gap:28px;align-items:start;min-width:0}
.bets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;min-width:0}
.bets-table{width:100%;min-width:0;table-layout:fixed;border-collapse:collapse;font-size:.875rem;font-variant-numeric:tabular-nums}
.bets-table th:first-child{width:32%}
.bets-table th:nth-child(2){width:28%}
.bets-table th:last-child{width:40%}
.bets-table th{color:var(--muted);text-align:left;font-weight:400;font-size:.875rem;padding:0 0 12px}
.bets-table .align-right{text-align:right}
.bets-table td{border-top:1px solid var(--line);padding:11px 0}
.bets-table td:first-child{white-space:nowrap;padding-right:9px}
.bets-table td:last-child{text-align:right;overflow-wrap:anywhere;padding-left:9px}
.odd-input{width:100%;max-width:78px;min-width:0;border:1px solid var(--line);border-radius:6px;background:var(--field);color:var(--text);font-size:1rem;padding:8px 9px;font-variant-numeric:tabular-nums}
input[aria-invalid=true]{border-color:var(--loss)}
input:focus-visible,button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.summary{min-width:0;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:21px}
.budget,.stat{min-width:0}
.field-label{display:block;font-size:.875rem;color:var(--muted);margin-bottom:9px}
.budget-field{display:flex;align-items:center;gap:9px}
.budget-field input{width:100%;min-width:0;border:1px solid var(--line);border-radius:6px;background:var(--field);color:var(--text);font-size:1.375rem;padding:8px 9px;font-variant-numeric:tabular-nums}
.stat{margin-top:26px}
.stat-value{display:block;font-size:1.625rem;line-height:1.3;font-weight:500;font-variant-numeric:tabular-nums;letter-spacing:-.03em;overflow-wrap:anywhere}
.profit .stat-value{color:var(--accent)}
.profit.negative .stat-value{color:var(--loss)}
.calculation-status{margin:18px 0 0;font-size:.875rem;color:var(--muted)}
.calculation-status:empty{display:none}
.actions{display:flex;flex-wrap:wrap;align-items:center;gap:18px;margin-top:28px}
.auto-label{display:flex;gap:9px;align-items:center;font-size:.875rem;min-height:44px;cursor:pointer}
.auto-label input{accent-color:var(--accent);width:18px;height:18px;margin:0}
.calculate-button{padding:11px 24px;min-height:44px;border:0;border-radius:7px;background:var(--accent);color:var(--button-text);font-weight:500;font-size:.875rem}
.calculate-button:hover{background:var(--accent-hover)}
.error-message{color:var(--loss);font-size:.875rem;margin:16px 0 0}
.error-message:empty{display:none}
.footer-note{margin:22px 0 0;color:var(--muted);font-size:.75rem}
.precision-note{margin-top:7px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:1080px){body{padding:24px 18px}.calculator{padding:26px}.workspace{display:flex;flex-direction:column;gap:24px}.bets{width:100%;order:1}.summary{width:100%;order:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;padding:18px}.stat{margin:0}.stat-value{font-size:1.375rem}.calculation-status{grid-column:1/-1;margin:0}}
@media(max-width:720px){.bets{grid-template-columns:1fr;gap:24px}.summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.budget{grid-column:1/-1}.odd-input{max-width:100px;min-height:44px}.bets-table td{padding:10px 0}}
@media(max-width:560px){body{padding:0;background:var(--bg)}.calculator{border:0;border-radius:0;padding:22px 18px}.app-header{margin-bottom:26px}h1{font-size:1.75rem}.budget-field input{font-size:1.375rem}.actions{gap:14px;justify-content:space-between}.footer-note{line-height:1.6}.brand-mark{display:none}.install-button{font-size:.875rem}.stat-value{font-size:1.375rem}}
@media(max-width:560px){.app-header{flex-direction:column;align-items:flex-start;gap:18px}.header-actions{width:100%;justify-content:flex-start;gap:10px}.theme-button{min-height:44px}}
@media(prefers-reduced-motion:no-preference){
  body,.calculator,.summary,.theme-switch,.brand-mark{transition:background-color .25s ease,color .25s ease,border-color .25s ease}
  .theme-button{transition:background-color .2s ease,color .2s ease,transform .15s ease}
  .theme-button:active{transform:scale(.96)}
  .calculator{animation:flexsbet-fade-in .5s cubic-bezier(.22,1,.36,1) both}
  .app-header,.bets,.summary,.actions{animation:flexsbet-reveal .52s cubic-bezier(.22,1,.36,1) both}
  .app-header{animation-delay:.04s}
  .bets{animation-delay:.1s}
  .summary{animation-delay:.16s}
  .actions{animation-delay:.22s}
  .odd-input,.budget-field input{transition:background-color .18s ease,border-color .18s ease,box-shadow .18s ease}
  .odd-input:focus,.budget-field input:focus{background:var(--field-focus);box-shadow:0 0 0 4px var(--focus-glow)}
  .calculate-button,.install-button{position:relative;overflow:hidden;transition:transform .2s cubic-bezier(.22,1,.36,1),background-color .2s ease,border-color .2s ease,box-shadow .2s ease}
  .calculate-button::after{content:"";position:absolute;inset:-60% -100%;pointer-events:none;background:linear-gradient(110deg,transparent 43%,var(--sheen) 50%,transparent 57%);opacity:0;transform:translateX(-40%);transition:transform .65s ease,opacity .18s ease}
  .calculate-button:active,.install-button:active{transform:translateY(1px) scale(.97);transition-duration:.09s}
  .calculate-button:active{box-shadow:0 2px 8px var(--button-glow-pressed)}
  @media(hover:hover){
    .calculate-button:hover{transform:translateY(-2px);box-shadow:0 7px 22px var(--button-glow)}
    .calculate-button:hover::after{opacity:1;transform:translateX(40%)}
    .install-button:hover{transform:translateY(-2px);background:var(--panel);border-color:var(--install-hover-line);box-shadow:0 6px 18px var(--install-shadow)}
    .calculate-button:active,.install-button:active{transform:translateY(1px) scale(.97)}
  }
}
@keyframes flexsbet-fade-in{from{opacity:0}to{opacity:1}}
@keyframes flexsbet-reveal{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:translateY(0)}}
