:root {
  --bg: #f4f4f5; --card: #ffffff; --ink: #18181b; --muted: #71717a; --line: #e4e4e7; --chip: #f4f4f5;
  --accent: #27272a; --on-accent: #ffffff; --shadow: 0 1px 2px rgba(0,0,0,.04), 0 1px 3px rgba(0,0,0,.05);
  --lo: #22a06b; --mid: #e2b203; --hi: #e5484d; --late: #fdecec; --zebra: #fafafa; --bar: rgba(255,255,255,.82); --link: #1d5fd1;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f0f11; --card: #18181b; --ink: #f4f4f5; --muted: #a1a1aa; --line: #27272a; --chip: #27272a;
          --accent: #e4e4e7; --on-accent: #18181b; --shadow: none;
          --late: #3a1d1f; --zebra: #1d1d21; --bar: rgba(24,24,27,.82); --link: #8ab4f8; }
}
* { box-sizing: border-box; }
a { color: var(--link); text-underline-offset: 2px; }
a:visited { color: var(--link); }
body { margin: 0; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 720px; margin: 0 auto; padding: 12px 16px 40px; }
h1 { font-size: 1.5rem; margin: 8px 0 16px; letter-spacing: -.02em; }
h1 small { display: block; font-size: .9rem; color: var(--muted); font-weight: 400; }
h2 { font-size: 1.1rem; margin: 0 0 10px; display: flex; justify-content: space-between; align-items: center; }
small { color: var(--muted); }
.top { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center;
  padding: 8px 16px; background: var(--bar); color: var(--ink); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px); }
.top a { color: var(--ink); text-decoration: none; }
.brand { font-weight: 700; letter-spacing: -.01em; }
nav { display: flex; gap: 4px; align-items: center; }
nav a:not(.me) { padding: 5px 12px; border-radius: 999px; color: var(--muted); font-size: .95rem; }
nav a:not(.me):hover { color: var(--ink); }
nav a.on { background: var(--chip); color: var(--ink); font-weight: 600; }
.me { background: var(--c); border-radius: 50%; width: 32px; height: 32px; display: grid; place-items: center;
  margin-left: 6px; box-shadow: 0 0 0 2px var(--card), 0 0 0 3px var(--line); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 14px;
  box-shadow: var(--shadow); }
.toggle { font-size: .85rem; font-weight: 500; color: var(--muted); }
.err { color: var(--hi); }
.empty { color: var(--muted); }
/* power */
.nowprice { margin: 0 0 10px; }
.recs { list-style: none; padding: 0; margin: 0 0 12px; }
.recs li { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.recs small { display: block; }
.big { font-size: 1.6rem; }
.chart { display: flex; align-items: flex-end; gap: 2px; height: 110px; padding-bottom: 16px; }
.bar { flex: 1; border-radius: 3px 3px 0 0; position: relative; min-width: 3px; }
.bar.lo, .legend .lo::before { background: var(--lo); }
.bar.mid, .legend .mid::before { background: var(--mid); }
.bar.hi, .legend .hi::before { background: var(--hi); }
.bar i { position: absolute; bottom: -16px; left: 0; font-size: .65rem; color: var(--muted); font-style: normal; }
.legend { font-size: .8rem; color: var(--muted); margin: 4px 0 0; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 6px; }
/* tasks */
.tasks { list-style: none; margin: 0; padding: 0; }
.task { display: flex; gap: 10px; align-items: center; padding: 8px 4px; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; }
.task.late { box-shadow: inset 3px 0 0 var(--hi); padding-left: 10px; }
.task.late small b { color: var(--hi); font-weight: 600; }
.task form { margin: 0; }
.tt { flex: 1; }
.tt small { display: block; }
.check { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card);
  color: var(--muted); font-size: 1rem; cursor: pointer; transition: all .15s; }
