/* HytteOS app styles (grown from design/proto/proto.css). Tokens first, then base, components, pages. */

/* Fonts are served from our own server (no visitor IPs to Google). Variable fonts, SIL OFL; latin + latin-ext
   (æ ø å and č ć š ž đ). Taken from Google Fonts on 2026-11-03. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 500 600; font-display: swap; src: url(../fonts/fraunces-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 500 600; font-display: swap; src: url(../fonts/fraunces-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --radius: 20px;
  --radius-sm: 14px;
  --nav-h: 72px;
  --side-w: 92px;                              /* desktop icon rail */
  --panel-w: clamp(340px, 28vw, 520px);        /* desktop cabin photo panel (1280px+) */

  /* light */
  --bg: #eef2ec;
  --surface: #ffffff;
  --surface-2: #e4eae1;
  --line: rgba(30, 60, 35, .08);
  --card-line: rgba(30, 60, 35, .07);
  --track: rgba(26, 46, 30, .09);
  --line-strong: rgba(26, 46, 30, .18);
  --input-bg: #ffffff;
  --danger: #b3402f;
  --danger-soft: rgba(179, 64, 47, .1);
  --text: #16221a;
  --muted: #5d6b5f;
  --common: #8a978c;   /* common stays (hhc): quieter than member colours */
  --faint: #9aa59b;
  --accent: #4c7a42;
  --accent-hover: #578a4c;
  --accent-text: #f6f9f3;
  --accent-soft: rgba(76, 122, 66, .13);
  --good: #3b7a2e;
  --warn: #a8691a;
  --warn-soft: rgba(196, 128, 40, .15);
  --sun: #f0b429;
  --moon: #e0bf5c;   /* night weather icons: soft gold, visible on white cards */
  --tick: #4c7a42;
  --nav-bg: rgba(255, 255, 255, .88);
  --glass: rgba(255, 255, 255, .8);
  --glass-line: rgba(255, 255, 255, .7);
  --hero-fade: 238, 242, 236;
  --glow: rgba(76, 122, 66, .16);
  --h1: #4f8a43;  --h1-soft: rgba(79, 138, 67, .2);
  --h2: #c27f25;  --h2-soft: rgba(194, 127, 37, .2);
  --h3: #3f84a0;  --h3-soft: rgba(63, 132, 160, .2);
  --h4: #9a5b74;  --h4-soft: rgba(154, 91, 116, .2);
  --h5: #5a6c8a;  --h5-soft: rgba(90, 108, 138, .2);
  --h6: #8a7434;  --h6-soft: rgba(138, 116, 52, .2);
  --h7: #2f8a7a;  --h7-soft: rgba(47, 138, 122, .2);
  --h8: #b5543f;  --h8-soft: rgba(181, 84, 63, .2);
  --h9: #6b5fa8;  --h9-soft: rgba(107, 95, 168, .2);
  --h10: #7a8a2e; --h10-soft: rgba(122, 138, 46, .2);
  --h11: #a8487e; --h11-soft: rgba(168, 72, 126, .2);
  --h12: #3f6fa0; --h12-soft: rgba(63, 111, 160, .2);
  --shadow: 0 1px 2px rgba(30, 60, 35, .04), 0 8px 24px rgba(30, 60, 35, .06);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16231c;
    --surface: #233129;
  --card-line: rgba(255, 255, 255, .04);
    --surface-2: #2c3b32;
    --line: rgba(255, 255, 255, .07);
    --track: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .14);
  --input-bg: rgba(255, 255, 255, .05);
  --danger: #f08a76;
  --danger-soft: rgba(240, 138, 118, .14);
    --text: #edf1ea;
    --muted: #9dac9e;
    --common: #9dac9e;
    --faint: #66766a;
    --accent: #4c7a42;
    --accent-hover: #578a4c;
    --accent-text: #f4f8f1;
    --accent-soft: rgba(140, 192, 110, .13);
    --good: #9fd06a;
    --warn: #e3a857;
    --warn-soft: rgba(227, 168, 87, .15);
    --sun: #f6c544;
    --moon: #f1e3a6;
    --tick: #6aa05b;
    --nav-bg: rgba(24, 37, 30, .9);
    --glass: rgba(35, 49, 41, .72);
    --glass-line: rgba(255, 255, 255, .08);
    --hero-fade: 22, 35, 28;
  --glow: rgba(110, 160, 90, .3);
    --h1: #8cc06e;  --h1-soft: rgba(140, 192, 110, .24);
    --h2: #e0a75a;  --h2-soft: rgba(224, 167, 90, .22);
    --h3: #78b3c9;  --h3-soft: rgba(120, 179, 201, .22);
    --h4: #d49ab1;  --h4-soft: rgba(212, 154, 177, .22);
    --h5: #a3b5d4;  --h5-soft: rgba(163, 181, 212, .22);
    --h6: #d4c07e;  --h6-soft: rgba(212, 192, 126, .22);
  --h7: #6fc7b5;  --h7-soft: rgba(111, 199, 181, .22);
  --h8: #e8907a;  --h8-soft: rgba(232, 144, 122, .22);
  --h9: #b0a5e6;  --h9-soft: rgba(176, 165, 230, .22);
  --h10: #c2d17a; --h10-soft: rgba(194, 209, 122, .22);
  --h11: #e391c0; --h11-soft: rgba(227, 145, 192, .22);
  --h12: #8fb4e0; --h12-soft: rgba(143, 180, 224, .22);
    --shadow: none;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #16231c;
  --surface: #233129;
  --card-line: rgba(255, 255, 255, .04);
  --surface-2: #2c3b32;
  --line: rgba(255, 255, 255, .07);
  --track: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .14);
  --input-bg: rgba(255, 255, 255, .05);
  --danger: #f08a76;
  --danger-soft: rgba(240, 138, 118, .14);
  --text: #edf1ea;
  --muted: #9dac9e;
  --common: #9dac9e;
  --faint: #66766a;
  --accent: #4c7a42;
  --accent-hover: #578a4c;
  --accent-text: #f4f8f1;
  --accent-soft: rgba(140, 192, 110, .13);
  --good: #9fd06a;
  --warn: #e3a857;
  --warn-soft: rgba(227, 168, 87, .15);
  --sun: #f6c544;
  --moon: #f1e3a6;
  --tick: #6aa05b;
  --nav-bg: rgba(24, 37, 30, .9);
  --glass: rgba(35, 49, 41, .72);
  --glass-line: rgba(255, 255, 255, .08);
  --hero-fade: 22, 35, 28;
  --glow: rgba(110, 160, 90, .3);
  --h1: #8cc06e;  --h1-soft: rgba(140, 192, 110, .24);
  --h2: #e0a75a;  --h2-soft: rgba(224, 167, 90, .22);
  --h3: #78b3c9;  --h3-soft: rgba(120, 179, 201, .22);
  --h4: #d49ab1;  --h4-soft: rgba(212, 154, 177, .22);
  --h5: #a3b5d4;  --h5-soft: rgba(163, 181, 212, .22);
  --h6: #d4c07e;  --h6-soft: rgba(212, 192, 126, .22);
  --h7: #6fc7b5;  --h7-soft: rgba(111, 199, 181, .22);
  --h8: #e8907a;  --h8-soft: rgba(232, 144, 122, .22);
  --h9: #b0a5e6;  --h9-soft: rgba(176, 165, 230, .22);
  --h10: #c2d17a; --h10-soft: rgba(194, 209, 122, .22);
  --h11: #e391c0; --h11-soft: rgba(227, 145, 192, .22);
  --h12: #8fb4e0; --h12-soft: rgba(143, 180, 224, .22);
  --shadow: none;
  color-scheme: dark;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }   /* the scrollbar's room is always kept: nothing shifts between short and long pages */
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }

.i {
  width: 24px; height: 24px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.i--sm { width: 18px; height: 18px; }
.i--xs { width: 15px; height: 15px; }

.serif { font-family: var(--font-serif); font-weight: 500; font-variation-settings: "opsz" 72; letter-spacing: -.01em; }
.muted { color: var(--muted); }

/* Navigation: bottom tab bar on phones, sidebar on desktop */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--nav-bg);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.nav__brand, .nav__cabin, .panel { display: none; }
.nav__list { display: flex; flex: 1; list-style: none; margin: 0; padding: 0 4px; }
.nav__list li { flex: 1; }
.nav__link {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  height: var(--nav-h);
  font-size: 11px; font-weight: 500; color: var(--muted);
}
.nav__link.is-active { color: var(--good); }
.subpage .nav { display: none; }

