/* Juttan Jackpot – vitt, marinblått och signalrött. Mobil först. */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url('../fonts/archivo-latin-wdth-normal.woff2') format('woff2-variations'), url('../fonts/archivo-latin-wdth-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url('../fonts/archivo-latin-ext-wdth-normal.woff2') format('woff2-variations'), url('../fonts/archivo-latin-ext-wdth-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --white: #ffffff;
  --navy: #0a2a66;
  --navy-2: #123a85;
  --blue: #1f51c6;
  --sky: #eff4fb;
  --sky-2: #dfe8f6;
  --ink: #0c1c3d;
  --muted: #56637e;
  --line: #dce3ef;
  --field: #c6d1e3;
  --red: #e2001a;
  --red-deep: #b30016;
  --red-tint: #fdeef0;
  --red-line: #f5c9cf;
  --shadow: 0 12px 32px rgba(10, 42, 102, .14), 0 2px 6px rgba(10, 42, 102, .06);
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 16px/1.5 var(--font);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 30px; line-height: 1.1; font-weight: 800; font-stretch: 78%; letter-spacing: -.01em; color: var(--navy); }
h2 { font-size: 20px; line-height: 1.2; font-weight: 750; font-stretch: 85%; color: var(--navy); }
a { color: var(--blue); text-underline-offset: 3px; }
img, svg { display: block; }
.ic { flex: none; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #7fa2f0; outline-offset: 2px; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num, .hero-sum, .fig-n, .owe-amt, .win-sum, .b-amt, .mine-n, .code, .round-sum, .rank {
  font-stretch: 66%;
  font-weight: 800;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -.005em;
}

/* ---------- Topbar & meny ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--white); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1040px; margin: 0 auto; padding: 0 16px; height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand span { font-size: 19px; font-weight: 800; font-stretch: 80%; letter-spacing: -.01em; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--white); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 4px 9px; font-size: 12px; font-weight: 650; color: var(--muted); text-decoration: none;
}
.tabbar a.on { color: var(--navy); }
.tabbar a.on::before { content: ''; position: absolute; top: -1px; left: 50%; width: 28px; height: 3px; margin-left: -14px; border-radius: 0 0 3px 3px; background: var(--red); }

.main { min-height: 60vh; }

/* ---------- Hero (blått band) ---------- */
.hero { background: var(--navy); color: var(--white); padding: 22px 0 70px; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: rgba(255, 255, 255, .78); }
.pill { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px; background: rgba(255, 255, 255, .12); color: var(--white); font-weight: 650; font-size: 13px; }
.hero-label { margin-top: 22px; font-size: 15px; font-weight: 550; color: rgba(255, 255, 255, .82); }
.hero-sum { display: flex; align-items: baseline; margin-top: 2px; font-size: clamp(68px, 22vw, 128px); line-height: .86; font-stretch: 62%; font-weight: 850; letter-spacing: -.02em; }
.hero-sum .unit { margin-left: .14em; font-size: .3em; font-weight: 700; font-stretch: 85%; letter-spacing: 0; color: rgba(255, 255, 255, .8); }
.figures { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 22px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .18); }
.figures > div { display: flex; flex-direction: column; }
.figures > div + div { padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, .18); }
.fig-n { font-size: 28px; line-height: 1.05; }
.fig-l { font-size: 13px; color: rgba(255, 255, 255, .74); }

/* ---------- Dagens biljett (överlappar bandet) ---------- */
.pass { position: relative; margin-top: -48px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.pass-main { padding: 18px 18px 16px; }
.pass-date { font-size: 13px; font-weight: 650; color: var(--muted); margin-bottom: 6px; }
.pass-title { font-size: 21px; line-height: 1.2; font-weight: 750; font-stretch: 85%; color: var(--navy); }
.pass-main .muted { margin-top: 2px; font-size: 15px; }
.pass-state { display: flex; align-items: center; gap: 12px; }
.badge-ok { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: var(--white); flex: none; }
.pass-stub { position: relative; padding: 16px 18px 16px; border-top: 2px dashed var(--line); }
.pass-stub::before, .pass-stub::after {
  content: ''; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--white); border: 1px solid var(--line);
}
.pass-stub::before { left: -12px; clip-path: inset(0 0 0 50%); }
.pass-stub::after { right: -12px; clip-path: inset(0 50% 0 0); }
.auto-line { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; color: var(--ink); text-decoration: none; }
.pass-stub > .auto-line:first-child { margin-top: 0; }
.auto-line span:nth-child(2) { flex: 1; }
.auto-line .ic { color: var(--navy); }
.link { color: var(--blue); font-weight: 700; }