.check:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.del { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1rem; }
.who { background: var(--c); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.due { font-size: .8rem; color: var(--muted); width: 42px; }
/* forms */
.add summary { cursor: pointer; font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 12px; }
label { display: flex; flex-direction: column; font-size: .85rem; color: var(--muted); gap: 4px; }
input, select, button { font: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.grid button, .pin button { background: var(--accent); color: var(--on-accent); border: 0; font-weight: 600; cursor: pointer; }
/* login */
.login { text-align: center; padding-top: 30px; }
.avatars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 420px; margin: 20px auto; }
.avatar { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); }
.avatar span { font-size: 2.4rem; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
  background: var(--c); border: 4px solid transparent; }
.avatar.sel span { border-color: var(--ink); }
.pin { display: flex; flex-direction: column; gap: 10px; max-width: 220px; margin: 0 auto; }
.pin input { text-align: center; font-size: 1.6rem; letter-spacing: .5em; }
/* departures — compact, fixed width, like Bo's old Indelukkehuset board */
#afgange h2, .fullboard h2 { margin-bottom: 6px; }
.board { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.3;
  border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.board th { text-align: left; padding: 3px 5px; font-weight: 600; }
.board td { padding: 3px 5px; white-space: nowrap; }
.board tbody tr:nth-child(odd) { background: var(--zebra); }
.ico { width: .85em; height: .85em; vertical-align: -1px; margin-right: 3px; display: inline; }
.board .ln { white-space: nowrap; }
.board .ln a { color: inherit; text-decoration: none; }
.board tr[data-href] { cursor: pointer; }
.board tbody tr[data-href]:hover { background: var(--late); }
.board .dly { color: var(--hi); font-weight: 600; }
.board .cancel td:not(.t) { text-decoration: line-through; opacity: .6; }
.msgs { list-style: none; padding: 0; margin: 3px 0 0; font-size: .85rem; color: var(--hi); }
.fullboard main { max-width: 460px; }
.back { text-align: center; }
.back a, h2 small a { color: var(--muted); }
@media (max-width: 440px) {
  #afgange { padding: 10px 6px; }
  .board th, .board td { padding: 3px 3px; }
  .board .cut { display: inline-block; max-width: 6.2em; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
}
@media (max-width: 375px) { .board .cut { max-width: 5.4em; } }
/* journey detail */
.back-top { margin: 4px 0 0; } .back-top a { color: var(--muted); text-decoration: none; }
.route { list-style: none; margin: 0; padding: 0; }
.route li { display: flex; align-items: center; gap: 10px; padding: 3px 0; position: relative; }
.route .rt { width: 5.2em; text-align: right; font-variant-numeric: tabular-nums; flex: none; }
.route .dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--accent); background: var(--card); flex: none; z-index: 1; }
.route li::before { content: ""; position: absolute; left: calc(5.2em + 14px); top: 0; bottom: 0; border-left: 2px solid var(--line); }
.route li:first-child::before { top: 50%; } .route li:last-child::before { bottom: 50%; }
.route .past { color: var(--muted); }
.route .mine { font-weight: 700; } .route .mine .dot { background: var(--accent); width: 14px; height: 14px; margin: 0 -2px; }
.route .cancel .sn { text-decoration: line-through; }
.dly { color: var(--hi); font-weight: 600; }
.msg { color: var(--hi); font-size: .85rem; margin: 8px 0 0; }
.btn { display: inline-block; margin-top: 10px; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; text-decoration: none; font-weight: 600; }
.pill { display: inline-flex; align-items: center; gap: 4px; background: var(--lc); color: #fff;
  border-radius: 8px; padding: 1px 9px 1px 7px; }
.pill .ico { width: .8em; height: .8em; }
.bar.fc { opacity: .45; background-image: repeating-linear-gradient(45deg, transparent 0 3px, rgba(255,255,255,.35) 3px 6px); }
span.fc, .fcl { font-size: .7rem; padding: 1px 6px; border-radius: 6px; border: 1px dashed var(--muted); color: var(--muted); font-weight: normal; }
.legend .fcl::before { content: none; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 12px 0; }
.kpis div { background: var(--zebra); border-radius: 10px; padding: 10px; text-align: center; }
.kpis b { display: block; font-size: 1.3rem; } .kpis small, .acc small { display: block; color: var(--muted); font-size: .72rem; }
.acc { width: 100%; border-collapse: collapse; font-size: .9rem; }
.acc th, .acc td { text-align: left; padding: 6px 4px; border-top: 1px solid var(--line); vertical-align: top; }
.acc th { font-size: .75rem; color: var(--muted); font-weight: normal; }
.acc td.hit { color: var(--lo); } .acc td.miss { color: var(--hi); }