/* Page changes: a sub page (form with X, body.subpage) slides up like a sheet and slides down when it closes;
   other page changes cross-fade. Browsers without cross-document view transitions just change the page. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
html:active-view-transition-type(sheet-open)::view-transition-new(root) { animation-name: vt-up; }
html:active-view-transition-type(sheet-open)::view-transition-old(root) { animation-name: vt-stay; }
html:active-view-transition-type(sheet-close)::view-transition-old(root) { animation-name: vt-down; z-index: 1; }
html:active-view-transition-type(sheet-close)::view-transition-new(root) { animation-name: vt-stay; }
@keyframes vt-up { from { transform: translateY(100%); } }
@keyframes vt-down { to { transform: translateY(100%); } }
@keyframes vt-stay { from, to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* Hero */
.hero {
  position: relative; isolation: isolate;
  height: 460px;
  color: #fff;
  background: #1b2a24 url(../img/cabin-placeholder.svg) center bottom / auto 140% no-repeat;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg,
    rgba(8, 14, 10, .5) 0%, rgba(8, 14, 10, 0) 32%,
    rgba(var(--hero-fade), 0) 64%, rgba(var(--hero-fade), .85) 90%, rgb(var(--hero-fade)) 100%);
}
.hero__bar {
  position: absolute; left: 16px; right: 16px; top: calc(14px + env(safe-area-inset-top));
  display: flex; justify-content: space-between; align-items: center;
}
.hero__actions { display: flex; gap: 10px; }
.hero__text { position: absolute; left: 20px; right: 20px; top: 110px; text-shadow: 0 1px 14px rgba(0, 0, 0, .35); }
.hero__greet { font-size: 15px; opacity: .92; margin-bottom: 4px; }
.hero__title { font-size: 48px; line-height: 1.02; font-variation-settings: "opsz" 120; }
.hero__sub { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 15px; opacity: .92; }
.hero__rule { width: 44px; height: 3px; border-radius: 2px; background: #9fd06a; margin-top: 14px; }
/* Long names and places never break the header: title max 2 lines (long words break), place 1 line */
.hero__title { overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  padding-bottom: .12em; margin-bottom: -.12em; }   /* room for descenders (j, g, p), the layout doesn't move */
.hero__place { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero__place .i { vertical-align: -2px; margin-right: 6px; }
/* Home: the place as a second serif line in light green under the cabin name (two-tone title) */
.hero__place--serif { margin-top: 4px; font-size: 20px; font-weight: 450; line-height: 1.2; color: #b9e08e; font-variation-settings: "opsz" 36; }
.hero--long .hero__title { font-size: 38px; line-height: 1.1; }   /* hero_long(): names over 22 characters */

/* Buttons */
.icon-btn {
  position: relative;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff;
  background: rgba(14, 22, 17, .42);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.icon-btn--solid { color: var(--text); background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); }
.icon-btn__dot {
  position: absolute; top: 10px; right: 11px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--sun); box-shadow: 0 0 0 2px rgba(14, 22, 17, .6);
}
.brand-mark {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  /* like the app icon: the logo (one roof over two equal halves, 2026-11-14) in cream + amber on the dark forest gradient */
  background: linear-gradient(#22382a, #111a14); color: #f4f1e8; --logo-acc: #e8a94a;
  border-radius: 30%; box-shadow: 0 2px 10px rgba(0, 0, 0, .25), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.brand-mark .i { width: 30px; height: 30px; }

.btn {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 56px; padding: 0 56px;
  border: 0; border-radius: 999px;
  background: var(--accent); color: var(--accent-text);
  font: 600 17px/1 var(--font-sans);
  cursor: pointer;
}
.btn:hover { background: var(--accent-hover); }
.btn__arrow {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .92); color: var(--accent);
}
.btn__arrow .i { width: 20px; height: 20px; stroke-width: 2.2; }
.btn--sm { height: 48px; font-size: 15px; }
.btn:disabled { background: var(--surface-2); color: var(--faint); cursor: default; }
.btn--sm .btn__arrow { width: 34px; height: 34px; right: 7px; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.card--glass {
  background: var(--glass);
  border-color: var(--glass-line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.card--flush { padding: 0; overflow: hidden; }

.sec-head { display: flex; justify-content: space-between; align-items: baseline; margin: 12px 4px 10px; }
.sec-head h2 { font-size: 17px; font-weight: 600; }
.sec-head a, .sec-head span { font-size: 14px; color: var(--good); font-weight: 500; }
.sec-head span { color: var(--muted); }
.sec-head .sec-head__links { display: flex; gap: 16px; }   /* two links on the right */

.label { font-size: 14px; color: var(--muted); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  color: #fff;
  background: rgba(14, 22, 17, .5);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.chip .i { color: var(--sun); }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 10px; flex: none;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.pill--ok { background: var(--accent-soft); color: var(--good); }
.pill--wait { background: var(--warn-soft); color: var(--warn); }
.pill--peak { background: var(--h1-soft); color: var(--text); }
.pill--peak .i { color: var(--sun); }

/* Ring progress */
.ring { position: relative; width: 84px; height: 84px; flex: none; }
.ring > svg { width: 100%; height: 100%; transform: rotate(-90deg); }   /* only the ring itself, not icons inside it */
.ring circle { fill: none; stroke-width: 7; }
.ring .ring__track { stroke: var(--track); }
.ring .ring__bar { stroke: var(--good); stroke-linecap: round; }
.ring__center {
  position: absolute; inset: 0;
  display: grid; place-items: center; text-align: center;
  color: var(--good);
}
.ring__center b { display: block; font-size: 18px; font-weight: 600; color: var(--text); line-height: 1; }
.ring__center small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }

/* Score */
.score { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.score__value { display: flex; align-items: center; gap: 10px; margin: 6px 0 4px; font-size: 46px; font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.score__value .i { width: 28px; height: 28px; color: var(--muted); stroke-width: 1.6; }
.score__tag { font-size: 14px; font-weight: 600; color: var(--good); }
.score__tag--warn { color: var(--warn); }
.score__tag--none { color: var(--muted); }
.score__meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
/* Home: cabin score left, our household's nights in the ring, ownership underneath */
.score--home { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 16px; }
.score__mine { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.score__ringlabel { font-size: 12px; color: var(--muted); white-space: nowrap; }
.score__own { grid-column: 1 / -1; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.ring--over .ring__bar { stroke: var(--warn); }
.ring--over .ring__center b { color: var(--warn); }
.ring__center .i { color: var(--good); }

/* Card kit 1: metric strip (metric_strip()): numbers side by side with dividers */
.metrics { display: flex; }
.metric { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 2px 10px; border-left: 1px solid var(--line); text-align: center; }
.metric:first-child { border-left: 0; }
.metric b { font-size: 18px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.metric small { font-size: 12px; color: var(--muted); }
.booking-card .metrics { margin-top: 4px; }
.booking-card .facts { margin-top: 0; }
.facts:not(:has(dt)) { display: none; }   /* no facts left (an own confirmed stay): no empty line */
.ticket__when.is-wait { background: var(--warn); color: #1b1408; }   /* a request in the ticket band */
.ticket__when.is-off { background: rgba(0, 0, 0, .25); }             /* cancelled, declined, expired */
.metrics-after { margin-top: 14px; border-top: 1px solid var(--line); }

/* Card kit 2: faces (face_stack()): overlapping avatars, "+N" last */
.faces { display: inline-flex; flex: none; }
.faces .avatar { width: 32px; height: 32px; margin-left: -9px; border: 2px solid var(--surface); font-size: 13px; }
.faces .avatar:first-child { margin-left: 0; }
.faces .avatar:not([style]) { background: linear-gradient(var(--hb-soft, var(--surface-2)), var(--hb-soft, var(--surface-2))), var(--surface); }
.faces .faces__more { color: var(--muted); font-size: 11.5px; }
.row > .faces { min-width: 55px; }   /* rows: the names line up whether one or two faces */
.faces-line { display: flex; align-items: center; gap: 10px; }
.faces-line > span { min-width: 0; }

/* Card kit 3: ticket (ticket_head()): a stay as a boarding pass, first in a .card */
.ticket { display: block; margin: -16px -16px 16px; color: inherit; text-decoration: none; }
.ticket__band { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 16px;
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; background: var(--accent); color: var(--accent-text);
  font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.ticket__label { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ticket__when { flex: none; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-weight: 600; letter-spacing: .01em; text-transform: none; }
.ticket__dates { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 16px 16px 14px; }
.ticket__end { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.ticket__end--out { align-items: flex-end; }
.ticket__end small { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ticket__end b { margin: 1px 0; font-size: 36px; font-weight: 600; line-height: 1; }
.ticket__mid { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; font-size: 14.5px; color: var(--muted); text-align: center; }
.ticket__line { display: flex; align-items: center; gap: 8px; width: 100%; color: var(--good); }
.ticket__line::before, .ticket__line::after { content: ''; flex: 1; border-top: 2px dashed currentColor; opacity: .4; }
.ticket__foot { display: flex; align-items: center; gap: 10px; margin: 0 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.ticket__who { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; font-weight: 600; }
.ticket__foot > .i { flex: none; }
.ticket-card .btn { margin-top: 16px; }

/* Stays tab (stays.php): the hub card sits on the photo like Cabin's weather card */
.stays { display: grid; gap: 12px; margin-top: 16px; }
@media (min-width: 1024px) {
  .stays { grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 28px; align-items: start; }
  .stays__col > section:first-child .sec-head, .stays__col > section:first-child { margin-top: 0; }
  /* right column: its first heading sits above the line, so the first card starts level with the ticket */
  .stays__col + .stays__col > section:first-child { margin-top: -32px; }
  .stays__col + .stays__col > section:first-child .sec-head { height: 22px; margin-bottom: 10px; align-items: center; }
  .head-plus { display: none; }   /* the "Book a stay" button (.head-cta) shows instead */
}
.stay-hub { background: var(--glass); border-color: var(--glass-line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.stay-hub .note__text { margin-top: 4px; }
.more-btn { margin-top: 10px; }
.more-btn.is-loading { opacity: .6; pointer-events: none; }
/* The stay's three checklists; the one for now is highlighted */
.stay-lists { display: grid; gap: 14px; }
.stay-list { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; font-size: 14px; color: var(--muted); text-decoration: none; }
.stay-list__name { display: flex; align-items: center; gap: 8px; }
.stay-list__count { font-weight: 600; }
.stay-list__bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--track); overflow: hidden; }
.stay-list__bar i { display: block; height: 100%; border-radius: 2px; background: var(--faint); }
.stay-list.is-now { color: var(--text); font-weight: 600; }
.stay-list.is-now .stay-list__name .i { color: var(--good); }
.stay-list.is-now .stay-list__bar { height: 6px; }
.stay-list.is-now .stay-list__bar i { background: var(--good); }
/* the next unticked items of the list for now, with empty tick circles */
.stay-next { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 4px; font-size: 13px; font-weight: 400; color: var(--muted); }
.stay-next__item { display: inline-flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%; }
.stay-next__item i { flex: none; width: 14px; height: 14px; border: 1.5px solid var(--faint); border-radius: 50%; }
.stay-next__more { color: var(--faint); }

/* Home: weather + checklist pair under the stay card */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.pair > .card { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: inherit; text-decoration: none; }
.pair > .card:only-child { grid-column: 1 / -1; }
.mini-wx__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mini-wx__temp { font-size: 34px; font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.mini-wx__icon { width: 64px; height: 64px; flex: none; margin: -22px -6px -6px 0; }   /* bigger, without making the row taller */
.mini-wx__desc { font-size: 14px; }
.mini-wx__range { font-size: 12px; color: var(--muted); }.mini-ring__row { display: flex; align-items: center; gap: 12px; flex: 1; }
.pair--top { margin: 0 0 18px; }
.side-ring { display: none; margin-top: 0; }   /* the lone "Your stay" ring in the stay page's right column (desktop) */
@media (min-width: 1024px) {
  .pair--alone { display: none; }
  .side-ring { display: grid; margin: 34px 0 4px; }   /* level with the checklist card (its heading sits above it) */
}   /* stay page: between the dates and the tabs */
.ring--sm { width: 64px; height: 64px; }   /* same size on Home and the stay page, with or without content inside */
.ring--sm circle { stroke-width: 9; }
.ring__num { position: absolute; inset: 0; display: grid; place-items: center; font-size: 24px; font-weight: 600; line-height: 1; color: var(--text); }
.ring__num .i { width: 26px; height: 26px; color: var(--good); }
.nights-bar { display: flex; gap: 4px; margin-top: auto; padding-top: 8px; }
.nights-bar i { flex: 1; height: 6px; border-radius: 3px; background: var(--track); }
.nights-bar i.is-done { background: var(--good); }
.mini-ring__row b { display: block; font-size: 20px; font-weight: 600; line-height: 1.1; }
.mini-ring__row small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
/* Checklist preview card (Home without weather): name + count, bar, first items with ticks, "+N more" */
.cl-preview { display: grid; gap: 10px; }
.cl-preview__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cl-preview__count { font-size: 13px; font-weight: 600; color: var(--muted); }
.cl-preview .stay-list__bar { display: block; height: 6px; }
.cl-preview .stay-list__bar i { background: var(--good); }
.cl-preview__items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 2px 0 0; padding: 0; list-style: none; }
.cl-preview__items li { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; }
.cl-preview__items i { flex: none; display: grid; place-items: center; width: 18px; height: 18px; border: 1.5px solid var(--line-strong); border-radius: 50%; color: var(--accent-text); }
.cl-preview__items li.is-done { color: var(--muted); }
.cl-preview__items li.is-done i { border-color: var(--accent); background: var(--accent); }
.cl-preview__more { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); }
.mini-ring.is-warn .ring__bar { stroke: var(--warn); }
.mini-ring.is-warn .mini-ring__row b { color: var(--warn); }
.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; text-decoration: none; }
.quick a span { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--surface-2); color: var(--text); }
.quick a:hover span { background: var(--accent-soft); color: var(--good); }

/* Small stat cards */
.minis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini { position: relative; min-height: 118px; }
.mini__value { font-size: 32px; font-weight: 600; line-height: 1; margin-top: 12px; letter-spacing: -.01em; }
.mini__unit { font-size: 13px; color: var(--muted); margin-top: 4px; }
.mini__icon {
  position: absolute; right: 14px; bottom: 14px;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--muted);
}
.mini__icon .i { width: 19px; height: 19px; }

/* Weather */
.weather { display: flex; align-items: center; gap: 14px; }
.weather__icon { width: 58px; height: 58px; flex: none; }
.weather__now { min-width: 0; }
.weather__temp { font-size: 34px; font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.weather__desc { font-size: 14px; margin-top: 4px; }
.weather__meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.weather__div { align-self: stretch; width: 1px; background: var(--line); }
.weather__dl { display: grid; grid-template-columns: auto auto; gap: 4px 12px; margin: 0; font-size: 13px; flex: 1; }
.weather__dl dt { color: var(--muted); }
.weather__dl dd { margin: 0; font-weight: 600; }
.weather > .i { color: var(--muted); }

/* Note (handover) */
.note { display: flex; align-items: center; gap: 14px; }
.note__icon {
  width: 46px; height: 46px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--good);
  border: 1px solid var(--line);
}
.note__body { flex: 1; min-width: 0; }
.note__title { font-size: 15px; font-weight: 600; }
.note__text { font-size: 14px; color: var(--muted); margin-top: 2px; }
.note > .i { color: var(--muted); }

/* List rows */
.rows { padding-top: 4px; padding-bottom: 4px; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row__bar { width: 4px; height: 38px; border-radius: 2px; background: var(--hb); flex: none; }
.row__main { flex: 1; min-width: 0; }
.row__title { font-size: 15px; font-weight: 600; }
.row__sub { font-size: 13px; color: var(--muted); }

.hh1 { --hb: var(--h1); --hb-soft: var(--h1-soft); }
.hh2 { --hb: var(--h2); --hb-soft: var(--h2-soft); }
.hh3 { --hb: var(--h3); --hb-soft: var(--h3-soft); }
.hh4 { --hb: var(--h4); --hb-soft: var(--h4-soft); }
.hh5 { --hb: var(--h5); --hb-soft: var(--h5-soft); }
.hh6 { --hb: var(--h6); --hb-soft: var(--h6-soft); }
.hh7 { --hb: var(--h7); --hb-soft: var(--h7-soft); }
.hh8 { --hb: var(--h8); --hb-soft: var(--h8-soft); }
.hh9 { --hb: var(--h9); --hb-soft: var(--h9-soft); }
.hh10 { --hb: var(--h10); --hb-soft: var(--h10-soft); }
.hh11 { --hb: var(--h11); --hb-soft: var(--h11-soft); }
.hh12 { --hb: var(--h12); --hb-soft: var(--h12-soft); }
/* "Who's going" card (going_card(): booking page, stay page) */
.going .card-head { margin-bottom: 8px; }
.going-list { list-style: none; margin: 0; padding: 0; }
.going-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.going-list li:first-child { border-top: 0; }
.going-list li > i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--hb); }
.going-list__name { flex: 1; min-width: 0; font-weight: 600; }
.going-list small { font-size: 12px; color: var(--muted); }
.going-list form { margin: 0; }
.going-list__x { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--muted); cursor: pointer; }
.going__btn { width: 100%; margin-top: 10px; gap: 8px; }
/* "Who's going" chips (booking form): a colour dot per member, ticked = filled */
.going-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.going-chips input { position: absolute; opacity: 0; pointer-events: none; }
.going-chips span { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.going-chips i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--hb); }
.going-chips input:checked + span { background: var(--hb-soft); color: var(--text); }
.going-chips input:checked + span i { background: var(--hb); }
.going-chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Home */
.main { max-width: 640px; margin: 0 auto; padding: 0 16px calc(var(--nav-h) + 28px); }
.home-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: -96px; }
/* Home columns: on phones they melt into one list in the old order (o1..o6); desktop: two independent columns */
.home-col { display: contents; }
.o1 { order: 1; } .o2 { order: 2; } .o3 { order: 3; } .o4 { order: 4; } .o5 { order: 5; } .o6 { order: 6; } .o7 { order: 7; }
/* "1 year ago" Cabin book memory (Home, top of the book) */
.book-memory__img { flex: none; width: 56px; height: 56px; border-radius: 14px; background: var(--surface-2) center / cover no-repeat; }
.book-memory__when { margin-bottom: 2px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--good); }
.book-year-line { margin: -6px 4px 14px; font-size: 14px; color: var(--muted); }
.book-memory-wrap { margin: 4px 0 18px; max-width: 640px; }
.book-card__who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.book-card__who .avatar { width: 26px; height: 26px; font-size: 11px; }
.entry-who { display: flex; align-items: center; gap: 10px; margin: -4px 0 12px; font-size: 14px; color: var(--muted); }

/* Plain page header (no hero) */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 640px; margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 16px 6px;
}
.page-title { font-size: 36px; line-height: 1.08; }
.page-sub { font-size: 15px; color: var(--muted); margin-top: 4px; }

/* Segmented control */
.seg {
  display: flex; padding: 4px; margin: 16px 0 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
}
.seg a { flex: 1; height: 36px; line-height: 36px; text-align: center; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted); }
.seg a.is-active { background: var(--accent); color: var(--accent-text); }
/* TEMPORARY: Me page test switch (admin / member), local only */
.dev-role { margin-bottom: 16px; border-style: dashed; }
.dev-role .seg { margin: 8px 0 0; }
.dev-role .seg button { flex: 1; height: 36px; border: 0; border-radius: 999px; background: none; font: inherit; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; }
.dev-role .seg button.is-active { background: var(--accent); color: var(--accent-text); }

/* Month calendar */
.month__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.month__head h2 { font-size: 22px; }
.month__nav { display: flex; gap: 8px; }
.month__nav .icon-btn { width: 38px; height: 38px; }
.cal { display: grid; grid-template-columns: 18px repeat(7, 1fr); row-gap: 4px; }
.cal__wk { padding-top: 7px; font-size: 10px; font-weight: 600; color: var(--faint); text-align: left; }   /* week number before each Monday */
.cal__wd { padding-bottom: 6px; text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); }
/* Day cell: number on top, the stay bar under it (or thin stripes when stays overlap). */
.cal { --bar-top: 32px; --bar-h: 15px; }
.d {
  position: relative; height: calc(var(--bar-top) + var(--bar-h) + 5px);
  display: flex; justify-content: center; padding-top: 3px; font-size: 14px; font-weight: 500;
}
.d span { position: relative; z-index: 1; }
.d.out { color: var(--faint); }
.bar {
  position: absolute; left: 0; right: 0; top: var(--bar-top); height: var(--bar-h);
  display: flex; align-items: center; padding: 0 6px; overflow: hidden;
  background: var(--hb); color: var(--bg);
  font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .03em; line-height: 1; white-space: nowrap;
}
.bar b { font-weight: inherit; }
.bar em { display: none; font-style: normal; overflow: hidden; text-overflow: ellipsis; }
.bar.s, .d.mon .bar { left: 3px; border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.bar.e, .d.sun .bar { right: 3px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
.bar.pending { background: transparent; color: var(--hb); border: 1.5px dashed var(--hb); }
.bar.pending:not(.s) { border-left: 0; }
.bar.pending:not(.e) { border-right: 0; }
/* Several stays on a day: two pills side by side, or (3+) the first stay's pill + "+N". */
.dchips {
  position: absolute; left: 3px; right: 3px; top: var(--bar-top); height: var(--bar-h);
  display: flex; gap: 2px;
}
.dchip {
  flex: 1; min-width: 0; display: grid; place-items: center; border-radius: 8px;
  background: var(--hb); color: var(--bg);
  font-style: normal; font-size: 10px; font-weight: 700; line-height: 1; white-space: nowrap; overflow: hidden;
}
.dchip.pending { background: transparent; color: var(--hb); border: 1.5px dashed var(--hb); }
.dchip.over { opacity: .6; }
.dchip.more { flex: 0 0 auto; padding: 0 3px; background: var(--surface-2); color: var(--text); }
.dchip b { font-weight: inherit; }
.dchip em { display: none; max-width: 100%; padding: 0 5px; overflow: hidden; text-overflow: ellipsis; font-style: normal; }
.sheet__cta { margin-top: 14px; }
/* Calendar feed: the row under the calendar views and its sheet (calendar.php, ical.php) */
.cal-ical { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--text); }
.cal-ical > span { flex: 1; }
.cal-ical .i:first-child { color: var(--good); }
.cal-ical .i:last-child { color: var(--muted); }
.ical-text { color: var(--muted); font-size: 15px; line-height: 1.5; }
#sheet-ical .field__hint { margin-top: 14px; }
#sheet-ical .link-box { padding-left: 0; margin-top: 8px; }
#sheet-ical form { margin-top: 12px; }
.bar.over { opacity: .6; }
.d.peak span::after {
  content: ""; position: absolute; right: -3px; top: 2px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--sun);
}
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.legend span {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 13px; color: var(--muted); background: var(--surface-2);
}
.legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--hb); }
.legend .peak-key i { background: var(--sun); width: 5px; height: 5px; }

.cal-page .main { padding-bottom: calc(var(--nav-h) + 96px); }
.cal-side { display: grid; gap: 12px; }
.fab {
  position: fixed; z-index: 15;
  left: 50%; transform: translateX(-50%);
  width: calc(100% - 32px); max-width: 608px;
  bottom: calc(var(--nav-h) + 14px + env(safe-area-inset-bottom));
  box-shadow: 0 8px 28px rgba(0, 0, 0, .28);
}
.peaks .row__bar { height: 30px; }
.row__value { flex: none; font-size: 14px; font-weight: 600; color: var(--muted); }

/* Weeks view (?v=year): one row per ISO week, grouped by month */
.year-head { margin: 4px 4px 12px; }
.weeks { display: grid; gap: 16px; }
.weeks__name { margin: 0 4px 8px; font-size: 15px; font-weight: 600; }
.weeks__month { break-inside: avoid; }
.weeks__list { padding: 2px 14px; }
.wk { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.wk:first-child { border-top: 0; }
.wk.is-past { opacity: .5; }
.wk.is-now { margin: 0 -14px; padding: 12px 14px; border-top-color: transparent; background: var(--accent-soft); }
.wk.is-now + .wk { border-top-color: transparent; }
.wk__no { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.wk__no small { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.wk__no b { font-size: 19px; font-weight: 600; }
.wk.is-now .wk__no b { color: var(--good); }
.wk__main { display: grid; gap: 6px; min-width: 0; }
.wk__dates { font-size: 14px; font-weight: 600; }
.wk__strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.wk__strip i { position: relative; height: 9px; border-radius: 3px; background: var(--surface-2); }
.wk__strip i.bk { background: var(--hb); }
.wk__strip i.pending { background: none; box-shadow: inset 0 0 0 1.5px var(--hb); }
.wk__strip i.pk::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; border-radius: 1px; background: var(--sun); }
.wk__strip i.today { outline: 1.5px solid var(--text); outline-offset: 1px; }
.wk__who { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.wk__name { display: inline-flex; align-items: center; gap: 5px; }
.wk__name i { width: 8px; height: 8px; border-radius: 50%; background: var(--hb); }
.wk__name.pending i { background: none; box-shadow: inset 0 0 0 1.5px var(--hb); }
.wk__peak { display: inline-flex; align-items: center; gap: 4px; color: var(--text); font-weight: 600; }
.wk__peak .i { color: var(--sun); }
.wk__free { color: var(--good); font-weight: 600; }
.wk__go { color: var(--muted); }
.wk__go .i { display: block; }
.year-legend { margin-top: 10px; padding-top: 0; }
/* Booking form: side column on desktop (stays around the dates, your share, rules); phones: form only */
.form-aside { display: none; }
.aside-note { margin: -2px 4px 10px; font-size: 13px; color: var(--muted); }
@media (min-width: 1024px) {
  .form-page .main:has(.form-split) { max-width: 1240px; }   /* as wide as the header, so the column ends under the X */
  .form-split { display: grid; grid-template-columns: minmax(0, 640px) minmax(300px, 1fr); gap: 28px; align-items: start; }
  .form-aside { display: grid; gap: 4px; }
  .form-aside .sec-head { margin-top: 0; }
  /* the first heading sits above the line, so the first card starts level with the form */
  .form-aside > section:first-child { margin-top: -32px; }
  .form-aside > section:first-child .sec-head { height: 22px; margin-bottom: 10px; align-items: center; }
  .form-aside .pair { margin-top: 8px; }
  .form-split > form .rules { display: none; }   /* shown in the side column */
}
/* Nights per member in a year (nights.php) */
.nights-list { padding: 4px 16px; }
.nights-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.nights-row:first-child { border-top: 0; }
.nights-row__main .fair-bar { margin: 8px 0 0; height: 8px; }
.nights-row .row__value { min-width: 64px; text-align: right; }
@media (min-width: 1024px) { .weeks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; } }   /* Jan Feb / Mar Apr ... */
.list-month + .list-month { margin-top: 22px; }
.list-month .sec-head { margin-top: 4px; }

/* Prepare */
.prep-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 16px 0 18px; }
.prep-dates { font-size: 28px; line-height: 1.15; }
.stay-over { display: flex; align-items: flex-start; gap: 8px; margin: -6px 0 16px; font-size: 14px; color: var(--muted); }
.stay-over .i { flex: none; margin-top: 2px; color: var(--good); }
.prep-page .main { padding-bottom: 110px; }
.prep-layout, .prep-side { display: grid; gap: 12px; }
.checks { padding: 2px 16px; }
.check { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.check:first-child { border-top: 0; }
.check__icon {
  width: 42px; height: 42px; flex: none; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--muted);
}
.check__icon .i { width: 20px; height: 20px; }
.check__main { flex: 1; min-width: 0; }
.check__title { font-size: 15px; font-weight: 600; }
.check__hint { font-size: 13px; color: var(--muted); }
.tick {
  width: 28px; height: 28px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid var(--faint); color: #fff;
}
.tick .i { width: 15px; height: 15px; stroke-width: 3; visibility: hidden; }
.tick.is-done { background: var(--tick); border-color: var(--tick); }
.tick.is-done .i { visibility: visible; }
.bottom-cta {
  position: fixed; z-index: 15;
  left: 50%; transform: translateX(-50%);
  width: calc(100% - 32px); max-width: 608px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  box-shadow: 0 8px 28px rgba(0, 0, 0, .28);
}

/* Forms */
.field { display: block; margin-bottom: 14px; }
.field__label { display: block; margin: 0 0 6px 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.field__label small { font-weight: 400; }
.field__error { display: block; margin: 6px 0 0 4px; font-size: 13px; color: var(--danger); }
.input {
  width: 100%; height: 52px; padding: 0 16px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--input-bg); color: var(--text);
  font: 400 16px/1.2 var(--font-sans);   /* 16px stops iOS from zooming in */
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.check-row { display: flex; align-items: center; gap: 10px; margin: 4px 4px 18px; font-size: 14px; color: var(--muted); cursor: pointer; }
.check-row input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.alert { margin-bottom: 14px; padding: 12px 14px; border-radius: 12px; font-size: 14px; background: var(--accent-soft); }
.alert--error { background: var(--danger-soft); color: var(--danger); }

/* Auth pages (login, signup, join, offline), like Home: the default cabin photo on top fading into the page,
   logo + serif title over the photo, then a normal app card with the form. Desktop: photo behind everything. */
.auth {
  position: relative; isolation: isolate;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  padding: calc(168px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
  background: var(--bg); color: var(--text);
}
.auth::before, .auth::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 460px; pointer-events: none; }
.auth::before {
  z-index: -2; background: #1b2a24 url(../img/heroes/fjell.jpg) 80% 55% / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, #000 52%, transparent 100%); mask-image: linear-gradient(180deg, #000 52%, transparent 100%);
}
.auth::after { z-index: -1; background: linear-gradient(180deg, rgba(8, 14, 10, .45) 0%, rgba(8, 14, 10, .1) 35%, rgba(8, 14, 10, .35) 70%, rgba(8, 14, 10, 0) 100%); }
.auth__brand {
  position: absolute; left: 16px; top: calc(16px + env(safe-area-inset-top));
  display: flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 700; letter-spacing: -.01em; color: #fff;
}
.auth__inner { width: 100%; max-width: 420px; margin: 0 auto; }
.auth__head { margin: 0 4px 22px; color: #fff; text-shadow: 0 1px 14px rgba(0, 0, 0, .4); }
.auth__head::after { content: ""; display: block; width: 44px; height: 3px; margin-top: 14px; border-radius: 2px; background: #9fd06a; }   /* the green rule under Home's title */
.auth__title { font-size: 40px; line-height: 1.05; font-variation-settings: "opsz" 120; }
.auth__sub { margin-top: 6px; font-size: 15px; opacity: .92; }
.auth .auth__card { padding: 20px; border-color: var(--card-line); background: var(--surface); color: var(--text); -webkit-backdrop-filter: none; backdrop-filter: none; }
.auth__alt { margin-top: 16px; text-align: center; font-size: 14px; color: var(--muted); }
.auth__alt a { color: var(--good); font-weight: 600; }
.auth .legal-links { margin-top: 22px; }
/* Browser autofill paints fields pale blue: keep the theme's field colours */
.input:-webkit-autofill, .input:-webkit-autofill:hover, .input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text); caret-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--input-bg) inset; transition: background-color 99999s;
}
.cdel-text { margin: 0 0 14px; }
.auth__consent { margin: 2px 2px 14px; font-size: 13px; color: var(--muted); }
.auth__consent a { color: var(--good); }

/* Personvern / Vilkår */
.legal { padding: 22px 20px; font-size: 15px; line-height: 1.6; }
.legal h2 { margin: 22px 0 6px; font-size: 17px; font-weight: 600; }
.legal h2:first-child { margin-top: 0; }
.legal p { margin: 0 0 10px; }
.legal ul { margin: 0 0 10px; padding-left: 20px; list-style: disc; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--good); }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin: 20px 0 8px; font-size: 13px; }
.legal-links a { color: var(--muted); }

.empty__text { margin: 6px 0 16px; font-size: 16px; }

/* Small shared pieces */
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-content: start; }   /* minmax: wide content (weather card) can't widen the page */
.link { color: var(--good); font-size: 14px; font-weight: 600; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.pill--soft { gap: 4px; background: var(--surface-2); color: var(--muted); }
.hero--photo { background-size: cover; background-position: var(--focus, center); }
/* Shade behind the hero text: stronger for brighter photos (--hero-shade from cabin_photo_style()) */
.hero--photo::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, rgba(8, 14, 10, var(--hero-shade, .3)) 0%, rgba(8, 14, 10, calc(var(--hero-shade, .3) * .5)) 45%, rgba(8, 14, 10, 0) 75%);
}

