/* Spela gratis: bygger på sidans befintliga stilmall (/assets/style.css) */
.spel { padding: 48px 0 80px; }
/* Sidans stilmall ger alla section extra luft och gör alla form till kort. Det återställs här. */
.spel section { padding: 0; }
.spel form { background: none; border: 0; border-radius: 0; padding: 0; gap: 16px; }
.spel h1 { max-width: none; }
.spel h1 { font-family: var(--display); font-weight: 800; font-size: clamp(36px, 6.5vw, 60px); line-height: 1.04; letter-spacing: -.03em; margin: 0 0 14px; }
.spel h2 { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: -.02em; margin: 0 0 16px; }
.spel h3 { font-family: var(--display); font-weight: 700; font-size: 19px; margin: 0 0 6px; }
.spel a { color: var(--pitch); font-weight: 600; }
.spel .btn, .spel .btn:hover { color: var(--flood-ink); }
.spel .btn.ghost { color: var(--ink); margin-left: 0; background: transparent; }
.spel-narrow { max-width: 520px; }
.spel-account { max-width: 760px; }
.spel-hero { max-width: 640px; padding-bottom: 8px; }
.spel-section { margin-top: 40px; }
.spel-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.spel-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 16px; }

/* Kort och formulär */
.spel-card, .spel form.spel-card { display: grid; gap: 18px; background: var(--surface); border: 1.5px solid var(--ink); border-radius: 16px; padding: 24px; box-shadow: 5px 5px 0 var(--pitch); }
.spel section.spel-card { padding: 24px; }
.spel form .btn { justify-self: start; }
.spel input[type="text"], .spel input[type="email"], .spel input[type="password"] { font: inherit; padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); width: 100%; }
.spel input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.spel .hint { font-weight: 400; font-size: 13.5px; color: var(--ink-soft); }
.spel .check input { margin-top: 5px; width: 18px; height: 18px; flex: none; accent-color: var(--pitch); }
.spel .check span { line-height: 1.45; }
.spel-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Meddelanden */
.spel-note { border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0 0 20px; background: var(--surface); }
.spel-note p, .spel-note ul { margin: 0; }
.spel-note ul { padding-left: 18px; }
.spel-err { border-color: #b3261e; }
.spel-ok { border-color: var(--pitch); }
.spel-info { border-style: dashed; border-color: var(--ink-soft); background: var(--surface-2); color: var(--ink); max-width: 46ch; }
:root[data-theme="dark"] .spel-err { border-color: #ff8a80; }

/* Start: steg och regler */
.spel-steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; padding: 0; margin: 0; }
.spel-steps li { counter-increment: step; background: var(--surface); border: 1.5px solid var(--ink); border-radius: 16px; padding: 20px 22px; }
.spel-steps li::before { content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 12px; border-radius: 50%; background: var(--pitch); color: var(--pitch-ink); font-family: var(--display); font-weight: 800; }
.spel-steps p { margin: 0; color: var(--ink-soft); }
.spel-rules { margin: 0; padding-left: 20px; max-width: 60ch; }
.spel-rules li { margin: 0 0 8px; }

/* Konto: saldot är sidans huvudsiffra */
.spel-balance-card { gap: 4px; }
.spel-who { margin: 0; font-weight: 700; color: var(--ink-soft); }
.spel-balance { display: flex; align-items: baseline; gap: 12px; margin: 0; }
.spel-balance b { font-family: var(--display); font-weight: 800; font-size: clamp(60px, 14vw, 104px); line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.spel-balance span { font-size: 20px; color: var(--ink-soft); font-weight: 600; }
.spel-tablewrap { overflow-x: auto; }
.spel-table { border-collapse: collapse; width: 100%; font-size: 16px; }
.spel-table th, .spel-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.spel-table th { font-weight: 700; color: var(--ink-soft); }
.spel-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.spel-danger p { color: var(--ink-soft); max-width: 60ch; }

/* Meny och rubrik */
.top nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.spel-pill { text-decoration: none; font-size: 14px; font-weight: 600; border: 1.5px solid var(--ink); border-radius: 999px; padding: 7px 14px; color: var(--ink); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .tools { align-items: center; }
.spel-navacct { display: none; }
/* På små skärmar ligger inloggningslänken i menyn så att rubrikraden får plats */
@media (max-width: 720px) { .spel-pill { display: none; } }
@media (max-width: 560px) { .spel { padding-top: 32px; } .spel-card, .spel form.spel-card, .spel section.spel-card { padding: 20px; } }

/* Rullgardinsmenyn (samma som på resten av sidan) */
.dd-offers-col { display: flex; flex-direction: column; gap: 8px; }
.dd-logo.bg-0d194f { background: #0d194f; border-color: #0d194f; padding: 0; }
@media (max-width: 1400px) { .spel-pill { max-width: 90px; } }

/* ===== Spela: matcher, kupong, bekräftelse, Mina spel ===== */
.spel input[type="text"], .spel input[type="email"], .spel input[type="password"], .spel select { font-size: 16px; min-height: 46px; }
.spel select { font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); width: 100%; }
.spel .btn { min-height: 46px; }
.spel-matches { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding-bottom: 84px; }
.sm-main { min-width: 0; }
.lead { max-width: 60ch; }
.daytabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; margin: 0 -2px; -webkit-overflow-scrolling: touch; }
.daytabs a { flex: none; text-decoration: none; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 999px; color: var(--ink); font-weight: 600; background: var(--surface); }
.daytabs a[aria-current="true"] { background: var(--pitch); color: var(--pitch-ink); border-color: var(--pitch); }
.daytabs small { opacity: .75; font-weight: 500; }
.spel h3.lg { font-size: 15px; font-weight: 700; color: var(--ink-soft); margin: 22px 0 8px; text-transform: none; }
.fx { background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; padding: 12px; margin: 0 0 10px; }
.fx-top { display: flex; gap: 12px; align-items: baseline; margin-bottom: 10px; }
.fx-time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink-soft); flex: none; }
.fx-teams { min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
.fx-odds { display: grid; gap: 8px; }
.fx-odds3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fx-odds2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
button.odd { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 48px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; cursor: pointer; text-align: left; touch-action: manipulation; }
button.odd .odd-l { font-size: 14px; color: var(--ink-soft); min-width: 0; overflow-wrap: anywhere; }
button.odd .odd-v { font-weight: 800; font-variant-numeric: tabular-nums; }
.fx-odds3 button.odd { justify-content: center; flex-direction: column; gap: 0; text-align: center; }
button.odd[aria-pressed="true"] { background: var(--pitch); border-color: var(--pitch); color: var(--pitch-ink); }
button.odd[aria-pressed="true"] .odd-l { color: var(--pitch-ink); }
button.odd:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.fx-more { margin-top: 10px; }
.fx-more summary { cursor: pointer; padding: 10px 2px; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.fx-note { margin: 10px 0 2px; font-size: 13px; color: var(--ink-soft); }
.fx-mk h4 { margin: 10px 0 6px; font-size: 14px; color: var(--ink-soft); }
.empty { color: var(--ink-soft); }
.note { color: var(--ink-soft); max-width: 70ch; }

/* Kupong: bottenpanel på mobil/iPad, sidokolumn på bred skärm */
.slip { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; }
.slip-bar { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border: 0; border-top: 2px solid var(--ink); background: var(--pitch); color: var(--pitch-ink); font: inherit; font-weight: 700; cursor: pointer; }
.slip-bar b { background: var(--pitch-ink); color: var(--pitch); border-radius: 999px; min-width: 28px; padding: 2px 8px; text-align: center; }
.slip-bar #slipBarOdds { margin-left: auto; font-variant-numeric: tabular-nums; }
.slip-panel { display: none; background: var(--surface); border-top: 2px solid var(--ink); max-height: 78vh; max-height: 78dvh; overflow-y: auto; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
.slip.open .slip-panel { display: block; }
.slip.open .slip-bar { display: none; }
.slip-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.slip-head h2 { margin: 0; }
.slip-close { min-height: 44px; padding: 0 14px; border: 1.5px solid var(--ink); border-radius: 10px; background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.slip-empty { color: var(--ink-soft); }
.slip-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.slip-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sl-match { grid-column: 1 / 2; font-weight: 700; overflow-wrap: anywhere; }
.sl-pick { grid-column: 1 / 2; color: var(--ink-soft); font-size: 14px; overflow-wrap: anywhere; }
.sl-odd { grid-column: 2; grid-row: 1 / 3; font-variant-numeric: tabular-nums; }
.sl-rm { grid-column: 3; grid-row: 1 / 3; width: 44px; height: 44px; border: 1.5px solid var(--line); border-radius: 10px; background: transparent; color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }
.slip form#slipForm { display: grid; gap: 14px; }
.slip-sum, .cp-sum { display: grid; gap: 8px; margin: 0; }
.slip-sum div, .cp-sum div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.slip-sum dt, .cp-sum dt { color: var(--ink-soft); }
.slip-sum dd, .cp-sum dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.cp-sum .cp-big dd { font-size: 26px; }
.cp-sum .a-small { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
@media (min-width: 1100px) {
  .spel-matches { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; padding-bottom: 0; }
  .slip { position: sticky; top: 90px; left: auto; right: auto; bottom: auto; z-index: 1; }
  .slip-bar, .slip-close { display: none !important; }
  .slip-panel, .slip.open .slip-panel { display: block; border: 1.5px solid var(--ink); border-radius: 16px; box-shadow: 5px 5px 0 var(--pitch); max-height: calc(100vh - 120px); }
}
@media (max-width: 380px) { .fx-odds2 { grid-template-columns: minmax(0, 1fr); } }

/* Bekräftelse och enskild kupong */
.cp-type { margin: 0; }
.cp-legs { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.cp-legs li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cp-match { font-weight: 700; overflow-wrap: anywhere; }
.cp-when { grid-column: 1; font-size: 14px; color: var(--ink-soft); }
.cp-pick { grid-column: 1; overflow-wrap: anywhere; }
.cp-odd { grid-column: 2; grid-row: 1 / 3; font-weight: 800; font-variant-numeric: tabular-nums; align-self: center; }
.cp-st { grid-column: 2; font-size: 13px; font-weight: 700; text-align: right; color: var(--ink-soft); }
.cp-st-won { color: var(--pitch); } .cp-st-lost { color: #b3261e; }
:root[data-theme="dark"] .cp-st-lost { color: #ff8a80; }
.spel .spel-actions .btn, .a-actions .btn { flex: 1 1 160px; justify-content: center; text-align: center; }

/* Mina spel */
.spel-balance-sm b { font-size: clamp(40px, 10vw, 64px); }
.betlist { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 10px; }
.betcard, .a-card { display: grid; gap: 6px; padding: 14px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); font-weight: 400; }
.spel a.betcard, .spel a.a-card { color: var(--ink); font-weight: 400; }
.bc-top, .a-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.bc-row, .a-row { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; }
.bc-time, .a-dim { color: var(--ink-soft); font-size: 13.5px; }
.bc-st { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1.5px solid var(--line); }
.bc-pending { border-color: var(--flood); } .bc-open, .bc-won { border-color: var(--pitch); color: var(--pitch); } .bc-lost { border-color: #b3261e; color: #b3261e; }

/* Admin */
body.adm { background: var(--bg); }
.a-top { position: sticky; top: 0; z-index: 30; background: var(--header-bg); border-bottom: 1.5px solid var(--ink); padding: 8px 16px; padding-top: calc(8px + env(safe-area-inset-top)); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; backdrop-filter: blur(8px); }
.a-brand { font-family: var(--display); font-weight: 800; color: var(--ink); text-decoration: none; }
.a-tabs { display: flex; gap: 6px; overflow-x: auto; flex: 1 1 100%; }
.a-tabs a { flex: none; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; border: 1.5px solid transparent; }
.a-tabs a[aria-current="page"] { background: var(--pitch); color: var(--pitch-ink); }
.a-badge { background: var(--flood); color: var(--flood-ink); border-radius: 999px; padding: 1px 8px; font-size: 13px; font-weight: 800; }
.a-main { padding-top: 24px; }
.a-main .wrap { max-width: 900px; }
.a-list { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 10px; }
.a-tag { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); vertical-align: middle; }
.a-sec { margin-top: 32px; }
.a-search { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 12px 0; align-items: end; }
.a-search .btn { justify-self: start; }
.a-pager { display: flex; gap: 10px; margin: 16px 0; }
.a-radio { display: flex; gap: 20px; flex-wrap: wrap; }
.a-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.a-log li { display: flex; flex-wrap: wrap; gap: 2px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.a-log span { color: var(--ink-soft); }
.a-actions, .a-btnrow { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.a-btnrow .btn { flex: 1 1 200px; }
.a-actions .btn { min-height: 56px; font-size: 18px; }
.a-deny { border-color: #b3261e; color: #b3261e; }
@media (min-width: 700px) { .a-search { grid-template-columns: 1fr 1fr auto; } .a-tabs { flex: 0 1 auto; } }

/* Finjusteringar efter test på mobil */
.slip-panel { max-height: 90vh; max-height: 90dvh; }
.slip-list { margin-bottom: 8px; }
.slip-list li { padding: 8px 0; }
.a-tabs { overflow-x: visible; flex-wrap: wrap; }
.a-tabs a { padding: 0 11px; font-size: 15px; }
/* Godkänn/Neka ligger kvar i bildkanten, så att långa kuponger kan beslutas utan att scrolla till slutet */
.a-actions { position: sticky; bottom: 0; z-index: 20; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1.5px solid var(--line); margin-top: 16px; }

/* Popup: kräver godkännande (bottom sheet på mobil, centrerad från 700px) */
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,.55); padding: 0; }
.modal-box { background: var(--bg, #fff); color: var(--ink, #111); width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; border: 1.5px solid var(--ink); border-radius: 18px 18px 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); outline: none; }
.modal-box h2 { margin: 0 0 10px; font-size: clamp(22px, 5vw, 28px); line-height: 1.2; }
.modal-box p { margin: 0 0 12px; line-height: 1.5; overflow-wrap: anywhere; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.modal-actions .btn { flex: 1 1 200px; justify-content: center; text-align: center; min-height: 48px; margin: 0; }
@media (min-width: 700px) {
  .modal { align-items: center; padding: 24px; }
  .modal-box { border-radius: 18px; padding: 26px 28px; }
}
html.modal-open, html.modal-open body { overflow: hidden; }

/* Kvitto och besked */
.spel-receipt { border: 2px solid var(--pitch); max-width: 60ch; }
.spel-receipt h2 { margin: 0 0 8px; font-size: clamp(22px, 5vw, 28px); }
.spel-receipt p { margin: 0 0 8px; line-height: 1.5; }
.spel-decision { max-width: 60ch; font-weight: 600; line-height: 1.45; }
.bc-dec { display: block; margin-top: 6px; font-size: .95em; line-height: 1.4; color: var(--ink); }

/* Matchsidan: saldo, sök, datumväljare */
.bal { margin: 0 0 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; color: var(--ink-soft); font-weight: 600; }
.bal b { color: var(--ink); font-size: 1.35em; font-variant-numeric: tabular-nums; font-family: var(--display, inherit); }
.slip-bal { margin: 0; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg); }

.msearch { position: relative; margin: 0 0 12px; }
.msearch[hidden], .ms-count[hidden], .ms-x[hidden], .dn-list[hidden], .day[hidden], .fx[hidden] { display: none; }
.ms-ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); pointer-events: none; }
.spel .msearch input[type="search"] { width: 100%; min-height: 50px; padding: 12px 46px 12px 44px; font: inherit; font-size: 16px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--surface); color: var(--ink); -webkit-appearance: none; appearance: none; }
.spel .msearch input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.spel .msearch input[type="search"]:focus { outline: 3px solid var(--pitch); outline-offset: 2px; }
.ms-x { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--surface-2, var(--line)); color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer; }
.ms-count { margin: 0 0 10px; font-weight: 600; color: var(--ink-soft); }

.dnav { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; gap: 8px; align-items: stretch; margin: 0 0 12px; }
.dn-arrow, .dn-cur { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; font: inherit; font-weight: 700; cursor: pointer; touch-action: manipulation; }
.dn-arrow { font-size: 28px; line-height: 1; }
.dn-arrow[aria-disabled="true"] { opacity: .35; cursor: default; pointer-events: none; }
.dn-cur { gap: 8px; padding: 0 12px; border-color: var(--ink); min-width: 0; }
.dn-cur span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dn-caret { flex: none; font-size: 14px; }
.dn-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 6px; list-style: none; max-height: min(60vh, 420px); overflow-y: auto; overscroll-behavior: contain; background: var(--bg, #fff); border: 1.5px solid var(--ink); border-radius: 14px; box-shadow: 5px 5px 0 var(--pitch); }
.dn-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; padding: 8px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.dn-list a:hover { background: var(--surface); }
.dn-list a[aria-selected="true"] { background: var(--pitch); color: var(--pitch-ink); }
.dn-list small { opacity: .75; font-weight: 500; }
@media (min-width: 700px) { .dnav { grid-template-columns: 52px minmax(0, 420px) 52px; justify-content: start; } .dn-list { right: auto; width: calc(420px + 60px); max-width: 100%; left: 60px; } }

.day-hd, .fx-when { display: none; }
.searching .dnav { display: none; }
.searching .day-hd { display: block; margin: 20px 0 8px; font-size: 18px; }
.searching h3.lg { display: none; }
.searching .fx-when { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 6px; font-size: 14px; color: var(--ink-soft); font-weight: 600; }
.searching .fx-date { font-variant-numeric: tabular-nums; }
.day-empty { margin: 8px 0 18px; padding: 16px; border: 1.5px dashed var(--ink-soft, #777); border-radius: 12px; background: var(--surface); font-weight: 700; text-align: center; }

/* Kontomeny */
.acct { position: relative; }
.acct-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; max-width: 170px; padding: 6px 14px; border: 1.5px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; touch-action: manipulation; }
.acct-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.acct-caret { flex: none; transition: transform .15s; }
.acct-btn[aria-expanded="true"] .acct-caret { transform: rotate(180deg); }
.acct-panel[hidden] { display: none; }
.acct-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 230px; max-width: calc(100vw - 24px); padding: 6px; background: var(--bg, #fff); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 14px; box-shadow: 5px 5px 0 var(--pitch); }
.acct-panel a, .acct-panel .acct-out { display: flex; align-items: center; width: 100%; min-height: 48px; padding: 8px 14px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 16px; font-weight: 600; text-decoration: none; text-align: left; cursor: pointer; box-sizing: border-box; }
.acct-panel a:hover, .acct-panel .acct-out:hover, .acct-panel a:focus-visible, .acct-panel .acct-out:focus-visible { background: var(--surface); outline: none; box-shadow: inset 0 0 0 2px var(--pitch); }
.acct-panel a[aria-current="page"] { background: var(--pitch); color: var(--pitch-ink); }
.acct-panel form { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--line); }
@media (max-width: 480px) { .acct-btn { max-width: 120px; padding: 6px 11px; } .acct-panel { right: -4px; } }

/* Konto, länk tillbaka, knappar */
.backlink { display: inline-flex; align-items: center; min-height: 44px; margin: 0 0 6px; font-weight: 600; color: var(--ink); text-decoration: none; }
.backlink:hover { text-decoration: underline; }
.acct-actions { margin-top: 18px; }
.spel-first { margin-top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Kuponger: matcher och val på kortet, tydliga statusar */
.bc-id { color: var(--ink-soft); font-weight: 500; }
.bc-legs { list-style: none; margin: 4px 0 2px; padding: 0; display: grid; gap: 8px; }
.bc-legs li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; align-items: baseline; padding-top: 8px; border-top: 1px solid var(--line); }
.bc-legs li:first-child { border-top: 0; padding-top: 0; }
.bc-m { grid-column: 1; font-weight: 700; overflow-wrap: anywhere; }
.bc-p { grid-column: 1; color: var(--ink-soft); font-size: 15px; }
.bc-o { grid-column: 2; grid-row: 1; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.bc-lm { grid-column: 2; grid-row: 2; justify-self: end; font-weight: 800; }
.bc-lm-won { color: #1a7a3a; } .bc-lm-lost { color: #c62828; } .bc-lm-void { color: #b45f00; }
.bc-st .sym { font-weight: 900; }
.bc-st.bc-won { color: #1a7a3a; border-color: #1a7a3a; background: rgba(26,122,58,.1); }
.bc-st.bc-lost { color: #c62828; border-color: #c62828; background: rgba(198,40,40,.08); }
.bc-st.bc-refund { color: #b45f00; border-color: #b45f00; background: rgba(230,130,0,.12); }
.bc-st.bc-pending, .bc-st.bc-open { color: var(--ink); }
.bc-res { display: block; font-weight: 700; }
.bc-res-won { color: #1a7a3a; } .bc-res-refund { color: #b45f00; }
:root[data-theme="dark"] .bc-lm-won, :root[data-theme="dark"] .bc-res-won, :root[data-theme="dark"] .bc-st.bc-won { color: #6fdc8c; }
:root[data-theme="dark"] .bc-lm-lost, :root[data-theme="dark"] .bc-st.bc-lost { color: #ff8a80; }
:root[data-theme="dark"] .bc-lm-void, :root[data-theme="dark"] .bc-res-refund, :root[data-theme="dark"] .bc-st.bc-refund { color: #ffb74d; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bc-lm-won, :root:not([data-theme="light"]) .bc-res-won, :root:not([data-theme="light"]) .bc-st.bc-won { color: #6fdc8c; }
  :root:not([data-theme="light"]) .bc-lm-lost, :root:not([data-theme="light"]) .bc-st.bc-lost { color: #ff8a80; }
  :root:not([data-theme="light"]) .bc-lm-void, :root:not([data-theme="light"]) .bc-res-refund, :root:not([data-theme="light"]) .bc-st.bc-refund { color: #ffb74d; }
}
.spel a.betcard:hover { border-color: var(--ink); }

/* Kontomenyn: rena menyrader (överstyr sajtens knapp- och formulärstil) */
.acct-panel form { display: block; margin: 4px 0 0; padding: 4px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.acct-panel .acct-out { border: 0; box-shadow: none; height: auto; line-height: 1.3; margin: 0; }
/* Smal skärm: kontomenyn ligger uppe till höger på samma rad som loggan; språk/tema/meny hamnar på raden under */
@media (max-width: 720px) {
  .top .wrap { flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
  .top .tools { display: contents; }
  .top .wrap .brand { order: 0; }
  .top .wrap .acct { order: 1; }
  .top .wrap .seg, .top .wrap .lang, .top .wrap .iconbtn { order: 2; }
  .top .wrap > nav { order: 3; }
  .top .wrap::after { content: ""; order: 1; flex: 0 0 100%; height: 0; }   /* tvingar språk/tema/meny till raden under */
}

/* Sportrad */
.sportbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 16px; }
.sp-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; padding: 8px 4px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14px; line-height: 1.15; text-align: center; touch-action: manipulation; overflow-wrap: anywhere; }
.sp-tab:hover { border-color: var(--ink); }
.sp-tab:focus-visible { outline: 3px solid var(--pitch); outline-offset: 2px; }
.sp-tab[aria-current="true"] { background: var(--pitch); color: var(--pitch-ink); border-color: var(--pitch); box-shadow: 3px 3px 0 var(--ink); }
.sp-ic { flex: none; }
@media (min-width: 700px) { .sportbar { grid-template-columns: repeat(4, minmax(0, 150px)); } .sp-tab { flex-direction: row; gap: 10px; min-height: 52px; font-size: 16px; padding: 8px 14px; } }
.fb-wrap[hidden], .sport-soon[hidden] { display: none; }
.sport-soon { margin: 8px 0 20px; padding: 28px 20px; border: 2px dashed var(--ink-soft, #777); border-radius: 16px; background: var(--surface); text-align: center; }
.ss-ic { display: inline-flex; width: 64px; height: 64px; align-items: center; justify-content: center; margin-bottom: 8px; border-radius: 50%; background: var(--pitch); color: var(--pitch-ink); }
.ss-ic .sp-ic { width: 34px; height: 34px; }
.sport-soon h2 { margin: 0 0 8px; font-size: clamp(22px, 5vw, 30px); outline: none; }
.sport-soon p { margin: 0 0 18px; color: var(--ink-soft); }

/* Introduktionen för utloggade: Öppna konto som huvudknapp, inloggning som tydligt alternativ */
.spel-intro { max-width: 60ch; margin: 0 0 20px; color: var(--ink-soft); }
.spel-alt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 18px 0 0; font-weight: 600; }
.spel-alt .btn { min-width: 140px; justify-content: center; text-align: center; }
@media (max-width: 720px) { .spel-navacct { display: block; } }

/* Enhetliga spelstatusar: symbol + text, aldrig bara färg */
.stx { font-weight: 700; }
.stx .sym { font-weight: 900; }
.stx-won { color: #1a7a3a; } .stx-lost { color: #c62828; } .stx-void { color: #b45f00; }
:root[data-theme="dark"] .stx-won { color: #6fdc8c; } :root[data-theme="dark"] .stx-lost { color: #ff8a80; } :root[data-theme="dark"] .stx-void { color: #ffb74d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stx-won { color: #6fdc8c; } :root:not([data-theme="light"]) .stx-lost { color: #ff8a80; } :root:not([data-theme="light"]) .stx-void { color: #ffb74d; } }

.bc-lm { white-space: nowrap; font-size: 13px; }
.spel-note .stx-won, .spel-note .stx-lost { font-size: 1.1em; }
.cp-legs li .cp-st { grid-column: 1 / -1; grid-row: auto; text-align: left; font-size: 14px; margin-top: 4px; }
.cp-legs li .cp-st .stx { font-weight: 700; }

/* Admin: blockerade konton och radering */
.a-tag-blocked { background: rgba(198,40,40,.1); border-color: #c62828; color: #c62828; }
:root[data-theme="dark"] .a-tag-blocked { color: #ff8a80; border-color: #ff8a80; background: rgba(255,138,128,.12); }
.a-blocked { color: #c62828; }
:root[data-theme="dark"] .a-blocked { color: #ff8a80; }
.a-danger { border-color: #c62828; }
.a-sec h3 { margin: 22px 0 10px; }
button[disabled] { opacity: .5; cursor: not-allowed; }

/* ===== Matchvyn med sportmeny (sporter och ligor) ===== */
.spel-wide .wrap { max-width: 1400px; }
.sm3 { gap: 16px; }
.sm-head h1 { font-size: clamp(28px, 5vw, 40px); margin-bottom: 8px; }
.sm-head .lead { margin: 0 0 12px; }

/* Menyn: på mobil en panel över sidan, på dator en egen kolumn med egen rullning */
.sm-menu { display: none; }
.sm-menu.open { display: block; position: fixed; inset: 0; z-index: 120; background: var(--bg, #fff); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sm-menu-in { padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; }
.sm-menu-hd { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 2; background: var(--bg, #fff); padding: 6px 0 10px; }
.sm-menu-hd h2 { margin: 0; font-size: 22px; }
.sm-close { width: 46px; height: 46px; border: 1.5px solid var(--ink); border-radius: 12px; background: transparent; color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; }
.sm-sports, .sm-leagues { list-style: none; margin: 0; padding: 0; }
.sm-sports { display: grid; gap: 8px; }
.sm-leagues[hidden] { display: none; }
.sm-leagues { margin: 6px 0 4px 18px; padding-left: 12px; border-left: 2px solid var(--line); display: grid; gap: 2px; }
.sm-s, .sm-l { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 700; touch-action: manipulation; }
.sm-s:hover, .sm-l:hover { border-color: var(--ink); }
.sm-s:focus-visible, .sm-l:focus-visible, .sm-open:focus-visible, .sm-close:focus-visible { outline: 3px solid var(--pitch); outline-offset: 2px; }
.sm-l { min-height: 44px; border-color: transparent; background: transparent; font-weight: 600; font-size: 15px; }
.sm-l:hover { background: var(--surface); }
.sm-lbl { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; line-height: 1.2; }
.sm-n { flex: none; min-width: 26px; padding: 2px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-weight: 600; font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
.sm-row { display: flex; gap: 6px; align-items: stretch; }
.sm-row > .sm-s { flex: 1 1 auto; min-width: 0; }
.sm-tg { flex: none; width: 52px; min-height: 48px; display: flex; align-items: center; justify-content: center; padding: 0; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; }
.sm-tg[hidden] { display: none; }
.sm-tg:hover { border-color: var(--ink); }
.sm-tg:focus-visible { outline: 3px solid var(--pitch); outline-offset: 2px; }
.sm-caret { flex: none; font-size: 15px; line-height: 1; transition: transform .15s; }
.sm-tg[aria-expanded="true"] .sm-caret { transform: rotate(180deg); }
.sm-picked { display: block; margin-top: 2px; font-size: 12px; font-weight: 700; color: var(--pitch-deep, var(--ink)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-picked[hidden] { display: none; }
.sm-sport.is-sel > .sm-row > .sm-s:not([aria-current="true"]) { border-color: var(--pitch); box-shadow: inset 4px 0 0 var(--pitch); }
.sm-s[aria-current="true"] { background: var(--pitch); color: var(--pitch-ink); border-color: var(--pitch); box-shadow: 3px 3px 0 var(--ink); }
.sm-s[aria-current="true"] .sm-n { color: var(--ink); }
.sm-sport.is-open:not(.is-sel) > .sm-row > .sm-s { border-color: var(--ink); }
.sm-l[aria-current="true"] { background: var(--pitch); color: var(--pitch-ink); border-color: var(--pitch); }
.sm-l[aria-current="true"] .sm-n { color: var(--ink); }
html.sm-lock, html.sm-lock body { overflow: hidden; }

/* Verktygsraden (menyknapp, sök, datum) */
.sm-tools { background: var(--bg, #fff); }
.sm-open { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; margin: 0 0 12px; padding: 8px 14px; border: 1.5px solid var(--ink); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; touch-action: manipulation; box-shadow: 3px 3px 0 var(--pitch); }
.sm-open[hidden] { display: none; }
.sm-open-t { display: grid; flex: 1 1 auto; min-width: 0; line-height: 1.25; }
.sm-open-t small { color: var(--ink-soft); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lgb[hidden], .lgb .fx[hidden] { display: none; }
.day-empty .btn { margin: 10px auto 0; display: inline-flex; }
.day-empty[hidden], .day-empty .btn[hidden] { display: none; }
.sm-main.searching .lgb h3.lg { display: none; }
.note + .note { margin-top: 8px; }

/* Kupongens varningar när oddset ändrats eller matchen startat */
.sl-warn { grid-column: 1 / 2; font-size: 13px; font-weight: 700; color: #8a5a00; }
.sl-bad { color: #b3261e; }
:root[data-theme="dark"] .sl-warn { color: #ffcf6e; }
:root[data-theme="dark"] .sl-bad { color: #ff8a80; }

/* Dator: tre kolumner (meny, matcher, kupong) som rullar var för sig */
@media (min-width: 1000px) {
  .spel.spel-wide { padding: 20px 0 24px; }
  .sm3 { display: grid; grid-template-columns: 270px minmax(0, 1fr) 340px; gap: 20px; align-items: stretch; padding-bottom: 0;
    height: calc(100vh - 128px); height: calc(100dvh - 128px); min-height: 520px; }
  .sm3 > .sm-menu, .sm3 > .sm-main, .sm3 > .slip { min-height: 0; height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
  .sm3 > .sm-menu { display: block; position: static; inset: auto; z-index: auto; background: none; overflow-y: auto; padding-right: 4px; }
  .sm-menu-in { padding: 0 0 12px; max-width: none; margin: 0; }
  .sm-menu-hd { position: static; padding: 0 0 10px; }
  .sm-menu-hd h2 { font-size: 20px; }
  .sm-close, .sm-open { display: none !important; }
  .sm3 > .slip { position: static; top: auto; }
  .sm3 .slip-panel, .sm3 .slip.open .slip-panel { max-height: none; }
  .sm3 .slip-bar { display: none !important; }
  .sm3 > .sm-main { padding: 0 6px 24px 2px; }
  .sm-tools { position: sticky; top: 0; z-index: 8; padding: 6px 0 4px; margin-top: 4px; box-shadow: 0 8px 8px -8px rgba(0,0,0,.18); }
  .sm-tools .dnav { margin-bottom: 8px; }
}
@media (min-width: 1000px) and (max-width: 1199px) { .sm3 { grid-template-columns: 240px minmax(0, 1fr) 320px; gap: 14px; } }
/* Mobil: matchlistan använder hela bredden; kupongen är kvar som knapp längst ned */
@media (max-width: 999px) { .sm3 { padding-bottom: 84px; } .sm-open { display: flex; } }
@media (min-width: 1000px) {
  .sm3 > .slip { padding: 0 8px 10px 0; z-index: 1; }
  .sm3 .slip-panel, .sm3 .slip.open .slip-panel { display: block; border: 1.5px solid var(--ink); border-radius: 16px; box-shadow: 4px 4px 0 var(--pitch); }
  .sm3 .slip-close { display: none !important; }
}
/* Sidans dekorativa .slip (snedställd kupongbild på startsidan) ska inte påverka den riktiga kupongen */
.spel .slip { transform: none; border: 0; border-radius: 0; box-shadow: none; background: transparent; padding: 0; animation: none; }
@media (min-width: 1000px) { .spel .sm3 > .slip { padding: 0 8px 10px 0; } }

/* Sportikoner i färg: samma storlek och plats, kontur följer temat (ljust/mörkt) */
.sp-ic { flex: none; display: block; width: 30px; height: 30px; overflow: visible; }
.sp-ic .rim { stroke: var(--ink); stroke-width: 1.5; }
.sm-s > .sp-ic, .sm-open > .sp-ic { margin-right: 2px; }
.sm-s[aria-current="true"] .sp-ic .rim { stroke: var(--ink); }
@media (max-width: 999px) { .sp-ic { width: 32px; height: 32px; } }
/* Sporter som kommer längre fram: statusrad under sporten och panel i mitten */
.sm-status { list-style: none; padding: 8px 12px; margin: 0; min-height: 40px; display: flex; align-items: center; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.sm-status span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--ink-soft); vertical-align: 1px; }
.sm-sport.is-soon .sm-leagues { border-left-style: dashed; }
.soon-box { text-align: center; padding: 40px 16px; border: 1.5px dashed var(--line); border-radius: 16px; margin: 8px 0 16px; }
.soon-box[hidden] { display: none; }
.soon-box h2 { margin: 0 0 6px; font-size: clamp(24px, 4vw, 32px); }
.soon-box .soon-sport { margin: 0 0 10px; font-weight: 800; color: var(--pitch-deep, var(--ink)); }
.soon-box p:last-child { margin: 0; color: var(--ink-soft); }
.sm-main.soon .dnav, .sm-main.soon .ms-count { display: none; }
/* Automatisk statusuppdatering */
.live-ann { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.live-note[hidden] { display: none; }
.live-note a { font-weight: 700; margin-left: 4px; }