.devices { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.devices form { margin: 0; }
.dev { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px;
  background: var(--card); color: inherit; cursor: pointer; }
.dev.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.dev small { font-size: .75rem; opacity: .85; }
.dev:disabled { opacity: .5; cursor: default; }

.wx { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wxcol { min-width: 0; }
.wxcol h3 { margin: 0 0 4px; font-size: .9rem; color: var(--muted); letter-spacing: .05em; }
.wxnow { margin: 0 0 8px; }
.wxnow b { font-size: 1.6rem; vertical-align: middle; }
.wxnow small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wxh { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px 2px;
  text-align: center; font-size: .8rem; }
.wxh li { display: flex; flex-direction: column; align-items: center; line-height: 1.25; }
.wxh i { color: var(--muted); font-style: normal; font-size: .7rem; }
.wxh em { color: #2f6fdf; font-style: normal; font-size: .7rem; }

.lvl { display: inline-block; padding: 1px 10px; border-radius: 999px; color: #fff; }
.lvl.lo { background: var(--lo); } .lvl.mid { background: var(--mid); color: #1a1a1a; } .lvl.hi { background: var(--hi); }
.wxp { list-style: none; padding: 0; margin: 0; }
.wxp li { display: grid; grid-template-columns: 1.6em 1fr auto; align-items: center; gap: 0 6px; padding: 3px 0;
  border-top: 1px solid var(--line); font-size: .85rem; }
.wxp i { font-style: normal; color: var(--muted); }
.wxp em { grid-column: 2 / 4; font-style: normal; font-size: .75rem; color: #2f6fdf; margin-top: -2px; }

#ptr { position: fixed; top: calc(env(safe-area-inset-top) + 6px); left: 50%; transform: translate(-50%, 0); opacity: 0;
  width: 34px; height: 34px; border-radius: 50%; background: var(--card); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 1.1rem; pointer-events: none; z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,.15); transition: transform .15s; }
#ptr.spin { opacity: 1 !important; animation: ptrspin .8s linear infinite; }
@keyframes ptrspin { to { transform: translate(-50%, 30px) rotate(360deg); } }

a.dev { border: 1px solid var(--line); border-radius: 10px; text-decoration: none; box-sizing: border-box; }
.camwrap { background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; }
.camwrap video { width: 100%; height: 100%; object-fit: contain; display: block; }

.dev.camera { padding: 6px; gap: 6px; }
.dev .thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: #000; display: block; }
.campic { width: 100%; border-radius: 12px; background: #000; display: block; }
.gohome { width: 100%; padding: 12px; font-size: 1.05rem; font-weight: 600; background: var(--accent); color: var(--on-accent);
  border: 0; border-radius: 12px; cursor: pointer; }
.gohome:disabled { opacity: .6; }
#hjemrute-res:not(:empty) { margin-top: 10px; }
.trips { list-style: none; padding: 0; margin: 0; }
.trip { border-top: 1px solid var(--line); padding: 6px 0; }
.trip summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.trip summary::-webkit-details-marker { display: none; }
.trip .tt small { display: block; }
.trip .lines { display: flex; gap: 3px; flex-wrap: wrap; justify-content: flex-end; }
.trip.best { box-shadow: inset 3px 0 0 var(--lo); padding-left: 8px; }
.trip.cancel { opacity: .55; }
.legs { list-style: none; padding: 4px 0 0 4px; margin: 0; font-size: .88rem; }
.legs li { padding: 3px 0; }
.legs li small { color: var(--muted); }
.legs .walk { color: var(--muted); }

/* ---- Lucide icons ---- */
.i { width: 1.15em; height: 1.15em; stroke-width: 1.75; vertical-align: -0.2em; flex: none; }
.i.sm { width: .95em; height: .95em; vertical-align: -0.15em; opacity: .8; }
.i.big { width: 1.7em; height: 1.7em; stroke-width: 1.5; }
h2 { justify-content: flex-start; gap: .45em; }
h2 > span { display: inline-flex; align-items: center; gap: .45em; }
h2 > small, h2 > .toggle { margin-left: auto; }
h2 .i { color: var(--muted); }
h1 .i, .brand .i { vertical-align: -0.15em; }
.brand { display: inline-flex; align-items: center; gap: .4em; }
.check .i, .del .i { width: 1em; height: 1em; stroke-width: 2.25; }
.gohome { display: flex; align-items: center; justify-content: center; gap: .5em; }
.dev .i.big { color: var(--muted); }
.dev.on .i.big { color: inherit; }
.wxp li .i { width: 1.25em; height: 1.25em; color: var(--muted); }
.wxnow .i.big { vertical-align: middle; color: var(--muted); }
.msg .i, .legend .i { width: 1em; height: 1em; }
/* initials avatars */
.who, .me, .avatar span { color: #fff; font-weight: 600; letter-spacing: .02em; }
.who { font-size: .85rem; }
.who.all { background: var(--line); color: var(--muted); }
.who.all .i { width: 1em; height: 1em; }
.me { font-size: .9rem; }
.avatar span { font-size: 2rem; background: var(--c); }
nav a { white-space: nowrap; }
nav a.me { color: #fff; }
.recs .i.big { width: 1.5em; height: 1.5em; color: var(--muted); }
@media (max-width: 400px) { .brand span.full { display: none; } }
/* all device tiles same size as the camera tile (16:9 thumb + label) */
.devices { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 1fr; }
.devices > form, .devices > a { height: 100%; }
.dev { height: 100%; min-height: 150px; justify-content: center; box-sizing: border-box; }
.dev.camera { justify-content: flex-start; }
.dev.on small { color: inherit; opacity: .8; }
/* compact, identical tiles: fixed 4:3, camera thumb fills the space above its label */
.devices { grid-auto-rows: auto; }
.dev { aspect-ratio: 4 / 3; height: auto; min-height: 0; padding: 8px; gap: 2px; overflow: hidden; }
.dev .i.big { width: 1.6em; height: 1.6em; }
.dev small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.dev.camera { padding: 6px; gap: 4px; }
.dev.camera .thumb { flex: 1; min-height: 0; aspect-ratio: auto; height: 0; }
.devices > form, .devices > a { height: auto; }
.devices { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dev { width: 100%; }
@media (max-width: 380px) { .dev { aspect-ratio: 1 / 1; } }
/* ---- shopping list ---- */
.shopadd { display: flex; gap: 8px; position: relative; }
.shopadd input { flex: 1; min-width: 0; font-size: 16px; } /* 16px stops iOS zooming in */
.shopadd > button { background: var(--accent); color: var(--on-accent); border: 0; padding: 0 14px; cursor: pointer; }
.sugg { position: absolute; top: 100%; left: 0; right: 52px; z-index: 20; list-style: none; margin: 4px 0 0; padding: 4px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.sugg button { width: 100%; text-align: left; background: none; border: 0; padding: 9px 10px; border-radius: 8px; cursor: pointer; color: var(--ink); }
.sugg button:hover, .sugg button:focus { background: var(--chip); }
#shopmsg:empty { display: none; }
#shopmsg { margin: 6px 0 0; font-size: .85rem; }
.shop { list-style: none; padding: 0; margin: 10px 0 0; }
.shop li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); transition: opacity .2s; }
.shop li.going { opacity: .3; }
.shop form { margin: 0; }
.shop .nm { flex: 1; min-width: 0; }
.who.sm { width: 22px; height: 22px; font-size: .7rem; }
.shop.done .nm { text-decoration: line-through; color: var(--muted); }
.shopdone { margin-top: 8px; }
.shopdone summary { font-size: .85rem; color: var(--muted); cursor: pointer; }
.check { display: grid; place-items: center; padding: 0; flex: none; } .del { display: grid; place-items: center; padding: 6px; }
/* ---- drag to reorder ---- */
.sec, .dev-slot { -webkit-touch-callout: none; }
.sec h2, .dev, .gohome { -webkit-user-select: none; user-select: none; }
.dev-slot { min-width: 0; }
.drag-chosen { transform: scale(1.02); }
.drag-chosen > .card, .drag-chosen.dev-slot .dev { box-shadow: 0 10px 28px rgba(0,0,0,.18); }
.drag-ghost { opacity: .35; }
.hint { text-align: center; margin: 4px 0 20px; }
button.btn { border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn:disabled { opacity: .6; }
.countdown { font-variant-numeric: tabular-nums; }
.dev-slot { position: relative; }
.extend { position: absolute; top: 6px; right: 6px; margin: 0; }
.extend button { font-size: .7rem; padding: 3px 7px; border-radius: 999px; background: var(--on-accent); color: var(--accent); border: 0; }
/* ---- aftensmad ---- */
.dinner .hint { text-align: left; margin: 0 0 10px; font-size: .85rem; color: var(--muted); }
.dinner .ok { color: #15803d; font-size: .9rem; margin: 0 0 8px; }
.dishes, .favs, .dres { list-style: none; padding: 0; margin: 0; }
.dishes li { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); }
.dishes li:first-child { border-top: 0; }
.dn { min-width: 0; flex: 1; }
.dn details summary { font-size: .8rem; color: var(--muted); cursor: pointer; }
.dn details small { display: block; color: var(--muted); }
.dact { display: flex; gap: 6px; align-items: center; flex: none; }
.dact form, .favs form, .dres form { margin: 0; }
.dact .btn { margin: 0; padding: 7px 12px; }
.vote { display: inline-flex; align-items: center; gap: 4px; background: none; border: 1px solid var(--line); color: inherit;
        border-radius: 999px; padding: 6px 10px; font: inherit; font-size: .85rem; cursor: pointer; font-variant-numeric: tabular-nums; }
.vote .i { width: 1em; height: 1em; }
.vote.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.voters { display: flex; gap: 3px; margin-top: 4px; }
.tag { display: inline-flex; vertical-align: middle; }
.tag .i { width: .95em; height: .95em; }
.tag.veg { color: #16a34a; } .tag.fav { color: #eab308; }
.dpick { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dpick div { display: flex; flex-direction: column; }
.dpick b { font-size: 1.15rem; }
.dpick small { color: var(--muted); }
.dpick form { margin: 0; } .dpick .btn { margin: 0; }
.dmore { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.dmore summary { cursor: pointer; color: var(--muted); font-size: .9rem; display: flex; align-items: center; gap: 6px; }
.dmore input, .dmore textarea { width: 100%; box-sizing: border-box; font-size: 16px; margin-top: 8px; }
.dres li, .favs li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; }
.dres li div { min-width: 0; } .dres small { display: block; color: var(--muted); font-size: .78rem; }
.favs li span { flex: 1; }
.dadd .btn { margin-top: 8px; }
.dhome { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.dppl { display: flex; gap: 3px; flex: 1; }
.dppl .away { opacity: .3; text-decoration: line-through; }
.btn.sm { margin: 0; padding: 5px 10px; font-size: .8rem; }
.vote:disabled { opacity: .4; cursor: default; }
.dinner .hint .i { width: 1em; height: 1em; vertical-align: -0.15em; }
.favs li > span small { display: block; color: var(--muted); font-size: .75rem; }
/* ---- kitchen tablet (/tavle) ---- */
.kitchen main.kgrid { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; padding: 14px; }
.kcol { min-width: 0; }
.kclock { display: flex; align-items: baseline; gap: 12px; margin: 0 0 10px 4px; }
.kclock b { font-size: 3.2rem; font-variant-numeric: tabular-nums; line-height: 1; }
.kclock span { font-size: 1.2rem; color: var(--muted); }
.kpick b { display: block; font-size: 1.6rem; } .kpick small { color: var(--muted); }
.kdish, .kshop { list-style: none; padding: 0; margin: 0; }
.kdish li { display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--line); }
.kdish li:first-child { border-top: 0; }
.kdish b { display: inline-flex; gap: 4px; align-items: center; font-variant-numeric: tabular-nums; }
.kshop { columns: 2; column-gap: 20px; }
.kshop li { padding: 3px 0; break-inside: avoid; }
#kring { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: grid; place-items: center; z-index: 50; color: #fff; }
#kring[hidden] { display: none; }
#kring div { text-align: center; max-width: 90vw; }
#kring img { max-width: 90vw; max-height: 70vh; border-radius: 12px; display: block; margin: 10px auto; }
@media (max-width: 800px) { .kitchen main.kgrid { grid-template-columns: 1fr; } }
.kgrid > .kclock { grid-column: 1 / -1; margin: 0 0 -4px 4px; }
@media (min-width: 1600px) { body.kitchen { zoom: 1.15; } }
body.kitchen { overflow-x: hidden; }
.kitchen main.kgrid { padding-bottom: 0; } .kitchen .kcol > .card:last-child { margin-bottom: 8px; }
.kitchen .kcol { align-self: start; }
.kitchen .board { pointer-events: none; } .kitchen .board a { color: inherit; text-decoration: none; }
#kdebug { position: fixed; bottom: 6px; right: 8px; background: #000; color: #0f0; font: 12px monospace; padding: 3px 6px; border-radius: 4px; z-index: 60; }
/* Lenovo Smart Display / 1280×800-ish landscape: squeeze so nothing scrolls */
@media (min-width: 1000px) and (max-height: 860px) {
  .kitchen main.kgrid { gap: 10px; padding: 8px 10px 0; }
  .kitchen .card { padding: 10px 14px; margin-bottom: 10px; }
  .kgrid > .kclock b { font-size: 2.4rem; } .kgrid > .kclock span { font-size: 1rem; }
  .kitchen .board tbody tr:nth-child(n+11) { display: none; }
  .kitchen .power .chart { height: 60px; }
  .kitchen .power .legend, .kitchen .power .nowprice small, .kitchen .wx + .legend { display: none; }
  .kitchen .recs li small { display: none; }
  .kitchen .wxp li:nth-child(n+4) { display: none; }
}
/* Lenovo Smart Display 10 via DashCast = 1024×640 css px (dpr 1.875) */
@media (min-width: 1000px) and (max-height: 700px) {
  .kitchen .board tbody tr:nth-child(n+8) { display: none; }
  .kitchen .board td, .kitchen .board th { padding-top: 1px; padding-bottom: 1px; }
  .kitchen .wxp li:nth-child(n+3) { display: none; }
  .kitchen .power .chart { height: 44px; padding-bottom: 12px; }
  .kitchen h2 { margin-bottom: 4px; }
  .kgrid > .kclock b { font-size: 2rem; }
}
.kppl { display: inline-flex; gap: 4px; margin-left: auto; }
.kppl .away { opacity: .25; }
/* today's special line (day.py): flag day / holiday / birthday, else "på denne dag" */
.dayline { margin: -6px 0 12px; color: var(--muted); font-size: .92rem; display: flex; gap: 6px; align-items: baseline; }
.dayline .flag { font-size: 1.1em; }
.dayline .flag.half { opacity: .55; }
.dayline.hist span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dayline.hist .i { flex: none; align-self: center; }
.kclock .dayline { margin: 0 0 0 auto; font-size: .95rem; max-width: 60%; min-width: 0; align-self: center; line-height: 1.3; }
.kclock .dayline.hist span { -webkit-line-clamp: 2; }
/* where am I (places.toml): Hjemme / Hos Lea switch under the greeting */
.placesw { display: flex; align-items: center; gap: 6px; margin: -4px 0 14px; color: var(--muted); }
.placesw form { margin: 0; }
.chip { border: 1px solid var(--line, #ddd); background: transparent; color: var(--ink); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: .9rem; cursor: pointer; }
.chip.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600; }
.wxp em.dry { color: var(--muted); }  /* placeholder line so DMI/YR rows stay aligned when only one predicts rain */
.hstat { font-size: .8rem; font-weight: 500; padding: 1px 10px; border-radius: 999px; background: var(--chip); color: var(--muted); }
.hstat.run { background: var(--hi); color: #fff; }
.heat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 8px; }
.heat div { display: flex; flex-direction: column; min-width: 0; }
.heat b { font-size: 1.3rem; }
.heat small { color: var(--muted); font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