/* Home, Cabin, Calendar, Cabin book on phones (hero_bg()): the photo stays fixed and fades into the page as you scroll (app.js sets --scroll 0..1) */
.hero-bg { display: none; }
@media (max-width: 1023px) {
  .has-fixed-hero .hero-bg {
    display: block; position: fixed; z-index: 0; top: 0; left: 0; right: 0; height: 520px;
    isolation: isolate; pointer-events: none;
    background: #1b2a24 url(../img/cabin-placeholder.svg) center bottom / auto 125% no-repeat;
  }
  .has-fixed-hero .hero-bg.hero--photo { background-size: cover; background-position: var(--focus, center); }
  /* Same proportions as Home (layer 520 for a 460 hero), so the fade lands where the content starts */
  .has-fixed-hero .hero-bg--strip { height: 305px; }
  .has-fixed-hero .hero-bg--short { height: 340px; }   /* Cabin book entry (hero--short 300) */
  .hero-bg::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg,
      rgba(8, 14, 10, .5) 0%, rgba(8, 14, 10, 0) 28%,
      rgba(var(--hero-fade), 0) 56%, rgba(var(--hero-fade), .85) 80%, rgb(var(--hero-fade)) 92%);
  }
  .hero-bg__dim { position: absolute; inset: 0; background: rgb(var(--hero-fade)); opacity: calc(var(--scroll, 0) * .9); }
  .has-fixed-hero .hero { background: none !important; }
  .has-fixed-hero .hero::before, .has-fixed-hero .hero::after { display: none; }
  .has-fixed-hero .hero, .has-fixed-hero .main { position: relative; z-index: 1; }
}
.narrow { max-width: 640px; }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
.btn--ghost:hover { background: var(--surface-2); }
.btn-chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 40px; padding: 0 14px;
  border: 0; border-radius: 999px;
  background: var(--surface-2); color: var(--text);
  font: 600 14px/1 var(--font-sans);
  cursor: pointer; white-space: nowrap;
}
.btn-chip:hover { filter: brightness(1.06); }
.btn-chip--accent { background: var(--accent); color: var(--accent-text); }
.icon-btn--plain { width: 40px; height: 40px; flex: none; color: var(--muted); background: transparent; border: 0; backdrop-filter: none; cursor: pointer; }
.icon-btn--plain:hover { background: var(--surface-2); }
/* The open list takes the select's (see-through) background in Chrome/Edge: give the options a solid one. */
select.input option, select.input optgroup { background: var(--surface); color: var(--text); }
select.input { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: right 20px center, right 15px center; background-size: 5px 5px; background-repeat: no-repeat; }
.input--sm { height: 40px; font-size: 14px; padding: 0 12px; }

/* Sub page header and forms */
.page-head { max-width: 640px; margin: 0 auto; padding: 6px 20px 18px; }
.page-step { font-size: 13px; font-weight: 600; color: var(--good); margin-bottom: 6px; }
.steps { display: flex; gap: 6px; margin-top: 16px; }
.steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--track); }
.steps i.on { background: var(--good); }
.form-page .main { padding-bottom: 40px; }
.form-card { padding: 18px; }
.form-intro { margin: 0 4px 14px; color: var(--muted); }
.form-submit { margin-top: 20px; }
.field__hint { display: block; margin: 6px 0 0 4px; font-size: 13px; color: var(--muted); }

