/* Badehusappen – stil (HT14 versjon 0.6), laget for å ligne en vanlig iPhone-app.
 *
 *  - Systemfonten (SF Pro på Apple, Segoe/Roboto ellers), store titler, grupperte lister med innrykk,
 *    gjennomsiktig fanelinje, segmentkontroller og ark som glir opp nedenfra.
 *  - Trykkflater minst 44 px. Trygge soner (Dynamic Island, hjemlinjen) via env(safe-area-inset-*).
 *  - Lys og mørk modus følger telefonen. Diskré animasjoner, slått av med «Reduser bevegelse».
 *  - Tekststørrelse: på iPhone følger grunnstørrelsen «Tekststørrelse» (Dynamic Type). Zoom er ikke sperret.
 *  - Husfargene settes fra rules.json som CSS-variabler (--A … --D).
 */
:root {
  color-scheme: light dark;
  --A: #2563eb; --B: #16a34a; --C: #ea580c; --D: #7c3aed;
  --tint: #007aff; --tint-soft: rgba(0, 122, 255, .12); --red: #ff3b30; --green: #34c759; --orange: #ff9500;
  --bg: #f2f2f7; --bg2: #ffffff; --bg3: #f2f2f7; --fill: rgba(120, 120, 128, .12); --fill2: rgba(120, 120, 128, .2);
  --ink: #000; --ink2: rgba(60, 60, 67, .6); --sep: rgba(60, 60, 67, .29);
  --bar: rgba(249, 249, 249, .82);
  --ok-bg: rgba(52, 199, 89, .14); --ok: #1c7c35; --no-bg: rgba(255, 149, 0, .15); --no: #a14d00;
  --r: 12px; --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tabh: 50px;
  --sl: env(safe-area-inset-left, 0px); --sr: env(safe-area-inset-right, 0px);
  --st: env(safe-area-inset-top, 0px); --sb: env(safe-area-inset-bottom, 0px);
  --pad: 16px;
  --ease: cubic-bezier(.32, .72, 0, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --tint: #0a84ff; --tint-soft: rgba(10, 132, 255, .2); --red: #ff453a; --green: #30d158;
    --bg: #000; --bg2: #1c1c1e; --bg3: #2c2c2e; --fill: rgba(118, 118, 128, .24); --fill2: rgba(118, 118, 128, .36);
    --ink: #fff; --ink2: rgba(235, 235, 245, .6); --sep: rgba(84, 84, 88, .65);
    --bar: rgba(22, 22, 24, .8);
    --ok-bg: rgba(48, 209, 88, .18); --ok: #7ee69a; --no-bg: rgba(255, 159, 10, .2); --no: #ffc069;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; font-size: 106.25%; }   /* 17 px som iOS */
@supports (font: -apple-system-body) and (-webkit-touch-callout: none) { html { font: -apple-system-body; } }
body { margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.35; color: var(--ink); background: var(--bg);
  padding: var(--st) 0 calc(var(--tabh) + 1.5rem + var(--sb)); overflow-wrap: break-word; -webkit-font-smoothing: antialiased; letter-spacing: -.01em; }
body.booting main { opacity: 0; }
main { max-width: 760px; margin: 0 auto; padding: 0 max(var(--pad), var(--sr)) 0 max(var(--pad), var(--sl)); transition: opacity .2s; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; letter-spacing: inherit; }
input, select, textarea { font: inherit; font-size: max(16px, 1rem); color: inherit; }        /* 16 px hindrer zoom i felt */
:focus-visible { outline: 3px solid var(--tint); outline-offset: 2px; }
a { color: var(--tint); text-decoration: none; }
.skip { position: absolute; left: -9999px; } .skip:focus { left: 1rem; top: calc(var(--st) + .5rem); z-index: 99; background: var(--bg2); padding: .5rem 1rem; border-radius: 10px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--ink2); }
h2 { font-size: 1.25rem; }
.view { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Store titler */
.large { padding: .6rem 0 .5rem; }
.large h1 { font-size: 2.05rem; line-height: 1.15; font-weight: 700; letter-spacing: .01em; margin: .15rem 0 0; }
.large .back { display: inline-flex; align-items: center; min-height: 44px; margin-left: -.2rem; padding: 0 .2rem; color: var(--tint); background: none; border: 0; font-size: 1.05rem; }
.row-between { display: flex; align-items: flex-end; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.intro { color: var(--ink2); margin: 0 0 1rem; }
.foot { color: var(--ink2); font-size: .82rem; margin: .5rem .9rem 1rem; }
.foot.center { text-align: center; margin-top: 2rem; }
.pad { padding: .2rem 0 .4rem; } .pad.row { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Knapper */
.btn { border: 0; border-radius: 12px; min-height: 50px; padding: .6rem 1.1rem; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
  transition: transform .12s, opacity .12s, background-color .2s; max-width: 100%; }
.btn:active { transform: scale(.97); opacity: .85; }
.btn.small { min-height: 44px; padding: .4rem .9rem; font-size: .95rem; border-radius: 999px; }
.btn.filled { background: var(--tint); color: #fff; }
.btn.tinted { background: var(--tint-soft); color: var(--tint); }
.btn.plain { background: none; color: var(--tint); }
.btn.red { color: var(--red); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.wide { width: 100%; }
/* Eldre klassenavn i booking-arket */
.primary { border: 0; background: var(--tint); color: #fff; border-radius: 12px; padding: .7rem 1.1rem; font-weight: 600; min-height: 44px; }
.primary:disabled { opacity: .45; }
.primary.wide { min-height: 50px; }
.secondary { border: 0; background: var(--tint-soft); color: var(--tint); border-radius: 12px; padding: .6rem 1rem; font-weight: 600; min-height: 44px; }
.danger { border: 0; background: rgba(255, 59, 48, .12); color: var(--red); border-radius: 12px; padding: .6rem 1rem; font-weight: 600; min-height: 44px; }
.ghost { border: 0; background: var(--fill); border-radius: 12px; padding: .6rem 1rem; min-height: 44px; }
.primary:active, .secondary:active, .danger:active, .ghost:active { opacity: .7; }

/* Grupperte lister med innrykk (inset grouped) */
.ghead { font-size: .8rem; font-weight: 400; text-transform: uppercase; letter-spacing: .02em; color: var(--ink2); margin: 1.4rem .9rem .4rem; display: flex; align-items: center; gap: .45rem; }
h2.ghead:has(.dot) { text-transform: none; font-size: 1.05rem; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.group { list-style: none; margin: 0 0 .5rem; padding: 0; background: var(--bg2); border-radius: var(--r); overflow: hidden; }
.group > li, .group > .cell, .group > label { position: relative; }
.group > li + li::before, .group > .cell + .cell::before { content: ""; position: absolute; top: 0; left: 1rem; right: 0; border-top: .5px solid var(--sep); }
.cell { display: flex; align-items: center; gap: .7rem; min-height: 44px; padding: .65rem 1rem; width: 100%; background: none; border: 0; text-align: left; color: var(--ink); font-size: 1rem; }
button.cell, a.cell { cursor: pointer; transition: background-color .15s; }
button.cell:active, a.cell:active { background: var(--fill); }
.cell.nav::after { content: ""; margin-left: auto; width: .5rem; height: .5rem; border: solid var(--ink2); border-width: 2px 2px 0 0; transform: rotate(45deg); opacity: .6; flex: 0 0 auto; }
.cell.tint { color: var(--tint); }
.cell.destructive { color: var(--red); }
.group.text { padding: .2rem 1rem; } .group.text p { margin: .7rem 0; }
.group.small .cell { font-size: .92rem; }
.houses .cell { font-weight: 600; font-size: 1.05rem; min-height: 54px; }
.contact { flex-wrap: wrap; gap: .2rem .9rem; } .contact b { flex: 1 0 100%; font-weight: 600; }
.contact a { min-height: 32px; display: inline-flex; align-items: center; }
.note { color: var(--ink2); }
.cell > span:has(> .dot) { display: inline-flex; align-items: center; gap: .6rem; }
.user .dot { margin-right: .5rem; vertical-align: 1px; }
.user { justify-content: space-between; flex-wrap: wrap; } .user .acts { display: flex; gap: .3rem; flex-wrap: wrap; margin-left: auto; }

/* Skjema */
.group.form { margin-bottom: .3rem; }
.field { gap: .8rem; padding-top: 0; padding-bottom: 0; min-height: 48px; }
.field > span { flex: 0 0 6.2rem; color: var(--ink); }
.field input, .field textarea { flex: 1; min-width: 0; border: 0; background: none; padding: .75rem 0; outline: none; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink2); opacity: .7; }
.field.area { align-items: stretch; } .field textarea { resize: vertical; min-height: 6rem; }
.formmsg { color: var(--red); font-size: .9rem; margin: .4rem .9rem; min-height: 1.2em; }
.formmsg:empty { min-height: 0; margin: 0; }
#login { margin-top: 1.2rem; }

/* Segmentkontroll */
.seg { display: flex; background: var(--fill); border-radius: 9px; padding: 2px; gap: 2px; margin: 0 0 .7rem; }
.seg button { flex: 1 1 0; min-width: 0; border: 0; background: none; border-radius: 7px; min-height: 36px; padding: .3rem .5rem; font-size: .92rem; font-weight: 500; transition: background-color .2s, box-shadow .2s; }
.seg button[aria-pressed="true"] { background: var(--bg2); box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 3px 1px rgba(0,0,0,.04); font-weight: 600; }
@media (prefers-color-scheme: dark) { .seg button[aria-pressed="true"] { background: #636366; } }
@media (pointer: coarse) { .seg button { min-height: 44px; } }

/* Kalender */
.toolbar { display: flex; align-items: center; gap: .3rem; margin: .2rem 0 .6rem; }
.caltitle { font-size: 1.05rem; font-weight: 600; margin: 0; flex: 1; min-width: 0; text-align: center; }
.navbtn { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 50%; border: 0; background: var(--fill); color: var(--tint); font-size: 1.6rem; line-height: 1; padding: 0 0 3px; }
.navbtn:active { background: var(--fill2); }
.hint { margin: 0 0 .6rem; padding: .6rem .9rem; border-radius: 12px; background: var(--tint-soft); color: var(--tint); font-size: .92rem; }
#calendar { container: cal / inline-size; }
.week { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.week li { display: flex; min-width: 0; }
.day { width: 100%; display: grid; grid-template-columns: minmax(3.4em, auto) minmax(0, 1fr); gap: .6rem; align-items: stretch; text-align: left;
  background: var(--bg2); border: 0; border-radius: var(--r); padding: .5rem; min-height: 76px; transition: transform .12s; }
.day:active { transform: scale(.985); }
.day.today .dnum { background: var(--red); color: #fff; } .day.today .dnum small { color: #fff; }
.day.past { opacity: .55; }
.dnum { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 10px; background: var(--fill); padding: .2rem .3rem; }
.dnum small { font-size: .75rem; color: var(--ink2); text-transform: capitalize; }
.dnum b { font-size: 1.35rem; line-height: 1.1; font-weight: 600; }
.slots { display: grid; grid-template-rows: repeat(3, auto); gap: .25rem; min-width: 0; }
.slot { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .45rem; border-radius: 8px; padding: .2rem .55rem; font-size: .9rem;
  background: var(--bg3); color: var(--ink2); min-height: 44px; min-width: 0; }
@media (prefers-color-scheme: light) { .slot { background: #f5f5f8; } }
.slot.free { color: var(--tint); cursor: pointer; }
.slot.taken { color: #fff; font-weight: 600; }
.slot .t { font-variant-numeric: tabular-nums; opacity: .85; font-weight: 500; }
.slot.nc { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.25) 0 8px, transparent 8px 16px); }
.hA { background-color: var(--A) !important; } .hB { background-color: var(--B) !important; }
.hC { background-color: var(--C) !important; } .hD { background-color: var(--D) !important; }
@container cal (min-width: 40em) {
  .week { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .45rem; }
  .day { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; gap: .4rem; padding: .4rem; }
  .dnum { flex-direction: row; gap: .35rem; padding: .3rem; } .dnum b { font-size: 1.15rem; }
  .slot { flex-direction: column; align-items: flex-start; justify-content: center; padding: .25rem .45rem; font-size: .82rem; line-height: 1.2; min-height: 48px; }
}
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.month .wd { text-align: center; font-size: .75rem; color: var(--ink2); padding: .2rem 0; text-transform: uppercase; }
.mcell { position: relative; aspect-ratio: 1 / 1.1; border: 0; border-radius: 9px; background: var(--bg2); padding: 0; overflow: hidden; display: flex; flex-direction: column; min-height: 44px; min-width: 0; }
.mcell .n { position: absolute; top: 3px; left: 5px; font-size: .85rem; font-weight: 600; z-index: 1; }
.mcell .half { flex: 1; display: flex; align-items: center; justify-content: flex-end; min-height: 0; }
.mcell .half i { display: none; font-style: normal; font-size: .75rem; font-weight: 600; color: #fff; padding: 0 .4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcell.out { opacity: .35; }
.mcell.today { box-shadow: inset 0 0 0 2px var(--red); } .mcell.today .n { color: var(--red); }
.mcell.past .n { color: var(--ink2); }
.mcell.has .n { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
@container cal (min-width: 34em) { .month { gap: 6px; } .mcell { aspect-ratio: 4 / 3; } .mcell .half i { display: block; } }
.legend { display: flex; gap: .4rem .9rem; flex-wrap: wrap; font-size: .82rem; color: var(--ink2); margin: .8rem .4rem; }
.dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; flex: 0 0 auto; }
.dot.big { width: 1.7rem; height: 1.7rem; border-radius: 8px; }

/* Ark (dialog) – glir opp nedenfra som på iPhone */
#sheet { position: fixed; inset: auto 0 0 0; margin: 0 auto; width: 100%; max-width: 640px; max-height: 92vh; max-height: 92dvh; padding: 0; border: 0;
  border-radius: 14px 14px 0 0; background: var(--bg); color: var(--ink); display: none; flex-direction: column; overflow: hidden; z-index: 50;
  box-shadow: 0 -8px 40px rgba(0,0,0,.25); }
#sheet[open] { display: flex; animation: up .38s var(--ease); }
#sheet::backdrop { background: rgba(0,0,0,.4); animation: fadein .3s ease; }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fadein { from { opacity: 0; } }
.sheet-fallback-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 49; }
@media (min-width: 700px) and (min-height: 600px) {
  #sheet { inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: min(560px, calc(100% - 3rem)); border-radius: 16px; max-height: min(86vh, 860px); }
  #sheet[open] { animation: pop .25s var(--ease); }
  @keyframes pop { from { opacity: 0; transform: translate(-50%, -48%) scale(.97); } to { opacity: 1; transform: translate(-50%, -50%); } }
}
html.sheet-open, html.sheet-open body { overflow: hidden; }
.grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--fill2); margin: 6px auto 0; flex: 0 0 auto; }
.sheet-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem max(1rem, var(--sr)) .4rem max(1rem, var(--sl)); }
.sheet-head h2 { margin: 0; font-size: 1.15rem; font-weight: 600; min-width: 0; }
.close { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--ink2); font-size: 1rem; flex: 0 0 auto; position: relative; }
.close::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--fill); z-index: -1; }
#sheetBody { container-type: inline-size; flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 0 max(1rem, var(--sr)) 1rem max(1rem, var(--sl)); }
#sheet.nofoot #sheetBody { padding-bottom: calc(1rem + var(--sb)); }
#sheetFoot { flex: 0 0 auto; background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: .5px solid var(--sep); padding: .6rem max(1rem, var(--sr)) calc(.6rem + var(--sb)) max(1rem, var(--sl)); }
#sheetFoot[hidden] { display: none; }
#sheetFoot .btn, #sheetFoot .primary { width: 100%; min-height: 50px; }
.lead { margin: .1rem 0 .6rem; font-weight: 600; }
.for { margin: .2rem 0 .6rem; color: var(--ink2); }
.label { font-size: .8rem; font-weight: 400; text-transform: uppercase; letter-spacing: .02em; color: var(--ink2); margin: 1rem .2rem .4rem; }
.label .muted { text-transform: none; }
.plist { list-style: none; padding: 0; margin: .2rem 0 .8rem; display: grid; gap: 0; background: var(--bg2); border-radius: var(--r); overflow: hidden; grid-template-columns: minmax(0, 1fr); }
.pitem { padding: .65rem 1rem; position: relative; min-width: 0; }
.pitem + .pitem::before { content: ""; position: absolute; top: 0; left: 1rem; right: 0; border-top: .5px solid var(--sep); }
.pitem .row { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .5rem; }
.pitem .acts { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .55rem; }
.acts > *, .pitem .row > * { min-width: 0; }
.chip { display: inline-flex; align-items: center; border-radius: 999px; padding: .1rem .6rem; color: #fff; font-weight: 600; font-size: .85rem; white-space: nowrap; }
.stat { font-size: .85rem; color: var(--ink2); margin-left: auto; }
.pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .45rem; margin: .3rem 0 .8rem; }
.pick button { border: 0; border-radius: 12px; padding: .6rem .2rem; min-height: 50px; font-weight: 600; color: #fff; opacity: .55; transition: opacity .15s, transform .15s; }
.pick button[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ink); }
@container (max-width: 14.5em) { .pick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.types { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: .3rem 0 .8rem; background: var(--bg2); border-radius: var(--r); overflow: hidden; }
.types button { display: flex; flex-wrap: wrap; gap: 0 .5rem; justify-content: space-between; align-items: center; text-align: left; border: 0; position: relative;
  background: none; padding: .7rem 1rem; min-height: 52px; min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.types button + button::before { content: ""; position: absolute; top: 0; left: 1rem; right: 0; border-top: .5px solid var(--sep); }
.types button:active { background: var(--fill); }
.types button[aria-pressed="true"], .types button[aria-checked="true"] { font-weight: 600; }
.types button[aria-pressed="true"]:not(.per)::after { content: "✓"; color: var(--tint); font-weight: 700; margin-left: .5rem; }
.types .t { color: var(--ink2); font-variant-numeric: tabular-nums; }
.types .box { display: inline-block; width: 1.4em; height: 1.4em; border: 2px solid var(--sep); border-radius: 50%; margin-right: .6rem; vertical-align: -.35em; position: relative; transition: background-color .15s, border-color .15s; }
.types [aria-checked="true"] .box { background: var(--tint); border-color: var(--tint); }
.types [aria-checked="true"] .box::after { content: ""; position: absolute; left: .4em; top: .17em; width: .3em; height: .6em; border: solid #fff; border-width: 0 .15em .15em 0; transform: rotate(45deg); }
.types .fullday span:first-child::before { content: "☀︎ "; }
.types button:disabled { opacity: .4; cursor: not-allowed; }
.msg { border-radius: 12px; padding: .7rem .9rem; margin: .4rem 0 .8rem; font-size: .93rem; }
.msg.ok { background: var(--ok-bg); color: var(--ok); }
.msg.no { background: var(--no-bg); color: var(--no); }
.daytime { margin: -.4rem .2rem .8rem; font-size: .85rem; }

/* Mine bookinger og statistikk */
.list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0; background: var(--bg2); border-radius: var(--r); overflow: hidden; }
.list > li { position: relative; }
.list > li + li::before { content: ""; position: absolute; top: 0; left: 1rem; right: 0; border-top: .5px solid var(--sep); }
.list .pitem .row.muted { font-size: .9rem; margin-top: .1rem; }
.card { background: var(--bg2); border-radius: var(--r); padding: .8rem 1rem; min-width: 0; }
.list .card { border-radius: 0; }
#stats { container-type: inline-size; }
.bars { display: grid; gap: .5rem; margin-top: .6rem; }
.bar { display: grid; grid-template-columns: max-content minmax(3rem, 1fr) auto; gap: .3rem .5rem; align-items: center; font-size: .93rem; }
.bar .track { background: var(--fill); border-radius: 6px; height: 16px; overflow: hidden; display: flex; }
.bar .fill { height: 100%; transition: width .4s var(--ease); }
.bar .fill.nc { opacity: .35; }
.bar small { color: var(--ink2); }
@container (max-width: 19em) { .bar { grid-template-columns: max-content minmax(0, 1fr); } .bar > :last-child { grid-column: 1 / -1; } }
.statgrid { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }

/* Fanelinje – gjennomsiktig med uskarp bakgrunn */
.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 6; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-top: .5px solid var(--sep);
  padding: 0 max(var(--sr), calc((100% - 640px) / 2)) var(--sb) max(var(--sl), calc((100% - 640px) / 2)); }
.tabs[hidden] { display: none; }
.tabs button { border: 0; background: none; padding: 5px 0 3px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 2px; font-size: .62rem; font-weight: 500; color: #8e8e93; min-height: var(--tabh); min-width: 0; letter-spacing: .01em; }
.tabs svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs button[aria-current="page"] { color: var(--tint); }
.tabs button[aria-current="page"] svg { stroke-width: 2.3; }

#toast { position: fixed; left: 50%; bottom: calc(var(--tabh) + 1.2rem + var(--sb)); transform: translate(-50%, 10px);
  background: rgba(30, 30, 32, .92); color: #fff; padding: .7rem 1.1rem; border-radius: 14px; font-size: .93rem; width: max-content; max-width: min(92vw, 34rem);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .3s var(--ease); z-index: 60; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, ::backdrop { animation: none !important; transition: none !important; }
}
@media (max-width: 340px) {
  :root { --pad: 10px; }
  .large h1 { font-size: 1.75rem; }
  .field > span { flex-basis: 4.8rem; }
  .month { gap: 3px; } .mcell .n { left: 3px; font-size: .78rem; } .mcell { aspect-ratio: auto; }
  #sheet { max-height: 100vh; max-height: 100dvh; border-radius: 0; }
}
/* Mobil liggende og PC: fanelinja som sidemeny */
@media (min-width: 1000px), (min-width: 640px) and (max-height: 500px) {
  body { padding-bottom: calc(1rem + var(--sb)); padding-left: calc(13rem + var(--sl)); }
  .tabs { top: 0; bottom: 0; right: auto; width: calc(13rem + var(--sl)); display: flex; flex-direction: column; gap: .2rem; border-top: 0; border-right: .5px solid var(--sep);
    padding: calc(1rem + var(--st)) .6rem 1rem max(.6rem, var(--sl)); }
  .tabs button { flex-direction: row; justify-content: flex-start; gap: .7rem; font-size: 1rem; padding: .5rem .8rem; border-radius: 10px; min-height: 44px; }
  .tabs svg { width: 22px; height: 22px; }
  .tabs button[aria-current="page"] { background: var(--tint-soft); }
  #toast { bottom: calc(1.5rem + var(--sb)); }
}
@media (min-width: 640px) and (max-height: 500px) {
  body { padding-left: calc(5.5rem + var(--sl)); }
  .tabs { width: calc(5.5rem + var(--sl)); padding-top: .4rem; }
  .tabs button { flex-direction: column; gap: 0; font-size: .68rem; padding: .3rem .1rem; text-align: center; justify-content: center; }
}
body:has(.tabs[hidden]) { padding-left: 0; }
@media (hover: hover) {
  button.cell:hover, a.cell:hover, .types button:not(:disabled):hover { background: var(--fill); }
  .slot.free:hover { box-shadow: inset 0 0 0 2px var(--tint); }
  .tabs button:hover { color: var(--tint); }
}

/* v0.6: «30 dager» – kompakt liste fra i dag og fremover (tre tider ved siden av hverandre) */
.week.list { gap: .4rem; }
.week.list .wkhead { display: block; margin: .5rem .3rem -.1rem; font-size: .8rem; font-weight: 600; color: var(--ink2); text-transform: uppercase; letter-spacing: .04em; }
.week.list li:first-child.wkhead { margin-top: 0; }
.week.list .day { min-height: 0; padding: .4rem; gap: .45rem; }
.week.list .dnum { padding: .15rem .25rem; } .week.list .dnum b { font-size: 1.2rem; }
.week.list .slots { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: none; }
.week.list .slot { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; padding: .2rem .45rem; font-size: .8rem; line-height: 1.2; min-height: 46px; }
.week.list .slot > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@container cal (min-width: 40em) {
  .week.list { grid-template-columns: minmax(0, 1fr); }
  .week.list .day { grid-template-columns: minmax(3.4em, auto) minmax(0, 1fr); grid-template-rows: none; }
  .week.list .dnum { flex-direction: column; gap: 0; }
  .week.list .slot { font-size: .88rem; }
}
/* v0.6: app-ikonet i toppen */
.applogo img { display: block; width: 72px; height: 72px; border-radius: 16px; margin: .6rem 0 .2rem; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.large h1 .hico { width: 34px; height: 34px; border-radius: 8px; vertical-align: -5px; margin-right: .45rem; }