.nudge { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--sky); color: var(--navy); font-size: 14px; text-decoration: none; }

/* ---------- Skuld / vinst ---------- */
.notice { margin-top: 16px; padding: 16px; border-radius: 16px; }
.notice-kicker { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.notice-owe { background: var(--red-tint); border: 1px solid var(--red-line); }
.notice-owe .notice-kicker { color: var(--red-deep); }
.owe-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who strong { display: block; font-size: 18px; line-height: 1.2; color: var(--ink); }
.who .muted { display: block; }
.owe-amt { font-size: 34px; line-height: 1; color: var(--red-deep); white-space: nowrap; }
.phone-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding: 10px 10px 10px 14px; background: var(--white); border-radius: 12px; }
.phone { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 750; color: var(--navy); text-decoration: none; font-variant-numeric: tabular-nums; }
.notice-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--red-line); }
.notice-foot p { flex: 1 1 200px; }
.notice-win { background: var(--sky); border: 1px solid var(--sky-2); }
.notice-win .notice-kicker { color: var(--navy); }
.win-sum { margin: 4px 0 2px; font-size: 40px; line-height: 1; color: var(--navy); }

.debt-list { list-style: none; margin: 10px 0 0; padding: 0; }
.debt-list li { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.notice-win .debt-list li { border-color: var(--sky-2); }
.debt-list li:last-child { border-bottom: 0; }
.debt-list .name { flex: 1; font-weight: 650; }
.debt-list .amt { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Sektioner ---------- */
.section { margin-top: 32px; }
.sec-head { margin-bottom: 12px; }
.sec-head p { margin-top: 4px; }
.sec-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.band { margin-top: 36px; padding: 28px 0 30px; background: var(--sky); }
.card { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); }
.section.card { margin-top: 20px; }
.page-head { margin: 26px 0 6px; }
.page-head p { margin-top: 4px; }
.empty { padding: 18px; border: 1.5px dashed var(--line); border-radius: 14px; text-align: center; color: var(--muted); font-size: 15px; }
.band .empty { border-color: #c9d6ea; }

/* ---------- Graf ---------- */
.chart { position: relative; height: 210px; touch-action: pan-y; border-radius: 12px; }
.chart:focus-visible { outline-offset: 4px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart-fallback { padding-top: 80px; text-align: center; }
.chart.ready .chart-fallback { display: none; }
.chart text { font-family: var(--font); font-size: 12px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.tip {
  position: absolute; top: 0; left: 0; z-index: 5; pointer-events: none;
  padding: 8px 11px; border-radius: 10px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow);
  font-size: 13px; line-height: 1.35; white-space: nowrap; opacity: 0; transition: opacity .12s;
}
.tip.on { opacity: 1; }
.tip b { display: block; color: var(--ink); }
.tip .v { font-weight: 750; color: var(--navy); font-variant-numeric: tabular-nums; }
.table-view { margin-top: 10px; }
.table-view summary { cursor: pointer; font-size: 14px; font-weight: 650; color: var(--blue); padding: 6px 0; }
.table-view table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 6px; }
.table-view th { text-align: left; font-weight: 650; color: var(--muted); padding: 6px 0; border-bottom: 1px solid var(--line); }
.table-view td { padding: 8px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.r { text-align: right !important; }

/* ---------- Segmentkontroll ---------- */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label, .seg a { padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 650; color: var(--muted); cursor: pointer; text-decoration: none; text-align: center; }
.seg input:checked + label, .seg a.on { background: var(--navy); color: var(--white); }
.seg input:focus-visible + label { outline: 3px solid #7fa2f0; outline-offset: 1px; }
.auth-card .seg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; margin: 4px 0 18px; background: var(--sky); border-color: var(--sky); }
.auth-card .seg a { padding: 10px 8px; }

/* ---------- Topplista ---------- */
.board { list-style: none; margin: 0; padding: 0; }
.board-win { display: none; }
.band[data-show="win"] .board-pool { display: none; }
.band[data-show="win"] .board-win { display: block; }
.board li { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid #d3ddec; }
.board li:last-child { border-bottom: 0; }
.board li.empty { display: block; border: 1.5px dashed #c9d6ea; padding: 18px; }
.rank { font-size: 24px; line-height: 1; color: var(--muted); text-align: center; }
.rank-1 { color: var(--red); }
.b-main { min-width: 0; }
.b-name { font-size: 16px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.b-sub { font-size: 13px; color: var(--muted); }
.bar { display: block; height: 6px; margin-top: 7px; border-radius: 3px; background: #d5e0f1; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 3px; background: var(--navy); }
.b-amt { font-size: 22px; line-height: 1; color: var(--navy); white-space: nowrap; }
.board li.me .b-name { color: var(--navy); }

/* ---------- Listor ---------- */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 84px 1fr auto; align-items: center; gap: 10px; min-height: 52px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.feed li:has(.inline-form) { grid-template-columns: 84px 1fr auto 36px; }
.feed-date { font-size: 13px; font-weight: 650; color: var(--muted); }
.feed-name { font-weight: 650; overflow-wrap: anywhere; }
.feed-amt { font-weight: 750; color: var(--navy); font-variant-numeric: tabular-nums; white-space: nowrap; }

.tag { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; background: var(--sky-2); color: var(--navy); font-size: 12px; font-weight: 650; line-height: 1.5; vertical-align: 2px; white-space: nowrap; }
.tag-auto { background: var(--white); box-shadow: inset 0 0 0 1px var(--field); }
.tag-ok { background: var(--navy); color: var(--white); }
.tag-blue { background: var(--navy); color: var(--white); }
.tag-red { background: var(--red-tint); color: var(--red-deep); }

.avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: var(--white); font-weight: 750; flex: none; }
.avatar-red { background: var(--red); }
.avatar-ghost { background: var(--white); color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--field); }
.avatar-lg { width: 60px; height: 60px; font-size: 26px; }

/* ---------- Knappar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px; border: 0; border-radius: 12px;
  font-size: 16px; font-weight: 750; font-stretch: 92%; text-decoration: none; cursor: pointer;
  transition: background-color .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-deep); }
.btn-blue { background: var(--navy); color: var(--white); }
.btn-blue:hover { background: var(--navy-2); }
.btn-ghost { background: var(--white); color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--field); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--navy); }
.btn-lg { height: 56px; font-size: 18px; }
.btn-sm { height: 40px; padding: 0 14px; font-size: 15px; }
.btn-xs { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 10px; background: var(--white); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.btn-icon:hover { color: var(--red-deep); box-shadow: inset 0 0 0 1px var(--red-line); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.inline-form { display: inline; margin: 0; }
.section > .inline-form, .wrap > .inline-form { display: block; margin-top: 12px; }
.wrap > .inline-form { margin-top: 24px; }

/* ---------- Formulär ---------- */
.form { margin: 0; }
.field { margin-bottom: 16px; }
.field label, .fieldset legend { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 650; color: var(--ink); }
input[type=text], input:not([type]), input[type=password], input[type=tel], input[type=number], input[type=date], select {
  width: 100%; height: 50px; padding: 0 14px;
  font-size: 16px; background: var(--white); color: var(--ink);
  border: 1.5px solid var(--field); border-radius: 12px; appearance: none;
}
select { padding-right: 40px; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%230a2a66' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 14px center; }
input:focus, select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(31, 81, 198, .16); }
input[aria-invalid=true] { border-color: var(--red); }
::placeholder { color: #9aa6bd; }
.hint { margin-top: 6px; font-size: 13px; color: var(--muted); }
.field-error { margin-top: 6px; font-size: 13px; font-weight: 650; color: var(--red-deep); }
.fieldset { margin: 8px 0 0; padding: 16px 0 0; border: 0; border-top: 1px solid var(--line); }
.fieldset legend { float: left; width: 100%; margin-bottom: 2px; font-size: 16px; font-weight: 750; color: var(--navy); }
.fieldset .hint { clear: both; margin: 0 0 12px; }
.code-input { text-align: center; font-size: 22px !important; font-weight: 750; font-stretch: 75%; letter-spacing: .12em; text-transform: uppercase; }
.form-inline .btn { width: 100%; }

.alert { margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; font-size: 15px; }
.alert-error { background: var(--red-tint); color: var(--red-deep); border: 1px solid var(--red-line); }
.alert-info { background: var(--sky); color: var(--navy); margin-top: 16px; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; top: 68px; left: 0; right: 0; z-index: 50; display: grid; gap: 8px; justify-items: center; padding: 0 12px; pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 10px; width: 100%; max-width: 520px; padding: 12px 10px 12px 14px; border-radius: 14px; background: var(--navy); color: var(--white); box-shadow: var(--shadow); font-size: 15px; pointer-events: auto; animation: toast-in .22s ease-out; }
.toast .ic { margin-top: 2px; }
.toast p { flex: 1; }
.toast-error { background: var(--red-deep); }
.toast-x { display: grid; place-items: center; width: 28px; height: 28px; margin: -3px 0; border: 0; border-radius: 8px; background: transparent; color: var(--white); cursor: pointer; opacity: .8; }
.toast.out { opacity: 0; transform: translateY(-6px); transition: opacity .2s, transform .2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- Mina insatser ---------- */
.mine { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.mine > div { display: flex; flex-direction: column; padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.card .mine { margin: 0 0 16px; }
.mine-n { font-size: 30px; line-height: 1.05; color: var(--navy); }
.mine-l { font-size: 13px; color: var(--muted); }
.status-line { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; padding: 12px 14px; background: var(--sky); border-radius: 12px; color: var(--navy); font-size: 15px; }
.status-line .ic { margin-top: 2px; }

/* Kalender */
.cal { margin: 0 0 12px; user-select: none; -webkit-user-select: none; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-title { font-size: 17px; font-weight: 750; color: var(--navy); }
.cal-nav { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--white); color: var(--navy); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.cal-nav:disabled { opacity: .35; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 4px; }
.cal-wd { padding: 4px 0 6px; font-size: 12px; font-weight: 650; color: var(--muted); text-align: center; }
.cal-day {
  position: relative; height: 44px; border: 0; padding: 0; background: transparent;
  font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--ink); cursor: pointer;
}
.cal-day span { position: relative; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; margin: 2px auto; border-radius: 10px; }
.cal-day:hover:not(:disabled) span { background: var(--sky); }
.cal-day:disabled { color: #a7b1c4; cursor: default; }
.cal-day.today span { box-shadow: inset 0 0 0 2px var(--red); }
.cal-day.pledged span::after { content: ''; position: absolute; bottom: 5px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--navy); }
.cal-day.in::before { content: ''; position: absolute; inset: 2px 0; background: var(--sky-2); }
.cal-day.start::before { left: 50%; }
.cal-day.end::before { right: 50%; }
.cal-day.start.end::before { display: none; }
.cal-day.start span, .cal-day.end span { background: var(--navy) !important; color: var(--white); }
.cal-day.start.pledged span::after, .cal-day.end.pledged span::after { background: var(--white); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--navy); }
.lg-ring { width: 14px; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 2px var(--red); }
.lg-range { width: 22px; height: 12px; border-radius: 3px; background: var(--sky-2); }
.cal-summary { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: var(--sky); color: var(--navy); font-size: 15px; }
.cal-summary:empty { display: none; }
.date-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.js .cal:not(:empty) ~ .date-pair { display: none; }

/* ---------- Profil ---------- */
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-head .muted { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 6px; font-size: 14px; }

/* ---------- Admin ---------- */
.tabs { display: flex; gap: 4px; margin: 14px -16px 0; padding: 0 16px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs a { flex: none; padding: 10px 12px 12px; font-size: 15px; font-weight: 650; color: var(--muted); text-decoration: none; }
.tabs a.on { color: var(--navy); box-shadow: inset 0 -3px 0 var(--red); }
.codebox { margin-top: 20px; padding: 20px 18px; border: 2px dashed #9fb4dc; border-radius: 18px; background: var(--sky); text-align: center; }
.codebox-for { font-size: 15px; font-weight: 650; color: var(--navy); }
.code { margin: 6px 0 14px; font-size: 38px; line-height: 1.1; letter-spacing: .06em; color: var(--navy); user-select: all; -webkit-user-select: all; }
.codebox .small { margin-top: 12px; }
.people { list-style: none; margin: 0; padding: 0; }
.person { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.person.is-off { opacity: .55; }
.person-main { flex: 1; min-width: 0; }
.person-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-weight: 700; overflow-wrap: anywhere; }
.menu { position: relative; }
.menu summary { list-style: none; padding: 8px 12px; border-radius: 10px; box-shadow: inset 0 0 0 1.5px var(--field); font-size: 14px; font-weight: 650; color: var(--navy); cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { box-shadow: inset 0 0 0 1.5px var(--navy); }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 230px; padding: 6px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.menu-pop .inline-form { display: block; }
.menu-btn { display: block; width: 100%; padding: 11px 12px; border: 0; border-radius: 9px; background: none; text-align: left; font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer; }
.menu-btn:hover { background: var(--sky); }
.menu-danger { color: var(--red-deep); }
.card-confirm { border: 2px solid var(--red); }
.card-confirm .notice-kicker { color: var(--red-deep); }
.confirm-title { margin: 6px 0 8px; font-size: 24px; }
.card-confirm .debt-list { margin-bottom: 12px; }
.round-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.round-head p { margin-top: 4px; }
.round-sum { font-size: 30px; line-height: 1; color: var(--navy); white-space: nowrap; }
.winner-line { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--ink); }
.winner-line .ic { color: var(--red); }

/* ---------- Inloggning ---------- */
.auth { background: var(--white); }
.auth-band { background: var(--navy); padding: 44px 16px 112px; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--white); }
.auth-brand span { font-size: 28px; font-weight: 800; font-stretch: 75%; letter-spacing: -.01em; }
.auth-brand .mark path:first-child { fill: var(--white); }
.auth-brand .mark path:nth-child(2) { stroke: var(--navy); }
.auth-brand .mark path:nth-child(3) { fill: var(--navy); }
.auth-card { position: relative; max-width: 440px; margin: -80px auto 40px; padding: 24px 20px 22px; background: var(--white); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.auth-card + .foot, .auth .main { padding: 0 16px; }
.auth-card h1 { font-size: 27px; margin-bottom: 8px; }
.auth-card .lead { margin-bottom: 18px; color: var(--muted); }
.auth-card .lead strong { color: var(--ink); }
.auth-card .small { margin-top: 16px; }

/* ---------- Sidfot ---------- */
.foot { margin-top: 44px; padding: 22px 16px 110px; border-top: 1px solid var(--line); text-align: center; font-size: 13px; color: var(--muted); }

/* ---------- Större skärmar ---------- */
@media (min-width: 560px) {
  .form-inline { display: flex; align-items: flex-end; gap: 10px; }
  .form-inline .field { flex: 1; margin: 0; }
  .form-inline .btn { width: auto; }
  .card { padding: 22px; }
  .pass-main { padding: 22px 24px 18px; }
  .pass-stub { padding: 18px 24px; }
}
@media (min-width: 860px) {
  .tabbar { position: static; display: flex; gap: 4px; padding: 0; border: 0; background: none; }
  .tabbar a { flex-direction: row; gap: 8px; padding: 9px 14px; border-radius: 10px; font-size: 15px; }
  .tabbar a.on { background: var(--sky); }
  .tabbar a.on::before { top: auto; bottom: -11px; }
  .foot { padding-bottom: 32px; }
  .hero { padding: 34px 0 84px; }
  .figures { max-width: 520px; }
  .pass { display: grid; grid-template-columns: 1fr 300px; }
  .pass-stub { border-top: 0; border-left: 2px dashed var(--line); display: flex; flex-direction: column; justify-content: center; }
  .pass-stub::before { top: -12px; left: -12px; clip-path: inset(50% 0 0 0); }
  .pass-stub::after { top: auto; bottom: -12px; right: auto; left: -12px; clip-path: inset(0 0 50% 0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Tidigare omgångar */
.past { list-style: none; margin: 0; padding: 0; }
.past li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.past-title { font-weight: 700; }
.past-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.past-amt { font-size: 20px; line-height: 1; font-stretch: 66%; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.more { margin-top: 14px; }
