/* Grand Slot – grusbana: terrakotta, elektriskt lime och glaskort */
:root {
  color-scheme: dark;
  --clay: #b4472b;
  --clay-deep: #7a2716;
  --clay-night: #3d130b;
  --cream: #f6e6df;
  --cream-ink: #3a1d15;
  --lime: #dcec6c;
  --lime-ink: #253005;
  --lilac: #dcc2ff;
  --text: #fff5f0;
  --muted: rgba(255, 238, 230, .68);
  --faint: rgba(255, 238, 230, .45);
  --glass: rgba(255, 255, 255, .11);
  --glass-2: rgba(255, 255, 255, .16);
  --glass-3: rgba(255, 255, 255, .06);
  --stroke: rgba(255, 255, 255, .20);
  --stroke-soft: rgba(255, 255, 255, .12);
  --danger: #ffb4a8;
  --r-xl: 30px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --display: "Michroma", "Outfit", sans-serif;
  --sans: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --tabs-h: 64px;
  --blur: blur(22px) saturate(140%);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
body { margin: 0; min-height: 100vh; color: var(--text); font: 400 16px/1.5 var(--sans); background: var(--clay-deep); }

/* Grusbanan i bakgrunden: renderad bild + mörkare toning för läsbarhet + korn */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(28, 7, 3, .62), rgba(28, 7, 3, .42) 30%, rgba(28, 7, 3, .5) 70%, rgba(14, 3, 1, .75)),
    url("/bg/court-mobile.jpg") center top / cover no-repeat,
    #7a2716;
}
@media (min-width: 761px) {
  body::before { background:
    linear-gradient(to bottom, rgba(28, 7, 3, .62), rgba(28, 7, 3, .42) 30%, rgba(28, 7, 3, .5) 70%, rgba(14, 3, 1, .75)),
    url("/bg/court-desktop.jpg") center / cover no-repeat,
    #7a2716; }
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .35; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.3 0 0 0 0 0.1 0 0 0 0 0.05 0 0 0 1.4 -0.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: var(--lime); }
.wrap { max-width: 900px; margin: 0 auto; padding: 8px 18px 120px; }
::selection { background: var(--lime); color: var(--lime-ink); }

/* ---------- Glas ---------- */
.glass, .tile, .panel, .dayres, .cal-tonight, .status-card, .upcoming li, .tabs, .headnav {
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}

/* ---------- Sidhuvud ---------- */
.lawn { position: relative; z-index: 6; }
.lawn-inner { max-width: 1100px; margin: 0 auto; padding: 22px 18px 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.emblem { width: 40px; height: 40px; color: rgba(255,255,255,.85); flex: none; filter: drop-shadow(0 4px 10px rgba(0,0,0,.25)); }
.wordmark { font: 400 22px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.wordmark small { display: block; font: 500 10px/1 var(--sans); letter-spacing: .3em; color: var(--muted); margin-top: 6px; }
.ribbon { display: none; }

.headnav { display: flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--glass); border: 1px solid var(--stroke-soft); }
.headnav a { display: flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; transition: background .2s, color .2s; }
.headnav a svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.headnav a:hover { color: var(--text); background: var(--glass-3); }
.headnav a.on { background: var(--cream); color: var(--cream-ink); }
.headnav a:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

.tabs { display: none; }
.mobile-only { display: none !important; }

/* ---------- Vyer ---------- */
.view[hidden] { display: none; }
.view-title { text-shadow: 0 2px 24px rgba(20,4,0,.6); font: 400 30px/1.15 var(--display); letter-spacing: .03em; text-transform: uppercase; margin: 22px 0 22px; text-shadow: 0 2px 20px rgba(60, 10, 0, .35); }
#view-oversikt .view-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

section.block { margin-bottom: 30px; }
.block > h2 { display: flex; align-items: center; gap: 10px; font: 500 20px/1.25 var(--sans); margin: 0 0 6px; }
.block > p.lead { text-shadow: 0 1px 12px rgba(20,4,0,.7); color: rgba(255, 238, 230, .82); margin: 0 0 14px; font-size: 15px; max-width: 64ch; }
.panel { background: linear-gradient(150deg, rgba(120, 40, 22, .45), rgba(60, 16, 8, .45)); border: 1px solid var(--stroke); border-radius: var(--r-xl); padding: 20px; box-shadow: 0 30px 60px -34px rgba(30, 4, 0, .7), inset 0 1px 0 rgba(255,255,255,.18); }
.textbtn { background: none; border: 0; padding: 0; font: 500 14px var(--sans); color: var(--lime); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tools { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: -4px 0 14px; }

/* ---------- Automatisk bokning ---------- */
@property --aura-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.aura { position: relative; border-radius: calc(var(--r-xl) + 3px); margin: 10px 0 30px; isolation: isolate; }
.aura::before, .aura::after {
  content: ""; position: absolute; inset: -2px; border-radius: calc(var(--r-xl) + 2px); z-index: 0; opacity: 0; transition: opacity .6s ease;
  background: conic-gradient(from var(--aura-angle), #dcec6c, #fff9b0, #f3c64a, #b8e04a, #fffbe0, #e9e05a, #dcec6c);
  animation: aura-spin 6s linear infinite;
}
.aura::after { inset: -8px; filter: blur(22px); border-radius: calc(var(--r-xl) + 8px); }
.aura.on::before { opacity: 1; }
.aura.on::after { opacity: .7; animation: aura-spin 6s linear infinite, aura-breathe 3.2s ease-in-out infinite; }
@keyframes aura-spin { to { --aura-angle: 360deg; } }
@keyframes aura-breathe { 0%, 100% { opacity: .45; transform: scale(.995); } 50% { opacity: .85; transform: scale(1.01); } }

.tile { position: relative; z-index: 1; overflow: hidden; border-radius: var(--r-xl); background: linear-gradient(155deg, rgba(122, 36, 20, .78), rgba(70, 18, 8, .82)); border: 1px solid var(--stroke); box-shadow: 0 40px 80px -40px rgba(20, 2, 0, .9), inset 0 1px 0 rgba(255,255,255,.18); transition: filter .4s; }
.tile.off { filter: saturate(.55) brightness(.92); }
.tile-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 6px; }
.tile-title { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; color: var(--muted); white-space: nowrap; flex-wrap: wrap; row-gap: 6px; }
.lamp { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.3); flex: none; }
.aura.on .lamp { background: var(--lime); box-shadow: 0 0 0 4px rgba(220,236,108,.2), 0 0 14px rgba(220,236,108,.8); }
.flag { display: inline-block; padding: 3px 10px; border-radius: 999px; font: 600 11px/16px var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.flag.dry { background: var(--lime); color: var(--lime-ink); }
.tile-warn { margin: 12px 22px 0; padding: 14px 16px; border-radius: var(--r-md); background: rgba(255, 244, 199, .95); color: #4a3a05; font-size: 14px; line-height: 1.45; }
.tile-warn b { display: block; margin-bottom: 2px; }
.tile-warn a { color: #4a3a05; font-weight: 700; }

.release { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; margin: 12px 22px 4px; }
.release-when { padding: 6px 2px; }
.tile-label { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: .01em; }
.release-date { font: 400 30px/1.15 var(--sans); font-weight: 500; margin-top: 8px; letter-spacing: -.01em; }
.release-date small { display: block; font: 400 14px/1.3 var(--sans); color: var(--muted); margin-top: 8px; }
.release-facts { display: grid; gap: 8px; align-content: center; }
.fact { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--glass); border: 1px solid var(--stroke-soft); font-size: 14px; line-height: 1.3; }
.fact b { display: block; font-size: 15px; font-weight: 600; }
.fact small { color: var(--muted); font-size: 13px; }
.fact .ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.fact .ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.fact.anine .ic { background: var(--lilac); color: #3b2358; }
.fact.free .ic { background: var(--lime); color: var(--lime-ink); }
.fact.book .ic { background: var(--cream); color: var(--cream-ink); }
.fact.book { background: rgba(220,236,108,.14); border-color: rgba(220,236,108,.35); }
.fact.nobook .ic { background: rgba(255,255,255,.16); color: #fff; }
.fact.paused .ic { background: #ffc9bf; color: #5a140a; }

/* Datumväljare: kommande nätter */
.upnext { padding: 18px 22px 4px; }
.nights { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.nights li { border-radius: var(--r-md); padding: 10px 4px 10px; text-align: center; background: var(--glass); border: 1px solid var(--stroke-soft); font-size: 12px; color: var(--muted); line-height: 1.2; }
.nights li b { display: block; font: 500 22px/1.2 var(--sans); color: var(--text); margin-top: 2px; }
.nights li .dot { display: block; width: 7px; height: 7px; border-radius: 50%; margin: 6px auto 0; background: rgba(255,255,255,.25); }
.nights li.play .dot { background: var(--lime); box-shadow: 0 0 8px rgba(220,236,108,.8); }
.nights li.anine .dot { background: var(--lilac); }
.nights li.tonight { background: var(--cream); color: rgba(58,29,21,.7); border-color: var(--cream); box-shadow: 0 10px 24px -12px rgba(0,0,0,.6); }
.nights li.tonight b { color: var(--cream-ink); }
.nights li.tonight.play .dot { background: #6d8a00; box-shadow: none; }
.nights li.tonight.anine .dot { background: #8b5fc4; }
.nights-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.nights-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }

.tile-rows { padding: 8px 22px 8px; }
.tile-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--stroke-soft); }
.tile-row .tile-label { grid-column: 1 / -1; }
.tile-main { font-size: 16px; font-weight: 500; }
.tile-main small { display: block; font-size: 13px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.scores { display: flex; gap: 6px; }
.score { min-width: 44px; height: 44px; padding: 0 10px; display: grid; place-items: center; border-radius: 14px; background: var(--glass); border: 1px solid var(--stroke-soft); font: 500 18px/1 var(--sans); font-variant-numeric: tabular-nums; }
.score.lead { background: var(--cream); color: var(--cream-ink); border-color: var(--cream); }
.score.full { background: #ffc9bf; color: #5a140a; border-color: #ffc9bf; }
.tile-foot { display: flex; align-items: center; gap: 12px; margin: 8px 12px 12px; padding: 14px 14px; border-radius: var(--r-lg); background: rgba(0,0,0,.18); font-size: 14px; color: var(--muted); }
.tile-foot b { color: var(--text); font-weight: 600; margin-right: 6px; }

/* ---------- Brytare ---------- */
.switch { position: relative; display: inline-flex; cursor: pointer; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch .track { width: 50px; height: 30px; border-radius: 15px; background: rgba(255,255,255,.18); border: 1px solid var(--stroke-soft); position: relative; transition: background .2s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.switch input:checked + .track { background: var(--lime); border-color: var(--lime); }
.switch input:checked + .track::after { transform: translateX(20px); background: var(--lime-ink); }
.switch input:focus-visible + .track { outline: 2px solid var(--cream); outline-offset: 2px; }
.switch.big .track { width: 62px; height: 36px; border-radius: 18px; }
.switch.big .track::after { width: 28px; height: 28px; }
.switch.big input:checked + .track::after { transform: translateX(26px); }

/* ---------- Kommande bokningar ---------- */
.upcoming { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.upcoming li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--glass); border: 1px solid var(--stroke-soft); font-weight: 500; }
.upcoming li .ball { width: 14px; height: 14px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px rgba(220,236,108,.6); flex: none; }
.upcoming li.empty { color: var(--muted); border-style: dashed; font-weight: 400; }
.upcoming-foot { align-items: end; }
.row > label.max { flex: 0 1 240px; }

/* ---------- Önskade tider ---------- */
.daygroup { display: flex; align-items: baseline; gap: 10px; margin: 2px 0 4px; padding: 0 2px; }
.daygroup span { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--cream); }
.daygroup small { font-size: 13px; color: var(--faint); }
.daygroup.weekend { margin-top: 22px; }
.daygroup.weekend span { color: var(--lime); }
.dayrow { padding: 16px 0; border-top: 1px solid var(--stroke-soft); }
.daygroup + .dayrow { border-top: 0; padding-top: 10px; }
.dayrow:last-child { padding-bottom: 2px; }
.dayhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dayhead .name { font-size: 17px; font-weight: 500; min-width: 84px; }
.dayrow.weekend .name { color: var(--lime); }
.dayhead .summary { color: var(--muted); font-size: 14px; }
.chips { display: grid; grid-template-columns: repeat(17, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.chip { position: relative; min-width: 0; height: 42px; border-radius: var(--r-sm); border: 1px solid var(--stroke-soft); background: var(--glass); color: var(--text); font: 500 14px/1 var(--sans); font-variant-numeric: tabular-nums; cursor: pointer; transition: background .15s, transform .15s; }
.chip:hover { background: var(--glass-2); }
.chip:active { transform: scale(.96); }
.chip:focus-visible { outline: 2px solid var(--lime); outline-offset: 1px; }
.chip.on { background: var(--cream); border-color: var(--cream); color: var(--cream-ink); }
.chip.on.first { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.chip .order { position: absolute; top: -7px; right: -6px; width: 19px; height: 19px; border-radius: 50%; background: var(--clay-night); color: #fff; font: 600 10px/19px var(--sans); text-align: center; box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
.venue { display: inline-flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.venue button { border: 1px solid var(--stroke-soft); border-radius: 999px; background: var(--glass); color: var(--muted); font: 500 14px/1 var(--sans); padding: 11px 16px; cursor: pointer; transition: background .15s; }
.venue button:hover { color: var(--text); background: var(--glass-2); }
.venue button.on { background: var(--cream); border-color: var(--cream); color: var(--cream-ink); }
.venue button:focus-visible { outline: 2px solid var(--lime); outline-offset: 1px; }
.dayrow.off .chips, .dayrow.off .venue { display: none; }
.dayrow.off .name { color: var(--faint); }
.ballopt { display: flex; align-items: flex-start; gap: 14px; margin-top: 14px; }
.ballopt b { display: block; font-size: 16px; font-weight: 600; margin-bottom: 2px; }
.ballopt span { font-size: 14px; color: var(--muted); }

/* ---------- Kalender ---------- */
.cal-tonight { display: grid; gap: 2px; padding: 18px 20px; margin: 0 0 16px; border-radius: var(--r-xl); background: linear-gradient(150deg, rgba(220,236,108,.22), rgba(255,255,255,.06)); border: 1px solid rgba(220,236,108,.45); }
.cal-tonight .ct-when { font-size: 13px; color: var(--muted); }
.cal-tonight b { font-size: 24px; font-weight: 500; }
.cal-tonight .ct-what { font-size: 15px; color: var(--muted); }
.cal-tonight .ct-what.play { color: var(--lime); font-weight: 500; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.cal .dow { font-size: 12px; font-weight: 500; color: var(--faint); text-align: center; padding-bottom: 4px; }
.cal .dow.weekend { color: var(--lime); }
.day { min-width: 0; overflow: hidden; position: relative; border: 1px solid var(--stroke-soft); border-radius: 14px; min-height: 64px; padding: 8px 9px; background: var(--glass); cursor: pointer; text-align: left; font: inherit; color: inherit; display: flex; flex-direction: column; justify-content: space-between; transition: background .15s, transform .15s; }
.day:hover { background: var(--glass-2); }
.day:active { transform: scale(.97); }
.day:focus-visible { outline: 2px solid var(--lime); outline-offset: 1px; }
.day .num { font-size: 18px; font-weight: 500; line-height: 1; }
.day .num small { font-size: 10px; font-weight: 500; text-transform: uppercase; opacity: .7; margin-left: 3px; }
.day .tag { font-size: 12px; font-weight: 500; line-height: 1.2; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day.weekend:not(.play):not(.anine) { background: rgba(255,255,255,.07); }
.day.play { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.day.play .tag { color: rgba(37,48,5,.8); }
.day.anine { background: rgba(220,194,255,.2); border-color: rgba(220,194,255,.3); }
.day.anine .tag { color: var(--lilac); }
.day.past { opacity: .3; cursor: default; }
.day.released:not(.past):not(.tonight) { background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(0,0,0,.08) 6px 12px); }
.day.exc::after { content: ""; position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--cream); box-shadow: 0 0 0 2px rgba(0,0,0,.25); }
.day.tonight { background: var(--cream); color: var(--cream-ink); border-color: var(--cream); box-shadow: 0 0 0 3px rgba(220,236,108,.9), 0 12px 26px -12px rgba(0,0,0,.6); z-index: 1; }
.tonight-badge { align-self: flex-start; padding: 2px 7px; border-radius: 999px; background: var(--clay-deep); color: #fff; font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -1px; margin-right: 7px; }

/* ---------- Barnschema ---------- */
.custody { display: grid; grid-template-columns: 76px repeat(7, minmax(0, 1fr)); gap: 7px; align-items: center; }
.custody .lbl { font-size: 14px; font-weight: 500; }
.custody .lbl small { display: block; font-weight: 400; color: var(--faint); font-size: 12px; }
.custody .dow { font-size: 12px; font-weight: 500; color: var(--faint); text-align: center; }
.cbtn { min-width: 0; overflow: hidden; border: 1px solid var(--stroke-soft); background: var(--glass); border-radius: var(--r-sm); height: 46px; font: 500 13px var(--sans); color: var(--muted); cursor: pointer; }
.cbtn.on { background: var(--lilac); color: #3b2358; border-color: var(--lilac); }
.cbtn:focus-visible { outline: 2px solid var(--lime); outline-offset: 1px; }

/* ---------- Formulär och knappar ---------- */
input[type=text], input[type=email], input[type=password], input[type=date], select {
  width: 100%; font: 400 16px var(--sans); color: var(--text); background: rgba(0,0,0,.16); border: 1px solid var(--stroke-soft); border-radius: var(--r-sm); padding: 10px 14px; min-height: 48px;
}
input::placeholder { color: var(--faint); }
select { margin-top: 6px; }
select option { color: #222; }
input:focus, select:focus { outline: 2px solid var(--lime); outline-offset: 0; border-color: transparent; }
input[type=date]::-webkit-calendar-picker-indicator { filter: invert(1) opacity(.7); }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--lime); }
input[type=file] { width: 100%; font: 400 14px var(--sans); color: var(--muted); margin-top: 6px; padding: 10px 12px; min-height: 48px; background: rgba(0,0,0,.16); border: 1px dashed var(--stroke); border-radius: var(--r-sm); }
input[type=file]::file-selector-button { font: 500 13px var(--sans); border: 0; background: var(--cream); color: var(--cream-ink); border-radius: 999px; padding: 8px 14px; margin-right: 12px; cursor: pointer; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.row > label { flex: 1 1 200px; font-size: 14px; color: var(--muted); }
.row > label input { margin-top: 6px; }
.row > label.cvv { flex: 0 1 200px; }
.row.hours > label { flex: 0 1 150px; }
.btn { font: 500 15px/1 var(--sans); border-radius: 999px; padding: 0 22px; min-height: 48px; cursor: pointer; border: 1px solid var(--stroke); background: var(--glass); color: var(--text); transition: background .15s, transform .15s; }
.btn:hover { background: var(--glass-2); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); font-weight: 600; box-shadow: 0 10px 24px -12px rgba(220,236,108,.8); }
.btn.primary:hover { background: #e6f47f; }
.btn.danger { border-color: rgba(255,180,168,.6); color: var(--danger); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn:focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; }
.hint { font-size: 14px; color: var(--muted); margin: 14px 0 0; }
.divider { border: 0; border-top: 1px solid var(--stroke-soft); margin: 18px 0; }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; }

.result { margin-top: 14px; font-size: 15px; }
.result:empty { display: none; }
.result .box { border-radius: var(--r-md); padding: 14px 16px; background: var(--glass); border: 1px solid var(--stroke-soft); }
.result .box.ok { background: rgba(220,236,108,.16); border-color: rgba(220,236,108,.4); }
.result .box.fel { background: rgba(255,120,100,.18); border-color: rgba(255,160,140,.4); }

.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.pill.ok, .pill.bokad { background: var(--lime); color: var(--lime-ink); }
.pill.prov { background: var(--cream); color: var(--cream-ink); }
.pill.av, .pill.hoppar { background: var(--glass-2); color: var(--muted); }
.pill.fel { background: #ff8f7c; color: #3d0800; }
.pill.ingen-tid { background: var(--lilac); color: #3b2358; }

/* ---------- Status för konto och betalning ---------- */
.status-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.status-card .ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.status-card .ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.status-card.ok .ic { background: var(--lime); color: var(--lime-ink); box-shadow: 0 0 16px rgba(220,236,108,.5); }
.status-card.missing .ic { background: #ffc9bf; color: #5a140a; }
.status-card .txt { flex: 1 1 200px; min-width: 0; }
.status-card .txt b { display: block; font-size: 16px; font-weight: 600; }
.status-card .txt span { display: block; font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.status-card .txt .email { color: var(--text); font-weight: 500; }
.subform { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--stroke-soft); }

/* ---------- Lediga tider ---------- */
.filters { display: grid; gap: 18px; }
.filter { display: grid; gap: 10px; }
.flabel { font-size: 14px; color: var(--muted); }
.filter .venue { margin-top: 0; }
.filters .btn { justify-self: start; }
.scanresult { display: grid; gap: 14px; margin-top: 16px; }
.dayres { overflow: hidden; border-radius: var(--r-xl); background: linear-gradient(150deg, rgba(120, 40, 22, .45), rgba(60, 16, 8, .5)); border: 1px solid var(--stroke); }
.dayres > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; background: rgba(255,255,255,.08); border-bottom: 1px solid var(--stroke-soft); }
.dayres > header b { font-size: 17px; font-weight: 500; }
.dayres.weekend > header { background: rgba(220,236,108,.16); }
.dayres.weekend > header b { color: var(--lime); }
.dayres > header .tags { display: flex; gap: 6px; }
.dayres > header .tag { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--glass-2); color: var(--text); }
.dayres > header .tag.anine { background: var(--lilac); color: #3b2358; }
.timerow { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: start; padding: 12px 18px; border-top: 1px solid var(--stroke-soft); }
.timerow:first-of-type { border-top: 0; }
.timerow .tm { font: 500 17px/40px var(--sans); font-variant-numeric: tabular-nums; }
.courts { display: flex; flex-wrap: wrap; gap: 8px; }
.slotbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--stroke-soft); background: var(--glass); color: var(--text); font: 500 14px var(--sans); cursor: pointer; transition: background .15s, transform .15s; }
.slotbtn:hover { background: var(--cream); color: var(--cream-ink); }
.slotbtn:active { transform: scale(.97); }
.slotbtn:focus-visible { outline: 2px solid var(--lime); outline-offset: 1px; }
.slotbtn .v { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; opacity: .6; }
.slotbtn.out { background: rgba(255, 214, 160, .16); border-color: rgba(255, 214, 160, .35); }
.slotbtn.ball { background: rgba(220,194,255,.18); border-color: rgba(220,194,255,.4); }
.slotbtn .dur { font-size: 12px; opacity: .7; }
.empty-note { padding: 22px; text-align: center; color: var(--muted); border-radius: var(--r-xl); border: 1px dashed var(--stroke); background: var(--glass-3); }

/* ---------- Logg ---------- */
.log { list-style: none; margin: 0; padding: 0; }
.log li { border-top: 1px solid var(--stroke-soft); padding: 14px 0; }
.log li:first-child { border-top: 0; padding-top: 0; }
.log li:last-child { padding-bottom: 0; }
.log .top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.log .top b { font-weight: 500; }
.log .t { color: var(--faint); font-size: 13px; }
.log .msg { margin-top: 4px; font-size: 15px; color: var(--muted); }
.log details { margin-top: 6px; font-size: 14px; color: var(--muted); }
.log details summary { cursor: pointer; color: var(--text); }
.log ol { margin: 6px 0; padding-left: 20px; }
.shots { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.shots a img { width: 120px; height: 80px; object-fit: cover; object-position: top; border-radius: 10px; border: 1px solid var(--stroke-soft); display: block; }

.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--cream); color: var(--cream-ink); padding: 12px 20px; border-radius: 999px; font-size: 15px; font-weight: 500; opacity: 0; transition: all .25s; pointer-events: none; z-index: 20; box-shadow: 0 16px 40px -16px rgba(0,0,0,.7); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  html { scroll-behavior: auto; }
  .aura::before, .aura.on::after { animation: none; }
  .aura.on::after { opacity: .5; }
}

/* ---------- Surfplatta och mobil: svävande bottenmeny ---------- */
@media (max-width: 960px) {
  .wrap { padding-bottom: calc(var(--tabs-h) + 110px); }
  .desk-only { display: none !important; }
  .headnav { padding: 4px; }
  .headnav a { padding: 9px; }
  .headnav a span { display: none; }
  .headnav a svg { width: 22px; height: 22px; }
  .tabs { display: flex; position: fixed; left: 14px; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); height: var(--tabs-h); padding: 6px; z-index: 10;
    border-radius: 999px; background: rgba(60, 16, 8, .55); border: 1px solid var(--stroke); box-shadow: 0 20px 40px -16px rgba(0,0,0,.7); justify-content: space-between; gap: 4px; }
  .tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 500; }
  .tabs a svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabs a.on { background: var(--lime); color: var(--lime-ink); }
  .tabs a:focus-visible { outline: 2px solid var(--cream); outline-offset: -2px; }
  .toast { bottom: calc(var(--tabs-h) + 34px + env(safe-area-inset-bottom)); }
}
@media (max-width: 640px) {
  .wrap { padding-left: 14px; padding-right: 14px; }
  .lawn-inner { padding: 18px 14px 8px; }
  .emblem { width: 34px; height: 34px; }
  .wordmark { font-size: 18px; }
  .view-title { font-size: 24px; margin: 16px 0 18px; }
  .panel { padding: 16px; border-radius: 26px; }
  .tile-head { padding: 16px 18px 4px; }
  .release { grid-template-columns: 1fr; margin: 10px 16px 4px; }
  .release-date { font-size: 26px; }
  .upnext, .tile-rows { padding-left: 16px; padding-right: 16px; }
  .nights { gap: 5px; }
  .nights li { padding: 8px 2px; font-size: 11px; border-radius: 13px; }
  .nights li b { font-size: 18px; }
  .chips { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; }
  .cal { gap: 5px; }
  .day { min-height: 56px; padding: 6px; border-radius: 12px; }
  .day .num { font-size: 16px; }
  .day .tag { font-size: 10.5px; }
  .tonight-badge { font-size: 8.5px; padding: 2px 5px; letter-spacing: 0; }
  .custody { grid-template-columns: 50px repeat(7, minmax(0, 1fr)); gap: 4px; }
  .custody .lbl small { display: none; }
  .cbtn { font-size: 10.5px; padding: 0; height: 42px; }
  .timerow { grid-template-columns: 1fr; gap: 6px; }
  .timerow .tm { line-height: 1.2; }
}
.day.tonight.exc::after { top: auto; bottom: 7px; }

/* ---------- Auto-rutan, kompakt ---------- */
.tile-head { padding: 16px 18px 4px; }
.tile-title { color: var(--text); font-size: 17px; font-weight: 600; gap: 9px; }
.spark { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.12); flex: none; transition: background .3s; }
.spark svg { width: 15px; height: 15px; fill: currentColor; }
.aura.on .spark { background: var(--lime); color: var(--lime-ink); box-shadow: 0 0 14px rgba(220,236,108,.7); }
.aura.on .spark svg { animation: twinkle 2.4s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(.82) rotate(18deg); } }
.flag { padding: 2px 8px; font-size: 10px; line-height: 16px; }

.tn-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 18px 0; padding: 14px 16px; border-radius: var(--r-lg); background: rgba(0,0,0,.16); border: 1px solid var(--stroke-soft); }
.tn-when .tile-label { font-size: 12px; }
.tn-date { font-size: 24px; font-weight: 500; line-height: 1.15; margin-top: 2px; white-space: nowrap; }
.tn-icons { display: flex; align-items: center; gap: 8px; }
.tn-ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.tn-ic svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tn-ic.anine { background: var(--lilac); color: #3b2358; }
.tn-ic.free { background: rgba(255,255,255,.14); color: var(--lime); }
.tn-ic.none { background: rgba(255,255,255,.1); color: var(--muted); }
.tn-ic.paused { background: #ffc9bf; color: #5a140a; }
.tn-time { height: 42px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-items: center; gap: 4px; background: var(--lime); color: var(--lime-ink); font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; box-shadow: 0 8px 20px -10px rgba(220,236,108,.8); }
.tn-time small { font-size: 12px; font-weight: 500; opacity: .7; }
.tn-time.idle { background: var(--cream); color: var(--cream-ink); box-shadow: none; }

.nights { margin: 12px 18px 0; gap: 6px; }
.nights li { padding: 7px 2px 8px; font-size: 11px; border-radius: 13px; }
.nights li b { font-size: 17px; }
.nights li .dot { width: 6px; height: 6px; margin-top: 5px; }

.tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0 0; padding: 12px 18px 14px; border-radius: 0; background: transparent; border-top: 1px solid var(--stroke-soft); font-size: 14px; color: var(--muted); }
.tile-foot .count b { color: var(--text); font-weight: 600; margin-right: 3px; }
.tile-foot .count.full b { color: #ffc9bf; }
.tile-foot .dry { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.switch.small .track { width: 38px; height: 22px; border-radius: 11px; }
.switch.small .track::after { width: 16px; height: 16px; top: 2px; left: 2px; }
.switch.small input:checked + .track::after { transform: translateX(16px); }
.tile-warn { margin: 10px 18px 0; }
@media (max-width: 640px) {
  .aura { margin-top: 6px; margin-bottom: 26px; }
  .tile-head { padding: 14px 14px 2px; }
  .tn-box { margin: 10px 12px 0; padding: 12px 14px; }
  .tn-date { font-size: 21px; }
  .tn-ic { width: 38px; height: 38px; }
  .tn-time { height: 38px; padding: 0 13px; font-size: 16px; }
  .nights { margin: 10px 12px 0; gap: 4px; }
  .nights li b { font-size: 15px; }
  .tile-foot { padding: 11px 14px 12px; }
}
@media (prefers-reduced-motion: reduce) { .aura.on .spark svg { animation: none; } }

/* ---------- Kontrast: mörkare bild, ljust frostat glas ---------- */
:root { --blur: blur(34px) saturate(150%); }
.panel, .dayres, .tile { border-color: rgba(255,255,255,.26); box-shadow: 0 30px 60px -30px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.25); }
.block > h2, .view-title { text-shadow: 0 2px 18px rgba(0,0,0,.8), 0 0 2px rgba(0,0,0,.5); }
.block > p.lead, .tools, .legend, .hint { text-shadow: 0 1px 10px rgba(0,0,0,.9); }
.block > p.lead { color: rgba(255, 244, 238, .9); }

/* ---------- Rutor med flik under: rutan vilar på en lime-flik med rubrik och i-knapp ---------- */
.block.tabbed { display: flex; flex-direction: column; }
.block.tabbed > * { order: 5; }
.block.tabbed > :is(.cal-tonight, .tools) { order: 0; }
.block.tabbed > .panel.main { order: 1; position: relative; z-index: 1; margin: 0;
  background: linear-gradient(180deg, rgba(120, 40, 22, .45) 0, rgba(60, 16, 8, .5) calc(100% - 70px), #5a1a0b calc(100% - 26px), #5a1a0b 100%);
  box-shadow: 0 14px 24px -14px rgba(0,0,0,.55), 0 30px 60px -30px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.22); }
.block.tabbed > .tab { order: 2; margin-top: -28px; padding: 38px 12px 10px 22px; border-radius: 0 0 var(--r-xl) var(--r-xl); background: #d7e76c; color: #2c3505; }
.tab-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tab h2 { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.3; }
.tab h2::before { display: none; }
.info-btn { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 1.5px solid rgba(44,53,5,.55); background: transparent; color: #2c3505; font: 600 15px/1 Georgia, serif; font-style: italic; cursor: pointer; transition: background .15s; }
.info-btn:hover, .info-btn[aria-expanded="true"] { background: #2c3505; color: #d7e76c; border-color: #2c3505; }
.info-btn:focus-visible { outline: 2px solid #2c3505; outline-offset: 2px; }
.tab p.lead { margin: 6px 10px 6px 0; max-width: none; font-size: 14px; color: rgba(44,53,5,.82); text-shadow: none; }
.tab p.lead[hidden] { display: none; }
.block.tabbed > .tools { margin: 0 0 12px; }
.view.single .view-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.view.single { padding-top: 16px; }
@media (max-width: 640px) { .block.tabbed > .tab { padding-left: 18px; } }
.cal-tonight { margin-bottom: 14px; }

.tile-foot a.count { color: var(--muted); text-decoration: none; }
.tile-foot a.count:hover { color: var(--text); }
@media (max-width: 640px) {
  .block > :is(h2, p.lead, .tools) { padding-left: 18px; padding-right: 18px; }
  .block > :is(h2, p.lead, .tools):not(:is(h2, p.lead, .tools) ~ *) { border-radius: 26px 26px 0 0; }
}

/* ---------- Auto: tre tydliga rader ---------- */
.auto-rows { list-style: none; margin: 10px 18px 0; padding: 0; display: grid; gap: 8px; }
.ar { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--r-lg); background: rgba(0,0,0,.18); border: 1px solid var(--stroke-soft); }
.ar-ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; background: rgba(255,255,255,.12); color: var(--text); }
.ar-ic svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ar-txt { display: grid; min-width: 0; }
.ar-label { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.ar-txt b { font-size: 20px; font-weight: 500; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-txt small { font-size: 13px; color: var(--muted); line-height: 1.35; }
.ar-time { display: inline-block; margin-left: 6px; padding: 1px 10px; border-radius: 999px; background: var(--cream); color: var(--cream-ink); font-size: 16px; font-weight: 600; vertical-align: 2px; }
.ar.rel .ar-ic { background: var(--cream); color: var(--cream-ink); }
.ar.anine .ar-ic { background: var(--lilac); color: #3b2358; }
.ar.anine b { color: var(--lilac); }
.ar.free .ar-ic { background: rgba(220,236,108,.2); color: var(--lime); }
.ar.book .ar-ic { background: var(--lime); color: var(--lime-ink); }
.ar.book.now { background: rgba(220,236,108,.14); border-color: rgba(220,236,108,.4); }
.ar.book.now .ar-time { background: var(--lime); color: var(--lime-ink); }
.ar.paused .ar-ic { background: #ffc9bf; color: #5a140a; }
.ar.idle .ar-ic { color: var(--muted); }
@media (max-width: 640px) {
  .auto-rows { margin: 10px 12px 0; gap: 6px; }
  .ar { padding: 10px 12px; gap: 12px; }
  .ar-ic { width: 38px; height: 38px; }
  .ar-txt b { font-size: 18px; }
}

/* Dagar som inte bokas är överstrukna, nästa försök har gul ram */
.nights li { position: relative; overflow: hidden; }
.nights li.skip b { text-decoration: line-through; text-decoration-thickness: 2px; opacity: .55; }
.nights li.skip::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top right, transparent calc(50% - 1px), rgba(255,255,255,.28) calc(50% - 1px), rgba(255,255,255,.28) calc(50% + 1px), transparent calc(50% + 1px)); }
.nights li.tonight.skip::after { background: linear-gradient(to top right, transparent calc(50% - 1px), rgba(58,29,21,.3) calc(50% - 1px), rgba(58,29,21,.3) calc(50% + 1px), transparent calc(50% + 1px)); }
.nights li.next { border: 2px solid var(--lime); box-shadow: 0 0 0 3px rgba(220,236,108,.25), 0 0 18px rgba(220,236,108,.45); }

.ar-pill { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 11px; border-radius: 999px; border: 1px solid var(--stroke); background: rgba(255,255,255,.08); color: var(--text); font: 500 13px var(--sans); cursor: pointer; white-space: nowrap; transition: background .15s; }
.ar-pill svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ar-pill:hover { background: rgba(255,255,255,.16); }
.ar-pill.on { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.ar-pill:focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; }
.ar .ar-txt { flex: 1 1 auto; }
@media (max-width: 640px) {
  .ar { flex-wrap: wrap; }
  .ar-pill { height: 32px; padding: 0 12px 0 9px; font-size: 12px; }
}
.ar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
.ar-pill { margin-left: 0; }
@media (max-width: 640px) {
  .ar { grid-template-columns: auto minmax(0, 1fr); }
  .ar-pill { grid-column: 2; justify-self: start; margin-top: 8px; }
}
@media (max-width: 640px) { .ar { row-gap: 4px; } .ar-pill { margin-top: 4px; } }

.ar-txt b { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; white-space: normal; }
.ar-time { margin-left: 0; }
.ar-venue { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px 0 8px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.ar-venue svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ar-venue.in { background: rgba(255,255,255,.14); color: var(--cream); border: 1px solid var(--stroke); }
.ar-venue.out { background: rgba(255, 214, 160, .2); color: #ffe2b8; border: 1px solid rgba(255, 214, 160, .4); }

/* ---------- Önskade tider: en ruta per dag ---------- */
.view-hint { margin: -8px 0 18px; color: rgba(255,244,238,.9); font-size: 15px; text-shadow: 0 1px 10px rgba(0,0,0,.9); max-width: 60ch; }
.daycards { display: grid; gap: 22px; margin-bottom: 30px; }
.daycards .block { margin-bottom: 0; }
.dayrow { padding: 0; border-top: 0; }
.dayrow .dayhead .summary { font-size: 15px; color: var(--text); }
.dayrow.off .dayhead .summary { color: var(--muted); }
.dayrow .chips { margin-top: 14px; }
.block.tabbed > .tab.weekend { background: #f3d2bb; color: #4a1f0e; }
.tab.weekend .tab-kind { color: rgba(74,31,14,.65); }
.tab-kind { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: rgba(44,53,5,.6); padding-right: 12px; }
.dayrow.off .tab { opacity: .75; }
.dayrow.off .panel.main { padding-bottom: 34px; }
.ball-toggle { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; height: 40px; padding: 0 16px 0 12px; border-radius: 999px; border: 1px solid var(--stroke-soft); background: var(--glass); color: var(--muted); font: 500 14px var(--sans); cursor: pointer; }
.ball-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.ball-toggle:hover { color: var(--text); background: var(--glass-2); }
.ball-toggle.on { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.ball-toggle:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.dayrow.off .ball-toggle { display: none; }
.dayrow .venue { display: flex; }
.dayrow .panel.main { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; }
.dayrow .panel.main > .dayhead, .dayrow .panel.main > .chips { flex: 0 0 100%; }
.dayrow .venue { display: inline-flex; }

/* Kommande bokningar */
.upcoming li.bk { gap: 16px; padding: 12px 16px; }
.bk-date { flex: none; width: 58px; padding: 6px 0; border-radius: 14px; text-align: center; background: rgba(255,255,255,.14); border: 1px solid var(--stroke-soft); line-height: 1.1; }
.bk-date small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.bk-date b { display: block; font: 600 22px/1.15 var(--sans); color: var(--text); }
.upcoming li.bk.first .bk-date { background: var(--lime); border-color: var(--lime); }
.upcoming li.bk.first .bk-date b, .upcoming li.bk.first .bk-date small { color: var(--lime-ink); }
.bk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bk-main b { font: 600 20px/1.2 var(--sans); }
.bk-main small { color: var(--muted); font-size: 14px; font-weight: 400; }
.bk-ball { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border-radius: 999px; background: rgba(220,236,108,.16); border: 1px solid rgba(220,236,108,.5); color: var(--lime); font-size: 13px; font-weight: 600; }
.bk-ball svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 340px) { .bk-ball span { display: none; } .bk-ball { padding: 6px; } }
.upcoming-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.upcoming-foot .hint { margin: 0; }
.upcoming.past { margin-bottom: 0; }
.upcoming.past li.bk { opacity: .72; }
.upcoming.past .bk-main b { font-size: 17px; }
.upcoming.past .bk-date b { font-size: 19px; }

/* Dagraden i Auto är klickbar */
.nights li[data-date] { cursor: pointer; transition: transform .12s, background .15s; }
.nights li[data-date]:hover { background: rgba(255,255,255,.16); }
.nights li.tonight[data-date]:hover { background: var(--cream); }
.nights li:focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; }
.nights li.sel { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--cream), 0 10px 22px -10px rgba(0,0,0,.7); }
.nights li.exc .dot { background: transparent !important; box-shadow: 0 0 0 1.5px var(--cream) !important; }
.nights li.tonight.exc .dot { box-shadow: 0 0 0 1.5px var(--cream-ink) !important; }
.daysheet { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 10px 18px 0; padding: 14px 16px; border-radius: var(--r-md); background: rgba(255,248,240,.14); border: 1px solid var(--stroke); animation: dsIn .18s ease-out; }
@keyframes dsIn { from { opacity: 0; transform: translateY(-4px); } }
.ds-txt { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ds-txt b { font: 600 17px var(--sans); }
.ds-txt span { font-size: 14px; }
.ds-txt small { font-size: 12px; color: var(--muted); }
.ds-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ds-actions .btn { height: 40px; padding: 0 16px; }
.ds-close { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--stroke); background: transparent; color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; }
@media (max-width: 640px) { .daysheet { margin: 10px 12px 0; } }
.daysheet[hidden] { display: none; }
/* Dagar som inte hinner bokas p.g.a. max antal bokningar */
.nights li.full { border: 1.5px dashed rgba(255,238,230,.45); }
.nights li.full b { opacity: .6; }
.nights li.full .dot { background: transparent !important; box-shadow: none !important; width: auto; height: auto; border-radius: 0; font-size: 9px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.nights li.full .dot::before { content: "Fullt"; }
.nights li.tonight.full { border-color: rgba(58,29,21,.45); }
.ar-venue.anine { background: rgba(220,194,255,.2); color: var(--lilac); border: 1px solid rgba(220,194,255,.45); }
.ar-venue.free { background: rgba(220,236,108,.12); color: var(--lime); border: 1px solid rgba(220,236,108,.35); }
/* Auto-rutan centrerad i fönstret på startsidan */
#view-oversikt:not([hidden]) { display: flex; flex-direction: column; justify-content: center; min-height: calc(100vh - 96px - 120px); min-height: calc(100svh - 96px - 120px); }
#view-oversikt .aura { margin: 0 auto; width: 100%; max-width: 860px; }
@media (max-width: 960px) {
  .wrap:has(#view-oversikt:not([hidden])) { padding-bottom: calc(var(--tabs-h) + 30px + env(safe-area-inset-bottom)); }
  #view-oversikt:not([hidden]) { min-height: calc(100vh - 84px - var(--tabs-h) - 30px); min-height: calc(100svh - 84px - var(--tabs-h) - 30px - env(safe-area-inset-bottom)); }
}

/* ---------- Flytande glas (styrs av --g, 0 = matt, 1 = klart) ---------- */
:root {
  --g: .6;
  --tint: calc(.86 - var(--g) * .74);          /* hur mycket terrakotta som täcker bakgrunden */
  --sheen: calc(.05 + var(--g) * .16);         /* ljusreflex uppe till vänster */
  --edge: calc(.18 + var(--g) * .34);          /* ljus kant överst */
  --blur: blur(calc(12px + var(--g) * 18px)) saturate(calc(130% + var(--g) * 70%)) brightness(calc(1 + var(--g) * .06));
  --panel-r: var(--r-xl);
  --glass-surface:
    linear-gradient(135deg, rgba(255,255,255,var(--sheen)) 0%, rgba(255,255,255,0) 38%, rgba(255,255,255,0) 70%, rgba(255,255,255,calc(var(--sheen) * .5)) 100%),
    linear-gradient(160deg, rgba(118, 38, 20, var(--tint)), rgba(58, 15, 7, calc(var(--tint) + .06)));
  --glass-shadow:
    inset 0 1px 0 rgba(255,255,255,var(--edge)),
    inset 0 -1px 0 rgba(255,255,255,calc(var(--edge) * .3)),
    inset 1px 0 0 rgba(255,255,255,calc(var(--edge) * .35)),
    inset -1px 0 0 rgba(255,255,255,calc(var(--edge) * .2)),
    0 24px 50px -28px rgba(0,0,0,.75);
}
@media (max-width: 640px) { :root { --panel-r: 26px; } }

.tile, .panel, .block.tabbed > .panel.main, .dayres, .headnav, .tabs, .daysheet {
  background: var(--glass-surface) !important;
  border: 1px solid rgba(255,255,255,calc(.12 + var(--g) * .16)) !important;
  box-shadow: var(--glass-shadow) !important;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.aura .tile { box-shadow: var(--glass-shadow), 0 40px 80px -40px rgba(20,2,0,.9) !important; }
/* Rader och rutor inuti glaset: ljusare glas i stället för mörk toning */
.ar, .nights li:not(.tonight), .upcoming li {
  background: linear-gradient(160deg, rgba(255,255,255,calc(.05 + var(--g) * .07)), rgba(255,255,255,calc(.02 + var(--g) * .03))), rgba(40, 10, 4, calc(.28 - var(--g) * .2));
  border-color: rgba(255,255,255,calc(.1 + var(--g) * .12));
  box-shadow: inset 0 1px 0 rgba(255,255,255,calc(var(--edge) * .6));
}
.ar.book.now { background: linear-gradient(160deg, rgba(220,236,108,.2), rgba(220,236,108,.08)); }
body { text-shadow: 0 1px 2px rgba(20, 4, 0, calc(var(--g) * .45)); }
.btn.primary, .tab, .chip.on, .ar-pill.on, .headnav a.on, .tabs a.on, .nights li.tonight { text-shadow: none; }

/* Fliken under rutan syns bara runt rutans rundade hörn, inte genom glaset */
.block.tabbed > .tab {
  -webkit-mask: linear-gradient(#000, #000) 0 28px / 100% calc(100% - 28px) no-repeat,
    radial-gradient(circle var(--panel-r) at var(--panel-r) calc(28px - var(--panel-r)), transparent calc(var(--panel-r) - .5px), #000 var(--panel-r)) 0 0 / var(--panel-r) 28px no-repeat,
    radial-gradient(circle var(--panel-r) at 0 calc(28px - var(--panel-r)), transparent calc(var(--panel-r) - .5px), #000 var(--panel-r)) 100% 0 / var(--panel-r) 28px no-repeat;
  mask: linear-gradient(#000, #000) 0 28px / 100% calc(100% - 28px) no-repeat,
    radial-gradient(circle var(--panel-r) at var(--panel-r) calc(28px - var(--panel-r)), transparent calc(var(--panel-r) - .5px), #000 var(--panel-r)) 0 0 / var(--panel-r) 28px no-repeat,
    radial-gradient(circle var(--panel-r) at 0 calc(28px - var(--panel-r)), transparent calc(var(--panel-r) - .5px), #000 var(--panel-r)) 100% 0 / var(--panel-r) 28px no-repeat;
}

/* Reglaget för glaseffekt */
.glass-ctl { display: flex; justify-content: space-between; align-items: baseline; font-weight: 500; margin-bottom: 10px; }
.glass-ctl output { font-variant-numeric: tabular-nums; color: var(--lime); font-weight: 600; }
#glassRange { width: 100%; accent-color: var(--lime); height: 28px; }
.glass-ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 4px; }
/* Auras sken bara runt kanten, så det inte lyser igenom glaset */
.aura::before { padding: 2px; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
/* Glöden är en skugga utanför rutan: den ritas aldrig under glaset och får mjuka kanter */
.aura::after { inset: 0; border-radius: var(--r-xl); background: none; filter: none; padding: 0; -webkit-mask: none; mask: none; }
.aura.on::after { opacity: 1; animation: glow-orbit 6s linear infinite, glow-breathe 3.2s ease-in-out infinite; }
@keyframes glow-orbit {
  0%, 100% { box-shadow: -14px -10px 44px -2px rgba(220,236,108,.75), 14px 12px 52px -4px rgba(243,198,74,.6), 0 0 26px 0 rgba(233,240,120,.45), 0 0 90px 6px rgba(220,236,108,.22); }
  25%      { box-shadow: 14px -12px 44px -2px rgba(243,198,74,.7), -14px 12px 52px -4px rgba(184,224,74,.7), 0 0 26px 0 rgba(233,240,120,.45), 0 0 90px 6px rgba(220,236,108,.22); }
  50%      { box-shadow: 14px 10px 44px -2px rgba(220,236,108,.75), -14px -12px 52px -4px rgba(243,198,74,.6), 0 0 26px 0 rgba(233,240,120,.45), 0 0 90px 6px rgba(220,236,108,.22); }
  75%      { box-shadow: -14px 12px 44px -2px rgba(243,198,74,.7), 14px -12px 52px -4px rgba(184,224,74,.7), 0 0 26px 0 rgba(233,240,120,.45), 0 0 90px 6px rgba(220,236,108,.22); }
}
@keyframes glow-breathe { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
@media (max-width: 640px) { .aura::after { border-radius: calc(var(--r-xl)); } }
@media (prefers-reduced-motion: reduce) { .aura.on::after { animation: none; box-shadow: 0 0 40px -4px rgba(220,236,108,.5), 0 0 80px 2px rgba(220,236,108,.16); } }
.nights li.next { border: 2px solid var(--lime); box-shadow: 0 0 0 3px rgba(220,236,108,.25), 0 0 18px rgba(220,236,108,.45); }
.nights li.full { border: 1.5px dashed rgba(255,238,230,.45); }
/* Bollmaskin eller tid först */
.ballprio { flex: 0 0 100%; margin-top: 12px; }
.ballprio .venue button { padding: 10px 14px; }
.ballprio-ex { margin: 8px 2px 0; font-size: 13px; color: var(--muted); line-height: 1.4; }
/* Status för nattens släpp */
.ar-status { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 11px; white-space: nowrap; border-radius: 999px; font-size: 13px; font-weight: 600; line-height: 1.2; }
.ar-status svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ar-status.yes { background: var(--lime); color: var(--lime-ink); }
.ar-status.no { background: rgba(255, 180, 168, .16); color: #ffc9bf; border: 1px solid rgba(255, 180, 168, .45); }
.ar-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ar-acts .ar-pill { margin-left: 0; }
@media (max-width: 640px) { .ar-acts { grid-column: 2; justify-content: flex-start; margin-top: 4px; } .ar-acts .ar-pill { margin-top: 0; } }
/* Ändra en enskild bokning */
.editor-host:empty { display: none; }
#dayEditor { margin: 10px 18px 0; }
@media (max-width: 640px) { #dayEditor { margin: 10px 12px 0; } }
.editor { display: flex; flex-wrap: wrap; column-gap: 8px; padding: 16px; border-radius: var(--r-lg); background: rgba(255,248,240,.12); border: 1px solid var(--stroke); animation: dsIn .18s ease-out; }
.editor > .chips, .editor > .ed-head, .editor > .ed-actions, .editor > .ballprio { flex: 0 0 100%; }
.editor > .venue { margin-top: 12px; }
.ed-head { display: flex; flex-direction: column; margin-bottom: 12px; }
.ed-head b { font: 600 18px var(--sans); }
.ed-head small { color: var(--muted); font-size: 13px; }
.ed-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ed-actions .btn { min-height: 42px; }
.ar-pill.edit svg { stroke-width: 1.9; }
.ar-pill.edit[aria-expanded="true"] { background: var(--cream); color: var(--cream-ink); border-color: var(--cream); }
.ar-venue.edited { background: rgba(246,230,223,.18); color: var(--cream); border: 1px dashed rgba(246,230,223,.6); }
.ovlist li.ov { gap: 14px; }
.ov-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ov-main b { font: 600 20px/1.2 var(--sans); }
.ov-main small { color: var(--muted); font-size: 14px; font-weight: 400; }
.ov-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ov-acts .btn { min-height: 38px; padding: 0 14px; font-size: 14px; }
.ovlist { margin-bottom: 0; }
#ovEditor { margin-top: 12px; }
.sub-title { font: 400 18px/1.2 var(--display); letter-spacing: .03em; text-transform: uppercase; margin: 34px 0 6px; text-shadow: 0 2px 18px rgba(0,0,0,.8); }
@media (max-width: 480px) { .ovlist li.ov { flex-wrap: wrap; } .ov-acts { flex: 0 0 100%; justify-content: flex-start; padding-left: 72px; } }
.ar[hidden] { display: none; }
/* Nästa släpp som inte bokas: mörkare, genomskinligare och överstruken */
.ar.rel.nobook { background: rgba(20, 5, 2, .38) !important; border-color: rgba(255,255,255,.07) !important; box-shadow: none !important; }
.ar.rel.nobook .ar-ic, .ar.rel.nobook .ar-txt { opacity: .5; }
.ar.rel.nobook .ar-ic { background: rgba(255,180,168,.2); color: #ffc9bf; opacity: 1; }
.ar.rel.nobook .ar-label { color: #ffc9bf; }
/* Bokning 1 och 2: numrerade, tiden som ett piller */
.ar-num { font: 600 22px/1 var(--sans); font-variant-numeric: tabular-nums; }
.ar-chips { display: flex; flex-wrap: wrap; gap: 6px; flex-basis: 100%; margin-top: 2px; }
.ar-venue.time { background: rgba(246,230,223,.9); color: var(--cream-ink); border: 1px solid var(--cream); font-variant-numeric: tabular-nums; }
.ar.book.now .ar-venue.time { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.ar.paused .ar-num, .ar.idle .ar-num { opacity: .7; }