.photo-pick {
  position: relative; overflow: hidden;
  display: grid; place-items: center;
  height: 190px;
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface-2) center / cover no-repeat;
  color: var(--muted); cursor: pointer;
}
.photo-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-pick__label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; pointer-events: none; }
.photo-pick.has-photo { border-style: solid; border-color: transparent; }
/* Cabin image picker (settings, new cabin): the app's own image set */
.hero-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hero-pick label { position: relative; display: block; cursor: pointer; }
.hero-pick input { position: absolute; opacity: 0; pointer-events: none; }
.hero-pick__img {
  display: block; aspect-ratio: 16 / 10; border-radius: var(--radius-sm);
  background: #1b2a24 url(../img/cabin-placeholder.svg) center bottom / auto 130% no-repeat;
  border: 2px solid transparent; box-shadow: 0 0 0 1px var(--line);
}
.hero-pick label .hero-pick__img[style] { background-size: cover; background-position: center; }
.hero-pick__name { display: block; margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.hero-pick input:checked ~ .hero-pick__img { border-color: var(--good); }
.hero-pick input:checked ~ .hero-pick__name { color: var(--text); }
.hero-pick input:focus-visible ~ .hero-pick__img { outline: 2px solid var(--good); outline-offset: 2px; }
@media (min-width: 640px) { .hero-pick { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.photo-pick.has-photo .photo-pick__label { background: rgba(14, 22, 17, .6); color: #fff; }
.photo-hint { margin: 8px 4px 18px; }

/* Households */
.sharebar { display: flex; gap: 3px; height: 10px; margin-bottom: 6px; border-radius: 999px; overflow: hidden; }
.sharebar span { flex: 1 1 0; min-width: 6px; background: var(--hb); }
.hh-card { padding-bottom: 12px; }
.hh-row { padding: 14px 0; border-top: 1px solid var(--line); }
.sharebar + div .hh-row:first-child { border-top: 0; }
.hh-row__top { display: flex; align-items: center; gap: 10px; }
.hh-row__dot { width: 12px; height: 12px; flex: none; border-radius: 50%; background: var(--hb); }
.hh-row__name { flex: 1; min-width: 0; }
.hh-row__bottom { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; margin-top: 10px; }
.hh-row__share { flex: 1; min-width: 110px; font-size: 13px; color: var(--muted); }
@media (min-width: 480px) { .hh-row__bottom { padding-left: 22px; } }
.hh-row__mine { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.hh-row__mine input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.hh-add { margin-top: 4px; }

.stepper { display: inline-flex; align-items: center; height: 40px; border-radius: 999px; background: var(--surface-2); }
.stepper button { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--text); cursor: pointer; }
.stepper button:hover { background: var(--line); }
.stepper input { width: 34px; border: 0; background: transparent; color: var(--text); text-align: center; font: 600 16px/1 var(--font-sans); -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; }

/* Invites */
.inv-card { padding-top: 4px; padding-bottom: 4px; }
.inv-row { padding: 14px 0; border-top: 1px solid var(--line); }
.inv-row:first-child { border-top: 0; }
.inv-row__head { display: flex; align-items: center; gap: 12px; }
.inv-row__main { flex: 1; min-width: 0; }
.link-box { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-left: 24px; }
.link-box .input { flex: 1 1 100%; min-width: 0; color: var(--muted); }
.inv-hint { margin: 10px 4px 0; }

/* Calendar (real data) */
.hhc { --hb: var(--common); --hb-soft: var(--surface-2); }
.d span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.d.past { color: var(--faint); }
.d.today span { box-shadow: 0 0 0 1.5px var(--good); color: var(--good); font-weight: 700; }
a.d:hover span { background: var(--surface-2); }
a.d.bk:hover .bar { filter: brightness(1.12); }
a.row:hover .row__title { color: var(--good); }

/* Booking form */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.grid2 .field { margin-bottom: 6px; min-width: 0; }
.input[type="date"] { min-width: 0; padding-right: 10px; }
.change-from { margin: 0 4px 14px; font-size: 14px; color: var(--muted); }
.facts dd a { color: var(--good); font-weight: 600; }
.nights-line { min-height: 20px; margin: 0 4px 14px; font-size: 14px; font-weight: 600; color: var(--good); }
.choice { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); }
.choice label { flex: 1; min-width: 0; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: block; height: 40px; line-height: 40px; padding: 0 6px; border-radius: 999px; text-align: center; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.choice input:checked + span { background: var(--accent); color: var(--accent-text); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.textarea { height: auto; padding: 12px 16px; line-height: 1.45; resize: vertical; }
.rules { display: grid; gap: 6px; margin: 4px 0 0; padding: 12px 14px; list-style: none; border-radius: 12px; background: var(--surface-2); font-size: 13px; color: var(--muted); }
.rules li { display: flex; align-items: center; gap: 8px; }
.rules .i { color: var(--good); }

/* Booking detail */
.hero--short { height: 300px; }
.hero--short .hero__text { top: auto; bottom: 64px; }
.hero--short .hero__greet { font-size: 13px; }
.hero--short .hero__title { font-size: 42px; }
/* Photo strip on main tab pages (strip_head()) */
/* Like the Cabin page: the first content (switch, year) sits on the faded bottom of the photo. */
.hero--strip { height: 270px; }
.hero--strip .hero__text { top: auto; bottom: 94px; }
.hero--strip .hero__title { font-size: 38px; }
.hero--strip.hero--long .hero__title { font-size: 30px; }
.hero--strip.hero--long .hero__text { bottom: 84px; }   /* two title lines must stay clear of the logo row */
.hero--strip + .main { position: relative; margin-top: -74px; }
.hero--strip + .main .seg { background: var(--glass); border-color: var(--glass-line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
/* Me: no photo, a soft green glow with a mountain line behind the header */
.shell--glow { position: relative; }
.shell--glow::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 150px; pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 390 120' preserveAspectRatio='none'%3E%3ClinearGradient id='f' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%238cc06e' stop-opacity='.08'/%3E%3Cstop offset='1' stop-color='%238cc06e' stop-opacity='0'/%3E%3C/linearGradient%3E%3Cpath d='M0 92 L52 60 L84 74 L140 22 L176 52 L214 34 L262 70 L300 46 L346 80 L390 58 L390 120 L0 120Z' fill='url(%23f)'/%3E%3Cpath d='M0 92 L52 60 L84 74 L140 22 L176 52 L214 34 L262 70 L300 46 L346 80 L390 58' fill='none' stroke='%238cc06e' stroke-opacity='.22' stroke-width='1.4' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center bottom / 100% 70px no-repeat,
    radial-gradient(130% 100% at 15% 0%, var(--glow), transparent 95%);
}
.shell--glow > * { position: relative; }
.shell--glow .topbar { padding-top: calc(26px + env(safe-area-inset-top)); padding-bottom: 30px; }
.booking-grid { position: relative; display: grid; gap: 12px; margin-top: 16px; }   /* below the strip header, on the photo */
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; }
.booking-note { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.decide-text { margin: 4px 0 14px; }
.decide-reason { margin: 14px 0 8px; }
.btn--danger { color: var(--danger); border-color: var(--danger-soft); }

/* Peak periods */
.peak-star { color: var(--sun); margin-right: 6px; vertical-align: -2px; }
.peak-label { display: flex; align-items: center; }
.year-nav { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 14px; }
.year-nav h2 { font-size: 30px; }
/* Card kit 7: timeline (tl_item()): date circles on a vertical line, a card next to each */
.timeline { position: relative; display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.timeline::before { content: ''; position: absolute; left: 23px; top: 24px; bottom: 24px; border-left: 2px solid var(--surface-2); }
.tl { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 12px; }
.tl__date { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 48px; height: 48px;
  border: 2px solid var(--hb, var(--line)); border-radius: 50%; background: var(--surface); line-height: 1; }
.tl__date small { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tl__date b { margin-top: 2px; font-size: 18px; font-weight: 600; }
.tl.is-now .tl__date { border-color: var(--accent); background: var(--accent); color: var(--accent-text); }
.tl.is-now .tl__date small { color: inherit; opacity: .8; }
.tl.is-past { opacity: .55; }
.tl__card { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px; border-left: 3px solid var(--hb, var(--card-line)); color: inherit; text-decoration: none; }
.tl__main { flex: 1; min-width: 0; }
/* Peak period card: title full width (only the edit arrow beside it), dates, a tinted "whose turn" box with face,
   name, state and pill, the action, then the next 4 years as a row of small columns */
.peak-tl .tl { align-items: start; }
.peak-tl .tl__date { margin-top: 12px; }
.peak-tl .tl__card { display: block; padding: 14px 16px; }
.pk__head { display: flex; align-items: flex-start; gap: 8px; }
.pk__title { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; line-height: 1.3; }
.pk__head .icon-btn { width: 30px; height: 30px; margin: -4px -8px 0 0; flex: none; }
.pk__dates { margin-top: 2px; font-size: 13px; color: var(--muted); }
.pk__who { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 14px;
  background: var(--hb-soft, var(--surface-2)); }
.pk__who .avatar { width: 36px; height: 36px; flex: none; }
.pk__who-main { flex: 1; min-width: 0; }
.pk__name { font-size: 15px; font-weight: 600; color: var(--hb, var(--text)); }
.pk__state { margin-top: 1px; font-size: 13px; color: var(--muted); }
.pk__who .pill { flex: none; }
.peak-act { margin-top: 10px; }
.pk__line { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); list-style: none; }
.pk__line li { min-width: 0; }
.pk__line small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--muted); }
.pk__line span { display: flex; align-items: center; gap: 5px; margin-top: 2px; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk__line i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--hb, var(--muted)); }
/* Your turn: what needs your answer, above the periods */
.turn-card { margin-bottom: 12px; border-left: 3px solid var(--sun); }
.turn-card__kicker { display: flex; align-items: center; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.turn-card__title { margin-top: 6px; font-size: 22px; line-height: 1.2; }
.turn-card__sub { margin-top: 2px; font-size: 14px; color: var(--muted); }
.turn-card__text { margin-top: 10px; font-size: 14px; line-height: 1.45; }
.peak-how__list { margin: 6px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.peak-how__list li + li { margin-top: 4px; }
.peak-how { align-items: flex-start; }
.peak-open-form { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.premium-card { display: flex; gap: 14px; align-items: center; }
.btn-row { display: flex; gap: 10px; margin-top: 14px; }
.btn-row .btn { width: auto; flex: 1; padding: 0 20px; }
.danger-zone { margin-top: 28px; }

.tpl-list { padding-top: 4px; padding-bottom: 4px; }
.tpl { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); cursor: pointer; }
.tpl:first-child { border-top: 0; }
.tpl input { position: absolute; opacity: 0; pointer-events: none; }
.tpl__main { flex: 1; min-width: 0; }
.tpl__title { display: block; font-size: 15px; font-weight: 600; }
.tpl__sub { display: block; font-size: 13px; color: var(--muted); }
.tpl input:checked ~ .tick { background: var(--tick); border-color: var(--tick); }
.tpl input:checked ~ .tick .i { visibility: visible; }
.tpl input:focus-visible ~ .tick { outline: 2px solid var(--accent); outline-offset: 2px; }
.tpl.is-done { cursor: default; opacity: .5; }
.tpl__extra { padding: 0 0 14px; }
.week-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.week-chips input { position: absolute; opacity: 0; pointer-events: none; }
/* not chosen = outline only, grey text; chosen = filled green with a check, so the two read apart at a glance */
.week-chips span { display: flex; align-items: center; justify-content: center; gap: 4px; width: 46px; height: 40px; border: 1px solid var(--line-strong); border-radius: 12px; background: transparent; font-weight: 600; color: var(--muted); cursor: pointer; }
.week-chips input:checked + span { border-color: var(--accent); background: var(--accent); color: var(--accent-text); }
.week-chips input:checked + span::before { content: "\2713"; font-size: .95em; }
.week-chips input:disabled + span { opacity: .35; cursor: default; }

.peak-side { display: flex; align-items: center; gap: 6px; flex: none; }
.peak-side .icon-btn { width: 34px; height: 34px; }
.btn-chip--sm { height: 30px; padding: 0 10px; font-size: 13px; }
.tpl .row__bar { height: 34px; }

/* Fairness */
/* Fairness page: one card per member (face, share, balance, nights bar, peak turns) */
.fair-cards { display: grid; gap: 10px; }
@media (min-width: 640px) { .fair-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fair-card.is-mine { border-color: var(--hb); }
.fair-card__head { display: flex; align-items: center; gap: 12px; }
.fair-card__who { flex: 1; min-width: 0; }
.fair-card__bal { max-width: 45%; font-size: 13px; font-weight: 600; line-height: 1.25; color: var(--good); text-align: right; }
.fair-card__bal.is-over { color: var(--warn); }
.fair-card .fair-bar { margin-top: 14px; }
.fair-card__turns { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* Home score: small year bars next to the number (fairness_spark()) */
.score__line { display: flex; align-items: center; gap: 16px; }
/* Fairness page score card: score + label on one line, then parts over nights as two stacked bars */
.score--page { display: block; }
.score__top { display: flex; align-items: center; gap: 16px; }
.score__top .score__value { margin: 0; }
.split { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.split__label { font-size: 12.5px; color: var(--muted); }
.split .sharebar { margin: 0; height: 12px; }
.split__none { flex: 1; background: var(--surface-2) !important; }
.spark { display: inline-flex; align-items: flex-end; gap: 6px; }
.spark__col { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.spark__track { display: flex; align-items: flex-end; width: 8px; height: 34px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.spark__track i { width: 100%; border-radius: 4px; background: var(--good); opacity: .45; }
.spark__col small { font-size: 10px; line-height: 1; color: var(--muted); }
.spark__col.is-now .spark__track i { opacity: 1; }
.spark__col.is-now small { color: var(--text); font-weight: 600; }
.fair-bar { position: relative; height: 10px; margin: 10px 0 8px; border-radius: 999px; background: var(--surface-2); }
.fair-bar__fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--hb); }
.fair-bar__mark { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--text); opacity: .7; }

/* Settings and members */
.quick-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.input--num { max-width: 160px; }
.alert--warn { background: var(--warn-soft); color: var(--warn); }
/* Members page: rows (share bar on top), each opens a sheet with parts / role / colour */
.member-rows .sharebar { margin: 10px 0 6px; }
.member__edit { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.member .swatches { margin: 4px 0 6px; }
.mem-field .field__label { display: block; margin-bottom: 4px; font-size: 12px; }
.mem-invite { width: auto; margin: 0 0 12px; gap: 8px; }
/* Colour picker per member: 12 dots, the chosen one ringed */
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.swatches label { position: relative; cursor: pointer; }
.swatches input { position: absolute; opacity: 0; pointer-events: none; }
.swatches i { display: block; width: 24px; height: 24px; border-radius: 50%; background: var(--hb); border: 3px solid transparent; box-shadow: 0 0 0 1px var(--line); }
.swatches input:checked + i { border-color: var(--bg); box-shadow: 0 0 0 2px var(--hb); }
.swatches input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.adm-delete { display: block; margin: 4px 4px 0; color: var(--danger); }   /* Settings tab: delete the cabin, last */
.me-thumb, .adm-thumb { display: block; width: 44px; height: 44px; border-radius: 10px; background: url(../img/cabin-placeholder.svg) center 70% / cover; flex: none; }

/* Stay, checklists, supplies */
.seg small { font-size: 11px; opacity: .75; }
button.tick { padding: 0; background: transparent; cursor: pointer; }
button.tick.is-done { background: var(--tick); }
/* Modal from the bottom (sheet_start(), app.js) */
dialog.sheet {
  position: fixed; inset: auto 0 0 0; margin: 0 auto; width: 100%; max-width: 640px; max-height: 88vh; max-height: 88dvh;
  padding: 0; border: 0; border-radius: 24px 24px 0 0; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); color: var(--text); box-shadow: 0 -10px 40px rgba(0, 0, 0, .35);
}
dialog.sheet[open] { animation: sheet-up .24s ease-out; }
dialog.sheet::backdrop { background: rgba(5, 10, 7, .6); }
@keyframes sheet-up { from { transform: translateY(40%); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet__grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); margin: 10px auto 0; }
.sheet__head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 16px 12px; background: var(--bg); }
.sheet__head h2 { font-size: 24px; line-height: 1.15; }
.sheet__sub { margin-top: 4px; font-size: 14px; color: var(--muted); }
.sheet__body { padding: 0 16px calc(24px + env(safe-area-inset-bottom)); }
.sheet__body .add-row { margin-top: 0; }
@media (min-width: 1024px) {
  dialog.sheet { inset: 0; margin: auto; max-height: 80vh; border-radius: 24px; }
  .sheet__grip { display: none; }
}
.sheet .booking-note { margin: 0; }
.sheet-gap { margin-top: 12px; }
.sheet-actions { display: grid; gap: 10px; margin-top: 16px; }
.sheet-confirm, .sheet-form { display: grid; gap: 10px; }
.sheet-form .field { margin: 0; }
.sheet-form .btn { margin-top: 4px; }
.sheet-confirm__text { margin-bottom: 6px; font-size: 15px; line-height: 1.5; }
.btn--danger-solid, .btn--danger-solid:hover { background: var(--danger); color: var(--bg); }
.note--link { color: inherit; text-decoration: none; }
.note--link > .i { flex: none; align-self: center; color: var(--muted); }
.note__clip { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.tick--static { background: transparent; border-style: dashed; border-color: var(--faint); }
.tick--static.is-done { background: var(--surface-2); border-style: solid; border-color: var(--surface-2); color: var(--muted); }
.pill--new { height: 20px; padding: 0 8px; font-size: 11px; vertical-align: 2px; background: var(--accent-soft); color: var(--good); }

/* Past stay (history): the whole list a step quieter */
.checks--locked .check__title { color: var(--muted); }
.checks--locked .check__icon { opacity: .55; }
/* Locked (past stay, or not yours to tick): grey instead of green, open items with a dashed ring */
button.tick:disabled { cursor: default; border-style: dashed; border-color: var(--faint); }
button.tick.is-done:disabled { background: var(--surface-2); border-style: solid; border-color: var(--surface-2); color: var(--muted); }
.check.is-busy { opacity: .6; }
.here-card .card-head + .check-group { border-top: 0; padding-top: 4px; }   /* Home "At the cabin": Now / Next labels */
.here-card .card-head { margin: 4px 0 6px; }
.here-card .card-head a { font-size: 14px; font-weight: 600; color: var(--good); }
.hero__date { display: none; }   /* shown only on desktop with the photo panel */
.score__split { display: none; }   /* Home fairness card: parts/nights bars on desktop only */
.check-group { padding: 14px 0 2px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.list-edit { display: inline-block; margin: 10px 4px 0; }
.prep-side section .card + .card { margin-top: 10px; }
.prep-side .sec-head { margin-top: 0; }
/* Fairness trend: one bar per year, 0-100 */
.trend { display: flex; gap: 2px; align-items: stretch; height: 168px; padding: 16px 12px 12px; }
.trend__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.trend__val { font-size: 13px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.trend__track { flex: 1; width: 100%; max-width: 36px; display: flex; align-items: flex-end; border-bottom: 1px solid var(--line); }
.trend__bar { width: 100%; border-radius: 4px 4px 0 0; background: var(--good); }
.trend__bar.is-empty { background: none; border: 1.5px dashed var(--line); border-bottom: 0; }
.trend__year { font-size: 12px; color: var(--muted); }
.trend__year.is-now { color: var(--text); font-weight: 600; }
.gdpr-list { margin: 0 0 16px; padding-left: 18px; display: grid; gap: 6px; font-size: 15px; list-style: disc; }
.bell { position: relative; }
.bell__badge {
  position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 999px; background: var(--warn); color: #fff; font-size: 11px; font-weight: 700; line-height: 19px; text-align: center;
}
.notif { align-items: flex-start; }
.notif .check__icon { margin-top: 2px; }
.notif__text { font-size: 15px; line-height: 1.4; }
.notif.is-new .notif__text { font-weight: 600; }
.notif__dot { flex: none; width: 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: var(--good); }
/* Calendar month view: free weekends as small cards (weekdays + round +, dates big, how far away) */
.free-sec { margin-top: 22px; }
.free-weekends { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .free-weekends { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.free-weekend { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px; color: inherit; text-decoration: none; }
.free-weekend__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.free-weekend__top small { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.free-weekend__add { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--good); }
.free-weekend:hover .free-weekend__add { background: var(--accent); color: var(--accent-text); }
.free-weekend b { font-size: 21px; font-weight: 600; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.free-weekend__when { font-size: 13px; font-weight: 600; color: var(--good); }
.tl__note { flex: none; font-size: 12px; color: var(--muted); white-space: nowrap; }
/* "Book a stay" in the Calendar header: desktop only (phones have the floating button) */
.head-cta { display: none; }
@media (min-width: 1024px) {
  .head-cta { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px 0 16px; border-radius: 999px;
    background: var(--accent); color: var(--accent-text); font-size: 15px; font-weight: 600; text-decoration: none; box-shadow: var(--shadow); }
  .head-cta:hover { background: var(--accent-hover); }
  .cal-side > .fab { display: none; }
}
.note__flags { margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--warn); }
.note--mine { margin-bottom: 10px; border-style: dashed; }
.note--plan { margin: 12px 0; }
.flag-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.flag-chips input { position: absolute; opacity: 0; pointer-events: none; }
.flag-chips span { display: inline-block; padding: 7px 12px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.flag-chips input:checked + span { background: var(--warn-soft); color: var(--warn); }
.add-row { display: flex; gap: 8px; margin-bottom: 12px; }
.add-row .input { flex: 1; min-width: 0; }
.add-row__btn { height: 52px; padding: 0 18px; }
.checks.is-faded { opacity: .6; }
.item-card { padding: 0; margin-bottom: 10px; }
.item-card summary { display: flex; align-items: center; gap: 14px; padding: 12px 16px; cursor: pointer; list-style: none; }
.item-card summary::-webkit-details-marker { display: none; }
.item-card summary .check__title, .item-card summary .check__hint { display: block; }
.item-card[open] summary { border-bottom: 1px solid var(--line); }
.item-form { display: grid; gap: 10px; padding: 14px 16px 16px; }
.item-card .item-form .btn-row { margin-top: 4px; align-items: center; }
.icon-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-pick input { position: absolute; opacity: 0; pointer-events: none; }
.icon-pick span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); color: var(--muted); cursor: pointer; }
.icon-pick input:checked + span { background: var(--accent); color: var(--accent-text); }
.month-chips { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }   /* 12 months = two even rows of 6 */
.month-chips span { width: auto; height: 34px; font-size: 12px; }

/* Hytta: info, codes, weather */
.cabin-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }   /* below the Info | Cabin book switch */
.stack { min-width: 0; }
.cabin-grid > .stack > section:first-child .weather { background: var(--glass); border-color: var(--glass-line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.wx-days { display: flex; justify-content: space-between; margin-top: 10px; padding: 12px 10px; }
.wx-day { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; min-width: 0; text-align: center; font-size: 13px; }
.wx-day small { font-size: 12px; color: var(--muted); text-transform: capitalize; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.wx-day__icon { width: 34px; height: 34px; }
.wx-day b { font-size: 15px; }
.wx-day span { color: var(--muted); }
.wx-credit { margin: 8px 4px 0; font-size: 12px; }
.wx-credit a { color: var(--muted); }
.weather > .weather__icon { flex: none; }
.weather__now { flex: 1 1 auto; min-width: 0; }
.weather__meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.weather__dl { flex: 0 0 auto; }
.weather__dl dd, .weather__dl dt { white-space: nowrap; }
.row__clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-row .row__sub { font-size: 12px; }
.code-value { font-size: 22px; font-weight: 700; letter-spacing: .08em; font-variant-numeric: tabular-nums; user-select: all; }
.code-value--sm { margin-bottom: 12px; font-size: 18px; color: var(--good); }
.code-hidden { font-size: 14px; color: var(--muted); }
/* Card kit 4: icon tiles (icon_tiles()): round glass buttons in one row, spread evenly */
.tiles { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; margin: 0 0 18px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; font-size: 12.5px; font-weight: 600; color: var(--text); text-align: center; text-decoration: none; }
.tile__icon { position: relative; display: grid; place-items: center; width: 56px; height: 56px; border: 1px solid var(--glass-line); border-radius: 50%;
  background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--shadow); color: var(--good); }
.tile__icon .i { width: 24px; height: 24px; }
.tile:hover .tile__icon { border-color: var(--good); }
.tile__text { display: flex; flex-direction: column; min-width: 0; }
.tile__sub { display: none; }   /* desktop only (the tiles become small cards) */
.sec-head--desk { display: none; }   /* a heading only the desktop layout needs */
.tile__badge { position: absolute; top: -3px; right: -3px; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--accent); color: var(--accent-text); font-size: 11px; font-weight: 700; }

/* Card kit 6: stat tiles (stat_tiles()): big number, small icon and label, side by side */
.stat-tiles { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; }
.stat-tile { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; min-width: 0; padding: 14px; }
.stat-tile__label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; font-weight: 600; }
.stat-tile__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; }
.stat-tile__row > div { min-width: 0; }
.stat-tile__row b { display: block; font-size: 30px; font-weight: 600; line-height: 1; }
.stat-tile__row small { display: block; margin-top: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12.5px; color: var(--muted); }
.stat-tile__icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--good); }
.me-head + .main .stat-tiles { margin: 4px 0 6px; }

/* Card kit 5: carousel (Cabin book on the Cabin tab): cards side by side, swipe sideways, they snap */
.carousel { display: flex; gap: 12px; margin: 0 -16px; padding: 2px 16px 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 152px; display: flex; flex-direction: column; overflow: hidden; scroll-snap-align: start; color: inherit; text-decoration: none; }
.slide__media { display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--surface-2) center / cover no-repeat; color: var(--muted); }
.slide__body { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; }
.slide__title { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 16px; font-weight: 600; line-height: 1.2; }
.slide__body small { font-size: 12px; color: var(--muted); }
.slide--more { justify-content: center; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; text-align: center; }
.slide--more .tile__icon { width: 48px; height: 48px; border: 0; background: var(--accent-soft); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
.info-card { display: flex; gap: 16px; align-items: flex-start; padding: 20px; }
.info-card__icon { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--surface-2); color: var(--good); }
.info-body { flex: 1; min-width: 0; font-size: 16px; line-height: 1.55; }
.info-body p + p, .info-body ul + p, .info-body p + ul { margin-top: 12px; }
.info-body ul { margin: 0; padding-left: 20px; }
.info-body li + li { margin-top: 4px; }
.info-body a { color: var(--good); font-weight: 600; }
.info-text { font-size: 15px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 90px; gap: 10px; align-items: end; }
.loc-hint { margin: 0 4px 12px; }
.place-hit button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.place-hit small { display: block; font-size: 12px; color: var(--muted); }
.loc-manual { margin-top: 12px; }
/* Settings forms: space under the overlap hint; fields that only matter once another field is set */
.set-overlap-hint { margin-bottom: 16px; }
/* Peak periods: buttons on the right of the title (add + X); desktop keeps a reading width like the Calendar list */
.topbar__actions { display: flex; align-items: center; gap: 10px; flex: none; }
.peaks-page .topbar { align-items: flex-start; }   /* the X at the top like on every page_head() page, not centred on the title */
.peaks-layout { display: grid; gap: 12px; }
.peaks-side { display: grid; gap: 12px; align-content: start; margin-top: 4px; }
.peaks-add { display: none; }   /* desktop only: phones have the "+" in the header */
@media (min-width: 1024px) {
  .peaks-page .main.narrow { max-width: 1240px; }
  .peaks-layout { grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); gap: 28px; align-items: start; }
  .peaks-side { margin-top: 0; }
  .peaks-add { display: flex; }
}
[data-settings]:has(select[name="changeover_dow"] option[value=""]:checked) .set-co-months { display: none; }
[data-settings]:has(input[name="fairness_warn_nights"]:placeholder-shown) .set-warn-approval { display: none; }
/* the saved location as one confirmed line; "Enter coordinates instead" folded away; setup step 1: hits as choices */
.loc-current { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); }
.loc-current > .i { flex: none; color: var(--good); }
.loc-current b { display: block; font-weight: 600; }
.loc-current small { display: block; font-size: 12px; color: var(--muted); }
.loc-manual-wrap { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.loc-manual-wrap summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--good); }
.loc-choices { display: grid; gap: 6px; margin-top: 10px; }
.loc-choices input { position: absolute; opacity: 0; pointer-events: none; }
.loc-choices label > span { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); cursor: pointer; }
.loc-choices small { display: block; font-size: 12px; color: var(--muted); }
.loc-choices input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.loc-choices input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Hytteboka */
.book-year { margin: 22px 4px 12px; font-size: 28px; }
.book-year:first-of-type { margin-top: 8px; }
.book-feed { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 1280px) { .book-feed.book-feed { grid-template-columns: repeat(3, minmax(0, 1fr)); } }   /* doubled class: wins over the 1024 rule below */
.book-card { display: flex; flex-direction: column; }
.book-card__body { flex: 1; display: flex; flex-direction: column; }
.book-card__foot { margin-top: auto !important; padding-top: 12px; }   /* the footer sits at the bottom, so cards in a row line up */
/* up to 5 small photos under the text, sharing the width (the fifth with "+N") */
.book-card__strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; max-width: 440px; margin-top: 12px; }
.book-card__strip i { position: relative; aspect-ratio: 1; border-radius: 12px; background: var(--surface-2) center / cover no-repeat; overflow: hidden; }
.book-card__strip b { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10, 16, 12, .55); color: #fff; font-size: 16px; font-weight: 700; }
.book-card__body { padding: 14px 16px 16px; }
.book-card__date { font-size: 13px; color: var(--muted); }
.book-card__title { margin-top: 4px; font-size: 24px; line-height: 1.15; }
.book-card__text { margin-top: 8px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.book-card__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 13px; color: var(--muted); }
.is-hearted { color: #e0707a; }
.is-hearted .i { fill: currentColor; }
.heart-btn { border: 0; cursor: pointer; font-family: inherit; }
.book-empty { display: grid; justify-items: start; gap: 6px; padding: 22px; }
.book-empty .btn { margin-top: 12px; }
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.photo-grid > a, .photo-grid > label { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; background: var(--surface-2) center / cover no-repeat; overflow: hidden; }
.photo-grid--edit { margin-bottom: 14px; }
.photo-grid--edit input { position: absolute; opacity: 0; pointer-events: none; }
.photo-grid--edit span { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 999px; background: rgba(14, 22, 17, .65); color: #fff; font-size: 12px; font-weight: 600; cursor: pointer; }
.photo-grid--edit input:checked + span { background: var(--danger); }
.photo-grid--edit label:has(input:checked) { opacity: .55; }
.info-photos { margin-top: 12px; }
.photo-drop { position: relative; display: grid; place-items: center; gap: 10px; min-height: 120px; padding: 16px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); cursor: pointer; }
.photo-drop--sm { min-height: 76px; margin-bottom: 14px; }
.photo-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-drop__previews { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; pointer-events: none; }
.photo-drop__previews span { width: 56px; height: 56px; border-radius: 10px; background: center / cover; }
/* photos picked so far (app.js), under the drop area, each with an x */
.photo-picked { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.photo-picked:empty { display: none; }
.photo-picked span { position: relative; width: 72px; height: 72px; border-radius: 12px; background: var(--surface-2) center / cover no-repeat; }
.photo-picked button { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; width: 24px; height: 24px; padding: 0;
  border: 2px solid var(--surface); border-radius: 50%; background: var(--text); color: var(--bg); font-size: 16px; line-height: 1; cursor: pointer; }

/* Photo viewer (app.js, links with data-lightbox): the photo full screen with previous / next */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 56px 16px; border: 0; background: rgba(6, 10, 8, .94); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(6, 10, 8, .6); }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 112px); border-radius: 12px; object-fit: contain; }
.lightbox__btn { position: fixed; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.lightbox__btn:hover { background: rgba(255, 255, 255, .24); }
.lightbox__x { top: 14px; right: 14px; }
.lightbox__prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 14px; top: 50%; transform: translateY(-50%); }
.lightbox.is-single .lightbox__prev, .lightbox.is-single .lightbox__next { display: none; }
.lightbox__count { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); font-size: 14px; color: rgba(255, 255, 255, .8); }
.photo-drop.has-photos { border-style: solid; }

