/* OTB Live: gemensam form för sajten. Norrsken över natthimmel. */
:root {
    --bg: #060a10;
    --surface: rgba(16, 23, 32, .78);
    --surface-solid: #101720;
    --surface-2: rgba(27, 37, 50, .8);
    --surface-3: #223041;
    --line: rgba(120, 160, 190, .16);
    --line-strong: rgba(120, 160, 190, .32);
    --text: #eaf1f7;
    --muted: #8fa1b5;
    --faint: #5d6e82;
    --accent: #34d399;
    --accent-2: #2dd4bf;
    --violet: #a78bfa;
    --accent-ink: #04281c;
    --danger: #fb7185;
    --warn: #fbbf24;
    --gold: #f2c14e;
    --radius: 14px;
    --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --display: 'Outfit', 'Inter', system-ui, sans-serif;
    --aurora: linear-gradient(100deg, #34d399 0%, #2dd4bf 45%, #a78bfa 100%);
    color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html { margin: 0; background: var(--bg); }
body { margin: 0; background: transparent; }
body { color: var(--text); font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; line-height: 1.55; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; line-height: 1.15; margin: 0; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- Norrskenet ---------- */
/* Tre ljusband som långsamt driver över himlen, med lodräta strålar (draperiet) och några stjärnor.
   Banden ligger överst på sidan och tonar ut nedåt, så att innehållet längre ned står mot mörker. */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
    background: radial-gradient(120% 70% at 50% -10%, #0b1d27 0%, #070d14 52%, var(--bg) 100%); }
.aurora i { position: absolute; display: block; border-radius: 50%; mix-blend-mode: screen; will-change: transform, opacity; }
.aurora i:nth-child(1) { left: -18%; top: -30vh; width: 90vw; height: 66vh; background: radial-gradient(closest-side, rgba(52, 211, 153, .55), rgba(52, 211, 153, .16) 55%, rgba(52, 211, 153, 0) 74%); transform: rotate(-10deg); animation: aurora-a 24s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { right: -22%; top: -26vh; width: 80vw; height: 58vh; background: radial-gradient(closest-side, rgba(45, 212, 191, .4), rgba(56, 189, 248, .12) 55%, rgba(45, 212, 191, 0) 72%); transform: rotate(12deg); animation: aurora-b 31s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { left: 22%; top: -36vh; width: 66vw; height: 62vh; background: radial-gradient(closest-side, rgba(167, 139, 250, .36), rgba(167, 139, 250, .1) 55%, rgba(167, 139, 250, 0) 72%); animation: aurora-c 38s ease-in-out infinite alternate; }
/* Draperiet: smala lodräta strålar som bara syns där banden lyser */
.aurora::before { content: ''; position: absolute; left: -10%; right: -10%; top: 0; height: 46vh; opacity: .5; mix-blend-mode: overlay;
    background: repeating-linear-gradient(94deg, rgba(255, 255, 255, 0) 0 14px, rgba(255, 255, 255, .5) 22px, rgba(255, 255, 255, 0) 34px 61px, rgba(255, 255, 255, .32) 70px, rgba(255, 255, 255, 0) 83px 120px);
    -webkit-mask-image: linear-gradient(#000 0%, rgba(0, 0, 0, .6) 45%, transparent 100%); mask-image: linear-gradient(#000 0%, rgba(0, 0, 0, .6) 45%, transparent 100%);
    animation: aurora-rays 46s linear infinite alternate; }
.aurora::after { content: ''; position: absolute; inset: 0; opacity: .6;
    background-image: radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 68% 9%, #cfe 50%, transparent 51%), radial-gradient(1.5px 1.5px at 41% 31%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 87% 27%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 27% 6%, #dff 50%, transparent 51%), radial-gradient(1px 1px at 55% 22%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 93% 12%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 5% 36%, #fff 50%, transparent 51%);
    background-size: 640px 520px; mask-image: linear-gradient(#000 0%, transparent 62%); -webkit-mask-image: linear-gradient(#000 0%, transparent 62%); }
@keyframes aurora-a { from { transform: translate3d(0, 0, 0) rotate(-10deg) scale(1); opacity: .8; } to { transform: translate3d(10vw, 5vh, 0) rotate(-3deg) scale(1.2); opacity: 1; } }
@keyframes aurora-b { from { transform: translate3d(0, 0, 0) rotate(12deg) scale(1.05); opacity: .65; } to { transform: translate3d(-13vw, 7vh, 0) rotate(4deg) scale(.92); opacity: 1; } }
@keyframes aurora-c { from { transform: translate3d(-9vw, 0, 0) scale(.9); opacity: .45; } to { transform: translate3d(11vw, 8vh, 0) scale(1.2); opacity: .95; } }
@keyframes aurora-rays { from { transform: translate3d(-4%, 0, 0) skewX(-6deg); } to { transform: translate3d(4%, 0, 0) skewX(5deg); } }
@media (prefers-reduced-motion: reduce) { .aurora i, .aurora::before { animation: none; } }
/* Starkare sken på startsidan och inloggningen */
body.glow .aurora i:nth-child(1) { height: 84vh; top: -28vh; }
body.glow .aurora i:nth-child(2) { height: 76vh; }
body.glow .aurora i:nth-child(3) { height: 80vh; }
body.glow .aurora::before { height: 64vh; opacity: .62; }
.aurora-text { background: var(--aurora); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Sidhuvud ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(6, 10, 16, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar .in { max-width: 1240px; margin: 0 auto; padding: 0 1.25rem; height: 3.75rem; display: flex; align-items: center; gap: 1.25rem; }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 1.9rem; width: auto; display: block; }
.topbar nav { display: flex; align-items: center; gap: .15rem; font-size: .92rem; font-weight: 500; margin-left: .5rem; }
.topbar nav a { padding: .45rem .8rem; border-radius: .55rem; color: var(--muted); white-space: nowrap; transition: color .15s, background .15s; }
.topbar nav a:hover, .topbar nav a.on { color: var(--text); background: rgba(255, 255, 255, .06); }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.usermenu { position: relative; }
.usermenu > button { display: inline-flex; align-items: center; gap: .5rem; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: 999px; padding: .25rem .7rem .25rem .25rem; cursor: pointer; font-size: .88rem; font-weight: 500; }
.usermenu > button:hover { border-color: var(--line-strong); }
.avatar { width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--aurora); color: #04281c; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .8rem; flex: none; }
.usermenu .menu { position: absolute; right: 0; top: calc(100% + .5rem); min-width: 13.5rem; background: var(--surface-solid); border: 1px solid var(--line-strong); border-radius: 12px; padding: .4rem; box-shadow: 0 18px 50px rgba(0, 0, 0, .55); display: none; }
.usermenu.open .menu { display: block; }
.usermenu .menu a, .usermenu .menu button { display: flex; align-items: center; gap: .65rem; width: 100%; padding: .55rem .7rem; border-radius: 8px; font-size: .9rem; background: none; border: 0; cursor: pointer; text-align: left; color: var(--text); }
.usermenu .menu a:hover, .usermenu .menu button:hover { background: rgba(255, 255, 255, .07); }
.usermenu .menu i { width: 1rem; text-align: center; color: var(--muted); }
.usermenu .menu .who { padding: .5rem .7rem .6rem; font-size: .8rem; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: .35rem; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 720px) { .topbar nav a.hide-s { display: none; } .usermenu .name { display: none; } .usermenu > button { padding: .25rem; } .topbar .in { gap: .5rem; } .brand img { height: 1.6rem; } }

/* ---------- Ytor ---------- */
main { flex: 1; width: 100%; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 1.25rem; }
.wrap.narrow { max-width: 760px; }
.page { padding-top: 2.5rem; padding-bottom: 4rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.card.pad { padding: 1.25rem; }
.card h3 { font-size: 1.02rem; font-weight: 700; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .85rem; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
/* En rubrik eller text som växer bredvid knappar ska inte tryckas ihop till en smal spalt på telefonen: den går till en egen rad i stället (tomma mellanrum undantas) */
.row > .grow:not(:empty) { min-width: min(100%, 15rem); }
.stack > * + * { margin-top: 1rem; }
.eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.page-title { font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 800; }
.lead { color: var(--muted); font-size: 1.05rem; max-width: 42rem; }

/* ---------- Knappar ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .62rem 1.05rem; border-radius: 10px; font-size: .92rem; font-weight: 600; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .05); color: var(--text); cursor: pointer; white-space: nowrap; transition: transform .1s, filter .15s, background .15s, border-color .15s; }
.btn:hover { background: rgba(255, 255, 255, .1); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); background: var(--accent); }
.btn.aurora-btn { background: var(--aurora); border: 0; color: #04281c; }
.btn.aurora-btn:hover { filter: brightness(1.08); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: rgba(255, 255, 255, .07); }
.btn.danger { color: var(--danger); border-color: rgba(251, 113, 133, .4); }
.btn.danger:hover { background: rgba(251, 113, 133, .12); }
.btn.sm { padding: .38rem .7rem; font-size: .82rem; border-radius: 8px; }
.btn.lg { padding: .85rem 1.4rem; font-size: 1rem; border-radius: 12px; }
.btn.block { width: 100%; }
.btn:disabled, .btn.busy { opacity: .55; cursor: default; pointer-events: none; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.iconbtn:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.iconbtn.danger:hover { color: var(--danger); }

/* ---------- Formulär ---------- */
.field { display: block; }
.field > span, .label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: .35rem; }
.input, select.input, textarea.input { width: 100%; padding: .65rem .8rem; border-radius: 10px; border: 1px solid var(--line-strong); background: rgba(4, 8, 13, .6); color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s; }
.input::placeholder { color: var(--faint); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(52, 211, 153, .18); }
.input.sm { padding: .38rem .55rem; font-size: .86rem; border-radius: 8px; }
textarea.input { resize: vertical; min-height: 7rem; line-height: 1.5; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238fa1b5' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .7rem center; padding-right: 2rem; }
.hint { font-size: .8rem; color: var(--faint); margin-top: .35rem; }
.when2 { display: flex; flex-wrap: wrap; gap: .4rem; }
.when2 input[type=date] { flex: 1 1 8.5rem; min-width: 0; }
.when2 input[type=time] { flex: 1 1 5.5rem; min-width: 0; }
.fields { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.check { display: inline-flex; align-items: center; gap: .55rem; font-size: .92rem; cursor: pointer; }
.check input { width: 1.05rem; height: 1.05rem; accent-color: var(--accent); }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: rgba(4, 8, 13, .6); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; padding: .4rem .8rem; border-radius: 7px; font-size: .85rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--surface-3); color: var(--text); }

/* ---------- Småsaker ---------- */
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .18rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 600; background: rgba(255, 255, 255, .07); color: var(--muted); white-space: nowrap; }
.chip.live { background: rgba(52, 211, 153, .16); color: var(--accent); }
.chip.draft { background: rgba(251, 191, 36, .14); color: var(--warn); }
.chip.off { background: rgba(251, 113, 133, .14); color: var(--danger); }
.dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); display: inline-block; animation: pulse 1.6s ease-in-out infinite; flex: none; }
.dot.still { animation: none; }
.dot.grey { background: var(--faint); animation: none; }
.dot.red { background: var(--danger); animation: none; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.ptitle { color: #f87171; font-weight: 700; font-size: .85em; margin-right: .3em; }
.elo { color: var(--faint); font-size: .85em; margin-left: .35em; font-variant-numeric: tabular-nums; }
.empty { padding: 2.5rem 1.5rem; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); }
.empty h3 { color: var(--text); margin-bottom: .4rem; }
.tabs { display: flex; gap: .2rem; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button, .tabs a { position: relative; padding: .75rem .95rem; background: none; border: 0; color: var(--muted); font-weight: 600; font-size: .92rem; cursor: pointer; white-space: nowrap; }
.tabs button:hover, .tabs a:hover { color: var(--text); }
.tabs .on { color: var(--text); }
.tabs .on::after { content: ''; position: absolute; left: .6rem; right: .6rem; bottom: -1px; height: 2px; border-radius: 2px; background: var(--aurora); }
.tabs .count { margin-left: .4rem; font-size: .72rem; padding: .05rem .4rem; border-radius: 999px; background: rgba(255, 255, 255, .08); }
table.t { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.t th { text-align: left; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: .55rem .75rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover td { background: rgba(255, 255, 255, .025); }
table.t .num { text-align: right; font-variant-numeric: tabular-nums; }
.scroll-x { overflow-x: auto; }

/* ---------- Dialoger och meddelanden ---------- */
.modal-back { position: fixed; inset: 0; z-index: 80; background: rgba(2, 5, 9, .72); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal { width: 100%; max-width: 30rem; max-height: calc(100vh - 2rem); overflow: auto; background: var(--surface-solid); border: 1px solid var(--line-strong); border-radius: 16px; padding: 1.4rem; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.modal.wide { max-width: 44rem; }
.modal h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.modal .actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.25rem; }
#toasts { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: .5rem; align-items: center; pointer-events: none; }
.toast { background: var(--surface-solid); border: 1px solid var(--line-strong); border-left: 3px solid var(--accent); border-radius: 10px; padding: .65rem 1rem; font-size: .9rem; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); animation: toast-in .2s ease-out; max-width: min(92vw, 32rem); }
.toast.err { border-left-color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Sidfot ---------- */
footer.site { border-top: 1px solid var(--line); margin-top: auto; }
footer.site .in { max-width: 1240px; margin: 0 auto; padding: 1.5rem 1.25rem 2rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; font-size: .84rem; color: var(--muted); }
footer.site img { height: 1.3rem; opacity: .75; display: block; }
footer.site a:hover { color: var(--text); }
footer.site .links { display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* ---------- Turneringskort (listor) ---------- */
.tgrid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.tcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: border-color .2s, transform .2s; backdrop-filter: blur(10px); }
.tcard:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.tcard.live { border-color: rgba(52, 211, 153, .45); box-shadow: 0 0 40px -18px rgba(52, 211, 153, .7); }
.tcard .cover { position: relative; aspect-ratio: 2.2 / 1; display: flex; align-items: center; justify-content: center; overflow: hidden;
    background: radial-gradient(90% 120% at 20% 0%, rgba(52, 211, 153, .28), transparent 60%), radial-gradient(80% 120% at 90% 10%, rgba(167, 139, 250, .24), transparent 60%), repeating-conic-gradient(#0d141c 0% 25%, #111a24 0% 50%) 0 0 / 48px 48px; }
.tcard .cover .mk { height: 46%; opacity: .32; }
.tcard .cover img.pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tcard .cover .flag { position: absolute; top: .7rem; left: .7rem; display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .65rem; border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: rgba(6, 10, 16, .82); backdrop-filter: blur(6px); color: var(--muted); }
.tcard.live .cover .flag { color: var(--accent); }
.tcard .cover .src { position: absolute; top: .7rem; right: .7rem; padding: .25rem .6rem; border-radius: 999px; font-size: .68rem; font-weight: 600; background: rgba(6, 10, 16, .82); color: var(--muted); }
.tcard .body { display: flex; flex-direction: column; gap: .7rem; padding: 1rem 1.05rem 1.1rem; flex: 1; }
.tcard .name { font-family: var(--display); font-size: 1.15rem; font-weight: 700; line-height: 1.25; }
.tcard .meta { font-size: .82rem; color: var(--muted); }
.tcard .rounds { display: flex; flex-wrap: wrap; gap: .35rem; }
.tcard .rd { padding: .2rem .55rem; border-radius: .4rem; font-size: .75rem; font-weight: 500; background: rgba(255, 255, 255, .06); color: var(--muted); border: 1px solid transparent; }
.tcard .rd:hover { color: var(--text); border-color: var(--line-strong); }
.tcard .rd.on { background: rgba(52, 211, 153, .14); color: var(--accent); border-color: rgba(52, 211, 153, .4); }
.tcard .rd.next { color: var(--text); }
.tcard .foot { margin-top: auto; display: flex; gap: .5rem; }
.tcard .foot .btn:first-child { flex: 1; }
.section-h { display: flex; align-items: center; gap: .6rem; font-family: inherit; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 2.5rem 0 1rem; }
.section-h .n { padding: .1rem .5rem; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--text); letter-spacing: 0; }

/* Smala mobiler: korta knappar i toppen så att inget hamnar utanför */
.show-xs { display: none; }
@media (max-width: 440px) { .hide-xs { display: none; } .show-xs { display: inline; } .topbar .right { gap: .35rem; } .topbar .right .btn.sm { padding-left: .65rem; padding-right: .65rem; } .topbar nav { margin-left: 0; } .topbar nav a { padding: .45rem .55rem; } }

/* ---- Partikort med litet bräde (startsidan, My page) ---- */
.ggrid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.gcard { display: flex; flex-direction: column; gap: .35rem; padding: .7rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  color: inherit; text-decoration: none; transition: border-color .2s, transform .2s; min-width: 0; }
.gcard:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.gcard.live { border-color: rgba(52, 211, 153, .28); }
.gcard .gp { display: flex; align-items: center; gap: .45rem; font-size: .86rem; min-width: 0; }
.gcard .gp .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.gcard .gp .pc { width: .7rem; height: .7rem; border-radius: 3px; flex: none; border: 1px solid rgba(255, 255, 255, .35); }
.gcard .gp .pc.w { background: #f2f4f7; } .gcard .gp .pc.b { background: #1a2028; }
.gcard .gp b { font-family: var(--mono, ui-monospace, monospace); }
.gcard .ck { font: 600 .8rem/1 var(--mono, ui-monospace, monospace); color: var(--muted); padding: .2rem .35rem; border-radius: .3rem; background: rgba(255, 255, 255, .05); }
.gcard .ck.on { color: #04281c; background: var(--accent); }
.gcard .ck:empty { display: none; }
.gcard .gm { font-size: .76rem; color: var(--muted); display: flex; align-items: center; gap: .35rem; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcard .gm .ev { overflow: hidden; text-overflow: ellipsis; }
.gcard .dot, .dash-h .dot { width: .45rem; height: .45rem; border-radius: 50%; background: var(--accent); display: inline-block; flex: none; }
.mb { display: grid; grid-template-columns: repeat(8, 1fr); aspect-ratio: 1; border-radius: 6px; overflow: hidden; }
.mb i { display: block; aspect-ratio: 1; position: relative; }
.mb i.l { background: #e9eef3; } .mb i.d { background: #8499ad; }
.mb i.l.x { background: #b6e3cf; } .mb i.d.x { background: #62b596; }
.mb img { width: 100%; height: 100%; display: block; }

/* Huvudmenyn (Layout::NAV): ikoner bara i mobilmenyn; under 860px blir menyn en utfällbar lista */
.topbar nav a i { display: none; }
.topbar nav a.only-s, .navtoggle { display: none; }
.navtoggle { width: 2.3rem; height: 2.3rem; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--text); cursor: pointer; align-items: center; justify-content: center; }
@media (max-width: 860px) {
    .navtoggle { display: inline-flex; }
    .topbar nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: .1rem; margin: 0; padding: .5rem 1rem 1rem;
        background: rgba(6, 10, 16, .97); border-bottom: 1px solid var(--line); font-size: 1rem; }
    .topbar nav.open { display: flex; }
    .topbar nav a, .topbar nav a.only-s { display: flex; align-items: center; gap: .75rem; padding: .75rem .8rem; }
    .topbar nav a i { display: inline-block; width: 1.1rem; text-align: center; color: var(--muted); }
    .topbar .right .hide-s { display: none; }
}
footer.site .fbrand { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
footer.site .links { gap: .5rem 1.25rem; }

/* Match i delar: en rad per del (antal × betänketid, namn, poäng för vinst) */
.stg-rows { display: flex; flex-direction: column; gap: .45rem; }
.stg { display: grid; grid-template-columns: 4.2rem auto 6rem minmax(5rem, 1fr) 7.5rem 2rem; gap: .45rem; align-items: center; }
.stg-head span { font-size: .72rem; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
.stg .input { padding-top: .45rem; padding-bottom: .45rem; }
.stg-foot { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin-top: .55rem; }
.arma-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .45rem; }
.arma-modes button { text-align: left; padding: .6rem .75rem; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--muted); cursor: pointer; font: inherit; }
.arma-modes button b { display: block; color: var(--text); font-size: .9rem; margin-bottom: .15rem; }
.arma-modes button span { font-size: .78rem; line-height: 1.35; display: block; }
.arma-modes button.on { border-color: var(--accent, #34d399); background: rgba(52,211,153,.08); }
.arma-fields { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .7rem; }
.arma-fields label { display: flex; flex-direction: column; gap: .25rem; font-size: .72rem; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
.arma-fields .input { width: 7rem; padding-top: .45rem; padding-bottom: .45rem; }
.arma-note { margin: .55rem 0 0; }
.arma-fixed { display: flex; align-items: center; color: var(--muted); background: transparent; border-style: dashed; }
.no-off .arma-modes button[data-mode="off"] { display: none; }
#m_kind { display: flex; gap: .4rem; }
@media (max-width: 560px) { .stg { grid-template-columns: 3.6rem auto 1fr 2rem; } .stg [data-k=name] { grid-column: 1 / 3; } .stg [data-k=win] { grid-column: 3 / 4; } .stg-head { display: none; } .stg-rows { gap: .9rem; } }

/* Genvägen i sidhuvudet till ett evenemang som pågår eller förbereds */
.ongoing { display: inline-flex; align-items: center; gap: .45rem; max-width: 17rem; padding: .32rem .75rem; border-radius: 999px; border: 1px solid rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .08); font-size: .84rem; color: var(--text); text-decoration: none; }
.ongoing:hover { border-color: var(--accent); }
.ongoing .od { width: .5rem; height: .5rem; border-radius: 50%; background: var(--warn); flex: none; }
.ongoing .od.live { background: var(--accent); box-shadow: 0 0 0 3px rgba(52, 211, 153, .25); }
.ongoing .on-k { color: var(--muted); font-size: .76rem; flex: none; }
.ongoing .on-n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1100px) { .ongoing .on-k { display: none; } .ongoing { max-width: 12rem; } }