/* Home: cabin book strip (the mockup's horizontal cards) */
.strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip-card { flex: 0 0 150px; scroll-snap-align: start; }
.strip-card__media { display: block; height: 112px; background: var(--surface-2) url(../img/cabin-placeholder.svg) center 70% / cover no-repeat; }
.strip-card__body { display: block; padding: 10px 12px 12px; }
.strip-card__body b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-card__body small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* PWA install card */
.install-card { display: flex; gap: 14px; align-items: flex-start; }
.install-card .note__icon { overflow: hidden; padding: 0; border: 0; border-radius: 12px; }
.install-card .note__icon img { display: block; width: 46px; height: 46px; }
.install-btn { margin-top: 12px; width: auto; padding: 0 56px 0 20px; }

/* Avatars, Meg */
.avatar { width: 40px; height: 40px; flex: none; display: inline-grid; place-items: center; border-radius: 50%; background: var(--hb-soft, var(--surface-2)) center / cover no-repeat; color: var(--hb, var(--good)); font-weight: 700; }
.avatar--lg { width: 64px; height: 64px; font-size: 26px; }
.me-head__who { display: flex; align-items: center; gap: 14px; min-width: 0; }
.me-head .page-sub { overflow: hidden; text-overflow: ellipsis; }
.avatar-pick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.avatar-pick .btn-chip { cursor: pointer; }
.avatar-pick .check-row { margin: 0; }
.cabin-row { gap: 6px; }
.cabin-row__main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.cabin-row__main .row__main { display: block; }
.cabin-row__main .row__title, .cabin-row__main .row__sub { display: block; }
.cabin-row__main .row__title { overflow-wrap: anywhere; }

.join-as { margin-bottom: 14px; color: var(--muted); }
.join-login { margin-top: 10px; }
.me-logout { margin-top: 12px; }
/* Me: two columns on desktop; the account choices (language, appearance) as tap-to-save buttons in a sheet */
.me-cols { display: grid; gap: 12px; }
.me-cols .sec-head { margin-top: 4px; }
.sheet-form .avatar-pick { margin-bottom: 4px; }
.choice-list { display: grid; gap: 8px; }
.choice-list button { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 52px; padding: 0 16px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--input-bg); color: var(--text); font: 500 16px/1 var(--font-sans); cursor: pointer; }
.choice-list button.is-active { border-color: var(--accent); background: var(--accent-soft); }
.choice-list button .i { color: var(--good); }
@media (min-width: 1024px) {
  .me-head + .main.narrow { max-width: 1240px; }
  .me-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .me-foot { max-width: 420px; margin: 28px auto 0; }   /* log out + links centred under both columns */
}

/* Desktop */
@media (min-width: 1024px) {
  .auth { justify-content: center; padding-left: max(48px, 8vw); padding-right: 48px; }
  .auth::before, .auth::after { bottom: 0; height: auto; }
  .auth::before { -webkit-mask-image: none; mask-image: none; }
  .auth::after { background: linear-gradient(90deg, rgba(8, 14, 10, .62) 0%, rgba(8, 14, 10, .3) 45%, rgba(8, 14, 10, 0) 75%); }
  .auth .legal-links { color: rgba(255, 255, 255, .8); }
  .auth .legal-links a { color: inherit; }
  .auth__inner { margin: 0; }
  .auth__brand { left: max(48px, 8vw); top: 32px; }
  .auth__title { font-size: 48px; }
  /* Icon rail: logo, the 5 tabs as icon + small label, the cabin thumb (switch / settings) at the bottom */
  .nav {
    top: 0; right: auto; bottom: 0;
    width: var(--side-w); height: auto;
    flex-direction: column; align-items: center;
    padding: 20px 8px;
    background: var(--surface);
    border-top: 0; border-right: 1px solid var(--line);
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .subpage .nav { display: flex; }
  .nav__brand { display: flex; padding-bottom: 22px; font-size: 0; }   /* the mark only, the name is in the panel */
  .nav__brand .brand-mark { width: 42px; height: 42px; }
  .nav__list { flex: 0 0 auto; flex-direction: column; gap: 6px; width: 100%; padding: 0; }
  .nav__link { gap: 5px; height: 64px; padding: 0 4px; border-radius: 14px; font-size: 11.5px; text-align: center; }
  .nav__link:hover { background: var(--surface-2); }
  .nav__link.is-active { background: var(--accent-soft); }
  .nav__cabin { display: block; margin-top: auto; padding: 0; border-radius: 12px; }
  .nav__cabin > span:not(.nav__thumb), .nav__cabin > .i { display: none; }
  .nav__thumb { display: block; width: 46px; height: 46px; border-radius: 12px; background: url(../img/cabin-placeholder.svg) center 70% / cover; box-shadow: 0 0 0 1px var(--line); }
  .nav__cabin:hover .nav__thumb { box-shadow: 0 0 0 2px var(--accent); }

  .shell { margin-left: var(--side-w); }
  .main { max-width: 1240px; margin: 0; padding: 24px 32px 48px; }
  .carousel { margin: 0; padding: 2px 0 12px; scroll-padding: 0; }   /* inside a grid column: no edge-to-edge bleed */
  /* the tiles become a full-width row of small cards: icon left, name + a short line */
  .tiles { gap: 12px; margin: 24px 0 20px; }   /* same space above as below (the switch above has none) */
  .tile { flex-direction: row; gap: 12px; padding: 12px 14px; border: 1px solid var(--card-line); border-radius: var(--radius-sm);
    background: var(--surface); box-shadow: var(--shadow); font-size: 15px; text-align: left; }
  .tile:hover { border-color: var(--good); }
  .tile__icon { flex: none; width: 44px; height: 44px; border: 0; background: var(--accent-soft); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .tile__icon .i { width: 22px; height: 22px; }
  .tile__sub { display: block; margin-top: 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12.5px; font-weight: 400; color: var(--muted); }

  .hero { height: 360px; margin: 24px 32px 0; border-radius: 28px; overflow: hidden; background-size: cover; background-position: center 64%; }
  .hero--photo { background-position: var(--focus, center 64%); }
  .hero::after { background: linear-gradient(90deg, rgba(8, 14, 10, .62) 0%, rgba(8, 14, 10, .15) 55%, rgba(8, 14, 10, 0) 100%); }
  .hero__bar { left: 24px; right: 24px; top: 20px; }
  .hero__bar .brand-mark { visibility: hidden; }
  .hero__text { top: auto; bottom: 40px; left: 40px; }
  .hero__title { font-size: 64px; }
  .hero__place--serif { font-size: 24px; }

  .home-grid {
    margin-top: 0; gap: 20px; align-items: start;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "fair next next"
      "weather next next"
      "minis next next"
      "note upcoming upcoming";
  }
  .home-grid--simple { grid-template-areas: none; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; }
  .home-grid--simple > .home-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-content: start; min-width: 0; }
  /* Home fairness card: score | parts over nights | your ring */
  .score--home { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) auto; gap: 4px 24px; }
  .score--home .score__split { display: block; }
  .score__split .split { margin: 0; padding: 0; border: 0; }
  .cabin-grid { margin-top: 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  /* both columns start with a heading ("Weather" is desktop only), so their first cards line up */
  .cabin-grid > .stack > section:first-child > .sec-head { margin-top: 0; }
  .sec-head--desk { display: flex; }
  .home-book { grid-column: 1 / -1; }
  .strip { margin: 0; padding-left: 0; padding-right: 0; }
  .strip-card { flex-basis: 190px; }
  .book-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .booking-grid .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }   /* a Cabin book entry: big enough to see */
  .book-entry-page .booking-grid:not(:has(.photo-grid)) { grid-template-columns: minmax(0, 820px); }   /* no photos: the text takes the width */
  /* Cabin book form: photos left, the words right */
  .form-page .main:has(.book-form) { max-width: 1240px; }
  .book-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 0 28px; align-items: start; }
  .book-form > .alert { grid-column: 1 / -1; }
  .book-form .photo-drop { min-height: 180px; }
  .hero--short { height: 300px; }
  .hero--short .hero__text { bottom: 40px; }
  .hero--strip { height: 220px; }
  .hero--strip .hero__text { bottom: 32px; }
  .hero--strip .hero__title { font-size: 48px; }
  .hero--long .hero__title { font-size: 48px; }
  .hero--strip.hero--long .hero__title { font-size: 36px; }
  .hero--strip.hero--long .hero__text { bottom: 32px; }
  .hero--strip + .main { margin-top: 0; }
  .booking-grid { margin-top: 0; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
  .d span { width: 30px; height: 30px; }
  .page-head { max-width: 1240px; margin: 0; padding: 10px 32px 22px; }
  .page-head .steps { max-width: 640px; }
  .form-page .main { max-width: 704px; }
  .area--next { align-self: stretch; display: flex; flex-direction: column; }
  .area--next .card { flex: 1; display: flex; flex-direction: column; }
  .home-grid .card--glass { background: var(--surface); border-color: var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .area--fair { grid-area: fair; }
  .area--next { grid-area: next; }
  .area--minis { grid-area: minis; }
  .area--weather { grid-area: weather; }
  .area--note { grid-area: note; }
  .area--upcoming { grid-area: upcoming; }
  .area--next .sec-head, .area--weather .sec-head { display: none; }

  .topbar { max-width: 1240px; margin: 0; padding: 32px 32px 0; }
  .page-title { font-size: 44px; }
  .cal-page .main, .prep-page .main { padding-bottom: 48px; }
  /* Every view is one column now (no side sections); the List timeline keeps a readable width */
  .cal-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
  .cal-layout--list > div:first-child { max-width: 820px; }
  .cal-layout--month .cal { --bar-top: 44px; --bar-h: 22px; }
  .cal-layout--month .bar, .cal-layout--month .dchip { font-size: 12px; }
  .cal-layout--month .dchip b { display: none; }
  .cal-layout--month .dchip em { display: block; }
  .cal__wk { padding-top: 10px; font-size: 11px; }
  .cal-layout .seg { max-width: 360px; margin-top: 0; }
  .seg--tabs { width: max-content; max-width: 100%; }   /* as wide as its tabs (4 since Expenses), not squeezed */
  .seg--tabs a { flex: 0 0 auto; min-width: 150px; padding: 0 26px; }
  .cal { --bar-top: 40px; --bar-h: 18px; }
  .d { padding-top: 5px; font-size: 15px; }
  .bar { font-size: 11px; letter-spacing: 0; }
  .bar b { display: none; }
  .bar em { display: block; }
  .dchip { font-size: 11px; }
  .dchip.more { padding: 0 6px; }
  .fab, .bottom-cta { position: relative; left: auto; bottom: auto; transform: none; width: 100%; box-shadow: none; }

  .prep-layout { grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 24px; align-items: start; }
  .prep-layout .sec-head { margin-top: 0; }
  .prep-back { display: none; }
  .legal-page .shell { margin: 0 auto; max-width: 800px; }   /* no sidebar on the public legal pages */
}

/* Big screens: fixed cabin photo panel | icon rail | content. The panel shows the cabin photo, so Home's hero and
   the photo strips become a plain title row: the page's line (greeting / kicker) big, cabin + place small. */
@media (min-width: 1280px) {
  .panel {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 20; isolation: isolate;
    display: flex; flex-direction: column; justify-content: space-between;
    width: var(--panel-w); padding: 32px 40px 48px;
    color: #fff;
    background: #1b2a24 url(../img/cabin-placeholder.svg) center bottom / cover no-repeat;
  }
  .panel.hero--photo { background-size: cover; background-position: var(--focus, center); }
  .panel::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgba(8, 14, 10, .45) 0%, rgba(8, 14, 10, 0) 28%, rgba(8, 14, 10, .15) 55%, rgba(8, 14, 10, .7) 100%);
  }
  .panel__brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; letter-spacing: -.01em; color: #fff; }
  .panel__brand .brand-mark { width: 38px; height: 38px; }
  .panel__brand .brand-mark .i { width: 26px; height: 26px; }
  .panel__text { text-shadow: 0 1px 14px rgba(0, 0, 0, .35); }
  .panel__name { font-size: 56px; line-height: 1.04; font-variation-settings: "opsz" 120; overflow-wrap: anywhere; }
  .panel__place { margin-top: 6px; font-size: 24px; font-weight: 450; line-height: 1.2; color: #b9e08e; font-variation-settings: "opsz" 36; }

  .has-panel .nav { left: var(--panel-w); }
  .has-panel .shell { margin-left: calc(var(--panel-w) + var(--side-w)); }

  .has-panel .hero.hero--fixed, .has-panel .hero.hero--strip {
    height: auto; max-width: 1240px; margin: 0; padding: 36px 32px 8px; border-radius: 0; overflow: visible;
    background: none !important; color: var(--text);
  }
  .has-panel .hero.hero--fixed::before, .has-panel .hero.hero--strip::before,
  .has-panel .hero.hero--fixed::after, .has-panel .hero.hero--strip::after { display: none; }   /* no photo shading on the plain row */
  .has-panel .hero.hero--fixed .hero__text, .has-panel .hero.hero--strip .hero__text { position: static; padding-right: 150px; text-shadow: none; }
  .has-panel .hero.hero--fixed .hero__greet, .has-panel .hero.hero--strip .hero__greet {
    margin: 0 0 6px; font-family: var(--font-serif); font-size: 44px; font-weight: 500; line-height: 1.1; opacity: 1;
    font-variation-settings: "opsz" 120; letter-spacing: -.01em;
  }
  /* cabin name + place are on the photo panel: not repeated here; Home shows today's date instead */
  .has-panel .hero.hero--fixed .hero__title, .has-panel .hero.hero--strip .hero__title,
  .has-panel .hero.hero--fixed .hero__place, .has-panel .hero.hero--strip .hero__place,
  .has-panel .hero.hero--fixed .hero__rule { display: none; }
  .has-panel .hero.hero--fixed .hero__date { display: block; margin: 0; font-size: 15px; font-weight: 500; color: var(--muted); }
  .has-panel .nav__brand { display: none; }   /* the panel has the logo */
  .has-panel .hero.hero--fixed .hero__bar, .has-panel .hero.hero--strip .hero__bar { left: auto; right: 32px; top: 40px; }
  .has-panel .hero.hero--fixed .hero__bar .brand-mark, .has-panel .hero.hero--strip .hero__bar .brand-mark { display: none; }
  .has-panel .hero.hero--fixed .icon-btn, .has-panel .hero.hero--strip .icon-btn {
    color: var(--text); background: var(--surface); border-color: var(--line); box-shadow: var(--shadow);
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
}

/* Landing page (visitors, index.php) */
html:has(.landing-page) { scroll-behavior: smooth; }   /* the bar links and "See how it works" jump down the page */
/* Hero: the cabin photo nearly full screen, darker overlay, wave into the page. Phones: text + buttons only. */
.land-hero {
  position: relative; isolation: isolate; color: #fff;
  display: flex; flex-direction: column; min-height: min(78svh, 680px);   /* phones: the next heading peeks in, whole */
  padding: calc(14px + env(safe-area-inset-top)) 16px 120px;   /* the buttons stay on the dark part, above the fade */
  background: #1b2a24 url(../img/cabin-placeholder.svg) center bottom / cover no-repeat;
}
.land-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(8, 14, 10, .7) 0%, rgba(8, 14, 10, .5) 45%, rgba(8, 14, 10, .45) 78%, rgba(var(--hero-fade), .55) 93%, rgb(var(--hero-fade)) 100%);
}
.land-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; max-width: 1080px; margin: 0 auto; }
.land-brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; }
.land-nav { display: none; }
.land-bar__end { display: flex; align-items: center; gap: 8px; }
.land-lang { padding: 0 6px; font-size: 14px; font-weight: 600; opacity: .9; }   /* "English" / "Norsk": the other language, one tap */
.land-lang:hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }
.land-login {
  height: 40px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: 999px;
  font-size: 14px; font-weight: 600; background: rgba(14, 22, 17, .42); border: 1px solid rgba(255, 255, 255, .2);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.land-hero__inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; width: 100%; max-width: 1080px; margin: auto auto 0; padding-top: 40px; }
.land-hero__text { text-shadow: 0 1px 14px rgba(0, 0, 0, .35); }
.land-kicker {
  display: inline-flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: #fff; text-shadow: none;
  background: rgba(14, 22, 17, .4); border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.land-kicker__icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(207, 232, 180, .18); color: #cfe8b4; }
.land-kicker__icon .i { width: 16px; height: 16px; }
.land-title { margin-top: 18px; font-size: 46px; line-height: 1.02; font-variation-settings: "opsz" 120; text-wrap: balance; }
.land-h2 { text-wrap: balance; }
.land-lead { margin-top: 16px; max-width: 30em; font-size: 18px; line-height: 1.5; opacity: .94; }
.land-cta { display: grid; gap: 10px; margin-top: 28px; }   /* phones: full width */
.btn--light { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .3); text-shadow: none; }
.btn--light:hover { background: rgba(255, 255, 255, .2); }
.land-ticks { display: none; list-style: none; margin: 28px 0 0; padding: 0; gap: 28px; font-size: 15px; font-weight: 500; }
.land-ticks li { display: flex; align-items: center; gap: 9px; }
.land-ticks .i { width: 20px; height: 20px; color: #cfe8b4; }
.land-preview { display: none; }
/* Short phone screens (Safari with its bars: ~600-650 px visible): the hero is as tall as its content there, so
   tighten the spacing; the next heading's first line then shows on load and the buttons stay on the dark part */
@media (max-width: 639px) and (max-height: 760px) {
  .land-hero { padding-bottom: 88px; }
  .land-hero__inner { padding-top: 18px; }
  .land-title { margin-top: 14px; }
  .land-lead { margin-top: 12px; }
  .land-cta { margin-top: 20px; }
  .land-sec.land-problem { margin-top: 12px; }
}
.land-wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: 36px; fill: rgb(var(--hero-fade)); }

/* Hero preview (desktop): the month grid with stays, the fairness card over its lower right corner */
/* the fairness card sits low and far right, so it only covers the empty bottom corner of the month */
.land-preview { position: relative; color: var(--text); padding: 0 140px 130px 0; }
.land-cal { width: 100%; max-width: 420px; padding: 16px 18px 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.land-cal__head, .land-fair__head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-family: var(--font-serif); font-size: 18px; }
.land-cal__head .i, .land-fair__head .i { width: 18px; height: 18px; color: var(--good); }
.land-cal__dow, .land-cal__wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); column-gap: 2px; }
.land-cal__dow span { font-size: 11px; color: var(--muted); text-align: center; padding-bottom: 4px; }
.land-cal__wk { grid-template-rows: 18px 22px; row-gap: 2px; padding: 4px 0; border-top: 1px solid var(--line); }
.land-cal__d { grid-row: 1; font-size: 11px; color: var(--muted); text-align: center; }
.land-cal__bar {
  grid-row: 2; display: flex; align-items: center; padding: 0 9px; border-radius: 999px; overflow: hidden; white-space: nowrap;
  font-size: 11.5px; font-weight: 600; color: var(--text); background: var(--hb-soft); box-shadow: inset 3px 0 0 var(--hb);
}
.land-fair { position: absolute; right: 0; bottom: 0; width: 220px; padding: 16px 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.land-fair__ring { margin: 4px auto 12px; width: 96px; height: 96px; }
.land-fair__ring .ring__center b { font-size: 28px; }
.land-fair__ring .ring__center small { position: absolute; top: calc(50% + 16px); left: 0; right: 0; margin: 0; }   /* 92 exactly in the middle, "Score" under it */
@property --n { syntax: "<integer>"; inherits: false; initial-value: 0; }
.land-count { counter-reset: n var(--n); }   /* on the element itself: --n doesn't inherit into ::after */
.land-count::after { content: counter(n); }

/* Hero entrance, once on load: calendar up, bars drawn, fairness card in from the right, ring fills while 92 counts up */
@media (prefers-reduced-motion: no-preference) {
  .land-preview .land-cal { animation: land-up .7s cubic-bezier(.2, .7, .2, 1) .15s backwards; }
  .land-preview .land-cal__bar { animation: land-draw .6s ease-out backwards; }
  .land-preview .land-cal__wk:nth-of-type(2) .land-cal__bar { animation-delay: .6s; }
  .land-preview .land-cal__wk:nth-of-type(3) .land-cal__bar { animation-delay: .8s; }
  .land-preview .land-cal__wk:nth-of-type(5) .land-cal__bar { animation-delay: 1s; }
  .land-preview .land-fair { animation: land-in .8s cubic-bezier(.2, .7, .2, 1) .9s backwards; }
  .land-preview .ring__bar { animation: land-ring 1.4s cubic-bezier(.3, .6, .2, 1) 1.2s backwards; }
  .land-preview .land-count { animation: land-num 1.4s cubic-bezier(.3, .6, .2, 1) 1.2s backwards; }
}
/* Scroll reveal (app.js: data-reveal gets is-hidden below the screen, then is-in): fade up; the example comes a
   moment after its text, then its bars draw, 92 counts up and the "live" note pops in */
[data-reveal] { transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
[data-reveal].is-hidden { opacity: 0; transform: translateY(32px); }
.land-row__demo[data-reveal], .land-demo[data-reveal] { transition-delay: .15s; }
.land-demo.is-in .sharebar { animation: land-draw .9s ease-out .5s backwards; }
.land-demo.is-in .land-count { animation: land-num 1.4s cubic-bezier(.3, .6, .2, 1) .5s backwards; }
.land-row__demo.is-in .land-cal__bar { animation: land-draw .6s ease-out .6s backwards; }
.land-row__demo.is-in .land-chip { animation: land-pop .5s cubic-bezier(.3, 1.4, .5, 1) 1s backwards; }
@keyframes land-pop { from { opacity: 0; transform: translateY(10px) scale(.9); } }
@keyframes land-up { from { opacity: 0; transform: translateY(24px); } }
@keyframes land-in { from { opacity: 0; transform: translateX(40px); } }
@keyframes land-draw { from { clip-path: inset(0 100% 0 0 round 999px); } to { clip-path: inset(0 0 0 0 round 999px); } }
@keyframes land-ring { from { stroke-dasharray: 0 100; } }
@keyframes land-num { from { --n: 0; } }
.land-fair__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 13.5px; }
.land-fair__list li { display: flex; align-items: center; gap: 8px; }
.land-fair__list b { margin-left: auto; font-weight: 600; }
.land-fair__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--hb); }

.land-demo { color: var(--text); width: 100%; padding: 18px; }
.land-demo__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.land-demo__score { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 40px; font-weight: 700; line-height: 1; }
.land-demo .row__title { display: flex; align-items: center; gap: 4px; }
.land-demo__head .score__tag { padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); }
.land-demo__split { margin-top: 12px; }
.land-demo__note { margin: 8px 2px 0; font-size: 12.5px; color: var(--muted); }
.land-demo__tl { margin-top: 14px; gap: 8px; }
.land-demo__tl .tl__card { padding: 10px 12px; box-shadow: none; }
.land-demo__tl .avatar { width: 34px; height: 34px; font-size: 14px; }

.land-main { padding: 8px 0 32px; }
.land-wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.land-sec { margin-top: 64px; }
.land-band + .land-wrap > .land-sec:first-child { margin-top: 48px; }

/* The problem: before and after */
.land-problem .land-h2 { max-width: 20em; }
.land-sec.land-problem { margin-top: 20px; }
.land-ba { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.land-ba__card h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 17px; font-weight: 600; }
.land-ba__card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.land-ba__card li { display: flex; gap: 10px; align-items: flex-start; }
.land-ba__card li .i { flex: none; margin-top: 4px; stroke-width: 2.4; }
.land-ba__card--before { background: var(--surface-2); border-color: transparent; box-shadow: none; color: var(--muted); }
.land-ba__card--before h3 { color: var(--text); }
.land-ba__card--before li .i { color: var(--warn); }
.land-ba__card--after { border-color: var(--good); }
.land-ba__card--after li .i { color: var(--good); }
.land-ba__card .brand-mark { width: 30px; height: 30px; border-radius: 9px; }
.land-ba__card .brand-mark .i { width: 20px; height: 20px; }

/* Fairness band: full width, dark forest green in both themes, with the example card */
.land-band {
  margin-top: 56px; padding: 44px 0; color: #fff;
  background: radial-gradient(120% 140% at 85% 0%, #2f5a3c 0%, rgba(47, 90, 60, 0) 60%), #1a2e22;
}
.land-band__inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center; }
.land-band__kicker { display: flex; align-items: center; gap: 8px; margin: 0 4px 10px; font-size: 14px; font-weight: 600; color: #cfe8b4; }
.land-band__kicker .i { width: 18px; height: 18px; }
.land-band .land-h2 { color: #fff; }
.land-band__lead { margin: 0 4px; font-size: 17px; line-height: 1.5; opacity: .9; }
.land-band__points { list-style: none; margin: 22px 4px 0; padding: 0; display: grid; gap: 12px; }
.land-band__points li { display: flex; align-items: center; gap: 12px; }
.land-band__icon { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(207, 232, 180, .14); color: #cfe8b4; }
.land-band__icon .i { width: 17px; height: 17px; }
.land-band .land-demo { box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }

/* Product tour: text + a small mock per row; desktop alternates the sides */
.land-tour { margin-top: 64px; }
.land-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 28px; }
.land-row + .land-row { margin-top: 44px; }
.land-row__kicker { display: flex; align-items: center; gap: 10px; margin: 0 4px 10px; font-size: 14px; font-weight: 600; color: var(--good); }
.land-row__kicker .note__icon { width: 34px; height: 34px; }
.land-row__text h3 { margin: 0 4px 8px; font-size: 26px; font-weight: 500; line-height: 1.15; }
.land-row__text > p:not(.land-row__kicker) { margin: 0 4px; color: var(--muted); font-size: 16px; line-height: 1.55; max-width: 30em; }
.land-row__ticks { list-style: none; margin: 16px 4px 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.land-row__ticks li { display: flex; align-items: center; gap: 10px; }
.land-row__ticks .i { flex: none; width: 20px; height: 20px; padding: 4px; border-radius: 50%; background: var(--accent-soft); color: var(--good); stroke-width: 2.6; }
/* the example sits on a stage: a rounded panel in a member colour with a faint dot grid */
.land-row__demo {
  position: relative; display: grid; gap: 12px; align-content: start; width: 100%; max-width: 520px;
  padding: 32px 22px; border-radius: 28px;
  background: radial-gradient(var(--line-strong) 1px, transparent 1.5px) 0 0 / 18px 18px,
              radial-gradient(120% 100% at 0% 0%, var(--hb-soft) 0%, transparent 75%), var(--surface-2);
}
.land-row__demo > .card { box-shadow: 0 14px 40px rgba(16, 32, 22, .14); }
.land-row__demo .land-cal { max-width: none; }
/* a "live" moment on the example: a small note card over its edge */
.land-chip {
  position: absolute; z-index: 1; right: 18px; bottom: 10px; display: flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 6px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap;
  background: var(--surface); color: var(--text); box-shadow: 0 10px 30px rgba(16, 32, 22, .2);
}
.land-chip .avatar { width: 26px; height: 26px; font-size: 11px; }
.land-chip__heart { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #f6dede; color: #c0392b; }
.land-chip__heart .i { fill: currentColor; }
.land-row__demo--book .land-chip { top: 10px; bottom: auto; }
.land-row__demo .book-card__strip { max-width: none; }
.land-cal__free { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--good); }
.land-note-line { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.land-note-line .i { flex: none; margin-top: 2px; color: var(--good); }
.land-note-line b { color: var(--text); font-weight: 600; }

/* Pricing */
.land-sub { margin: -6px 4px 18px; max-width: 36em; color: var(--muted); font-size: 16px; }
.land-plan--premium {
  position: relative; color: #fff; border-color: transparent; box-shadow: 0 24px 60px rgba(16, 32, 22, .28);
  background: radial-gradient(120% 120% at 100% 0%, #2f5a3c 0%, rgba(47, 90, 60, 0) 60%), #1a2e22;
}
.land-plan--premium .land-plan__price, .land-plan--premium li .i { color: #cfe8b4; }
.land-plan__badge {
  position: absolute; top: 16px; right: 16px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 700; background: #cfe8b4; color: #1a2e22;
}
.land-plan__trial { margin: 16px 0 18px; padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .88); }

/* Final section: the cabin photo again, darker, white text */
.land-final {
  position: relative; isolation: isolate; overflow: hidden; margin-top: 48px; padding: 56px 20px; border-radius: var(--radius);
  text-align: center; color: #fff; background: #1b2a24 center 70% / cover no-repeat;
}
.land-final::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8, 14, 10, .55), rgba(8, 14, 10, .75)); }
.land-final .land-h2 { margin: 0 auto 10px; max-width: 18em; color: #fff; }
.land-final p { margin: 0 auto 24px; max-width: 32em; color: rgba(255, 255, 255, .88); font-size: 17px; text-wrap: balance; }
.land-final .btn { max-width: 360px; margin: 0 auto; }
/* "Laget i Norge": a separator over the footer links, a line on each side */
.land-made {
  display: flex; align-items: center; gap: 10px; max-width: 520px; margin: 40px auto 0;
  font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap;
}
.land-made::before, .land-made::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.land-made svg { width: 22px; height: 16px; border-radius: 3px; flex: none; box-shadow: 0 0 0 1px var(--line); }
.land-h2 { margin: 0 4px 16px; font-size: 30px; line-height: 1.12; }
.land-grid, .land-plans { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.land-feature h3, .land-steps h3 { margin: 12px 0 4px; font-size: 17px; font-weight: 600; }
.land-feature p, .land-steps p { color: var(--muted); }
/* phones: the icon left of the title and text (shorter cards); from 640px the icon sits on top */
@media (max-width: 639px) {
  .land-feature { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: start; }
  .land-feature .note__icon { grid-row: span 2; }
  .land-feature h3 { margin-top: 2px; }
}
/* Guides (guide.php, include/guides.php), "magazine" 2026-11-23: photo header, summary card, numbered headings,
   table of contents on the right (desktop), the HytteOS part as a dark green card. Cards also on the landing (#guider). */
.guide-hero {
  position: relative; isolation: isolate; color: #fff;
  padding: calc(14px + env(safe-area-inset-top)) 16px 84px;
  background: #1b2a24 center / cover no-repeat;
}
.guide-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(8, 14, 10, .72) 0%, rgba(8, 14, 10, .55) 50%, rgba(8, 14, 10, .5) 80%, rgba(var(--hero-fade), .6) 94%, rgb(var(--hero-fade)) 100%);
}
.guide-hero__in { max-width: 1080px; margin: 0 auto; }
.guide-hero__text { max-width: 760px; padding-top: 48px; text-shadow: 0 1px 14px rgba(0, 0, 0, .35); }
.guide-crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; font-size: 13px; opacity: .85; }
.guide-crumbs a { color: #fff; }
.guide-crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.guide-hero .land-kicker { margin: 0; }
.guide__title { margin: 16px 0 10px; font-size: 36px; line-height: 1.08; font-variation-settings: "opsz" 120; text-wrap: balance; }
.guide__meta, .guide__sub { margin: 0; font-size: 14px; opacity: .85; }
.guide__sub { max-width: 34em; font-size: 17px; line-height: 1.5; opacity: .92; }

.guide-main { max-width: 1112px; margin: -40px auto 0; padding: 0 16px 28px; position: relative; }
.guide-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.guide { min-width: 0; max-width: 720px; }
.guide-sum { padding: 18px 20px 20px; }
.guide-sum__h { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--good); }
.guide-sum ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.guide-sum li { display: flex; align-items: flex-start; gap: 10px; font-size: 16px; line-height: 1.45; font-weight: 500; }
.guide-sum .i { flex: none; width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--accent); color: var(--accent-text); }

.guide__body { margin-top: 26px; font-size: 16.5px; line-height: 1.72; }
.guide__lead { margin: 0 0 8px; font-family: var(--font-serif); font-size: 21px; line-height: 1.5; font-variation-settings: "opsz" 24; }
.guide__body h2 { display: flex; align-items: center; gap: 12px; margin: 40px 0 10px; font-size: 22px; line-height: 1.3; font-weight: 600; scroll-margin-top: 20px; }
.guide-n {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-size: 15px; font-weight: 700; background: var(--accent-soft); color: var(--good);
}
.guide__body p { margin: 0 0 14px; }
.guide__body ul { margin: 0 0 16px; padding-left: 22px; list-style: disc; }
.guide__body li { margin-bottom: 7px; }
.guide__body li::marker { color: var(--good); }
.guide__body a { color: var(--good); text-decoration: underline; text-underline-offset: 2px; }
.guide__body ul.guide-check { list-style: none; padding: 6px 18px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--card-line); }
.guide-check li { position: relative; margin: 0; padding: 10px 0 10px 32px; border-top: 1px solid var(--line); line-height: 1.5; }
.guide-check li:first-child { border-top: 0; }
.guide-check li::before {
  content: ""; position: absolute; left: 0; top: 12px; width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--line-strong);
}

.guide-table { width: 100%; margin: 6px 0 20px; border-collapse: separate; border-spacing: 0; font-size: 15px;
  background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow); border: 1px solid var(--card-line); overflow: hidden; }
.guide-table th, .guide-table td { padding: 11px 14px; text-align: left; border-top: 1px solid var(--line); }
.guide-table thead th { border-top: 0; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
.guide-table td:first-child { font-weight: 600; }
.guide-who { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.guide-who::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--hb); }

/* the worked example: one bar per person, the fair share as a dashed line */
.guide-example { margin: 6px 0 20px; padding: 16px 18px 18px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--card-line); }
.guide-example figcaption { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 14px; font-size: 13px; font-weight: 600; color: var(--muted); }
.guide-example__share { color: var(--good); }
.guide-example__rows { display: grid; gap: 12px; }
.guide-example__rows p { margin: 0; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "name bar n" ". d d"; align-items: center; gap: 4px 12px; font-size: 15px; }
.guide-example__name { grid-area: name; font-weight: 600; }
.guide-example__bar { grid-area: bar; position: relative; height: 12px; border-radius: 999px; background: var(--track); }
.guide-example__bar i { display: block; height: 100%; border-radius: 999px; background: var(--hb); }
.guide-example__bar::after { content: ""; position: absolute; top: -5px; bottom: -5px; left: var(--share); border-left: 2px dashed var(--text); opacity: .45; }
.guide-example__n { grid-area: n; font-weight: 600; font-variant-numeric: tabular-nums; }
.guide-example__d { grid-area: d; justify-self: end; font-size: 13px; color: var(--muted); }
.guide-example__d.is-over { color: var(--warn); }
.guide-example__d.is-under { color: var(--good); }

/* the HytteOS part: dark green like the landing band */
.guide-app {
  margin-top: 40px; padding: 26px 22px 24px; border-radius: var(--radius); color: #fff;
  background: radial-gradient(120% 140% at 90% 0%, #2f5a3c 0%, rgba(47, 90, 60, 0) 60%), #1a2e22;
}
.guide-app__kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 14px; font-weight: 600; color: #cfe8b4; }
.guide-app__kicker .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
.guide-app__kicker .brand-mark .i { width: 22px; height: 22px; }
.guide-app h2 { margin: 0 0 10px; font-size: 26px; color: #fff; }
.guide-app__text p { margin: 0 0 18px; font-size: 16px; line-height: 1.65; opacity: .9; }
.guide-app__note { margin: 12px 0 0; font-size: 13px; opacity: .75; }

.guide-side { display: none; }
.guide-toc { position: sticky; top: 24px; padding: 18px 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--card-line); }
.guide-toc__h { margin: 0 0 10px 6px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.guide-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.guide-toc a { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 10px; font-size: 14px; line-height: 1.3; color: var(--text); }
.guide-toc a:hover { background: var(--accent-soft); }
.guide-toc__n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.guide-toc__n .i { width: 14px; height: 14px; }

.guide-more { margin: 48px 0 14px; font-size: 26px; }
.guide-list { display: grid; gap: 12px; }
.guide-card { display: flex; flex-direction: column; padding: 20px 20px 18px; color: var(--text); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.guide-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: 0 2px 4px rgba(30, 60, 35, .05), 0 14px 32px rgba(30, 60, 35, .1); }
.guide-card__icon { width: 44px; height: 44px; margin-bottom: 14px; border-radius: 13px; display: grid; place-items: center; background: var(--hb-soft); color: var(--hb); }
.guide-card__icon .i { width: 22px; height: 22px; }
.guide-card h3 { margin: 0 0 6px; font-size: 17px; line-height: 1.35; }
.guide-card p { margin: 0 0 14px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.guide-card__go { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--good); }
.guide-card__go .i { width: 16px; height: 16px; transition: transform .15s ease; }
.guide-card:hover h3 { color: var(--good); }
.guide-card:hover .guide-card__go .i { transform: translateX(3px); }
.guide-main .legal-links { margin-top: 32px; }
/* short pages (the guide list): the footer at the bottom of the window */
body.guide-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.guide-main { flex: 1 0 auto; display: flex; flex-direction: column; width: 100%; }
.guide-main > .land-made { width: 100%; margin-top: auto; padding-top: 56px; }
/* the list page: a taller header, the title lower, close to the cards */
.guide-hero--list { display: flex; flex-direction: column; min-height: 400px; }
.guide-hero--list .guide-hero__in { flex: 1; display: flex; flex-direction: column; width: 100%; }
.guide-hero--list .guide-hero__text { margin-top: auto; padding-top: 32px; }
.guide-app--list { margin-top: 32px; }
@media (min-width: 640px) {
  .guide-hero { padding-bottom: 96px; }
  .guide-hero__text { padding-top: 72px; }
  .guide__title { font-size: 48px; }
  .guide-list { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .land-sec .guide-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .guide-app { padding: 32px 32px 28px; }
  .guide-app .btn { display: inline-flex; width: auto; min-width: 280px; }
}
@media (min-width: 1024px) {
  .guide-hero { padding: 24px 32px 96px; }   /* the bar at the same height as on the front page */
  .guide-hero--list { min-height: min(48vh, 440px); padding-bottom: 96px; }
  .guide-layout { grid-template-columns: minmax(0, 720px) 260px; justify-content: space-between; gap: 56px; }
  .guide-side { display: block; }
}

/* FAQ (landing #faq): folded answers, the text is in the HTML either way. Desktop: intro + contact card left
   (sticky), questions right. */
.land-faq-sec { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.land-faq-side__lead { margin: 8px 0 0; font-size: 16px; line-height: 1.55; color: var(--muted); }
.land-faq-ask { display: none; }
.land-faq { display: grid; gap: 10px; align-content: start; }
.land-faq__item { padding: 0; }
.land-faq__item summary {
  display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 16px 18px;
  font-size: 16px; font-weight: 600; cursor: pointer; list-style: none;
}
.land-faq__item summary::-webkit-details-marker { display: none; }
.land-faq__item summary::after {
  content: '+'; flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-size: 20px; font-weight: 400; line-height: 1; color: var(--good); background: var(--accent-soft);
}
.land-faq__item[open] summary::after { content: '\2212'; background: var(--accent); color: var(--accent-text); }
.land-faq__item p { margin: 0; padding: 0 18px 18px; font-size: 15px; line-height: 1.6; color: var(--muted); }
@media (min-width: 900px) {
  .land-faq-sec { grid-template-columns: 340px minmax(0, 1fr); gap: 48px; align-items: start; }
  .land-faq-side { position: sticky; top: 24px; }
  .land-faq-ask { display: block; margin-top: 24px; padding: 20px; }
  .land-faq-ask__icon { width: 40px; height: 40px; margin-bottom: 12px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--good); }
  .land-faq-ask__icon .i { width: 20px; height: 20px; }
  .land-faq-ask h3 { margin: 0 0 4px; font-size: 17px; }
  .land-faq-ask p { margin: 0 0 14px; font-size: 14px; line-height: 1.5; color: var(--muted); }
  .land-faq-ask__mail { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--good); }
  .land-faq-ask__mail .i { width: 16px; height: 16px; }
  .land-faq-ask__link { display: block; margin-top: 10px; font-size: 14px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
}

/* Steps (2026-11-24): three numbers on a thin line, no cards. Phones: down the left side; desktop: across. */
.land-steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; }
.land-steps li { position: relative; display: flex; gap: 16px; align-items: flex-start; padding-bottom: 28px; }
.land-steps li:last-child { padding-bottom: 0; }
.land-steps li:not(:last-child)::before {
  content: ""; position: absolute; left: 19px; top: 48px; bottom: 6px; width: 2px; border-radius: 2px;
  background: linear-gradient(var(--accent), var(--line-strong));
}
.land-steps h3 { margin: 8px 0 4px; }
.land-steps p { max-width: 24em; }
.land-how__cta { margin-top: 28px; }
.land-step__n {
  flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-text); font-size: 17px; font-weight: 700; box-shadow: 0 0 0 6px var(--accent-soft);
}
.land-plan h3 { font-family: var(--font-serif); font-size: 24px; font-weight: 500; }
/* Plans: the price big in the serif, both buttons at the bottom of equally tall cards */
.land-plan { display: flex; flex-direction: column; }
.land-plan__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 8px 0 20px; font-size: 14px; font-weight: 500; color: var(--muted); }
.land-plan__price b { font-size: 44px; line-height: 1; font-weight: 500; color: var(--text); }
.land-plan ul { margin-bottom: 24px; }
.land-plan > .btn { margin-top: auto; }
.land-plan--premium ul { margin-bottom: 0; }
.land-plan--premium .land-plan__price { color: rgba(255, 255, 255, .72); }
.land-plan--premium .land-plan__price b { color: #fff; }
.land-plan ul { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 9px; }
.land-plan li { display: flex; gap: 9px; align-items: flex-start; }
.land-plan li .i { margin-top: 3px; color: var(--good); stroke-width: 2.4; }

@media (min-width: 640px) {
  .land-grid, .land-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .land-cta { grid-template-columns: auto auto; max-width: none; justify-content: start; }
  .land-cta .btn { width: auto; padding: 0 64px 0 28px; }
  .land-cta .btn--light { padding: 0 28px; }
  .land-ticks { display: flex; flex-wrap: wrap; }
  .land-demo { max-width: 420px; }
  .land-ba { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .land-sec.land-problem { margin-top: 40px; }
}
@media (min-width: 1024px) {
  .land-hero { min-height: min(100vh, 900px); padding: 24px 32px 120px; background-position: 62% 100%; }
  .land-hero::after {
    background: linear-gradient(180deg, rgba(8, 14, 10, .5) 0%, rgba(8, 14, 10, .15) 40%, rgba(8, 14, 10, .1) 72%, rgba(var(--hero-fade), .45) 90%, rgb(var(--hero-fade)) 100%),
                linear-gradient(90deg, rgba(8, 14, 10, .78) 0%, rgba(8, 14, 10, .45) 45%, rgba(8, 14, 10, .05) 75%);
  }
  .land-nav { display: flex; gap: 36px; font-size: 15px; font-weight: 500; }
  .land-nav a { opacity: .9; }
  .land-nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
  .land-nav a[aria-current] { opacity: 1; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
  .land-lead { max-width: 30em; font-size: 20px; }
  .land-hero__inner { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: 48px; margin: auto; padding-top: 48px; }
  .land-title { font-size: 76px; line-height: 1; }
  .land-preview { display: block; justify-self: end; width: 100%; max-width: 560px; }
  .land-wave { height: 72px; }
  .land-wrap { max-width: 1144px; padding: 0 32px; }   /* 1080 content, like the hero */
  .land-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .land-h2 { font-size: 36px; }
  .land-band { padding: 72px 0; }
  .land-band__inner { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 64px; }
  .land-band .land-demo { justify-self: end; }
  .land-band .land-h2 { font-size: 40px; }
  .land-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; margin-top: 40px; }
  .land-row + .land-row { margin-top: 72px; }
  .land-row:nth-child(odd) .land-row__text { order: 2; }   /* rows 2 and 4 (child 1 is the title): mock left */
  .land-row__demo { justify-self: center; }
  .land-row__text h3 { font-size: 32px; }
  .land-plans { align-items: stretch; }
  /* more air between sections (2026-11-24) */
  .land-sec, .land-tour, .land-band + .land-wrap > .land-sec:first-child, .land-final { margin-top: 128px; }
  .land-band { margin-top: 128px; }
  .land-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .land-steps li { flex-direction: column; gap: 14px; padding-bottom: 0; }
  .land-how { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: start; }
  .land-steps li::before, .land-steps li:not(:last-child)::before { content: ""; position: absolute; left: 56px; right: -20px; top: 19px; bottom: auto; width: auto; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--line-strong)); }
  .land-how__cta { width: auto; margin: 0; padding: 0 64px 0 28px; }   /* centre on the number row (steps have 8px top margin) */
  .land-steps h3 { margin-top: 4px; font-size: 19px; }
  .land-final { padding: 88px 32px; }
  .land-final .land-h2 { font-size: 44px; }
}

/* Landing details (2026-11-24): section kickers, sticky glass bar, FAQ answers that slide open */
.land-eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 4px 10px; font-size: 14px; font-weight: 600; color: var(--good); }
.land-eyebrow .i { width: 18px; height: 18px; }
.land-faq-side .land-eyebrow { margin-left: 0; }
.land-sticky {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; padding: calc(8px + env(safe-area-inset-top)) 16px 8px;
  color: var(--text); background: var(--nav-bg); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  transform: translateY(-110%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s;
}
.land-sticky.is-on { transform: none; visibility: visible; transition: transform .25s ease; }
.land-sticky__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1080px; margin: 0 auto; }
.land-sticky .land-brand { font-size: 16px; color: var(--text); }
.land-sticky .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
.land-sticky .brand-mark .i { width: 24px; height: 24px; }
@media (prefers-reduced-motion: no-preference) {
  .land-faq { interpolate-size: allow-keywords; }
  .land-faq__item::details-content { block-size: 0; overflow: clip; transition: block-size .28s ease, content-visibility .28s allow-discrete; }
  .land-faq__item[open]::details-content { block-size: auto; }
  .land-faq__item summary::after { transition: background-color .2s ease, color .2s ease, transform .28s ease; }
  .land-faq__item[open] summary::after { transform: rotate(180deg); }
}
@media (prefers-reduced-motion: reduce) {
  .land-sticky, .land-sticky.is-on, .guide-card { transition: none; }
  .guide-card:hover { transform: none; }
}
/* Expenses (expenses / expense / expense_edit): cards in a grid, the detail page in two columns on desktop */
.xp-sections { display: grid; gap: 8px; }
/* a count beside a section title (instead of alone at the far right on wide screens) */
.sec-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; margin-left: 6px; padding: 0 7px; border-radius: 999px;
  vertical-align: 2px; font-size: 13px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.xp-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.xp-card { display: grid; gap: 4px; color: inherit; text-decoration: none; }
.xp-card.is-due { box-shadow: inset 4px 0 0 var(--warn), var(--shadow); }
.xp-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.xp-card__title { font-size: 16px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xp-card__amount { font-size: 17px; font-weight: 700; white-space: nowrap; }
.xp-card__sub { font-size: 13px; color: var(--muted); }
.xp-card__progress { display: block; height: 6px; margin-top: 8px; border-radius: 999px; background: var(--track); overflow: hidden; }
.xp-card__progress i { display: block; height: 100%; border-radius: inherit; background: var(--good); }
.xp-card__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.xp-due { color: var(--warn); font-weight: 600; }
.xp-ok { color: var(--good); font-weight: 600; }
.xp-history__amount { font-weight: 600; white-space: nowrap; }
.xp-empty { margin-bottom: 14px; }
.xp-home .note__title { color: var(--warn); }
.xp-hint { margin: -10px 4px 16px 34px; }
.xp-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.xp-col { display: grid; gap: 16px; align-content: start; }
.xp-detail__top { display: flex; justify-content: space-between; align-items: center; }
.xp-detail__title { margin-top: 12px; font-size: 30px; font-weight: 500; line-height: 1.15; }
.xp-detail__amount { margin-top: 4px; font-size: 26px; font-weight: 700; }
.xp-detail__note { margin-top: 14px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.xp-receipts { display: flex; gap: 8px; margin-top: 14px; }
.xp-receipts a { width: 76px; height: 76px; border-radius: 12px; background: var(--surface-2) center / cover no-repeat; }
.xp-share-list { list-style: none; margin: 0; padding: 0; }
.xp-share-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.xp-share-list li:first-child { border-top: 0; }
.xp-share-list .avatar { width: 36px; height: 36px; font-size: 14px; flex: none; }
.xp-share__main { flex: 1; min-width: 0; }
.xp-share-list li.is-paid .row__title { color: var(--muted); }
.xp-tick { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--good); }
.xp-payto { margin: 10px 0 0; }
.xp-bill { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding: 12px 14px;
  border-radius: 12px; background: var(--warn-soft); }
.xp-bill p { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; color: var(--text); flex: 1 1 220px; }
.xp-bill p .i { flex: none; margin-top: 2px; color: var(--warn); }
.xp-payto-pick { margin-top: 4px; }
/* approval: by parts / equal as the app's segmented switch, then the members with their live share */
.xp-split label { flex: 1; position: relative; cursor: pointer; }
.xp-split input { position: absolute; opacity: 0; pointer-events: none; }
.xp-split span { display: block; height: 36px; line-height: 36px; text-align: center; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted); }
.xp-split input:checked + span { background: var(--accent); color: var(--accent-text); }
.xp-split input:focus-visible + span { outline: 2px solid var(--good); outline-offset: 2px; }
.xp-pick { list-style: none; margin: 4px 0 12px; padding: 0; }
.xp-pick li label { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); cursor: pointer; }
.xp-pick li:first-child label { border-top: 0; }
.xp-pick input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--accent); }
.xp-pick .avatar { width: 32px; height: 32px; font-size: 13px; flex: none; }
.xp-pick__name { flex: 1; min-width: 0; display: grid; font-size: 15px; font-weight: 500; }
.xp-pick__name small { font-size: 12px; color: var(--muted); font-weight: 400; }
.xp-pick__share { font-weight: 700; white-space: nowrap; }
@media (min-width: 640px) {
  .xp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .xp-cols { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; }
  .xp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Site admin (admin*.php): made for the big screen, works on a phone. A bar with the sections, then tables and cards. */
.admin-page { background: var(--bg); }
.adm-bar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; padding: 12px 24px;
  background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
}
.adm-bar__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.adm-bar__brand .brand-mark { width: 34px; height: 34px; }
.adm-bar__brand .brand-mark .i { width: 24px; height: 24px; }
.adm-bar__brand small { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--good); }
.adm-nav { display: flex; gap: 4px; }
.adm-nav a { padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--muted); }
.adm-nav a:hover { color: var(--text); background: var(--surface-2); }
.adm-nav a.is-active { color: var(--accent-text); background: var(--accent); }
.adm-bar__back { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.adm-main { max-width: 1280px; margin: 0 auto; padding: 24px 24px 64px; }
.adm-h1 { font-size: 32px; font-weight: 500; line-height: 1.15; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.adm-h1 small { font-family: var(--font-sans, inherit); font-size: 16px; color: var(--muted); }
.adm-h2 { margin: 22px 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.adm-card .adm-h2:first-child, .adm-card__head .adm-h2 { margin-top: 0; }
.adm-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.adm-search .input { width: 320px; max-width: 100%; }
.adm-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.adm-stat { padding: 16px 18px; }
.adm-stat__label { font-size: 13px; color: var(--muted); }
.adm-stat__value { display: block; margin-top: 4px; font-size: 34px; font-weight: 500; line-height: 1.1; }
.adm-stat__sub { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.adm-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 24px; }
.adm-stack { display: grid; gap: 16px; align-content: start; }
.adm-card { padding: 18px; }
.adm-card--flush { padding: 0; overflow: hidden; }
.adm-pad { padding: 18px 18px 0; }
.adm-card__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.adm-table th { padding: 10px 14px; text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
.adm-table td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.adm-table tbody tr:first-child td { border-top: 0; }
.adm-card:not(.adm-card--flush) .adm-table td { padding-left: 0; }
.adm-table tr[data-href] { cursor: pointer; }
.adm-table tr[data-href]:hover td { background: var(--surface-2); }
.adm-table tr.is-faded td { opacity: .55; }
.adm-nowrap { white-space: nowrap; }
.adm-chev { width: 24px; text-align: right; }
.adm-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.adm-who .avatar { width: 34px; height: 34px; font-size: 13px; flex: none; }
.adm-who span { display: grid; min-width: 0; }
.adm-who b { font-weight: 600; }
.adm-who small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-tag { margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-style: normal; font-size: 11px; font-weight: 700; background: var(--accent-soft); color: var(--good); }
.adm-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-family: var(--font-sans, inherit); font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.adm-pill--premium { background: #f5e3c2; color: #7a4d0e; }
.adm-pill--trial { background: var(--accent-soft); color: var(--good); }
.adm-pill--deleted { background: #f3d6d2; color: #8c2f22; }
.adm-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.adm-tabs a { padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--line); }
.adm-tabs a small { margin-left: 4px; font-weight: 500; }
.adm-tabs a.is-active { color: var(--accent-text); background: var(--accent); border-color: transparent; }
.adm-pager { display: flex; gap: 6px; margin-top: 14px; }
.adm-pager a { min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; }
.adm-pager a.is-active { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.adm-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 10px; font-size: 14px; }
.adm-profile { display: flex; align-items: center; gap: 16px; }
.adm-profile > .avatar { width: 64px; height: 64px; font-size: 24px; }
.adm-facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0; font-size: 14px; }
.adm-facts dt { color: var(--muted); }
.adm-facts dd { margin: 0; }
.adm-actions { display: grid; gap: 16px; }
.adm-actions form { display: grid; gap: 8px; }
.adm-actions .field__hint { margin: 0; }
.adm-actions .check-row { gap: 8px; flex-wrap: wrap; }
.adm-date, .check-row input.adm-date { width: auto; height: 38px; padding: 0 10px; }   /* not the 20px radio size of .check-row input */
.adm-temp code { margin-left: 6px; padding: 2px 8px; border-radius: 6px; font-size: 16px; letter-spacing: .05em; background: var(--surface); user-select: all; }
.adm-empty { padding: 4px 0; font-size: 14px; }
.adm-chart { display: flex; align-items: flex-end; gap: 8px; height: 180px; padding-top: 8px; }
.adm-chart__col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.adm-chart__bar { width: 100%; max-width: 34px; min-height: 2px; border-radius: 6px 6px 2px 2px; background: var(--good); }
.adm-chart__n { font-size: 12px; font-weight: 600; }
.adm-chart__wk { font-size: 11px; color: var(--muted); }
@media (min-width: 1024px) {
  .adm-cols { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .adm-cols--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .adm-bar { flex-wrap: wrap; gap: 10px 16px; padding: 10px 16px; }
  .adm-nav { order: 3; width: 100%; overflow-x: auto; }
  .adm-main { padding: 16px 16px 48px; }
  .adm-card--flush { overflow-x: auto; }
}

/* On/off switch (a checkbox with class "switch"), used for the email choices on Me */
input.switch {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 46px; height: 28px; margin: 0;
  border-radius: 999px; background: var(--track); cursor: pointer; transition: background .2s;
}
input.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s;
}
input.switch:checked { background: var(--accent); }
input.switch:checked::after { transform: translateX(18px); }
input.switch:focus-visible { outline: 2px solid var(--good); outline-offset: 2px; }
.email-prefs { list-style: none; margin: 0 0 16px; padding: 0; }
.email-prefs label { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.email-prefs li:first-child label { border-top: 0; }
.email-prefs span { display: grid; gap: 2px; min-width: 0; }
.email-prefs b { font-size: 15px; font-weight: 600; }
.email-prefs small { font-size: 13px; color: var(--muted); }
.auth__forgot { margin: -6px 2px 14px; text-align: right; font-size: 13.5px; }
.auth__forgot a { color: inherit; opacity: .85; text-decoration: underline; text-underline-offset: 3px; }

/* Message banner (admin settings, layout.php): a pill on top of the page; without JS it stays hidden (app.js shows it) */
.msg-banner {
  position: fixed; z-index: 999; top: calc(10px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 32px); display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 16px;
  font-size: 14px; line-height: 1.35; color: var(--text); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.msg-banner[hidden] { display: none; }
.msg-banner > .i { flex: none; color: var(--good); }
.msg-banner button { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--muted); cursor: pointer; }
.adm-note { margin: 8px 2px 0; }
.plan-usage { display: grid; gap: 6px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.plan-usage .stay-list__bar { display: block; height: 6px; }
.plan-usage .stay-list__bar i { background: var(--good); }
.plan-usage .stay-list__bar i.is-full { background: var(--warn); }
.plan-cta { margin-top: 12px; }

/* Premium page (premium.php): price, what Premium gives, the facts about paying, the pay button */
.prem-card { margin-top: 14px; padding: 20px; }
.prem-price { margin: 0 0 14px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.prem-price strong { font-family: var(--font-serif); font-size: 32px; font-weight: 600; line-height: 1.1; }
.prem-price span { font-size: 14px; color: var(--muted); }
.prem-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 15px; }
.prem-list li { display: flex; gap: 9px; align-items: flex-start; }
.prem-list li .i { margin-top: 3px; flex: none; color: var(--good); stroke-width: 2.4; }
.prem-facts { margin: 16px 0 18px; padding: 12px 14px 12px 30px; border-radius: 12px; display: grid; gap: 6px; font-size: 14px; line-height: 1.5; color: var(--muted); background: var(--surface-2); }
.prem-pay { width: 100%; }
.prem-secure { margin-top: 10px; text-align: center; }
.adm-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; }
.adm-tag--blocked { background: #f3d6d2; color: #8c2f22; }

/* "Log in as" banner (admin_banner() in layout.php): on top of everything while the site admin acts as a user */
.imp-banner {
  position: fixed; z-index: 1000; top: calc(8px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: #1a2e22; background: #f5c76a; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); white-space: nowrap;
}
.imp-banner button { height: 30px; padding: 0 14px; border: 0; border-radius: 999px; font: inherit; color: #fff; background: #1a2e22; cursor: pointer; }
