/* PEAK's UI, C2 (docs/peak/arkitektur.md PB13, analysis "PEAK fra bunden"). Loaded on every page
   (app/peak/views.php peak_head_tags()); the page's body has .peak-c2.
   1. The foundation: a cool neutral ground, four tokens per product and theme, a six-step type scale, four radii,
      one shadow, motion tokens – all named --pk-*, then mapped onto app.css' semantic tokens (--bg, --surface, --text,
      --accent …) so every existing page and module takes the new look without being touched. A party type keeps its
      accent, font and art (--fest-*) but no longer colours the whole page.
   2. The frame (app/peak/frame.php): the header, four tabs (a bar on a phone, a rail from 960 px), "Opret", and the
      room's context with its modules. Mobile first; movement only without prefers-reduced-motion. */

/* ---------- 1. Foundation: dark (the default) ---------- */
:root body.peak-c2, :root body.peak-c2[data-fest-type] {
  --pk-ground: #0e111c; --pk-surface: #171b29; --pk-surface-2: #212637; --pk-surface-3: #2a3044;
  --pk-ink: #eceff5; --pk-ink-2: #b3baca; --pk-ink-3: #8e96a8; --pk-line: #262b3b; --pk-edge: #6b7387;
  --pk-ski-solid: #4fc3f7; --pk-ski-on: #071a33; --pk-ski-ink: #7fd3fa; --pk-ski-tint: #13304a;
  --pk-sun-solid: #ffb300; --pk-sun-on: #2a1405; --pk-sun-ink: #ffc94d; --pk-sun-tint: #3a2508;
  --pk-party-solid: #ff3d9a; --pk-party-on: #1b0730; --pk-party-ink: #ff7ab8; --pk-party-tint: #3a1230;
  --pk-home-solid: #eceff5; --pk-home-on: #131726; --pk-home-ink: #eceff5; --pk-home-tint: #212637;
  --pk-shadow: 0 0 0 1px rgb(255 255 255 / 0.06), 0 16px 40px rgb(0 0 0 / 0.45);
  color-scheme: dark;
}
/* ---------- light ---------- */
:root[data-theme="light"] body.peak-c2, :root[data-theme="light"] body.peak-c2[data-fest-type] {
  --pk-ground: #f3f6f8; --pk-surface: #ffffff; --pk-surface-2: #e3e8ee; --pk-surface-3: #d5dce4;
  --pk-ink: #131726; --pk-ink-2: #4a5163; --pk-ink-3: #5c6477; --pk-line: #dde3ea; --pk-edge: #7d8696;
  --pk-ski-solid: #1e63d6; --pk-ski-on: #ffffff; --pk-ski-ink: #1a56bd; --pk-ski-tint: #e6eefb;
  --pk-sun-solid: #ffb300; --pk-sun-on: #2a1405; --pk-sun-ink: #9a4300; --pk-sun-tint: #fff4d6;
  --pk-party-solid: #c2186f; --pk-party-on: #ffffff; --pk-party-ink: #b0165f; --pk-party-tint: #fce7f1;
  --pk-home-solid: #131726; --pk-home-on: #ffffff; --pk-home-ink: #131726; --pk-home-tint: #e3e8ee;
  --pk-shadow: 0 1px 2px rgb(19 23 38 / 0.08), 0 12px 32px rgb(19 23 38 / 0.16);
  color-scheme: light;
}
/* The product's ground: a quiet tint so you can tell where you are – Sun a warm hint of sun, Party a hint of violet
   (its pink stays the accent), Ski a touch more blue than Home's neutral ground. Only the ground and its surfaces shift; text and
   edges stay neutral, so the contrast is the same as on Home. The tint never stands alone: the mark and the product's
   name in the logo say it too. app/peak/frame.php peak_theme_colors() repeats the grounds for the browser's bar. */
:root body.peak-c2[data-peak="ski"] {
  --pk-ground: #0c1220; --pk-surface: #151d2e; --pk-surface-2: #1f283b; --pk-surface-3: #293347; --pk-line: #243045;
}
:root body.peak-c2[data-peak="sun"] {
  --pk-ground: #14120e; --pk-surface: #1d1a15; --pk-surface-2: #28241d; --pk-surface-3: #322d25; --pk-line: #2e2a22;
}
:root body.peak-c2[data-peak="party"] {
  --pk-ground: #110e1c; --pk-surface: #1a1628; --pk-surface-2: #252036; --pk-surface-3: #2f2943; --pk-line: #2b263d;
}
:root[data-theme="light"] body.peak-c2[data-peak="ski"] {
  --pk-ground: #eef3f9; --pk-surface: #ffffff; --pk-surface-2: #dde6f0; --pk-surface-3: #cfdae6; --pk-line: #d9e2ec;
}
:root[data-theme="light"] body.peak-c2[data-peak="sun"] {
  --pk-ground: #f8f4ea; --pk-surface: #ffffff; --pk-surface-2: #ece6d8; --pk-surface-3: #e0d9c8; --pk-line: #e6dfcf;
}
:root[data-theme="light"] body.peak-c2[data-peak="party"] {
  --pk-ground: #f5f2fa; --pk-surface: #ffffff; --pk-surface-2: #e7e2f0; --pk-surface-3: #dbd5e6; --pk-line: #e2dcec;
}
/* The scale, radii and motion are the same in both themes. */
body.peak-c2 {
  --pk-f-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pk-f-display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --pk-fs-1: 0.875rem; --pk-fs-2: 1rem; --pk-fs-3: 1.25rem; --pk-fs-4: 1.75rem; --pk-fs-5: 2.5rem; --pk-fs-6: clamp(3.5rem, 18vw, 6rem);
  --pk-r-1: 6px; --pk-r-2: 14px; --pk-r-3: 24px; --pk-r-pill: 999px;
  --pk-ease-out: cubic-bezier(0.23, 1, 0.32, 1); --pk-ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);
  --pk-dur-press: 100ms; --pk-dur-quick: 180ms; --pk-dur-base: 220ms; --pk-dur-sheet: 300ms;
  --pk2-rail: 248px;
  --pk2-page-max: 1200px; /* Home, a room, the calendar: two columns on a wide screen */
}
/* The product of the page: the room's colour is the product's, never the whole page's. */
body.peak-c2, body.peak-c2[data-peak="home"] { --pk-p-solid: var(--pk-home-solid); --pk-p-on: var(--pk-home-on); --pk-p-ink: var(--pk-home-ink); --pk-p-tint: var(--pk-home-tint); }
body.peak-c2[data-peak="ski"], .peak-c2 [data-peak="ski"] { --pk-p-solid: var(--pk-ski-solid); --pk-p-on: var(--pk-ski-on); --pk-p-ink: var(--pk-ski-ink); --pk-p-tint: var(--pk-ski-tint); }
body.peak-c2[data-peak="sun"], .peak-c2 [data-peak="sun"] { --pk-p-solid: var(--pk-sun-solid); --pk-p-on: var(--pk-sun-on); --pk-p-ink: var(--pk-sun-ink); --pk-p-tint: var(--pk-sun-tint); }
body.peak-c2[data-peak="party"], .peak-c2 [data-peak="party"] { --pk-p-solid: var(--pk-party-solid); --pk-p-on: var(--pk-party-on); --pk-p-ink: var(--pk-party-ink); --pk-p-tint: var(--pk-party-tint); }

/* The mapping onto app.css' tokens: the existing pages and modules take the new ground, surfaces, text and accent. */
:root body.peak-c2, :root body.peak-c2[data-fest-type], :root[data-theme="light"] body.peak-c2, :root[data-theme="light"] body.peak-c2[data-fest-type] {
  --bg: var(--pk-ground); --bg-glow: var(--pk-ground); --surface: var(--pk-surface); --surface-2: var(--pk-surface-2); --surface-3: var(--pk-surface-3);
  --border: var(--pk-line); --text: var(--pk-ink); --muted: var(--pk-ink-2); --faint: var(--pk-ink-3);
  --accent: var(--pk-p-ink); --accent-ink: var(--pk-p-on); --shadow: var(--pk-shadow);
  background: var(--pk-ground);
  font-family: var(--pk-f-body);
}
:root body.peak-c2[data-peak="home"] { --accent: var(--pk-ski-ink); }
body.peak-c2 :is(h1, h2, h3) { font-family: var(--pk-f-body); font-weight: 700; letter-spacing: -0.02em; }
body.peak-c2 h1 { font-size: clamp(1.75rem, 5vw, 2.25rem); }
body.peak-c2[data-fest-type] .page-head h1 { font-family: var(--fest-font, var(--pk-f-body)); }

/* ---------- 2. The frame: header ---------- */
.pk2-head { position: sticky; top: 0; z-index: 60; background: var(--pk-ground); }
/* While the product switcher or "Opret" is open, the header (and its sheet) rises above the tabs and the rail. */
.pk2-head:has(.peak-switch[open], .pk2-create[open]) { z-index: 300; }
.pk2-head-inner { display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 0 12px; padding-top: env(safe-area-inset-top, 0px); }
.pk2-head .peak-switch { margin-right: auto; }
.pk2-head-actions { display: flex; align-items: center; gap: 6px; }
.peak-c2 .pk2-head .theme-toggle { display: none; }

/* "Opret": a round + on a phone, a full button in the rail */
.pk2-create { position: relative; }
.pk2-create > summary { list-style: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--pk-r-pill);
  background: var(--pk-surface-2); color: var(--pk-ink); cursor: pointer; }
.pk2-create > summary::-webkit-details-marker { display: none; }
.pk2-create > summary span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pk2-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 80; width: min(340px, calc(100vw - 24px)); padding: 10px; display: grid; gap: 6px;
  border-radius: var(--pk-r-3); background: var(--pk-surface); box-shadow: var(--pk-shadow); }
.pk2-menu-title { margin: 6px 8px 4px; font-weight: 700; font-size: var(--pk-fs-3); }
.pk2-option { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 12px; border-radius: var(--pk-r-2); background: var(--pk-ground);
  color: var(--pk-ink); text-decoration: none; }
.pk2-option span { display: grid; }
.pk2-option small { color: var(--pk-ink-3); font-size: 0.8125rem; }
.pk2-option:hover, .pk2-option:focus-visible { box-shadow: inset 0 0 0 2px var(--pk-ink); outline: none; }

/* ---------- Tabs: the phone's bar ---------- */
.pk2-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--pk-surface); border-top: 1px solid var(--pk-line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.pk2-tab { position: relative; display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 58px;
  color: var(--pk-ink-3); font-size: 0.6875rem; font-weight: 600; text-decoration: none; }
.pk2-tab .icon, .pk2-tab .peak-mark { width: 24px; height: 24px; }
.pk2-tab[aria-current="page"] { color: var(--pk-ink); }
.pk2-tab[aria-current="page"]::after { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--pk-ink); }
.pk2-badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--pk-r-pill);
  display: grid; place-items: center; background: var(--pk-party-solid); color: var(--pk-party-on); font-size: 0.6875rem; }

/* ---------- The room's context: back, the name with its switcher, the modules ---------- */
.pk2-ctx { display: grid; gap: 8px; padding-top: 4px; padding-bottom: 4px; }
/* The compact room context (peak_frame_room() 'compact', e.g. the piste map): on a phone only "‹ <name>" – the page needs
   the height. An open UX question (docs/ux-spoergsmaal.md), not a rule for other pages. */
@media (max-width: 959px) {
  .pk2-ctx-compact { padding-top: 0; padding-bottom: 0; }
  .pk2-ctx-compact .pk2-id { display: none; }
}
.pk2-back { display: inline-flex; align-items: center; gap: 4px; justify-self: start; min-height: 40px; padding: 0 10px 0 2px; margin-left: -6px;
  border-radius: var(--pk-r-pill); color: var(--pk-ink-2); font-weight: 600; text-decoration: none; }
.pk2-back:hover { color: var(--pk-ink); }
.pk2-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pk2-id .peak-mark { flex: none; }
/* In the app (PB36): mark and name are one button that folds the trip's timer (.pkt-hero[data-pkt-timer] below) */
.pk2-id-btn { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; min-height: 44px; margin: -2px; padding: 2px; border: 0; border-radius: var(--pk-r-2); background: none; color: inherit; font: inherit; text-align: left; }
button.pk2-id-btn { cursor: pointer; }
.pk2-id-btn:focus-visible { outline: 3px solid var(--pk-p-ink); outline-offset: 2px; }
.pk2-id-btn .trip-switch-name { font-size: var(--pk-fs-3); font-weight: 700; letter-spacing: -0.01em; }
.pk2-id-text { display: grid; min-width: 0; }
.pk2-id-sub { color: var(--pk-ink-3); font-size: var(--pk-fs-1); }
/* The trip's or party's switcher becomes the room's name */
.pk2-id .trip-switch > summary { display: inline-flex; align-items: center; gap: 6px; padding: 2px 0; background: none; border: 0; min-height: 36px; }
.pk2-id .trip-switch-name { font-size: var(--pk-fs-3); font-weight: 700; letter-spacing: -0.01em; max-width: none; white-space: normal; overflow: visible; text-overflow: clip; }
.pk2-id .trip-switch > summary { max-width: 100%; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .pk2-create[open] .pk2-menu { animation: pk2-pop var(--pk-dur-quick) var(--pk-ease-out); transform-origin: top right; }
  .pk2-tab, .pk2-option, .pk2-back { transition: color var(--pk-dur-quick) ease, box-shadow var(--pk-dur-quick) ease; }
}
@keyframes pk2-pop { from { opacity: 0; transform: scale(0.96); } }

/* ---------- From 960 px: the rail on the left, the room's modules beside the page ---------- */
@media (min-width: 960px) {
  body.peak-c2 { padding-left: var(--pk2-rail); padding-bottom: 48px; }
  /* The rail's surface is its own layer, so the header can rise above the tabs (an open sheet) without covering them. */
  body.peak-c2::before { content: ""; position: fixed; top: 0; left: 0; bottom: 0; width: var(--pk2-rail); z-index: 50;
    background: var(--pk-surface); border-right: 1px solid var(--pk-line); }
  .pk2-head { position: fixed; top: 0; left: 0; width: var(--pk2-rail); background: none; }
  .pk2-head-inner { flex-direction: column; align-items: stretch; gap: 12px; padding: 20px 16px; }
  .pk2-head .peak-switch { margin-right: 0; align-self: flex-start; }
  .pk2-head-actions { position: fixed; top: 22px; left: calc(var(--pk2-rail) - 60px); justify-content: flex-end; }
  .peak-c2 .pk2-head .theme-toggle { display: inline-grid; }
  .pk2-head .pk2-create { order: 3; margin-top: 4px; }
  .pk2-head .pk2-create > summary { width: 100%; height: 48px; display: flex; justify-content: center; gap: 8px; background: var(--pk-ink); color: var(--pk-ground); font-weight: 700; }
  .pk2-head .pk2-create > summary span { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .pk2-head .pk2-menu { left: 0; right: auto; }
  .pk2-tabs { top: 96px; right: auto; bottom: auto; width: var(--pk2-rail); display: flex; flex-direction: column; gap: 4px; padding: 0 16px;
    background: none; border: 0; z-index: 61; }
  .pk2-tab { display: flex; justify-content: flex-start; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: var(--pk-r-pill);
    font-size: var(--pk-fs-2); color: var(--pk-ink-2); }
  .pk2-tab[aria-current="page"] { background: var(--pk-surface-2); }
  .pk2-tab[aria-current="page"]::after { display: none; }
  .pk2-badge { position: static; margin-left: auto; }
  .pk2-head .pk2-create { position: fixed; top: 368px; /* under the five tabs (96 + 5 × 48 + 4 × 4) */ left: 16px; width: calc(var(--pk2-rail) - 32px); }
  .pk2-ctx { max-width: var(--pk2-page-max); margin: 0 auto; padding: 24px 24px 8px; }
  .pk2-id .trip-switch-name { font-size: var(--pk-fs-4); }
}

/* ---------- 3. Pages: Home, the room, Kalender, Indbakke ---------- */
.pk2-page { display: flex; flex-direction: column; gap: 20px; padding-bottom: 24px; }
.pk2-page > h1 { margin: 4px 0 0; }
.pk2-narrow { max-width: 760px; }
.pk2-sec { display: grid; gap: 8px; }
.pk2-sec-title { margin: 0; padding-left: 4px; font-size: var(--pk-fs-1) !important; font-weight: 600 !important; color: var(--pk-ink-2); letter-spacing: 0 !important; }
.pk2-sec-title small { font-size: inherit; font-weight: 400; color: var(--pk-ink-3); }

/* The list group: rows on one surface, a hairline between them – the workhorse instead of cards */
.pk2-list { background: var(--pk-surface); border-radius: var(--pk-r-2); overflow: hidden; }
.pk2-list > * + * { border-top: 1px solid var(--pk-line); }
.pk2-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px; margin: 0; color: var(--pk-ink); text-decoration: none; }
a.pk2-row:hover { background: color-mix(in srgb, var(--pk-surface-2) 55%, transparent); }
.pk2-row .peak-mark { flex: none; }
.pk2-row-text { flex: 1; min-width: 0; display: grid; }
.pk2-row-text b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk2-row-text small { display: flex; align-items: center; gap: 6px; color: var(--pk-ink-3); font-size: 0.8125rem; }
.pk2-row-text small .icon { width: 16px; height: 16px; }
.pk2-go { color: var(--pk-ink-3); font-size: 1.2rem; }
.pk2-when { flex: none; color: var(--pk-ink-3); font-size: var(--pk-fs-1); font-variant-numeric: tabular-nums; }
.pk2-row-empty { color: var(--pk-ink-2); }
.pk2-row-more b { color: var(--pk-ski-ink); }
.pk2-empty { display: grid; gap: 12px; justify-items: start; padding: 20px; border-radius: var(--pk-r-3); background: var(--pk-surface); color: var(--pk-ink-2); margin: 0; }
.pk2-empty p { margin: 0; }
.pk2-empty .pk2-create > summary { width: auto; padding: 0 18px; display: flex; gap: 8px; background: var(--pk-ink); color: var(--pk-ground); font-weight: 700; }
.pk2-empty .pk2-create > summary span { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
.pk2-empty .pk2-menu { left: 0; right: auto; }

/* Buttons: pills only */
.pk2-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 0; border-radius: var(--pk-r-pill);
  font: 600 var(--pk-fs-2) / 1 var(--pk-f-body); text-decoration: none; cursor: pointer; }
.pk2-btn-primary { background: var(--pk-p-solid); color: var(--pk-p-on); }
.pk2-btn-soft { background: var(--pk-surface-2); color: var(--pk-ink); }
.pk2-btn-tint { background: var(--pk-p-tint); color: var(--pk-p-ink); }
.pk2-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }

/* Home as a day plan (app/peak/home_c2.php, direction 1 "Dagen"). Ink on the ground, hairlines, no cards; the only
   coloured field is the Nu scene, which is art and keeps its own deep palette in both themes, so its text stays light.
   The layout follows the page's own width (a container), not the window – the rail takes its share on a computer. */
.pk2-page.pkd-day { --day-ring: var(--pk-ground); display: block; width: 100%; container: day / inline-size; } /* a size container has no width of its own */
.pkd-day > * + * { margin-top: 44px; }
.pkd-day .pkd-faces .avatar, .pkd-faces-more { box-shadow: 0 0 0 2px var(--day-ring); }
.pkd-day-lede h1 { margin: 0; font-size: var(--pk-fs-4); line-height: 1.15; font-weight: 700; letter-spacing: -0.025em; }
.pk2-btn-ink { background: var(--pk-ink); color: var(--pk-ground); }
.pkd-day-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-size: var(--pk-fs-1); font-weight: 600; color: var(--pk-ink-2); white-space: nowrap; text-decoration: none; }
.pkd-day-link:hover { color: var(--pk-ink); }

/* Faces: overlapping avatars, "+n" when there are more */
.pkd-faces { --fs: 28px; display: inline-flex; align-items: center; }
.pkd-faces .avatar { --s: var(--fs); font-size: calc(var(--fs) * 0.34); letter-spacing: -0.02em; }
.pkd-faces > * + * { margin-left: calc(var(--fs) * -0.2); }
.pkd-faces-more { display: inline-grid; place-items: center; width: var(--fs); height: var(--fs); border-radius: 50%; background: var(--pk-surface-2); color: var(--pk-ink-2);
  font-size: calc(var(--fs) * 0.36); font-weight: 700; }

/* The Nu scene */
.pkd-now { --art-deep: #071a33; --art-hi: #4fc3f7; --art-on: #071a33; --art-ink: #fff; --art-ink-2: rgb(255 255 255 / 0.8); --day-ring: var(--art-deep);
  position: relative; isolation: isolate; overflow: hidden; border-radius: var(--pk-r-3); background: var(--art-deep); color: var(--art-ink); }
.pkd-now[data-peak="sun"] { --art-deep: #2a1405; --art-hi: #ffb300; --art-on: #2a1405; }
.pkd-now[data-peak="party"] { --art-deep: #1b0730; --art-hi: #ff3d9a; --art-on: #1b0730; }
.pkd-now-art { position: absolute; z-index: -1; inset: 0 0 auto; height: 220px;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 94%); mask-image: linear-gradient(to bottom, #000 30%, transparent 94%); }
.pkd-scene { display: block; width: 100%; height: 100%; }
.pkd-now-body { display: grid; gap: 14px; padding: 150px 20px 20px; }
.pkd-now :focus-visible { outline-color: var(--art-ink); }
.pkd-now-h { display: flex; align-items: center; gap: 12px; margin: 0; font-size: var(--pk-fs-4); line-height: 1.1; color: var(--art-ink); }
.pkd-now-meta { margin: -6px 0 0; font-size: var(--pk-fs-1); color: var(--art-ink-2); }
.pkd-now-meta b { color: var(--art-ink); font-weight: 600; }
.pkd-days { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 4px; }
.pkd-strokes { display: inline-flex; gap: 5px; }
.pkd-strokes i { position: relative; overflow: hidden; width: 22px; height: 5px; border-radius: 3px; background: rgb(255 255 255 / 0.24); }
.pkd-strokes i.on::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--art-hi); transform-origin: left center; }
.pkd-days-l { display: inline-flex; align-items: center; gap: 8px; font-size: var(--pk-fs-1); font-weight: 600; font-variant-numeric: tabular-nums; }
.pkd-live { position: relative; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--art-hi, var(--pk-p-ink)); }
.pkd-live::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: inherit; opacity: 0; }
.pkd-people { display: inline-flex; align-items: center; gap: 10px; font-size: var(--pk-fs-1); font-weight: 600; color: var(--art-ink-2); }
.pkd-now .pkd-faces-more { background: rgb(255 255 255 / 0.18); color: var(--art-ink); }
.pkd-facts { max-width: 46ch; margin: 0; font-size: var(--pk-fs-2); line-height: 1.45; color: var(--art-ink-2); }
.pkd-facts b { color: var(--art-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.pkd-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pkd-now-go { flex: 1 1 auto; background: var(--art-hi); color: var(--art-on); }
.pkd-now-go:hover { filter: brightness(1.08); }
.pkd-now.is-soon .pkd-now-h { display: grid; gap: 10px; }
.pkd-count { font: 800 calc(var(--pk-fs-5) * 1.4) / 0.95 var(--pk-f-display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.pkd-count-to { display: flex; align-items: center; gap: 10px; font-size: var(--pk-fs-3); letter-spacing: -0.015em; }

/* The other live experiences, right under the scene */
.pkd-nowwrap { display: grid; gap: 4px; }
.pkd-also { margin: 0; padding: 0; list-style: none; }
.pkd-also-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t go" "m go"; align-items: center; gap: 2px 12px;
  min-height: 56px; padding: 10px 12px; border-radius: var(--pk-r-2); color: var(--pk-ink); text-decoration: none; }
.pkd-also-row:hover { background: var(--pk-surface); }
.pkd-also-k { display: none; }
.pkd-also-t { grid-area: t; display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.pkd-also-t b { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.pkd-also-m { grid-area: m; padding-left: 50px; font-size: var(--pk-fs-1); color: var(--pk-ink-2); }
.pkd-also-go { grid-area: go; display: inline-flex; align-items: center; gap: 4px; font-size: var(--pk-fs-1); font-weight: 600; color: var(--pk-ink-2); }
.pkd-also-go > span:first-child { display: none; }

/* Sections on the ground */
.pkd-day-cols, .pkd-day-col { display: grid; gap: 44px; align-content: start; }
.pkd-day-cols > *, .pkd-day-col > * { min-width: 0; }
.pkd-new.is-wide { display: none; }
.pkd-day-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.pkd-day-h h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: var(--pk-fs-3); letter-spacing: -0.02em; }
.pkd-day-badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--pk-r-pill);
  background: var(--pk-party-solid); color: var(--pk-party-on); font-size: 0.75rem; font-weight: 700; letter-spacing: 0; }
.pkd-day-empty { margin: 0; color: var(--pk-ink-2); }

/* Forude: the timeline, a hairline spine through the product marks */
.pkd-tl { --tl-date: 44px; --tl-node: 32px; --tl-gap: 12px; position: relative; margin: 0; padding: 0; list-style: none; }
.pkd-tl > li { position: relative; }
.pkd-tl > li::before { content: ""; position: absolute; left: calc(var(--tl-date) + var(--tl-gap) + var(--tl-node) / 2 - 1px); top: 0; bottom: 0; width: 2px; background: var(--pk-line); }
.pkd-tl > li:first-child::before { top: 28px; }
.pkd-tl > li:last-child::before { bottom: calc(100% - 28px); }
.pkd-tl-row { position: relative; display: grid; grid-template-columns: var(--tl-date) var(--tl-node) minmax(0, 1fr); grid-template-areas: "date node body" "date node aside";
  column-gap: var(--tl-gap); row-gap: 8px; padding: 12px 0 18px; border-radius: var(--pk-r-2); color: var(--pk-ink); text-decoration: none; }
.pkd-tl-row:hover { background: var(--pk-surface); --day-ring: var(--pk-surface); }
.pkd-tl-row:hover .pkd-tl-node { background: var(--pk-surface); }
.pkd-tl-date { grid-area: date; display: grid; justify-items: end; align-content: start; padding-top: 2px; }
.pkd-tl-dd { font-size: var(--pk-fs-4); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.pkd-tl-wd { margin-top: 6px; font-size: 0.8125rem; color: var(--pk-ink-3); white-space: nowrap; }
.pkd-tl-node { grid-area: node; position: relative; z-index: 1; display: grid; place-items: center; width: var(--tl-node); height: var(--tl-node); border-radius: 50%; background: var(--pk-ground); }
.pkd-tl-body { grid-area: body; display: grid; gap: 3px; min-width: 0; padding-top: 3px; }
.pkd-tl-t { font-size: var(--pk-fs-2); font-weight: 600; }
.pkd-tl-m { font-size: var(--pk-fs-1); color: var(--pk-ink-2); }
.pkd-tl-m b { color: var(--pk-p-ink); font-weight: 600; }
.pkd-tl-aside { grid-area: aside; display: flex; align-items: center; gap: 12px; }
.pkd-tl-when { font-size: var(--pk-fs-1); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pkd-tl-month { display: grid; grid-template-columns: var(--tl-date) var(--tl-node) minmax(0, 1fr); column-gap: var(--tl-gap); align-items: center; padding: 14px 0 6px; }
.pkd-tl-month span { grid-column: 1 / -1; grid-row: 1; padding-left: calc(var(--tl-date) + var(--tl-gap) * 2 + var(--tl-node)); font-size: var(--pk-fs-1); font-weight: 600; color: var(--pk-ink-2); }
.pkd-tl-month::after { content: ""; grid-row: 1; grid-column: 3; height: 1px; margin-left: 96px; background: var(--pk-line); }

/* Rows: Kræver dig, Siden sidst */
.pkd-day-list { margin: 0; padding: 0; list-style: none; }
.pkd-day-list > li + li { border-top: 1px solid var(--pk-line); }
.pkd-day-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; grid-template-areas: "ic body when" ". acts acts"; column-gap: 14px; padding: 16px 0; color: var(--pk-ink); }
.pkd-day-row.is-link { margin: 0 -8px; padding: 14px 8px; border-radius: var(--pk-r-2); text-decoration: none; }
.pkd-day-row.is-link:hover { background: var(--pk-surface); --day-ring: var(--pk-surface); }
.pkd-day-ic { grid-area: ic; display: grid; place-items: start center; padding-top: 1px; }
.pkd-day-body { grid-area: body; display: grid; gap: 3px; min-width: 0; color: inherit; text-decoration: none; }
.pkd-day-body > b { font-size: 0.9375rem; font-weight: 600; }
.pkd-day-body > span { font-size: var(--pk-fs-1); color: var(--pk-ink-2); }
.pkd-day-body > .pkd-faces { margin-top: 8px; }
.pkd-day-when { grid-area: when; padding-left: 8px; font-size: 0.8125rem; color: var(--pk-ink-3); white-space: nowrap; }
.pkd-day-acts { grid-area: acts; margin-top: 12px; }
.pkd-day-acts .pk2-answers { flex-wrap: wrap; padding: 0; }
.pkd-day-acts .pk2-answers .pk2-btn { flex: 0 1 auto; }
.pkd-thumbs { display: flex; gap: 4px; margin-top: 8px; }
.pkd-thumbs img, .pkd-thumb-more { width: 44px; height: 44px; flex: none; border-radius: 8px; object-fit: cover; background: var(--pk-surface-2); }
.pkd-thumb-more { display: grid; place-items: center; font-size: var(--pk-fs-1); font-weight: 700; color: var(--pk-ink-2); }

/* Start something new */
.pkd-new { display: grid; gap: 4px; padding-top: 20px; border-top: 1px solid var(--pk-line); }
.pkd-new h2 { margin: 0 0 4px; font-size: var(--pk-fs-3); letter-spacing: -0.02em; }
.pkd-new ul { margin: 0; padding: 0; list-style: none; }
.pkd-new li + li { border-top: 1px solid var(--pk-line); }
.pkd-new-item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 64px; margin: 0 -8px; padding: 8px;
  border-radius: var(--pk-r-2); color: var(--pk-ink); text-decoration: none; }
.pkd-new-item:hover { background: var(--pk-surface); }
.pkd-new-txt { display: grid; gap: 1px; }
.pkd-new-txt b { font-weight: 600; }
.pkd-new-txt span { font-size: var(--pk-fs-1); color: var(--pk-ink-2); }

/* A new user: three doors on a dashed (unplanned) spine, and the invitation link */
.pkd-doors { --door-mk: 52px; max-width: 900px; }
.pkd-doors ul { margin: 0; padding: 0; list-style: none; }
.pkd-door { position: relative; display: grid; grid-template-columns: var(--door-mk) minmax(0, 1fr); gap: 4px 16px; padding: 22px 0; }
.pkd-door:not(:last-child)::before { content: ""; position: absolute; top: calc(22px + var(--door-mk) + 6px); bottom: -16px; left: calc(var(--door-mk) / 2 - 1px); border-left: 2px dashed var(--pk-line); }
.pkd-door-mk { grid-row: span 2; display: grid; place-items: center; width: var(--door-mk); height: var(--door-mk); border-radius: 50%; background: var(--pk-surface); }
.pkd-door-txt h2 { margin: 0; font-size: var(--pk-fs-3); letter-spacing: -0.02em; }
.pkd-door-txt p { max-width: 52ch; margin: 4px 0 0; font-size: var(--pk-fs-2); line-height: 1.45; color: var(--pk-ink-2); }
.pkd-door .pk2-btn { justify-self: start; margin-top: 12px; }
.pkd-door-link { display: grid; grid-template-columns: var(--door-mk) minmax(0, 1fr); gap: 16px; align-items: start; margin: 8px 0 0; padding-top: 24px; border-top: 1px solid var(--pk-line); color: var(--pk-ink-2); line-height: 1.45; }
.pkd-door-link .icon { justify-self: center; color: var(--pk-ink-3); }
.pkd-door-link b { color: var(--pk-ink); font-weight: 600; }

@container day (min-width: 600px) {
  .pkd-also-go > span:first-child { display: inline; }
}
@container day (min-width: 860px) {
  .pkd-day > * + * { margin-top: 56px; }
  .pkd-day-lede h1 { font-size: var(--pk-fs-5); letter-spacing: -0.03em; }
  /* the scene: art on the right, bleeding left into the deep field that carries the text */
  .pkd-now-art { inset: 0 0 -24% 40%; height: auto;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 46%); mask-image: linear-gradient(to right, transparent 0, #000 46%); }
  .pkd-now-body { max-width: 620px; min-height: 340px; align-content: start; gap: 16px; padding: 40px 44px 36px; }
  .pkd-now-h { font-size: var(--pk-fs-5); letter-spacing: -0.03em; }
  .pkd-now-meta { margin-top: -4px; font-size: var(--pk-fs-2); }
  .pkd-strokes { gap: 6px; }
  .pkd-strokes i { width: 26px; height: 6px; }
  .pkd-days { column-gap: 24px; }
  .pkd-facts { font-size: var(--pk-fs-3); line-height: 1.4; letter-spacing: -0.01em; }
  .pkd-now-go { flex: none; }
  .pkd-acts { margin-top: 10px; }
  .pkd-now.is-soon .pkd-now-body { padding-top: 36px; }
  .pkd-count { font-size: calc(var(--pk-fs-5) * 2); }
  .pkd-count-to { font-size: var(--pk-fs-4); letter-spacing: -0.025em; }
  .pkd-also-row { grid-template-columns: 96px auto minmax(0, 1fr) auto; grid-template-areas: "k t m go"; gap: 16px; padding: 8px 16px 8px 0; }
  .pkd-also-k { display: block; justify-self: end; font-size: var(--pk-fs-1); font-weight: 600; color: var(--pk-ink-3); }
  .pkd-also-m { padding-left: 0; }
  /* 7/5: Forude with "Start noget nyt" under it on the left; Kræver dig and Siden sidst on the right */
  .pkd-day-cols { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 56px; align-items: start; }
  .pkd-day-cols.is-single { grid-template-columns: minmax(0, 1fr); } /* the app's Home (PB36): no Forude column */
  .pkd-new.is-wide { display: grid; }
  .pkd-new.is-narrow { display: none; }
  .pkd-tl { --tl-date: 56px; --tl-gap: 16px; }
  .pkd-tl-row { grid-template-columns: var(--tl-date) var(--tl-node) minmax(0, 1fr) auto; grid-template-areas: "date node body aside"; padding: 14px 16px 20px 0; }
  .pkd-tl-aside { flex-direction: column; align-items: flex-end; gap: 10px; padding-top: 3px; }
  .pkd-doors { --door-mk: 64px; }
  .pkd-door { grid-template-columns: var(--door-mk) minmax(0, 1fr) auto; align-items: center; gap: 28px; padding: 26px 0; }
  .pkd-door:not(:last-child)::before { top: calc(50% + var(--door-mk) / 2 + 6px); bottom: calc(-50% + var(--door-mk) / 2 + 6px); }
  .pkd-door-mk { grid-row: auto; }
  .pkd-door .pk2-btn { margin-top: 0; }
}
/* The one authored moment: the day's strokes fill in order when the page appears, and the live dot breathes.
   Without motion the end state is simply there. */
@media (prefers-reduced-motion: no-preference) {
  .pkd-strokes i.on::after { animation: pkd-fill 200ms var(--pk-ease-out) both; }
  .pkd-strokes i:nth-child(2)::after { animation-delay: 75ms; }
  .pkd-strokes i:nth-child(3)::after { animation-delay: 150ms; }
  .pkd-strokes i:nth-child(4)::after { animation-delay: 225ms; }
  .pkd-strokes i:nth-child(5)::after { animation-delay: 300ms; }
  .pkd-strokes i:nth-child(n+6)::after { animation-delay: 350ms; }
  .pkd-live::after { animation: pkd-breathe 2.4s var(--pk-ease-out) 400ms infinite; }
}
@keyframes pkd-fill { from { transform: scaleX(0); } }
@keyframes pkd-breathe { 0% { transform: scale(1); opacity: 0.55; } 70%, 100% { transform: scale(2.8); opacity: 0; } }

/* The room: one timer as the hero, the day's cards, the modules as rows */
.pk2-timer .countdown { border-radius: var(--pk-r-3); }
.pk2-hero { display: grid; gap: 6px; padding: 20px; border-radius: var(--pk-r-3); background: var(--pk-surface); }
.pk2-big { font: 800 3rem / 0.95 var(--pk-f-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.pk2-big small { font-size: 1.125rem; letter-spacing: -0.02em; }
.pk2-big-text { font-size: var(--pk-fs-4); }
.pk2-big-text.is-long { font-size: var(--pk-fs-3); line-height: 1.25; letter-spacing: -0.01em; } /* a sentence, not a word (ski after the trip) */
.pk2-hero-sub { color: var(--pk-ink-2); }
.pk2-today { margin: 0; } /* the room's day cards – its own name, so the calendar's .pk2-day (a square cell) never applies */

/* Kalender (peak_kalender.php): one calendar for every product. Colour follows the event's product – Ski blue, Sun
   yellow, Party pink, a group's own plans neutral – always with the product's mark beside it, never colour alone. */
.pk2-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pk2-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: var(--pk-r-pill); background: var(--pk-surface-2);
  color: var(--pk-ink); font-weight: 600; text-decoration: none; cursor: pointer; }
.pk2-chip[aria-current="true"] { background: var(--pk-ink); color: var(--pk-ground); }
.pk2-chip .peak-mark, .pk2-chip .icon { width: 16px; height: 16px; flex: none; }
[data-x="ski"] { --pk-x: var(--pk-ski-solid); --pk-x-tint: var(--pk-ski-tint); }
[data-x="sun"] { --pk-x: var(--pk-sun-solid); --pk-x-tint: var(--pk-sun-tint); }
[data-x="party"] { --pk-x: var(--pk-party-solid); --pk-x-tint: var(--pk-party-tint); }
[data-x="group"] { --pk-x: var(--pk-edge); --pk-x-tint: var(--pk-surface-2); }
.pk2-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pk2-cal-head h1 { margin: 4px 0 0; }
.pk2-cal-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pk2-cal-scope { position: relative; }
.pk2-cal-scope > summary { list-style: none; max-width: min(320px, calc(100vw - 32px)); }
.pk2-cal-scope > summary::-webkit-details-marker { display: none; }
.pk2-cal-scope > summary span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk2-cal-scope .pk2-menu { left: 0; right: auto; max-height: min(420px, 60vh); overflow-y: auto; }
.pk2-cal-body { display: grid; gap: 20px; }
.pk2-month { display: grid; gap: 10px; padding: 14px; border-radius: var(--pk-r-3); background: var(--pk-surface); align-self: start; }
.pk2-month-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pk2-month-head h2 { margin: 0; font-size: var(--pk-fs-3); }
.pk2-month-nav { display: flex; align-items: center; gap: 4px; }
.pk2-icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--pk-r-pill); color: var(--pk-ink); }
.pk2-icon-btn:hover { background: var(--pk-surface-2); }
.pk2-icon-btn .icon { width: 20px; height: 20px; }
.pk2-btn-sm { min-height: 40px; padding: 0 14px; font-size: var(--pk-fs-1); gap: 6px; }
.pk2-btn-sm .icon { width: 16px; height: 16px; }
.pk2-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.pk2-wd { text-align: center; padding: 2px 0 4px; color: var(--pk-ink-3); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; }
.pk2-day { position: relative; isolation: isolate; display: grid; place-items: start center; aspect-ratio: 1; min-height: 44px; padding-top: 6px;
  border-radius: var(--pk-r-2); color: var(--pk-ink); font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.pk2-day:hover { background: var(--pk-surface-2); }
.pk2-day.is-other { color: var(--pk-ink-3); }
/* The chosen day (PB43): the bubble's fill – peak.js glides it between the days; without script this is the look */
.pk2-day[aria-selected="true"] { background: var(--pk-ink); color: var(--pk-ground); }
/* A trip's days and today's ring are layers of their own (::before / ::after), so the bubble – which takes the days'
   own backgrounds and shadows away (peak.css, .bubble-under) – leaves them in place */
.pk2-day[data-trip]::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--pk-x-tint); }
.pk2-day[data-trip="ski"] { --pk-x-tint: var(--pk-ski-tint); }
.pk2-day[data-trip="sun"] { --pk-x-tint: var(--pk-sun-tint); }
.pk2-day[aria-selected="true"]::before { opacity: 0; }
/* Today, wherever the choice is: a thin ring just outside the day and its number in the accent – on the bubble the
   number takes the bubble's own colour (the accent would not read on it), the ring stays around it */
.pk2-day.is-today::after { content: ""; position: absolute; inset: -2px; border-radius: calc(var(--pk-r-2) + 2px); box-shadow: inset 0 0 0 2px var(--accent); pointer-events: none; }
.pk2-day.is-today > span { color: var(--accent); }
.pk2-day.is-today[aria-selected="true"] > span, .pk2-day.is-today[data-bubble-on] > span { color: inherit; }
.pk2-dots { position: absolute; bottom: 6px; left: 0; right: 0; display: flex; justify-content: center; gap: 3px; }
.pk2-dots b { width: 6px; height: 6px; border-radius: 50%; background: var(--pk-x); }
.pk2-agenda { display: grid; gap: 10px; align-content: start; min-width: 0; }
.pk2-days { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.pk2-dayrow { display: grid; gap: 6px; scroll-margin-top: calc(var(--pk2-cal-top, 60px) + 12px); }
/* The chosen day in focus, the month's other days quieter (PB43); a past day quieter still */
.pk2-dayrow:not(.is-selected) { opacity: 0.5; }
.pk2-dayrow.is-past:not(.is-selected) { opacity: 0.35; }
.pk2-date { margin: 0; padding-left: 4px; font-size: var(--pk-fs-1); color: var(--pk-ink-2); }
.pk2-dayrow.is-today .pk2-date { color: var(--accent); }
.pk2-dayrow.is-selected .pk2-date { color: var(--pk-ink); }
.pk2-dayrow.is-empty .pk-fold-in { display: grid; gap: 6px; }
.pk2-nothing { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 6px 6px 6px 18px;
  border-radius: var(--pk-r-2); background: var(--pk-surface); color: var(--pk-ink-2); }
.pk2-nothing p { margin: 0; }
@media (prefers-reduced-motion: no-preference) {
  .pk2-dayrow { transition: opacity 300ms var(--pk-ease-out); }
}
.pk2-ev > summary { list-style: none; cursor: pointer; box-shadow: inset 4px 0 0 var(--pk-x); }
.pk2-ev > summary::-webkit-details-marker { display: none; }
.pk2-ev > summary:hover { background: color-mix(in srgb, var(--pk-surface-2) 55%, transparent); }
.pk2-ev[open] > summary .pk2-go { transform: rotate(180deg); }
.pk2-ev-body { padding: 0 14px 14px 18px; color: var(--pk-ink-2); }
.pk2-ev-body p { margin: 0 0 4px; }
.pk2-ev-note { color: var(--pk-ink); overflow-wrap: anywhere; }
.pk2-ev-by, .pk2-hint { color: var(--pk-ink-3); font-size: var(--pk-fs-1); }
.pk2-danger { color: var(--danger); }
.pk2-cal-time { width: 80px; flex: none; white-space: nowrap; color: var(--pk-ink-2); font-size: var(--pk-fs-1); font-weight: 600; font-variant-numeric: tabular-nums; }
.pk2-subscribe { border-radius: var(--pk-r-2); background: var(--pk-surface); }
.pk2-subscribe > summary { list-style: none; cursor: pointer; }
.pk2-subscribe > summary::-webkit-details-marker { display: none; }
.pk2-subscribe > summary > .icon { width: 22px; height: 22px; flex: none; color: var(--pk-ink-2); }
.pk2-subscribe[open] > summary .pk2-go { transform: rotate(180deg); }
/* A phone: the month stays put under the header while the list rolls beneath it (calendar.js sets --pk2-head-h and
   --pk2-cal-top = header + month, so a day's line lands just under the month) */
@media (max-width: 959px) {
  .pk2-month { position: sticky; top: var(--pk2-head-h, 60px); z-index: 5; box-shadow: 0 10px 18px -14px rgb(0 0 0 / 0.5); }
}
@media (min-width: 960px) {
  .pk2-cal-body { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .pk2-month { position: sticky; top: 24px; padding: 18px; }
}

/* Chats (peak_chats.php): the list, and the conversation beside it on a computer; a phone shows one at a time. One
   12 px gap all the way on a computer – rail | list | conversation | edge – and the conversation full height; a phone
   has it edge to edge, down to the tab bar (docs/peak/chat-koncepter/, variant C). */
.pk2-chats { gap: 16px; }
.pk2-chats-list { display: grid; gap: 12px; align-content: start; min-width: 0; }
.pk2-chats-list h1 { margin: 4px 0 0; }
.pk2-search { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: var(--pk-r-pill); background: var(--pk-surface);
  color: var(--pk-ink-3); }
.pk2-search .icon { width: 18px; height: 18px; flex: none; }
.pk2-search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--pk-ink); font: inherit; font-size: 1rem; outline: none; }
.pk2-search:focus-within { box-shadow: inset 0 0 0 2px var(--pk-ink); }
.pk2-chatrow .peak-mark { width: 32px; height: 32px; }
.pk2-chatrow[aria-current="page"] { background: var(--pk-surface-2); box-shadow: inset 4px 0 0 var(--pk-x); }
.pk2-chatrow small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* the last message on one line */
.pk2-chat-meta { display: grid; justify-items: end; gap: 4px; flex: none; color: var(--pk-ink-3); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.pk2-notice { margin: 0; padding: 12px 14px; border-radius: var(--pk-r-2); background: var(--pk-surface); color: var(--pk-ink); box-shadow: inset 4px 0 0 var(--danger); }
.pk2-chats-pane { display: grid; gap: 8px; align-content: start; min-width: 0; }
.pk2-chats-pick { display: grid; place-items: center; gap: 8px; min-height: 320px; border-radius: var(--pk-r-3); background: var(--pk-surface); color: var(--pk-ink-3); }
.pk2-chats-pick .icon { width: 32px; height: 32px; }
.pk2-chats-pick p { margin: 0; }
@media (max-width: 959px) {
  .pk2-chats:not(.has-open) .pk2-chats-pane, .pk2-chats.has-open .pk2-chats-list { display: none; }
  .pk2-chats-pane { gap: 0; }
  /* 120 px = the header (60) and the tab bar (58 + its line); both also grow by the safe areas – the top one too, which
     matters in the PEAK app and an installed app (full screen under the notch), where the composer otherwise hid under
     the tab bar (30 Oct 2026) */
  .pk2-chats-pane .chat { height: calc(100dvh - 120px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); margin-inline: -16px; border-inline: 0; border-radius: 0; }
  /* an open conversation ends at the tab bar, and the page itself doesn't scroll */
  body.peak-c2.page-peak_chats:has(.pk2-chats.has-open), body.peak-c2.page-peak_chats:has(.pk2-chats.has-open) .pk2-page { padding-bottom: 0; }
  .pk2-chats-pane .chat .card-head .hint { display: none; }
  /* the feedback button would lie on the send arrow: feedback from any other page */
  body.peak-c2.page-peak_chats:has(.pk2-chats.has-open) .feedback-fab { display: none; }
}
@media (min-width: 960px) {
  body.peak-c2.page-peak_chats { padding-bottom: 0; }
  body.peak-c2.page-peak_chats main.container { max-width: none; margin: 0; padding: 12px; }
  body.peak-c2.page-peak_chats .pk2-page { padding: 0; }
  /* the conversation ends where its messages do (their 880 px column + the wall's padding) – a wide screen keeps
     the space to its right for the background picker */
  .pk2-chats { display: grid; grid-template-columns: 320px minmax(0, 912px); gap: 12px; align-items: start; }
  .pk2-chats-list { position: sticky; top: 12px; max-height: calc(100dvh - 24px); overflow-y: auto; padding-top: 8px; }
  .pk2-chats-list h1 { padding-left: 8px; }
  .pk2-chats-pane .chat { height: calc(100dvh - 24px); }
  .chat .chat-back { display: none; }
  /* the feedback button would lie on the send arrow: in the rail's corner */
  body.peak-c2.page-peak_chats .feedback-fab { right: auto; left: calc(var(--pk2-rail) - 58px); }
}
/* Room for a panel right of the conversation: 🎨 opens the background picker there, beside the chat (chat.js .show()),
   instead of over it. The panel is a share of the screen (24 %, 340–800 px: 480 px on 2000, 614 on 2560, 800 on a 4K),
   out to the right edge (12 px). Its room is always kept free, open or closed, so the conversation fills the rest and never
   moves when the picker opens – with its messages and the composer out to the conversation's edges. */
@media (min-width: 1880px) {
  body.peak-c2.page-peak_chats { --chat-panel: clamp(340px, 24vw, 800px); }
  body.peak-c2.page-peak_chats .chat-bg-dialog:not(:modal) { position: fixed; z-index: 30; top: 12px; bottom: 12px; right: 12px; left: auto;
    width: var(--chat-panel); height: auto; max-height: none; margin: 0; border-color: var(--pk-line); border-radius: var(--pk-r-3);
    background: var(--pk-surface); box-shadow: none; }
  body.peak-c2.page-peak_chats .pk2-chats { grid-template-columns: 320px minmax(0, 1fr); padding-right: calc(var(--chat-panel) + 12px); }
  body.peak-c2.page-peak_chats :is(.chat-list, .chat-form) { max-width: none; }
  body.peak-c2.page-peak_chats :is(.chat-picker, .chat-attach) { margin-inline: 12px; }
}
@media (min-width: 1880px) and (prefers-reduced-motion: no-preference) {
  body.peak-c2.page-peak_chats .chat-bg-dialog[open]:not(:modal) { animation: pk2-rise var(--pk-dur-base) var(--pk-ease-out); }
}

/* PEAK's conversation (render_chat()): one surface, the wall to its edges, the group's name as the
   head; on a wide screen the messages and the composer in a column you can read across. */
body.peak-c2 .chat { gap: 0; padding: 0; overflow: hidden; }
body.peak-c2 .chat .card-head { flex-wrap: nowrap; align-items: center; gap: 10px; margin: 0; padding: 8px 12px 8px 20px; min-height: 60px; border-bottom: 1px solid var(--pk-line); }
body.peak-c2 .chat .chat-back { margin: 0 0 0 -10px; padding-right: 2px; }
body.peak-c2 .chat-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--pk-fs-3); }
body.peak-c2 .chat .card-head .hint { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8125rem; }
body.peak-c2 .chat-wall { border-radius: 0; padding: 12px 16px 8px; }
body.peak-c2 .chat-list, body.peak-c2 .chat-form { box-sizing: border-box; width: 100%; max-width: 880px; margin-inline: auto; }
body.peak-c2 .chat-picker, body.peak-c2 .chat-attach { margin: 8px max(12px, calc((100% - 880px) / 2)) 0; }

/* The composer: quiet tools (a neutral stroke, 44 px), one rounded field, the send arrow inside it. No Send button:
   Enter sends; the arrow shows when there is something to send (text, or a picture waiting). A computer has
   +, picture, sticker and GIF on the left (also while you write); a phone only "+" (photos first) with the sticker in
   the field – the GIF under "+". */
body.peak-c2 .chat-form { gap: 0; align-items: flex-end; padding: 8px 12px 12px 6px; border-top: 0; }
body.peak-c2 .chat-tools { gap: 0; }
body.peak-c2 .chat-tool { width: 44px; height: 44px; background: transparent; color: var(--pk-ink-2); }
body.peak-c2 .chat-tool .icon { width: 22px; height: 22px; }
body.peak-c2 .chat-tool-gif span { padding: 2px 3px; border-width: 1.5px; border-radius: 5px; font-size: 0.625rem; }
body.peak-c2 .chat-tool[aria-expanded="true"], body.peak-c2 .chat-more[open] > .chat-tool { background: color-mix(in srgb, var(--pk-p-ink) 16%, transparent); color: var(--pk-p-ink); }
@media (hover: hover) and (pointer: fine) {
  body.peak-c2 .chat-tool:hover { background: color-mix(in srgb, var(--pk-p-ink) 12%, transparent); color: var(--pk-p-ink); }
}
body.peak-c2 .chat-tool:focus-visible, body.peak-c2 label.chat-tool:focus-within, .chat-send:focus-visible { outline: 3px solid var(--pk-p-ink); outline-offset: 2px; }
.chat-field { position: relative; display: flex; flex: 1; min-width: 0; margin-left: 4px; }
body.peak-c2 .chat-form textarea { min-height: 44px; padding: 11px 50px 11px 16px; border: 1px solid transparent; border-radius: 22px; background: var(--pk-surface-2); line-height: 1.35; }
body.peak-c2 .chat-form textarea::placeholder { color: var(--pk-ink-3); opacity: 1; }
body.peak-c2 .chat-form textarea:focus { outline: none; }
body.peak-c2 .chat-field:focus-within textarea { border-color: var(--pk-p-ink); }
.chat-send { position: absolute; right: 4px; bottom: 4px; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%;
  background: var(--pk-p-solid); color: var(--pk-p-on); cursor: pointer; }
.chat-send::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; } /* a 44 px target */
.chat-send .icon { width: 20px; height: 20px; }
:root[data-theme="light"] .chat-send { box-shadow: 0 0 0 1px var(--pk-edge); } /* a pale product colour on a pale field */
.chat-form:has(textarea:placeholder-shown) .chat-send { opacity: 0; transform: scale(0.8); visibility: hidden; pointer-events: none; }
.chat:has(.chat-attach:not([hidden])) .chat-send { opacity: 1; transform: none; visibility: visible; pointer-events: auto; }
.chat-field-tools { position: absolute; right: 0; bottom: 0; display: none; }
.chat-form:has(textarea:not(:placeholder-shown)) .chat-field-tools { opacity: 0; transform: scale(0.8); visibility: hidden; pointer-events: none; }
.chat-more-photos { display: none; }
@media (min-width: 601px) {
  body.peak-c2 .chat-form:has(textarea:not(:placeholder-shown)) .chat-tools > :not(.chat-more) { display: grid; }
  body.peak-c2 .chat-more-item[data-chat-picker-open] { display: none; } /* they're out on the left */
}
@media (max-width: 600px) {
  body.peak-c2 .chat-tools > :not(.chat-more) { display: none; }
  .chat-field-tools { display: flex; }
  .chat-field-tools > .chat-tool-gif, body.peak-c2 .chat-more-item[data-chat-picker-open="sticker"] { display: none; }
  .chat-more-photos { display: flex; }
}

/* A message is only its words. A click shows when it was sent and who has seen it (a light pill under it); a right
   click (a long press on a phone) opens its menu – copy, delete your own, report. */
body.peak-c2 .chat-bubble[role="button"] { cursor: pointer; }
@media (pointer: coarse) { body.peak-c2 .chat-bubble[role="button"] { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; } } /* a long press opens the menu (Kopiér is in it) */
body.peak-c2 .chat-bubble[role="button"]:focus-visible { outline: 3px solid var(--pk-p-ink); outline-offset: 2px; }
body.peak-c2 .chat-msg.is-held .chat-bubble { filter: brightness(1.08); }
.chat-info { --chat-info-bg: var(--pk-surface); display: grid; justify-items: start; gap: 4px; justify-self: start; margin: -2px 0 4px 40px; max-width: min(440px, 100%); }
:root[data-theme="dark"] .chat-info { --chat-info-bg: var(--pk-surface-3); }
.chat-info.is-mine { justify-self: end; justify-items: end; margin-left: 0; }
.chat-info-line { display: inline-flex; align-items: center; gap: 10px; min-height: 30px; padding: 2px 4px 2px 12px; border-radius: var(--pk-r-pill); background: var(--chat-info-bg);
  color: var(--pk-ink-2); font-size: 0.75rem; font-variant-numeric: tabular-nums; box-shadow: 0 2px 8px rgb(0 0 0 / 0.15); }
.chat-info-line > time { color: var(--pk-ink); font-weight: 600; }
.chat-info-line > span.chat-seen { padding-right: 8px; }
.chat-seen { display: inline-flex; align-items: center; gap: 6px; }
button.chat-seen { min-height: 26px; padding: 0 4px 0 8px; border: 0; border-radius: var(--pk-r-pill); background: none; color: inherit; font: inherit; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { button.chat-seen:hover { background: color-mix(in srgb, var(--pk-ink) 8%, transparent); } }
button.chat-seen:focus-visible { outline: 3px solid var(--pk-p-ink); outline-offset: 1px; }
.chat-faces { display: inline-flex; align-items: center; }
.chat-faces > * + * { margin-left: -6px; }
.chat-faces .avatar { box-shadow: 0 0 0 2px var(--chat-info-bg); font-size: 0.5625rem; }
.chat-faces-more { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--pk-r-pill); background: var(--pk-surface-2);
  box-shadow: 0 0 0 2px var(--chat-info-bg); color: var(--pk-ink); font-size: 0.6875rem; font-weight: 700; }
.chat-seen-all { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 2px 10px; width: min(340px, calc(100vw - 96px)); max-height: 196px;
  overflow-y: auto; margin: 0; padding: 8px 10px; list-style: none; border-radius: 14px; background: var(--chat-info-bg); color: var(--pk-ink); font-size: 0.8125rem;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.15); overscroll-behavior: contain; }
.chat-seen-all[hidden] { display: none; }
.chat-seen-all li { display: flex; align-items: center; gap: 8px; min-height: 30px; min-width: 0; }
.chat-seen-all li span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-menu { position: fixed; z-index: 100; display: grid; min-width: 168px; padding: 4px; border: 1px solid var(--pk-line); border-radius: 12px; background: var(--pk-surface);
  box-shadow: var(--pk-shadow); }
:root[data-theme="dark"] .chat-menu { background: var(--pk-surface-3); }
.chat-menu[hidden], .chat-menu [hidden] { display: none; }
.chat-menu button { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--pk-ink);
  font: inherit; font-size: 0.8125rem; font-weight: 600; text-align: left; cursor: pointer; }
@media (pointer: coarse) { .chat-menu button { min-height: 40px; } }
.chat-menu button .icon { width: 16px; height: 16px; }
.chat-menu button:hover, .chat-menu button:focus-visible { background: color-mix(in srgb, var(--pk-ink) 8%, transparent); outline: none; }
.chat-menu button:focus-visible { box-shadow: inset 0 0 0 2px var(--pk-p-ink); }
.chat-menu .is-danger { color: var(--danger); }

/* The group's background (PB30): Snefald (only PEAK has it), and the moving pictures (Skovpisten, Afterski, Snefald, Fadøl). Each animated background
   has a still picture (--wall-img) and a moving one (--wall-live, CSS animation inside the SVG,
   dev/make-chat-backgrounds.php); the moving one shows while the viewer has "Animerede baggrunde" on (.is-live, their
   own choice) and the device doesn't ask for reduced motion – an SVG as a background image doesn't hear that setting
   itself, so the page decides. */
.chat-wall--snowfall {
  background-image: linear-gradient(rgba(4, 10, 20, var(--wall-dim)), rgba(4, 10, 20, var(--wall-dim))), var(--wall-img);
  background-size: cover; background-position: center;
  --wall-img: url("/assets/img/chat/snowfall-still.svg"); --wall-live: url("/assets/img/chat/snowfall.svg"); --wall-color: #c9d6e6;
}
body.peak-c2 .chat-wall--forest { --wall-live: url("/assets/img/chat/forest-live.svg"); }
body.peak-c2 .chat-wall--apres { --wall-live: url("/assets/img/chat/apres-live.svg"); }
body.peak-c2 .chat-wall--foam { --wall-live: url("/assets/img/chat/foam-live.svg"); }
@media (prefers-reduced-motion: no-preference) {
  body.peak-c2 .chat-wall.is-live:is(.chat-wall--forest, .chat-wall--apres, .chat-wall--snowfall, .chat-wall--foam) {
    background-image: linear-gradient(rgba(4, 10, 20, var(--wall-dim)), rgba(4, 10, 20, var(--wall-dim))), var(--wall-live);
  }
}
/* The picker: the person's own "Animerede baggrunde", and which backgrounds move */
.chat-bg-motion { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: 12px; background: var(--pk-surface-2); cursor: pointer; }
.chat-bg-motion input { flex: none; width: 20px; height: 20px; min-height: 0; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; accent-color: var(--pk-p-solid); }
.chat-bg-motion span { display: grid; }
.chat-bg-motion small { color: var(--pk-ink-2); font-size: 0.8125rem; }
.chat-bg-option { position: relative; }
.chat-bg-live { position: absolute; top: 6px; right: 6px; padding: 1px 6px; border-radius: var(--pk-r-pill); background: color-mix(in srgb, var(--pk-ground) 78%, transparent); color: var(--pk-ink); font-size: 0.625rem; font-weight: 700; pointer-events: none; }
/* The sets as tabs (chat.js shows one at a time) – the row scrolls rather than widening the dialog on a phone */
.chat-bg-tabs { display: flex; gap: 4px; width: 0; min-width: 100%; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chat-bg-tabs button { flex: none; min-height: 36px; padding: 0 12px; border: 0; border-radius: var(--pk-r-pill); background: var(--pk-surface-2); color: var(--pk-ink-2); font: inherit; font-size: var(--pk-fs-1); font-weight: 600; cursor: pointer; }
.chat-bg-tabs button[aria-selected="true"] { background: var(--pk-ink); color: var(--pk-ground); }
.chat-bg-tabs button:focus-visible { outline: 2px solid var(--pk-p-ink); outline-offset: 2px; }
/* With the bubble (peak.js) the sets sit in one rail, so the pill can glide behind them */
.chat-bg-tabs.has-bubble { gap: 2px; padding: 3px; border-radius: var(--pk-r-pill); background: var(--pk-surface-2); }
.chat-bg-tabs.has-bubble button { background: none; }
.chat-bg-tabs:not([hidden]) ~ .chat-bg-set legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* PEAK's calm walls (app/chat.php CHAT_WALL_FX, PB31, docs/peak/chat-baggrunde/): a quiet base and a few effects on
   their own layer in the scroll area's grid cell, under the messages – it stands still while you scroll. Only
   transform and opacity move, in loops of 8–170 s; each particle is a column as tall as the wall with its dot at one
   end, so the keyframes need no variables and the compositor runs them alone. They move only with the person's
   "Animerede baggrunde" (.is-live on the scroll area) and no request for reduced motion – otherwise the same scene
   stands still: with motion off a paused animation keeps its spread; under reduced motion app.css cuts every animation
   to one instant run, so the base and the glow stay and the dust is gone. The picker's small copies move on hover and
   when chosen. */
body.peak-c2 .chat > :is(.chat-scroll, .chat-wall-fx) { grid-row: 2; grid-column: 1 / -1; }
body.peak-c2 .chat > .chat-scroll { position: relative; z-index: 1; }
.chat-wall-fx { position: relative; z-index: 0; overflow: hidden; pointer-events: none; contain: strict; container-type: size; background: var(--fx-base, transparent); }
.chat-bg-swatch:has(> .chat-wall-fx) { position: relative; overflow: hidden; }
.chat-bg-swatch > .chat-wall-fx { position: absolute; inset: 0; }
:where(.chat-wall-fx) .fx { position: absolute; display: block; animation-play-state: paused; animation-timing-function: ease-in-out; animation-iteration-count: infinite; }
@media (prefers-reduced-motion: no-preference) {
  .chat-scroll.is-live ~ .chat-wall-fx .fx,
  .chat-bg-dialog:has([data-chat-motion]:checked) .chat-bg-option:is(:hover, :has(input:checked)) .fx { animation-play-state: running; }
}
.fx-img { inset: 0; background: var(--fx-img) var(--fx-pos, center) / cover no-repeat; }
.fx-drift {
  inset: -12%; will-change: transform;
  background: radial-gradient(42% 38% at 28% 30%, var(--fx-c1), transparent 72%), radial-gradient(46% 42% at 74% 64%, var(--fx-c2), transparent 72%),
    radial-gradient(30% 30% at 58% 12%, var(--fx-c3, transparent), transparent 72%);
  animation-name: chat-fx-drift; animation-duration: 130s;
}
.fx-drift-b {
  background: radial-gradient(36% 34% at 70% 22%, var(--fx-c3, transparent), transparent 72%), radial-gradient(40% 36% at 22% 76%, var(--fx-c2), transparent 72%);
  animation-name: chat-fx-drift-b; animation-duration: 170s;
}
.fx-glow {
  left: var(--x); top: var(--y); width: var(--s); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; opacity: 0.6;
  background: radial-gradient(closest-side, var(--g), transparent);
  animation-name: chat-fx-breathe; animation-duration: var(--d); animation-delay: var(--dl); animation-direction: alternate;
}
.fx-glow-0 { --g: var(--fx-g1); }
.fx-glow-1 { --g: var(--fx-g2, var(--fx-g1)); }
.fx-p { left: var(--x); top: 0; bottom: 0; width: var(--z); opacity: 0; animation-duration: var(--d); animation-delay: var(--dl); animation-timing-function: linear; }
.fx-p::before { content: ""; position: absolute; top: 100%; left: 0; width: var(--z); height: var(--z); border-radius: 50%; background: var(--fx-p); opacity: var(--po); }
.fx-dust { animation-name: chat-fx-rise; }
.fx-dust:nth-of-type(even) { animation-name: chat-fx-rise-b; }
.fx-star {
  left: var(--x); top: var(--y); width: var(--z); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: var(--fx-star, transparent); opacity: 0.35;
  animation-name: chat-fx-twinkle; animation-duration: var(--d); animation-delay: var(--dl); animation-direction: alternate;
}
.fx-mist {
  left: -25%; width: 150%; top: var(--y); height: var(--h); background: radial-gradient(50% 50% at 50% 50%, var(--fx-mist), transparent 72%);
  animation-name: chat-fx-mist; animation-duration: var(--d); animation-delay: var(--dl); animation-direction: alternate;
}
.fx-sheen {
  top: -50%; bottom: -50%; left: 0; width: 38%; background: linear-gradient(90deg, transparent, var(--fx-sheen), transparent);
  transform: translate3d(-160%, 0, 0) rotate(16deg); animation-name: chat-fx-sheen; animation-duration: 80s;
}
@keyframes chat-fx-drift { 0%, 100% { transform: translate3d(-3%, -2%, 0) rotate(0deg) scale(1); } 50% { transform: translate3d(3%, 2.5%, 0) rotate(5deg) scale(1.05); } }
@keyframes chat-fx-drift-b { 0%, 100% { transform: translate3d(2%, 3%, 0) rotate(0deg); } 50% { transform: translate3d(-3%, -2%, 0) rotate(-4deg); } }
@keyframes chat-fx-breathe { from { opacity: 0.55; transform: scale(1); } to { opacity: 0.95; transform: scale(1.08); } }
@keyframes chat-fx-twinkle { from { opacity: 0.25; } to { opacity: 0.7; } }
@keyframes chat-fx-rise { 0% { transform: translate3d(0, 0, 0); opacity: 0; } 12%, 82% { opacity: 1; } 100% { transform: translate3d(14px, -100%, 0); opacity: 0; } }
@keyframes chat-fx-rise-b { 0% { transform: translate3d(0, 0, 0); opacity: 0; } 12%, 82% { opacity: 1; } 100% { transform: translate3d(-12px, -100%, 0); opacity: 0; } }
@keyframes chat-fx-mist { from { transform: translate3d(-7%, 0, 0); } to { transform: translate3d(7%, 0, 0); } }
@keyframes chat-fx-sheen { 0%, 62% { transform: translate3d(-160%, 0, 0) rotate(16deg); } 100% { transform: translate3d(420%, 0, 0) rotate(16deg); } }

/* Rolig dybde: drift, glow and a little dust in the experience's colour – dark (the default), Sun, then light */
:is(.chat-wall--calm ~ .chat-wall-fx, .chat-wall--calm > .chat-wall-fx) {
  --fx-base: radial-gradient(120% 90% at 50% 0%, #0f1a2e, #0a1120 62%, #080d18);
  --fx-c1: rgb(79 195 247 / 0.16); --fx-c2: rgb(30 99 214 / 0.26); --fx-c3: rgb(155 231 255 / 0.08); --fx-g1: rgb(79 195 247 / 0.13); --fx-g2: rgb(120 140 255 / 0.1);
  --fx-p: rgb(200 230 255 / 0.9);
}
body[data-peak="sun"] :is(.chat-wall--calm ~ .chat-wall-fx, .chat-wall--calm > .chat-wall-fx) {
  --fx-base: radial-gradient(120% 90% at 50% 0%, #1a140c, #120e09 62%, #0d0a07);
  --fx-c1: rgb(255 179 0 / 0.12); --fx-c2: rgb(255 111 60 / 0.14); --fx-c3: rgb(255 224 130 / 0.07); --fx-g1: rgb(255 190 90 / 0.1); --fx-g2: rgb(255 120 80 / 0.09);
  --fx-p: rgb(255 228 180 / 0.9);
}
:root[data-theme="light"] :is(.chat-wall--calm ~ .chat-wall-fx, .chat-wall--calm > .chat-wall-fx) {
  --fx-base: radial-gradient(120% 90% at 50% 0%, #f6f9fc, #eff4f9 62%, #eaf0f7);
  --fx-c1: rgb(79 195 247 / 0.16); --fx-c2: rgb(30 99 214 / 0.08); --fx-c3: rgb(255 255 255 / 0.8); --fx-g1: rgb(255 255 255 / 0.7); --fx-g2: rgb(79 195 247 / 0.1);
  --fx-p: rgb(30 99 214 / 0.5);
}
:root[data-theme="light"] body[data-peak="sun"] :is(.chat-wall--calm ~ .chat-wall-fx, .chat-wall--calm > .chat-wall-fx) {
  --fx-base: radial-gradient(120% 90% at 50% 0%, #fdf9f1, #f9f3e7 62%, #f6eedf);
  --fx-c1: rgb(255 179 0 / 0.14); --fx-c2: rgb(255 111 60 / 0.08); --fx-c3: rgb(255 255 255 / 0.8); --fx-g1: rgb(255 255 255 / 0.7); --fx-g2: rgb(255 179 0 / 0.1);
  --fx-p: rgb(200 120 20 / 0.45);
}
/* Kontur: height lines around PEAK's peak, a glow over the summit and a band of light now and then */
:is(.chat-wall--contour ~ .chat-wall-fx, .chat-wall--contour > .chat-wall-fx) {
  --fx-base: #0b1120; --fx-img: url("/assets/img/chat/contour-dark.svg"); --fx-pos: 70% center; --fx-g1: rgb(79 195 247 / 0.08); --fx-sheen: rgb(255 255 255 / 0.035);
}
body[data-peak="sun"] :is(.chat-wall--contour ~ .chat-wall-fx, .chat-wall--contour > .chat-wall-fx) { --fx-base: #110e0a; --fx-g1: rgb(255 179 0 / 0.07); }
:root[data-theme="light"] :is(.chat-wall--contour ~ .chat-wall-fx, .chat-wall--contour > .chat-wall-fx) {
  --fx-base: #f1f5f9; --fx-img: url("/assets/img/chat/contour-light.svg"); --fx-g1: rgb(79 195 247 / 0.12); --fx-sheen: rgb(255 255 255 / 0.6);
}
:root[data-theme="light"] body[data-peak="sun"] :is(.chat-wall--contour ~ .chat-wall-fx, .chat-wall--contour > .chat-wall-fx) { --fx-base: #f9f5ec; --fx-g1: rgb(255 179 0 / 0.12); }
/* Alpeskumring: ridges in haze, mist that drifts and a few stars */
:is(.chat-wall--dusk ~ .chat-wall-fx, .chat-wall--dusk > .chat-wall-fx) {
  --fx-base: #0d1220; --fx-img: url("/assets/img/chat/dusk-dark.svg"); --fx-mist: rgb(200 190 220 / 0.07); --fx-star: rgb(230 236 250 / 0.7);
}
:root[data-theme="light"] :is(.chat-wall--dusk ~ .chat-wall-fx, .chat-wall--dusk > .chat-wall-fx) {
  --fx-base: #eef2f8; --fx-img: url("/assets/img/chat/dusk-light.svg"); --fx-mist: rgb(255 255 255 / 0.55); --fx-star: transparent;
}

@media (prefers-reduced-motion: no-preference) {
  body.peak-c2 .chat-tool { transition: transform var(--pk-dur-press) var(--pk-ease-out), background-color var(--pk-dur-quick) ease, color var(--pk-dur-quick) ease; }
  body.peak-c2 .chat-tool:active, .chat-send:active { transform: scale(0.92); }
  .chat-send, .chat-field-tools { transition: opacity var(--pk-dur-quick) var(--pk-ease-out), transform var(--pk-dur-quick) var(--pk-ease-out), visibility 0s; }
  .chat-form:has(textarea:placeholder-shown) .chat-send, .chat-form:has(textarea:not(:placeholder-shown)) .chat-field-tools {
    transition: opacity var(--pk-dur-quick) var(--pk-ease-out), transform var(--pk-dur-quick) var(--pk-ease-out), visibility 0s linear var(--pk-dur-quick); }
  body.peak-c2 .chat-more > summary .icon { transition: transform var(--pk-dur-base) var(--pk-ease-out); }
  body.peak-c2 .chat-more[open] > summary .icon { transform: rotate(45deg); }
  body.peak-c2 .chat-more[open] .chat-more-menu { animation: pk2-pop var(--pk-dur-quick) var(--pk-ease-out); transform-origin: bottom left; }
  body.peak-c2 .chat-picker:not([hidden]), .chat-info { animation: pk2-rise var(--pk-dur-base) var(--pk-ease-out); }
  body.peak-c2 .chat-form textarea { transition: border-color var(--pk-dur-quick) ease, padding var(--pk-dur-quick) var(--pk-ease-out); }
  .chat-menu:not([hidden]) { animation: pk2-pop var(--pk-dur-quick) var(--pk-ease-out); transform-origin: top left; }
  body.peak-c2 .chat-bubble[role="button"] { transition: filter var(--pk-dur-quick) ease, transform var(--pk-dur-press) var(--pk-ease-out); }
  body.peak-c2 .chat-msg.is-held .chat-bubble { transform: scale(0.98); }
}
@keyframes pk2-rise { from { opacity: 0; transform: translateY(6px); } }

/* Indbakke: the answer right under what it answers */
.pk2-item { display: grid; }
.pk2-answers { display: flex; gap: 8px; padding: 0 14px 12px 56px; margin: 0; }
.pk2-answers .pk2-btn { flex: 1; }

@media (min-width: 960px) {
  .pk2-page { padding-top: 8px; }
}
@media (min-width: 960px) {
  body.peak-c2 main.container { max-width: var(--pk2-page-max); margin: 0 auto; padding: 24px 24px 0; }
  /* Each kind of page gets the width it needs, centred in the space right of the rail. */
}
body.peak-c2.page-peak_indbakke { --pk2-page-max: 760px; } /* a list reads best narrow */
body.peak-c2:not(:has(.pk2-tabs)) { --pk2-page-max: 1120px; } /* signed out: the public pages */

/* The room's one timer: every look gets Stolelift's size (timers.css .cl-content), so switching look never changes
   the page. Each scene fills the height; the looks themselves are untouched. */
.pk2-timer .countdown { min-height: clamp(360px, 250px + 30vw, 470px); }
.pk2-timer .countdown .cd-scene { min-height: clamp(360px, 250px + 30cqi, 470px); justify-content: center; }

/* "Redigér skitur/festen": a gear beside the room's name, for those who may edit (app/peak/frame.php) */
.pk2-gear { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin-left: auto; border-radius: var(--pk-r-pill);
  background: var(--pk-surface-2); color: var(--pk-ink-2); }
.pk2-gear .icon { width: 20px; height: 20px; }
.pk2-gear:hover { color: var(--pk-ink); background: var(--pk-p-tint); }
.pk2-gear:focus-visible { outline: 3px solid var(--pk-p-ink); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .pk2-gear { transition: color var(--pk-dur-quick) ease, background-color var(--pk-dur-quick) ease; }
  .pk2-gear:hover .icon { transform: rotate(30deg); transition: transform var(--pk-dur-base) var(--pk-ease-out); }
}
/* The trip menu in the room: the active trip stands out, with its "Redigér" right under it */
.pk2-id .trip-item[aria-current] { background: var(--pk-p-tint); color: var(--pk-ink); }
.pk2-id .trip-edit { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 2px 0 6px; padding: 0 12px; border-radius: var(--pk-r-2);
  color: var(--pk-p-ink); font-weight: 600; text-decoration: none; }
.pk2-id .trip-edit .icon { width: 18px; height: 18px; }
.pk2-id .trip-edit:hover, .pk2-id .trip-edit:focus-visible { background: var(--pk-surface-2); }

/* A trip's overview (app/peak/room.php): one page – the timer and the day first, the features, and beside them on a
   computer what's coming and the group's chat. No second navigation. */
.pk2-room-grid { display: flex; flex-direction: column; gap: 20px; }
.pk2-room-main, .pk2-room-aside { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.pk2-features { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.pk2-feature { display: grid; gap: 2px; align-content: center; min-height: 64px; padding: 12px 14px; border-radius: var(--pk-r-2);
  background: var(--pk-surface); color: var(--pk-ink); text-decoration: none; }
.pk2-feature b { font-weight: 600; }
.pk2-feature small { color: var(--pk-ink-3); font-size: 0.8125rem; }
.pk2-feature:hover { background: color-mix(in srgb, var(--pk-p-tint) 60%, var(--pk-surface)); }
.pk2-feature:focus-visible { outline: 3px solid var(--pk-p-ink); outline-offset: 2px; }
.pk2-unread { flex: none; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--pk-r-pill); display: grid; place-items: center;
  background: var(--pk-p-solid); color: var(--pk-p-on); font-size: 0.75rem; }
.pk2-party-features { margin: 4px 0 16px; }
@media (min-width: 960px) {
  .pk2-room-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
  .pk2-room-aside { position: sticky; top: 24px; }
}

/* ---------- The trophy cabinet as round medals (app/peak/trophies.php) ----------
   Metals, enamel and glows are material (the medal's art), defined once per finish: --tier is the finish as a line
   colour (the ring's arcs), --glow the soft aura behind the medal. Both are softer in the light theme. A phone swipes
   one row of medals (scroll snap, the next one peeking in); from 640 px they stand in a grid. */
.pkm-cabinet [data-finish="bronze"] { --tier: #e0904f; --glow: rgb(232 140 70 / 0.34); }
.pkm-cabinet [data-finish="silver"] { --tier: #d4dbe4; --glow: rgb(214 228 245 / 0.26); }
.pkm-cabinet [data-finish="gold"] { --tier: #f2c04a; --glow: rgb(255 199 80 / 0.34); }
.pkm-cabinet [data-finish="ice"] { --tier: #7fd8ff; --glow: rgb(110 212 255 / 0.36); }
.pkm-cabinet [data-finish="custom"] { --tier: #b18cff; --glow: rgb(177 140 255 / 0.3); }
.pkm-cabinet [data-finish="locked"] { --tier: var(--pk-edge); --glow: rgb(224 144 79 / 0.1); }
:root[data-theme="light"] .pkm-cabinet [data-finish="bronze"] { --tier: #b0632a; --glow: rgb(214 120 50 / 0.24); }
:root[data-theme="light"] .pkm-cabinet [data-finish="silver"] { --tier: #7d8896; --glow: rgb(120 140 165 / 0.22); }
:root[data-theme="light"] .pkm-cabinet [data-finish="gold"] { --tier: #b78510; --glow: rgb(230 170 30 / 0.26); }
:root[data-theme="light"] .pkm-cabinet [data-finish="ice"] { --tier: #2a8fc8; --glow: rgb(40 160 225 / 0.24); }
:root[data-theme="light"] .pkm-cabinet [data-finish="custom"] { --tier: #7a52d6; --glow: rgb(122 82 214 / 0.2); }
:root[data-theme="light"] .pkm-cabinet [data-finish="locked"] { --glow: rgb(214 120 50 / 0.08); }
.pkm-svg[data-finish="bronze"] { --s1: #ffd3a6; --s2: #d98a4a; --s3: #8a4a1c; --s4: #c97a3c; --s5: #5e2f10; }
.pkm-svg[data-finish="silver"] { --s1: #ffffff; --s2: #d8dee6; --s3: #7d8794; --s4: #c3cad3; --s5: #4f5864; }
.pkm-svg[data-finish="gold"] { --s1: #fff4c2; --s2: #f4c54a; --s3: #9a6608; --s4: #e6b23a; --s5: #6b4606; }
.pkm-svg[data-finish="ice"] { --s1: #ffffff; --s2: #cdf3ff; --s3: #4fb2e6; --s4: #a6e3fb; --s5: #2a7fb8; }
.pkm-svg[data-finish="custom"] { --s1: #efe6ff; --s2: #c4a8ff; --s3: #6c45c9; --s4: #a888f0; --s5: #3e2380; }
.pkm-svg[data-finish="locked"] { --s1: var(--pk-surface-3); --s2: var(--pk-surface-2); --s3: var(--pk-surface); --s4: var(--pk-surface-2); --s5: var(--pk-ground);
  --c1: var(--pk-surface-2); --c2: var(--pk-surface); }
:root[data-theme="light"] .pkm-svg[data-finish="locked"] { --s1: #d5dce4; --s2: #c9d1da; --s3: #b3bdc9; --s4: #cdd5de; --s5: #a4afbc; --c1: #dde3ea; --c2: #cdd5de; }
.pkm-svg .s1 { stop-color: var(--s1); } .pkm-svg .s2 { stop-color: var(--s2); } .pkm-svg .s3 { stop-color: var(--s3); }
.pkm-svg .s4 { stop-color: var(--s4); } .pkm-svg .s5 { stop-color: var(--s5); }
.pkm-svg .c1 { stop-color: var(--c1, #2d3652); } .pkm-svg .c2 { stop-color: var(--c2, #0e1220); }
.pkm-svg .pkm-mill { fill: none; stroke: rgb(0 0 0 / 0.26); stroke-width: 1.6; stroke-dasharray: 0.8 1.8; }
.pkm-svg .pkm-hi { fill: none; stroke: rgb(255 255 255 / 0.75); stroke-width: 1.4; stroke-linecap: round; }
.pkm-svg .pkm-lo { fill: none; stroke: rgb(0 0 0 / 0.35); stroke-width: 1.4; stroke-linecap: round; }
.pkm-svg .pkm-gloss { fill: none; stroke: rgb(255 255 255 / 0.16); stroke-width: 3; stroke-linecap: round; }
.pkm-svg .pkm-facet { fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; opacity: 0.9; }
.pkm-svg[data-finish="locked"] .pkm-hi { opacity: 0.25; }
.pkm-svg[data-finish="locked"] .pkm-mill { stroke: var(--pk-edge); stroke-opacity: 0.35; }
.pkm-svg[data-finish="locked"] .pkm-bezel { stroke: var(--pk-edge); stroke-width: 1; stroke-dasharray: 2 3; }
.pkm-svg .pkm-track { fill: none; stroke: var(--pk-surface-3); stroke-width: 5; stroke-linecap: round; }
.pkm-svg .pkm-track.is-locked { stroke: var(--pk-edge); stroke-width: 2.2; stroke-dasharray: 0.1 6; opacity: 0.8; }
.pkm-svg .pkm-track.is-unavailable { stroke: var(--pk-edge); stroke-width: 2.2; stroke-dasharray: 3 4; opacity: 0.7; }
.pkm-svg .pkm-fill { fill: none; stroke: var(--tier); stroke-width: 5; stroke-linecap: round; filter: drop-shadow(0 0 3px var(--glow)); }

/* The medal: a fixed square, the emoji in its centre (assets/js/peak.js corrects each for its ink) */
.pkm-art { --s: 112px; position: relative; flex: none; width: var(--s); height: var(--s); display: grid; place-items: center; margin-bottom: 14px; }
.pkm-art .pkm-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 6px 9px rgb(0 0 0 / 0.38)); }
:root[data-theme="light"] .pkm-art .pkm-svg { filter: drop-shadow(0 5px 7px rgb(19 23 38 / 0.2)); }
.pkm-art[data-finish="locked"] .pkm-svg { filter: none; }
.pkm-aura { position: absolute; inset: -16%; border-radius: 50%; opacity: 0.75; background: radial-gradient(closest-side, var(--glow) 30%, transparent 100%); }
.pkm-emoji { position: relative; display: block; font: 400 calc(var(--s) * 0.3) / 1 "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  transform: translate(calc(var(--dx, 0px) + var(--ox, 0) * 1em), calc(var(--dy, 0px) + var(--oy, 0) * 1em)); }
.pkm-art[data-finish="locked"] .pkm-emoji { filter: grayscale(1); opacity: 0.42; }
.pkm-lock { position: absolute; right: 9%; bottom: 9%; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--pk-surface-2); color: var(--pk-ink-2); box-shadow: 0 0 0 2px var(--pk-ground); }
.pkm-lock .icon { width: 14px; height: 14px; }
/* Optical nudges, in em of the emoji: where an emoji's visual weight sits off its ink box (a mug's handle, a low bed) */
.pkm-emoji[data-ach="dranker"] { --ox: -0.04; }
.pkm-emoji[data-ach="sengens_konge"] { --oy: -0.03; }

/* The list: a row to swipe on a phone, a grid from 640 px */
.pkm-scroll { margin: 0 -16px; padding: 6px 16px 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  scroll-padding-inline: 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pkm-scroll::-webkit-scrollbar { display: none; }
.pkm-scroll:focus-visible { outline: 3px solid var(--pk-ink); outline-offset: -3px; border-radius: var(--pk-r-2); }
.pkm-list { display: grid; grid-auto-flow: column; grid-auto-columns: max(128px, 36.5vw); gap: 4px; /* about 2½ in view: the next one peeks in */ margin: 0; padding: 0; list-style: none; }
.pkm { position: relative; /* keeps its screen-reader text inside the scrolling row */ display: flex; flex-direction: column; align-items: center; min-width: 0;
  padding: 14px 6px 16px; text-align: center; scroll-snap-align: start; }
.pkm-name { margin: 0; font-size: 0.9375rem; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.pkm-tier { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 5px; max-width: 100%; margin: 4px 0 0; color: var(--pk-ink-2); font-size: 0.8125rem; }
.pkm-tn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pkm-tc { flex-basis: 100%; } /* a line of its own in the narrow phone column */
.pkm-tier .icon { width: 13px; height: 13px; flex: none; }
.pkm.is-locked .pkm-tier { color: var(--pk-ink-3); }
.pkm-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--tier); box-shadow: 0 0 6px var(--glow); }
.pkm-next { margin: 2px 0 0; color: var(--pk-ink-3); font-size: 0.8125rem; }
.pkm-next.is-done { color: var(--pk-ink-2); font-weight: 600; }
.pkm-remove { margin-top: 6px; }
@media (min-width: 640px) {
  .pkm-scroll { margin: 0; padding: 0; overflow: visible; scroll-snap-type: none; }
  .pkm-list { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px 10px; }
  .pkm-tc { flex-basis: auto; }
  .pkm-tc::before { content: "·" / ""; margin-right: 5px; } /* the separator is decoration: hidden from assistive tech */
}
@media (hover: hover) {
  .pkm:hover .pkm-aura { opacity: 1; }
  .pkm:not(.is-locked):hover .pkm-svg { filter: drop-shadow(0 6px 9px rgb(0 0 0 / 0.38)) drop-shadow(0 0 10px var(--glow)); }
}
@media (prefers-reduced-motion: no-preference) {
  .pkm-scroll { scroll-behavior: smooth; }
  .pkm-art .pkm-svg, .pkm-aura { transition: transform var(--pk-dur-quick) var(--pk-ease-out), opacity var(--pk-dur-quick) var(--pk-ease-out); }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .pkm:hover .pkm-art .pkm-svg { transform: translateY(-2px); }
  .pkm:hover .pkm-aura { transform: scale(1.06); }
}

/* The profile around the PEAK pass (app/peak/profile_c2.php, app/peak/pass.php). The pass is a physical object: its
   materials – graphite, glacier blue, obsidian – and the brand's three foil colours are art and live as local
   properties on the card, the same in both themes. Everything around it uses the C2 tokens. The layout follows the
   page's own width (a container). */
.pk2-page.pkp { --pkp-danger: #ff6b7f; display: block; width: 100%; container: pkp / inline-size; }
:root[data-theme="light"] .pkp { --pkp-danger: #c02b3d; }
body.peak-c2.page-profil { --pk2-page-max: 1200px; }
.pkp-layout { display: grid; gap: 28px; }
.pkp-side { display: grid; justify-items: center; gap: 14px; align-content: start; }
.pkp-main { min-width: 0; }
.pkp-main > .section:first-child { margin-top: 0; }
.pkp-back-link { margin: 0; }
@container pkp (min-width: 860px) {
  .pkp-layout { grid-template-columns: 340px minmax(0, 1fr); gap: 48px; align-items: start; }
  .pkp-side { position: sticky; top: 24px; }
}

/* The card's materials per class (a neutral one on someone else's profile) */
.pkp-pass { position: relative; width: 100%; max-width: 340px; aspect-ratio: 5 / 8; --fx: 0.28; --fy: 0.18;
  --m-bg: radial-gradient(120% 70% at 78% 26%, #474c54 0%, transparent 62%), linear-gradient(165deg, #383c43 0%, #26292e 55%, #1c1e22 100%);
  --m-solid: #26292e; --m-ink: #f2f3f5; --m-ink-2: #c3c7ce; --m-ink-3: #a5aab3; --m-topo: 0.16; --m-water: 0.36;
  --m-rim: rgb(214 220 228 / 0.42); --m-foil1: #eef1f5; --m-foil2: #b9c0ca; --m-foil3: #858d98; --m-dot: #c9ced6; --m-done: #dfe3e9; }
.pkp-pass[data-tier="business"] {
  --m-bg: repeating-linear-gradient(0deg, rgb(255 255 255 / 0.03) 0 1px, transparent 1px 3px),
    radial-gradient(110% 60% at 78% 28%, #2c6896 0%, transparent 62%), linear-gradient(170deg, #1f4f77 0%, #133353 50%, #0b2037 100%);
  --m-solid: #133353; --m-ink: #f2f9ff; --m-ink-2: #c6dcec; --m-ink-3: #abc6da; --m-topo: 0.19; --m-water: 0.4;
  --m-rim: rgb(190 232 255 / 0.4); --m-foil1: #e6f8ff; --m-foil2: #9fdcf5; --m-foil3: #4fb0e0; --m-dot: #9fdcf5; --m-done: #bfeaff; }
.pkp-pass[data-tier="first_class"] {
  --m-bg: radial-gradient(90% 55% at 76% 26%, rgb(126 96 210 / 0.24) 0%, transparent 66%), radial-gradient(80% 40% at 8% 100%, rgb(255 61 154 / 0.12), transparent 70%),
    linear-gradient(170deg, #18161f 0%, #0d0c13 55%, #060609 100%);
  --m-solid: #0d0c13; --m-ink: #f5f3fa; --m-ink-2: #c6c2d4; --m-ink-3: #a9a4ba; --m-topo: 0.15; --m-water: 0.32;
  --m-rim: rgb(255 201 77 / 0.38); --m-foil1: #7fdcff; --m-foil2: #ffc94d; --m-foil3: #ff3d9a; --m-dot: #ff3d9a; --m-done: #ffc94d; }

.pkp-tilt, .pkp-flipper { position: absolute; inset: 0; }
.pkp-face { position: absolute; inset: 0; overflow: hidden; isolation: isolate; border-radius: 22px; background: var(--m-bg); color: var(--m-ink);
  box-shadow: inset 0 0 0 1px var(--m-rim), 0 2px 6px rgb(0 0 0 / 0.3), 0 28px 48px -20px rgb(0 0 0 / 0.65); user-select: none; }
:root[data-theme="light"] .pkp-face { box-shadow: inset 0 0 0 1px var(--m-rim), 0 2px 4px rgb(19 23 38 / 0.18), 0 28px 44px -22px rgb(19 23 38 / 0.5); }
.pkp-pass[data-pass] .pkp-face { cursor: pointer; }
.pkp-back { visibility: hidden; }
.pkp-pass.is-flipped .pkp-front { visibility: hidden; }
.pkp-pass.is-flipped .pkp-back { visibility: visible; }

/* the contour map fades below the foil band; inside the summit's triangle it is brighter – the watermark */
.pkp-topo { position: absolute; inset: 0; width: 100%; height: 100%; opacity: var(--m-topo); pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 0 60%, rgb(0 0 0 / 0.3) 70%, rgb(0 0 0 / 0.18) 100%); mask-image: linear-gradient(#000 0 60%, rgb(0 0 0 / 0.3) 70%, rgb(0 0 0 / 0.18) 100%); }
.pkp-water { opacity: var(--m-water); clip-path: polygon(23.1% 66%, 70% 11.9%, 116.9% 66%); }
.pkp-back .pkp-topo { opacity: calc(var(--m-topo) * 0.6); transform: scaleX(-1); }
.pkp-ridge { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; pointer-events: none; }
.pkp-ridge .hi { stroke: rgb(255 255 255 / 0.16); stroke-width: 1; }
.pkp-ridge .lo { stroke: rgb(0 0 0 / 0.22); stroke-width: 1; }
.pkp-sheen { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle at calc(var(--fx) * 100%) calc(var(--fy) * 100%), rgb(255 255 255 / 0.1), transparent 46%); }
.pkp-pass.is-live .pkp-sheen { background: radial-gradient(circle at calc(var(--fx) * 100%) calc(var(--fy) * 100%), rgb(255 255 255 / 0.16), transparent 42%); }
.pkp-slot { position: absolute; top: 19px; left: 50%; width: 56px; height: 11px; margin-left: -28px; border-radius: 999px; background: var(--pk-ground);
  box-shadow: inset 0 2px 3px rgb(0 0 0 / 0.55), 0 1px 0 rgb(255 255 255 / 0.14); }

.pkp-top { position: absolute; top: 12px; left: 20px; right: 20px; height: 34px; display: flex; align-items: center; justify-content: space-between; }
.pkp-word { display: inline-flex; align-items: center; gap: 7px; }
.pkp-word b { font: 800 17px var(--pk-f-display); letter-spacing: -0.04em; }
.pkp-word b i { font-style: normal; color: var(--m-dot); }
.pkp-class { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.pkp-back .pkp-class { font-size: 14px; letter-spacing: 0.02em; }
.pkp-num { font-variant-numeric: tabular-nums; }

.pkp-id { position: absolute; left: 22px; right: 22px; bottom: calc(34% + 20px); }
.pkp-av { box-shadow: 0 0 0 3px var(--m-solid), 0 0 0 4.5px var(--m-foil2); }
.pkp-name { margin: 16px 0 0; font-size: 1.625rem; line-height: 1.1; color: var(--m-ink); overflow-wrap: anywhere; }
.pkp-handle { margin: 3px 0 0; font-size: 14px; color: var(--m-ink-2); }
.pkp-rank { margin: 12px 0 0; font-size: 15px; font-weight: 700; }
.pkp-rank span { font-weight: 400; color: var(--m-ink-2); }
.pkp-title { margin: 2px 0 0; font-size: 14px; color: var(--m-ink-2); }
.pkp-title b { color: var(--m-ink); font-weight: 600; }

/* the brand's three bands as foil, with a highlight that follows the pointer */
.pkp-foil { position: absolute; left: 0; right: 0; top: 66%; height: 15px; display: grid; grid-template-rows: 6fr 5fr 4fr; }
.pkp-foil i { display: block; }
.pkp-foil i:nth-child(1) { background: linear-gradient(90deg, var(--m-foil1), color-mix(in srgb, var(--m-foil1) 55%, #fff) 38%, var(--m-foil1) 64%, color-mix(in srgb, var(--m-foil1) 78%, #000)); }
.pkp-foil i:nth-child(2) { background: linear-gradient(90deg, var(--m-foil2), color-mix(in srgb, var(--m-foil2) 55%, #fff) 38%, var(--m-foil2) 64%, color-mix(in srgb, var(--m-foil2) 78%, #000)); }
.pkp-foil i:nth-child(3) { background: linear-gradient(90deg, var(--m-foil3), color-mix(in srgb, var(--m-foil3) 60%, #fff) 38%, var(--m-foil3) 64%, color-mix(in srgb, var(--m-foil3) 78%, #000)); }
.pkp-foil::after { content: ""; position: absolute; inset: 0; mix-blend-mode: screen; background-size: 260% 100%; background-position: calc((1.222 - var(--fx)) / 1.6 * 100%) 0;
  background-image: linear-gradient(100deg, transparent 36%, rgb(255 255 255 / 0.6) 47%, transparent 58%); }

.pkp-facts { position: absolute; top: calc(66% + 32px); left: 22px; right: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.pkp-facts dt { font-size: 13px; color: var(--m-ink-3); }
.pkp-facts dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; }
.pkp-prods { position: absolute; bottom: 68px; left: 22px; right: 22px; display: flex; gap: 16px; margin: 0; padding: 0; list-style: none; }
.pkp-prods li { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.pkp-prods li.is-off { color: var(--m-ink-3); font-weight: 400; }
.pkp-prods li.is-off svg { filter: grayscale(1); opacity: 0.45; }
.pkp-climb { position: absolute; bottom: 18px; left: 22px; right: 76px; height: 44px; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--m-ink-2); white-space: nowrap; }
.pkp-pass:not([data-pass]) .pkp-climb { right: 22px; }
.pkp-climb b { color: var(--m-ink); }
.pkp-ridgemini { flex: 1; height: 24px; min-width: 0; }
.pkp-ridgemini .rest { fill: rgb(255 255 255 / 0.07); }
.pkp-ridgemini .done { fill: var(--m-done); opacity: 0.85; }
.pkp-ridgemini .line { fill: none; stroke: var(--m-ink-3); stroke-width: 1; vector-effect: non-scaling-stroke; }
.pkp-ridgemini .here { fill: var(--m-ink); }

.pkp-flipbtn { position: absolute; right: 14px; bottom: 18px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; cursor: pointer;
  border: 1px solid var(--m-rim); border-radius: 999px; background: rgb(255 255 255 / 0.08); color: var(--m-ink); }
.pkp-flipbtn:hover { background: rgb(255 255 255 / 0.16); }
.pkp-flipbtn:focus-visible { outline: 3px solid var(--pk-ink); outline-offset: 2px; }

/* the back: one's own numbers and the last stamps */
.pkp-back-up { position: absolute; top: 62px; left: 22px; right: 22px; bottom: calc(34% + 14px); display: flex; flex-direction: column; gap: 10px; }
.pkp-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 0; }
.pkp-totals div { display: flex; flex-direction: column-reverse; }
.pkp-totals dt { font-size: 13px; color: var(--m-ink-2); }
.pkp-totals dd { margin: 0; font-size: 1.875rem; font-weight: 700; line-height: 1.1; }
.pkp-sf { margin: 0; font-size: 13px; color: var(--m-ink-3); }
.pkp-bstamps { display: flex; align-items: center; min-height: 64px; margin-top: auto; }
.pkp-bstamp { display: block; flex: none; }
.pkp-bstamp + .pkp-bstamp { margin-left: -8px; }
.pkp-bstamp.is-empty { display: grid; place-items: center; width: 64px; height: 64px; padding: 6px; border: 1.5px dashed var(--m-ink-3); border-radius: 50%;
  color: var(--m-ink-2); font-size: 11px; line-height: 1.15; text-align: center; }
.pkp-found { position: absolute; top: calc(66% + 32px); left: 22px; right: 22px; max-width: 22ch; margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.3; }
.pkp-valid { position: absolute; bottom: 22px; left: 22px; right: 76px; margin: 0; font-size: 13px; color: var(--m-ink-2); line-height: 1.35; }

/* stamps: a double ring in the product's ink; on the card always the dark-theme inks (the card is always dark) */
.pkp-stamp { flex: none; overflow: visible; color: var(--pk-p-ink); }
.pkp-stamp .outer { fill: none; stroke: currentColor; stroke-width: 3; }
.pkp-stamp .inner { fill: none; stroke: currentColor; stroke-width: 1.3; }
.pkp-stamp text { fill: currentColor; font: 700 10px var(--pk-f-body); letter-spacing: 0.16em; }
.pkp-stamp.is-pending .outer { stroke-dasharray: 5 4; stroke-width: 2; }
.pkp-stamp.is-pending { opacity: 0.6; }
.pkp-pass .pkp-stamp[data-x="ski"] { color: #7fd3fa; }
.pkp-pass .pkp-stamp[data-x="sun"] { color: #ffc94d; }

/* the stamps by year, on the page */
.pkp-year { margin: 18px 0 6px; font: 700 var(--pk-fs-3) var(--pk-f-display); letter-spacing: -0.02em; color: var(--pk-ink-3); }
.pkp-stamp-list { display: grid; margin: 0; padding: 0; list-style: none; }
.pkp-stamp-row { display: flex; align-items: center; gap: 16px; min-height: 44px; padding: 12px 0; box-shadow: inset 0 1px 0 var(--pk-line); color: var(--pk-ink); text-decoration: none; }
.pkp-stamp-row:hover b { text-decoration: underline; text-underline-offset: 3px; }
.pkp-stamp-t { display: grid; gap: 2px; min-width: 0; }
.pkp-stamp-t b { font-size: var(--pk-fs-2); font-weight: 700; }
.pkp-stamp-t span { font-size: var(--pk-fs-1); color: var(--pk-ink-2); }
.pkp-empty { margin: 0; color: var(--pk-ink-2); }
@container pkp (min-width: 860px) { .pkp-stamp-list { grid-template-columns: 1fr 1fr; column-gap: 28px; } }

/* the rows at the bottom of one's own profile (.pkp-links): a link on, its icon, name and a line */
.pkp-sets { box-shadow: inset 0 1px 0 var(--pk-line); }
.pkp-set { box-shadow: inset 0 -1px 0 var(--pk-line); scroll-margin-top: 24px; }
.pkp-set-ic { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--pk-surface-2); color: var(--pk-ink-2); }
.pkp-set-t { display: grid; flex: 1; gap: 1px; min-width: 0; }
.pkp-set-t b { font-size: var(--pk-fs-2); font-weight: 600; }
.pkp-set-t span { font-size: var(--pk-fs-1); color: var(--pk-ink-3); }
.pkp-set-chev { color: var(--pk-ink-3); }
.pkp-set-link { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 10px 4px; border-radius: var(--pk-r-1); color: inherit; text-decoration: none; }
.pkp-set-link:hover .pkp-set-t b { text-decoration: underline; text-underline-offset: 3px; }

/* the one authored moment: the pass turns over (3D) and tilts under the pointer – only with motion allowed */
@media (prefers-reduced-motion: no-preference) {
  .pkp-pass { perspective: 1500px; }
  .pkp-tilt { transform-style: preserve-3d; transition: transform 420ms var(--pk-ease-out); }
  .pkp-pass.is-live .pkp-tilt { transition-duration: 90ms; transform: rotateX(calc((0.5 - var(--fy)) * 7deg)) rotateY(calc((var(--fx) - 0.5) * 9deg)); }
  .pkp-flipper { transform-style: preserve-3d; transition: transform 300ms var(--pk-ease-out); }
  .pkp-face { -webkit-backface-visibility: hidden; backface-visibility: hidden; }
  .pkp-back { transform: rotateY(180deg); }
  .pkp-pass.is-flipped .pkp-flipper { transform: rotateY(180deg); }
  .pkp-set-chev { transition: transform var(--pk-dur-quick) var(--pk-ease-out); }
}

/* The PEAK trip pass (app/boardingpass.php with a travel plan, app/travel.php): the coloured band carries the trip's
   own short summary instead of the stats – three lines at most, the full text is on /rejse – and a line that says it
   is a PEAK travel document, not a ticket. */
.peak-c2 .bp-summary { display: block; }
.peak-c2 .bp-summary p { display: -webkit-box; overflow: hidden; margin: 0; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3;
  font-size: 0.95rem; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }
.peak-c2 .bp-summary-none { color: var(--ink-2); font-style: italic; }
.peak-c2 .bp-disclaimer { flex-basis: 100%; font-size: 0.72rem; color: var(--ink-2); }

/* ---------- The trip's room in sections (app/peak/room.php peak_room_sections_page(), PEAK Ski; prototype "C" in
   docs/peak/tur-koncepter/). The timer and what to do now side by side; then sections without frames, each heading
   with a hairline: Dagen, Turen (three previews, pictures of one height), Konkurrencer, Minder og fællesskab. On a
   phone Dagen and Turen scroll sideways (the next panel peeks in). The layout follows the room's own width. ---------- */
.pk2-page.pkt { display: grid; gap: 40px; width: 100%; container: pkt / inline-size; }
.pkt-band { display: grid; gap: 16px; --pkt-stacked: 1; /* app.js folds the timer by itself only while stacked */ }
.pkt-now { display: grid; align-content: start; gap: 16px; min-width: 0; }
.pkt-now > .card, .pkt-day > .card { margin: 0; }
.pkt-hero .pk2-hero { margin: 0; }
/* The app's timer folds into the trip's mark and name above it and grows back out of them like a bubble (PB36;
   app.js toggles .is-collapsed from data-pkt-toggle). Closing: the row closes on the iOS sheet curve while the timer
   rounds its corners, shrinks toward the mark (top left) and fades. Opening is a beat slower and lands with PEAK's soft
   overshoot (--pk-ease), so it swells into place and settles. Transitions, not keyframes: a tap mid-way turns it around
   from where it is. Timing is the owner's call (30 Oct 2026: slower, more bubble). */
/* Closing glides: easeInOutCubic (easings.net) – a soft start and a soft landing, not the sheet curve's snap */
.pkt-hero[data-pkt-timer] { --pkt-open: 750ms; --pkt-close: 750ms; --pkt-ease-fold: cubic-bezier(0.65, 0, 0.35, 1); display: grid; grid-template-rows: 1fr; }
.pkt-hero[data-pkt-timer] > * { min-height: 0; overflow: hidden; border-radius: var(--pk-r-3); transform-origin: 24px 0; }
.pkt-hero[data-pkt-timer].is-collapsed { grid-template-rows: 0fr; visibility: hidden; }
.pkt-hero[data-pkt-timer].is-collapsed > * { opacity: 0; transform: translateY(-12px) scale(0.9); border-radius: 64px; }
.pkt-band:has(> .pkt-hero.is-collapsed) { row-gap: 0; }
@media (prefers-reduced-motion: no-preference) {
  /* Closing (toward .is-collapsed) */
  .pkt-hero[data-pkt-timer] { transition: grid-template-rows var(--pkt-close) var(--pkt-ease-fold), visibility 0s linear var(--pkt-close); }
  /* The timer fades as it shrinks – over most of the fold, not before it – so it melts into the mark */
  .pkt-hero[data-pkt-timer] > * { transition: transform var(--pkt-close) var(--pkt-ease-fold), border-radius var(--pkt-close) var(--pkt-ease-fold), opacity calc(var(--pkt-close) * 0.8) var(--pkt-ease-fold) calc(var(--pkt-close) * 0.1); }
  /* Opening: the row opens on the sheet curve, the bubble swells in a beat later and settles with a soft overshoot */
  .pkt-hero[data-pkt-timer]:not(.is-collapsed) { transition: grid-template-rows var(--pkt-open) var(--pk-ease-sheet), visibility 0s; }
  .pkt-hero[data-pkt-timer]:not(.is-collapsed) > * { transition: transform var(--pkt-open) var(--pk-ease) 40ms, border-radius var(--pkt-open) var(--pk-ease-out) 40ms, opacity calc(var(--pkt-open) * 0.6) var(--pk-ease-out) 40ms; }
  .pkt-band { transition: row-gap 750ms cubic-bezier(0.65, 0, 0.35, 1), grid-template-columns var(--pk-dur-sheet) var(--pk-ease-sheet); }
  /* Press feedback on the trip's mark and name, the moment the finger lands */
  button.pk2-id-btn { transition: transform var(--pk-dur-press) var(--pk-ease-out); }
  button.pk2-id-btn:active { transform: scale(0.97); }
}
@media (prefers-reduced-motion: reduce) {
  /* No movement: the timer only cross-fades; the row opens and closes at once */
  .pkt-hero[data-pkt-timer] > *, .pkt-hero[data-pkt-timer].is-collapsed > * { transform: none; border-radius: var(--pk-r-3); transition: opacity var(--pk-dur-base) ease; }
}

/* Panels beside the timer and the shortcuts' rows */
.pkt-panel { display: grid; align-content: start; gap: 10px; padding: 18px 12px 8px; border-radius: var(--pk-r-3); background: var(--pk-surface); }
.pkt-panel > h2 { margin: 0; padding: 0 8px 4px; font-size: var(--pk-fs-3); color: var(--pk-ink); }
.pkt-activity > h2 { font-size: var(--pk-fs-2); }
.pkt-panel > p, .pkt-panel > .pkt-pack, .pkt-panel > .pk2-btn { margin-inline: 8px; }
.pkt-panel > .pk2-btn { justify-self: start; }
.pkt-when { margin: 0; font-weight: 700; color: var(--pk-p-ink); }
.pkt-muted { margin: 0; font-size: var(--pk-fs-1); color: var(--pk-ink-2); }
.pkt-pack { display: grid; gap: 8px; padding: 6px 0 4px; }
.pkt-meter { display: block; height: 6px; border-radius: var(--pk-r-pill); background: var(--pk-surface-2); overflow: hidden; }
.pkt-meter > span { display: block; height: 100%; border-radius: inherit; background: var(--pk-p-solid); }
.pkt-rows { display: grid; }
.pkt-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 18px; align-items: center; gap: 12px; min-height: 60px; padding: 8px 4px; border-radius: var(--pk-r-2); color: var(--pk-ink); text-decoration: none; }
.pkt-row + .pkt-row { box-shadow: 0 -1px 0 var(--pk-line); }
@media (hover: hover) and (pointer: fine) { .pkt-row:hover { background: var(--pk-surface-2); box-shadow: none; } .pkt-row:hover + .pkt-row { box-shadow: none; } }
.pkt-row:focus-visible, .pkt-prev:focus-visible { outline: 3px solid var(--pk-p-ink); outline-offset: 2px; }
.pkt-row-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--pk-p-tint); color: var(--pk-p-ink); }
.pkt-row-ic .icon { width: 20px; height: 20px; }
.pkt-row-text { display: grid; min-width: 0; }
.pkt-row-text b, .pkt-row-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pkt-row-text b { font-weight: 600; }
.pkt-row-text small { font-size: 0.8125rem; color: var(--pk-ink-2); }
.pkt-row > .icon { width: 18px; height: 18px; color: var(--pk-ink-3); }

/* Sections: a heading with a hairline (and, on a phone, "Swipe →" where the content scrolls sideways) */
.pkt-sec { display: grid; align-content: start; gap: 16px; min-width: 0; }
.pkt-sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0; padding-bottom: 10px; border-bottom: 1px solid var(--pk-line);
  font-size: var(--pk-fs-3); letter-spacing: -0.02em; }
.pkt-swipe { font-size: var(--pk-fs-1); font-weight: 600; letter-spacing: 0; color: var(--pk-ink-3); }
.pkt-compete h3 { margin: 0 0 4px; font-size: var(--pk-fs-2); }
.pkt-split { display: grid; gap: 40px; }
.pkt-split.is-together-first > :last-child { order: -1; }

/* The league: rank, face, name, a bar (decoration – the number says it) */
.pkt-league { display: grid; gap: 8px; margin: 6px 4px 10px; padding: 0; list-style: none; }
.pkt-league li { display: grid; grid-template-columns: 18px 32px minmax(0, 7rem) minmax(40px, 1fr) 2.5ch; align-items: center; gap: 10px; }
.pkt-rank { font: 800 var(--pk-fs-1) / 1 var(--pk-f-display); color: var(--pk-ink-3); text-align: center; }
.pkt-league li:first-child .pkt-rank { color: var(--pk-p-ink); }
.pkt-league-name { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.pkt-bar { height: 8px; border-radius: var(--pk-r-pill); background: var(--pk-surface-2); overflow: hidden; }
.pkt-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--pk-p-solid); }
.pkt-league b { font: 800 var(--pk-fs-2) / 1 var(--pk-f-display); text-align: right; font-variant-numeric: tabular-nums; }

/* The three previews: a picture of the feature's own data (all one height), its name, one line, where it goes */
.pkt-trio { display: grid; gap: 28px; }
.pkt-prev { display: grid; align-content: start; min-width: 0; color: var(--pk-ink); text-decoration: none; }
.pkt-visual { display: block; height: 168px; overflow: hidden; border-radius: var(--pk-r-2); }
.pkt-prev-body { display: grid; gap: 6px; padding: 14px 2px 4px; }
.pkt-prev h3 { margin: 0; font-size: var(--pk-fs-1); font-weight: 600; color: var(--pk-ink-2); letter-spacing: 0; }
@media (hover: hover) and (pointer: fine) { .pkt-prev:hover h3 { color: var(--pk-ink); } }
.pkt-prev-body p { margin: 0; font-size: var(--pk-fs-1); color: var(--pk-ink-2); }
.pkt-big { color: var(--pk-ink) !important; font: 700 var(--pk-fs-3) / 1.15 var(--pk-f-body) !important; letter-spacing: -0.02em; }
.pkt-status { color: var(--pk-p-ink) !important; font-weight: 700; }
.pkt-go { display: inline-flex; align-items: center; gap: 2px; margin-top: 2px; font-size: var(--pk-fs-1); font-weight: 600; color: var(--pk-p-ink); }
.pkt-go .icon { width: 16px; height: 16px; }
/* Pistekort: drawn mountains, the runs in their colours, the lifts, you (art – the runs keep their piste colours) */
.pkt-map { display: block; width: 100%; height: 100%; background: linear-gradient(var(--pk-p-tint), var(--pk-surface)); }
.pkt-map-far { fill: color-mix(in srgb, var(--pk-ink) 14%, var(--pk-surface)); }
.pkt-map-near { fill: color-mix(in srgb, var(--pk-ink) 24%, var(--pk-surface)); }
.pkt-run { fill: none; stroke-width: 4; stroke-linecap: round; }
.pkt-run-blue { stroke: #3b82f6; } .pkt-run-red { stroke: #e5484d; } .pkt-run-black { stroke: var(--pk-ink); }
.pkt-lift { fill: none; stroke: var(--pk-ink-3); stroke-width: 1.5; stroke-dasharray: 3 4; }
.pkt-you { fill: var(--pk-p-solid); stroke: var(--pk-surface); stroke-width: 3; }
/* Om rejsen: the trip pass's stub */
.pkt-ticket .pkt-visual { display: grid; align-content: center; gap: 14px; padding: 0 20px; background: var(--pk-surface); }
.pkt-ticket-route { display: flex; align-items: center; gap: 12px; font: 800 var(--pk-fs-5) / 1 var(--pk-f-display); letter-spacing: -0.03em; }
.pkt-ticket-route i { flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--pk-ink-3) 0 5px, transparent 5px 10px); }
.pkt-ticket-facts { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 4px 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pkt-ticket-facts small { display: block; font-size: 0.75rem; font-weight: 600; color: var(--pk-ink-2); }
/* Pisteavisen: a small front page in the paper's own type (newsprint is the paper's art, in both themes) */
.pkt-paper { display: grid; align-content: start; gap: 6px; height: 100%; padding: 12px 16px; background: #f6f1e6; color: #1d1a16; }
.pkt-paper-mast { padding-bottom: 6px; border-bottom: 2px solid #1d1a16; font: 1.5rem / 1 "UnifrakturMaguntia", serif; text-align: center; }
.pkt-paper-date { font: 600 0.75rem / 1.3 "Source Serif 4", Georgia, serif; text-align: center; color: #4a443d; }
.pkt-paper-kicker { font: 700 0.75rem / 1 "Source Serif 4", Georgia, serif; color: #a2271c; }
.pkt-paper-head { font: 900 1.35rem / 1.1 "Playfair Display", Georgia, serif; letter-spacing: -0.01em; }
.pkt-paper-deck { font: italic 500 0.875rem / 1.35 "Source Serif 4", Georgia, serif; color: #3d3730; }
.pkt-prev-pisteavisen { container: pktpaper / inline-size; }
@container pktpaper (max-width: 340px) { .pkt-paper-deck { display: none; } }
/* Wrapped and the gallery (after the trip) */
.pkt-wrapped { display: flex; align-items: flex-end; gap: 28px; height: 100%; padding: 0 20px 16px; background: linear-gradient(140deg, var(--pk-p-tint), var(--pk-surface) 70%); }
.pkt-wrapped b { display: block; font: 800 var(--pk-fs-6) / 0.9 var(--pk-f-display); letter-spacing: -0.04em; }
.pkt-wrapped small { font-size: var(--pk-fs-1); color: var(--pk-ink-2); }
.pkt-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 4px; height: 100%; background: var(--pk-surface); }
.pkt-photos img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: cover; }

/* Phone: Dagen and Turen scroll sideways – the next panel peeks in, each snaps into place */
@container pkt (max-width: 719px) {
  .pkt-scroll { display: flex; gap: 12px; margin-inline: -16px; padding: 0 16px 6px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px;
    overscroll-behavior-x: contain; scrollbar-width: none; }
  .pkt-scroll::-webkit-scrollbar { display: none; }
  .pkt-scroll > * { flex: 0 0 86%; min-width: 0; scroll-snap-align: start; }
  .pkt-day > .card { height: 100%; }
  .pkt-compete { padding: 16px 12px 8px; border-radius: var(--pk-r-3); background: var(--pk-surface); } /* beside a card, a card */
  .pkt-compete h3 { padding-inline: 4px; }
  .pkt-trio > .pkt-prev { border-radius: var(--pk-r-3); background: var(--pk-surface); overflow: hidden; }
  .pkt-trio .pkt-visual { border-radius: 0; }
  .pkt-trio .pkt-paper, .pkt-trio .pkt-photos { margin: 12px 12px 0; height: 156px; border-radius: var(--pk-r-1); overflow: hidden; }
  .pkt-trio .pkt-prev-pisteavisen .pkt-visual, .pkt-trio .pkt-prev-galleri .pkt-visual { height: auto; }
  .pkt-trio .pkt-prev-body { padding: 14px 16px 16px; }
}
@container pkt (min-width: 720px) {
  .pkt-swipe { display: none; }
  .pkt-day { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; gap: 32px; }
  .pkt-trio { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pkt-split { grid-template-columns: 1fr 1fr; gap: 48px; }
  .pkt > .pkt-sec-together .pkt-rows { grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .pkt > .pkt-sec-together .pkt-row:nth-child(2) { box-shadow: none; }
}
@container pkt (min-width: 900px) { /* a 1280 px screen gives the room about 980 px */
  .pkt-band { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; gap: 24px; }
  .pkt-band { --pkt-stacked: 0; }
  .pkt-band.is-solo, .pkt-band:has(> .pkt-hero.is-collapsed) { grid-template-columns: 1fr; }
  .pkt-band:has(> .pkt-hero.is-collapsed) > .pkt-now { max-width: 720px; } /* folded by hand: the day keeps its width */
  .pkt-trio { grid-template-columns: 5fr 4fr 3fr; }
}

/* ---------- Motion as building blocks (PB40, docs/design-system.md 1.10): use these, don't invent new motion ----------
   The fold (.pk-fold): everything that opens in place. A button with aria-expanded and aria-controls opens the panel
   (peak.js). Closing glides on ease-in-out-cubic over 750 ms – soft start, soft landing – while the content sinks a
   little and fades; opening is as long and settles with PEAK's soft overshoot (--pk-ease). Transitions, so a second
   tap mid-way turns it around. The trip's timer uses the same values. Reduced motion: a cross-fade, no height. */
.pk-fold { --pk-fold-ms: 750ms; --pk-fold-ease: cubic-bezier(0.65, 0, 0.35, 1); display: grid; grid-template-rows: 0fr; visibility: hidden; }
.pk-fold.is-open { grid-template-rows: 1fr; visibility: visible; }
.pk-fold > .pk-fold-in { min-height: 0; overflow: hidden; opacity: 0; transform: translateY(-10px) scale(0.98); transform-origin: 50% 0; }
.pk-fold.is-open > .pk-fold-in { opacity: 1; transform: none; }
.pk-fold.is-instant, .pk-fold.is-instant > .pk-fold-in { transition: none !important; } /* opened by the address (#…) */
@media (prefers-reduced-motion: no-preference) {
  .pk-fold { transition: grid-template-rows var(--pk-fold-ms) var(--pk-fold-ease), visibility 0s linear var(--pk-fold-ms); }
  .pk-fold > .pk-fold-in { transition: transform var(--pk-fold-ms) var(--pk-fold-ease), opacity calc(var(--pk-fold-ms) * 0.8) var(--pk-fold-ease) calc(var(--pk-fold-ms) * 0.1); }
  .pk-fold.is-open { transition: grid-template-rows var(--pk-fold-ms) var(--pk-ease-sheet), visibility 0s; }
  .pk-fold.is-open > .pk-fold-in { transition: transform var(--pk-fold-ms) var(--pk-ease, var(--pk-ease-out)) 40ms, opacity calc(var(--pk-fold-ms) * 0.6) var(--pk-ease-out) 40ms; }
}
@media (prefers-reduced-motion: reduce) {
  .pk-fold > .pk-fold-in { transform: none; transition: opacity var(--pk-dur-base) ease; }
}

/* The segmented choice (.pk-seg): one rail; the choice is the bubble (peak.js BUBBLE_ROWS) */
.pk-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--pk-r-pill); background: var(--pk-surface-2); }
.pk-seg form { display: contents; }
.pk-seg button { min-height: 36px; padding: 0 14px; border: 0; border-radius: var(--pk-r-pill); background: none; color: var(--pk-ink-2);
  font: inherit; font-size: var(--pk-fs-1); font-weight: 600; line-height: 1; cursor: pointer; touch-action: manipulation; white-space: nowrap; }
.pk-seg button[aria-pressed="true"] { background: var(--pk-ink); color: var(--pk-ground); }
.pk-seg button:focus-visible { outline: 3px solid var(--pk-p-ink); outline-offset: 2px; }

/* The switch (.pk-switch): a real checkbox (.pk-switch-in, role="switch") drawn as a switch whose knob is a bubble – it
   stretches while pressed and lands with an overshoot */
.pk-switch-in { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.pk-switch { flex: none; position: relative; width: 50px; height: 30px; border-radius: var(--pk-r-pill); background: var(--pk-surface-3); }
.pk-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 12px; background: var(--pk-ink-2); }
.pk-switch-in:checked + .pk-switch { background: var(--pk-p-solid); }
.pk-switch-in:checked + .pk-switch::after { transform: translateX(20px); background: var(--pk-p-on); }
.pk-switch-in:focus-visible + .pk-switch { outline: 3px solid var(--pk-p-ink); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .pk-switch { transition: background-color 220ms ease; }
  .pk-switch::after { transition: transform 420ms var(--pk-ease, var(--pk-ease-out)), width 200ms var(--pk-ease-out), background-color 200ms ease; }
  label:active > .pk-switch::after { width: 30px; }
  label:active > .pk-switch-in:checked + .pk-switch::after { transform: translateX(14px); }
}

/* ---------- The profile's bottom: four ways on (Tour, Konto og abonnement, Indstillinger, Feedback) ---------- */
.pkp-links .pkp-sets { margin: 0; padding: 0; list-style: none; }
.pkp-links button.pkp-set-link { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.pkp-set-link:focus-visible { outline: 3px solid var(--pk-p-ink); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .pkp-set-link { transition: transform var(--pk-dur-press) var(--pk-ease-out); }
  .pkp-set-link:active { transform: scale(0.985); }
}

/* ---------- Indstillinger (.pks, app/peak/settings.php): one calm page – groups of rows with hairlines, no cards ---------- */
.pks { display: grid; gap: 28px; max-width: 640px; padding-bottom: 32px; }
.pks-top { display: grid; gap: 4px; }
.pks-top h1 { margin: 0; font-size: var(--pk-fs-5, 1.75rem); letter-spacing: -0.02em; }
.pks-group { display: grid; gap: 6px; }
.pks-list { margin: 0; padding: 0; list-style: none; box-shadow: inset 0 1px 0 var(--pk-line); }
.pks-row { box-shadow: inset 0 -1px 0 var(--pk-line); scroll-margin-top: 24px; }
.pks-line { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 4px; }
.pks-line .pkp-set-t { flex: 1; }
button.pks-line { width: 100%; border: 0; border-radius: var(--pk-r-1); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
button.pks-line:focus-visible { outline: 3px solid var(--pk-p-ink); outline-offset: -3px; }
.pks-line .pkp-set-chev { transform: rotate(90deg); }
.pks-line[aria-expanded="true"] .pkp-set-chev { transform: rotate(-90deg); }
@media (prefers-reduced-motion: no-preference) { .pks-line .pkp-set-chev { transition: transform 420ms var(--pk-ease, var(--pk-ease-out)); } }
.pks-body { display: grid; gap: 18px; padding: 2px 4px 22px; }
@media (min-width: 640px) { .pks-body { padding-left: 58px; } }
.pks-kinds { margin: 0; padding: 0; list-style: none; }
.pks-kind { display: flex; align-items: center; gap: 14px; min-height: 56px; box-shadow: inset 0 -1px 0 var(--pk-line); cursor: pointer; }
.pks-kinds > li:last-child .pks-kind { box-shadow: none; }
.pks-kind .pkp-set-t { flex: 1; }
.pks-note { margin: 0; font-size: var(--pk-fs-1); color: var(--pk-ink-3); }
.pks-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.pks-sub { margin: 6px 0 0; font-size: var(--pk-fs-2); font-weight: 600; }
.pks-row.is-danger .pkp-set-t b, .pks-row.is-danger .pkp-set-ic { color: var(--pkp-danger); }
.pks-devices { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.pks-devices li { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pks-body .avatar-edit { justify-content: flex-start; }
.pks-foot { margin: 0 4px; font-size: var(--pk-fs-1); color: var(--pk-ink-3); }
.pks-foot a { color: inherit; }
/* a phone: the choice under its name when the row is narrow */
@media (max-width: 420px) {
  .pks-line.has-seg { flex-wrap: wrap; }
  .pks-line.has-seg .pk-seg { margin-left: 54px; }
}

/* ---------- Dagens Bummert (the stage) and Missioner (the list) – app/peak/dagens.php, PB44 ----------
   One reading column under the Dagens tabs. Rows are .pk2-list rows; a row's chevron opens its details with the fold
   (.pk-fold); the filter row gets the bubble (peak.js BUBBLE_ROWS). Prototype: docs/peak/dagens-koncepter/. */
body.peak-c2 main.container:has(> .pdg-page) { max-width: calc(760px + 48px); }
main:has(> .pdg-page) > .dagens-tabs { margin-bottom: 20px; }
.pdg-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.pdg-page h1, .pdg-page h2 { letter-spacing: 0; }

/* The stage (Bummert): the title holder with the hat and the line, under the heading row */
.pdg-stage { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; }
.pdg-stage-avatar { display: inline-grid; }
.pdg-stage-avatar .has-clown-hat { margin-top: 40px; } /* the hat stands half an avatar above it – clear of the tabs */
.pdg-stage-text { display: grid; gap: 4px; min-width: 0; }
.pdg-stage-name { margin: 0; font: 800 var(--pk-fs-4) / 1.05 var(--pk-f-display); color: var(--pk-ink); overflow-wrap: anywhere; }
.pdg-stage-line { margin: 0; color: var(--pk-ink-2); font-size: var(--pk-fs-2); line-height: 1.35; }
@media (max-width: 639px) { .pdg-stage-avatar .avatar, .pdg-stage-avatar .has-clown-hat { --s: 96px !important; } .pdg-stage-avatar .has-clown-hat { margin-top: 32px; } }
@media (min-width: 640px) {
  .pdg-stage { gap: 24px; }
  .pdg-stage-name { font-size: var(--pk-fs-5); }
}

/* The heading (both pages): the button by the heading. The bar (Missioner): the filter sticks under the header while scrolling */
.pdg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
body.peak-c2 .pdg-head h1 { margin: 0; font: 700 var(--pk-fs-3) / 1.2 var(--pk-f-body); color: var(--pk-ink); }
.pdg-bar { position: sticky; top: 60px; z-index: 3; margin: 0 -8px; padding: 4px 8px; border-radius: var(--pk-r-3);
  background: color-mix(in srgb, var(--pk-ground) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
@media (min-width: 960px) { .pdg-bar { top: 0; } }

/* The filter: the choices without a container (the Dagens tabs above keep theirs), 44 px to tap, the chip's selected look */
.pk-filter { display: flex; gap: 4px; width: fit-content; max-width: 100%; padding-right: 24px; overflow-x: auto; scrollbar-width: none;
  mask-image: linear-gradient(to right, black calc(100% - 24px), transparent); }
.pk-filter::-webkit-scrollbar { display: none; }
.pk-filter a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: var(--pk-r-pill);
  color: var(--pk-ink-2); font-weight: 600; font-size: var(--pk-fs-1); text-decoration: none; }
.pk-filter a[aria-current="true"] { background: var(--pk-ink); color: var(--pk-ground); }
.pk-filter a small { margin-left: 5px; font-size: var(--pk-fs-1); font-weight: 600; opacity: 0.75; }
@media (hover: hover) and (pointer: fine) { .pk-filter a:not([aria-current="true"]):hover { color: var(--pk-ink); } }
.pdg-panel { display: grid; gap: 14px; }
.pdg-panel[hidden] { display: none; }
.pdg-sec-title { margin-top: 4px; }
.pdg-empty { padding: 20px; }

/* Rows: who, the line, one thing to press – and the chevron that folds the rest out */
.pdg-list { list-style: none; margin: 0; padding: 0; }
body.peak-c2 .pdg-row { display: block; position: relative; min-height: 0; padding: 0; }
.pdg-row-main { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px; }
.pdg-row-main > form { margin: 0; flex: none; }
.pdg-avatar { display: inline-grid; flex: none; place-items: center; }
.pdg-avatar .has-clown-hat { margin-top: 12px; }
.pdg-thumb img { width: 44px; height: 44px; border-radius: var(--pk-r-1); object-fit: cover; display: block; }
.pdg-row-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pdg-row-text b { font-weight: 600; font-size: var(--pk-fs-2); line-height: 1.3; color: var(--pk-ink); overflow-wrap: anywhere; }
.pdg-row-text small { font-size: var(--pk-fs-1); color: var(--pk-ink-2); line-height: 1.35; }
.pdg-row-text .badge { margin-left: 4px; vertical-align: 1px; }
.pdg-quote { font-style: italic; }
.pdg-row.is-lost .pdg-row-text b, .pdg-ms.is-missed .pdg-row-text b, .pdg-ms.is-rejected .pdg-row-text b { color: var(--pk-ink-3); font-weight: 500; }

.pdg-more { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: -6px -8px -6px 0; padding: 0; border: 0;
  border-radius: 50%; background: none; color: var(--pk-ink-3); cursor: pointer; }
.pdg-more .icon { width: 20px; height: 20px; transform: rotate(90deg); }
.pdg-more[aria-expanded="true"] .icon { transform: rotate(-90deg); }
@media (hover: hover) and (pointer: fine) { .pdg-more:hover { background: var(--pk-surface-2); color: var(--pk-ink); } }
@media (prefers-reduced-motion: no-preference) { .pdg-more .icon { transition: transform var(--pk-dur-base) var(--pk-ease-out); } }
.pdg-fold { display: grid; gap: 12px; justify-items: start; padding: 0 14px 16px 66px; }
.pdg-fold > * { margin: 0; max-width: 100%; }
@media (max-width: 480px) { .pdg-fold { padding-left: 14px; } }

.pdg-body { color: var(--pk-ink); font-size: var(--pk-fs-2); line-height: 1.45; }
.pdg-meta { color: var(--pk-ink-2); font-size: var(--pk-fs-1); line-height: 1.5; }
.pdg-strong { color: var(--pk-ink); font-weight: 600; }
.pdg-meta form, .pdg-inline { display: inline; margin: 0; }
.pdg-link { border: 0; padding: 0; background: none; color: var(--pk-ink-2); font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.pdg-link:hover { color: var(--pk-ink); }
.pdg-photos { display: flex; flex-wrap: wrap; gap: 6px; }
.pdg-photos img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--pk-r-1); display: block; }
.pdg-alibi { padding-left: 14px; border-left: 2px solid var(--pk-p-solid); }
.pdg-alibi p { margin: 0; color: var(--pk-ink); font-size: var(--pk-fs-2); line-height: 1.45; }
.pdg-alibi footer { margin-top: 4px; color: var(--pk-ink-2); font-size: var(--pk-fs-1); }
.pdg-actions { display: flex; justify-content: flex-end; margin: 0; }

/* The vote: a pill with the hat, the product's colour when it is yours, pressed like the bubble */
.pdg-vote.bm-vote { min-height: 44px; padding: 0 12px 0 8px; gap: 4px; border: 0; border-radius: var(--pk-r-pill); background: var(--pk-surface-2);
  color: var(--pk-ink); font: 700 var(--pk-fs-2) / 1 var(--pk-f-body); }
.pdg-hat { display: inline-grid; width: 22px; height: 22px; }
.pdg-hat svg { width: 100%; height: 100%; display: block; }
.pdg-vote.bm-vote[aria-pressed="true"] { background: var(--pk-p-solid); color: var(--pk-p-on); border-color: transparent; }
.pdg-vote.bm-vote:disabled { opacity: 1; background: transparent; color: var(--pk-ink-2); }
.pdg-vote.bm-vote:disabled .pdg-hat { opacity: 0.6; }
@media (prefers-reduced-motion: no-preference) {
  .pdg-vote.bm-vote { transition: transform var(--pk-dur-press) var(--pk-ease-out), background-color var(--pk-dur-quick) var(--pk-ease-out), color var(--pk-dur-quick) var(--pk-ease-out); }
  .pdg-vote.bm-vote:not(:disabled):active { transform: scale(0.96); }
  .pdg-vote.bm-vote.is-bump { animation: none; }
}

/* The crowning: the site's own overlay, in the product's colour */
body.peak-c2 .bm-reveal-card { border-color: var(--pk-p-solid); border-radius: var(--pk-r-3); background: var(--pk-surface); }
body.peak-c2 .bm-reveal-stage .avatar { box-shadow: 0 0 0 5px var(--pk-surface), 0 0 0 8px var(--pk-p-solid); }

/* Missioner */
.pdg-ic { display: inline-grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--pk-surface-2); color: var(--pk-ink-2); }
.pdg-ic .icon { width: 20px; height: 20px; }
.pdg-ms.is-contest .pdg-ic { background: var(--pk-p-tint); color: var(--pk-p-ink); }
.pdg-sf { flex: none; min-width: 36px; padding: 0 9px; border-radius: var(--pk-r-pill); background: var(--pk-surface-2); color: var(--pk-ink);
  font-weight: 700; font-size: var(--pk-fs-1); line-height: 28px; text-align: center; }
.pdg-sf.is-won { background: var(--pk-p-solid); color: var(--pk-p-on); }
.pdg-state { font-weight: 600; }
.pdg-state.is-done { color: var(--pk-p-ink); }
.pdg-meter { position: relative; width: 100%; height: 22px; border-radius: var(--pk-r-pill); background: var(--pk-surface-2); overflow: hidden; }
.pdg-meter > span { position: absolute; inset: 0 auto 0 0; background: var(--pk-p-solid); border-radius: inherit; }
.pdg-meter > b { position: relative; display: block; text-align: center; font-size: var(--pk-fs-1); line-height: 22px; color: var(--pk-ink); }
.pdg-proof img { width: 120px; height: 90px; object-fit: cover; border-radius: var(--pk-r-1); display: block; }
.pdg-board.contest-board { width: 100%; margin: 0; padding: 0; list-style: none; display: grid; }
.pdg-board.contest-board li { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px; padding: 6px 0; border: 0;
  border-top: 1px solid var(--pk-line); border-radius: 0; background: none; font-size: var(--pk-fs-1); }
.pdg-board.contest-board li:first-child { border-top: 0; }
.pdg-board.contest-board li.is-lead { background: none; box-shadow: none; }
.pdg-board.contest-board li.is-lead > b { color: var(--pk-p-ink); }
.pdg-board.contest-board li.is-me b { color: var(--pk-ink); }
.pdg-board .cb-place { color: var(--pk-ink-3); font-weight: 700; }
.pdg-complete { display: grid; gap: 8px; width: 100%; }
.pdg-complete .field { margin: 0; }
.pdg-complete .pk2-btn { justify-self: start; }
.pdg-review-acts { display: flex; gap: 8px; margin: 0; padding: 0 14px 14px 70px; }
@media (max-width: 480px) { .pdg-review-acts { padding-left: 14px; } }
.pdg-place { width: 22px; text-align: center; font-weight: 700; color: var(--pk-ink-3); }
.pdg-boardlist .is-lead .pdg-place { color: var(--pk-p-ink); }
.pdg-points { font-weight: 700; color: var(--pk-ink); }

/* The dialogs: what you need first, the rest under "Mere" / "Flere valg" */
.pdg-details { border-top: 1px solid var(--pk-line); padding-top: 8px; }
.pdg-details > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-weight: 600; color: var(--pk-ink-2); list-style: none; }
.pdg-details > summary::-webkit-details-marker { display: none; }
.pdg-details > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.pdg-details[open] > summary::before { transform: rotate(45deg); }
.pdg-details > * + * { margin-top: 12px; }
.pdg-dialog .seg small { color: var(--pk-ink-3); }

/* ---------- The propaganda button (bullshit.php, docs/peak/propaganda-koncepter/) ----------
   PEAK Ski's deep blue disc with the sky-blue rim, a megaphone and its three lines; the press lives in bullshit.js (WAAPI).
   The disc keeps its blue in both themes. */
.bs-button {
  position: relative; justify-self: center; display: grid; place-items: center; width: 176px; height: 176px;
  padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; -webkit-user-select: none; user-select: none;
}
.bs-button:focus-visible { outline: 3px solid var(--pk-ski); outline-offset: 8px; }
@media (min-width: 760px) { .bs-button { margin-inline: 48px; } } /* the rings spread 44 px past the disc; beside the heading it sits at the edge */
.bs-disc {
  position: relative; display: grid; place-content: center; justify-items: center; gap: 4px; width: 100%; height: 100%;
  border-radius: 50%; overflow: hidden; color: white;
  background: radial-gradient(130% 130% at 26% 16%, color-mix(in srgb, var(--pk-ski) 60%, var(--pk-ski-2)) 0%, var(--pk-ski-2) 36%, color-mix(in srgb, var(--pk-ski-2) 42%, black) 100%);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--pk-ski) 85%, transparent), 0 0 22px 2px color-mix(in srgb, var(--pk-ski) 40%, transparent),
    inset 0 1px 0 color-mix(in srgb, white 30%, transparent), inset 0 -10px 24px color-mix(in srgb, black 25%, transparent);
}
.bs-flare {
  position: absolute; inset: 0; border-radius: 50%; opacity: 0; pointer-events: none;
  background: radial-gradient(circle, transparent 52%, color-mix(in srgb, var(--pk-ski) 60%, transparent) 100%);
}
.bs-ring { position: absolute; inset: 0; border: 2px solid var(--pk-ski); border-radius: 50%; opacity: 0; pointer-events: none; }
.bs-icon { width: 80px; height: 60px; margin-top: -4px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.bs-horn { transform-box: fill-box; transform-origin: 30% 40%; }
.bs-wave { stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.bs-label { font: 800 1.375rem / 1 ui-rounded, "SF Pro Rounded", var(--pk-f-body); letter-spacing: 0; text-shadow: 0 1px 2px color-mix(in srgb, black 30%, transparent); }
@media (hover: hover) {
  .bs-button:hover .bs-disc { box-shadow: 0 0 0 2px var(--pk-ski), 0 0 30px 4px color-mix(in srgb, var(--pk-ski) 55%, transparent),
    inset 0 1px 0 color-mix(in srgb, white 30%, transparent), inset 0 -10px 24px color-mix(in srgb, black 25%, transparent); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .bs-disc { transition: box-shadow var(--pk-dur-base) var(--pk-ease-out); } }

/* ---------- Giv en omgang (render_logger(), dashboard.js – the owner's choice A · Ark, 11 Nov 2026) ----------
   A button across the logger under "Jeg er oppe!" and "+1 øl" – quieter than they are – opens a sheet: from the bottom on
   a phone, in the middle on a computer. The people are the logger's own chips; chosen is aria-pressed (a round is
   several people). After giving, today's panel shows the giver's rounds, and the message can undo it. */
.log-actions .round-btn {
  grid-column: 1 / -1; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 16px;
  border: 1px solid var(--pk-line); border-radius: 18px; background: var(--pk-surface-2); color: var(--pk-ink);
  font: 800 1rem / 1.15 "Bricolage Grotesque", sans-serif; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.round-btn .round-emoji { font-size: 1.5rem; line-height: 1; }
.round-btn[disabled] { opacity: 0.7; }
.round-btn .bubble { background: color-mix(in srgb, #f7a51c 70%, white); }
.round-btn:focus-visible, .round-give:focus-visible, .round-chip:focus-visible { outline: 3px solid var(--pk-ski); outline-offset: 2px; }
.round-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.round-chip[aria-pressed="true"] { background: color-mix(in srgb, var(--c) 22%, var(--surface-2)); border-color: var(--c); box-shadow: 0 0 0 1px var(--c); }
.round-chip[aria-pressed="false"] { opacity: 0.55; }
.round-chip[aria-pressed="false"] .avatar { filter: grayscale(1); }
.round-give {
  width: 100%; min-height: 52px; margin-top: 14px; border: 0; border-radius: var(--pk-r-pill);
  background: var(--pk-ink); color: var(--pk-ground); font: 700 var(--pk-fs-2) / 1 var(--pk-f-body); cursor: pointer;
}
.round-give:disabled { opacity: 0.4; cursor: default; }
.round-sheet {
  width: min(100% - 24px, 440px); max-width: none; margin: auto auto 12px; padding: 18px 18px 20px;
  border: 0; border-radius: var(--pk-r-3); background: var(--pk-surface); color: var(--pk-ink);
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.35);
}
.round-sheet::backdrop { background: rgb(0 0 0 / 0.45); }
.round-sheet header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.round-sheet h2 { margin: 0; font: 800 var(--pk-fs-4) / 1.1 var(--pk-f-display); }
@media (min-width: 760px) { .round-sheet { margin: auto; } }
.today-rounds { font-weight: 700; }
.toast.has-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; pointer-events: auto; }
.toast.has-action button {
  flex: none; min-height: 36px; padding: 0 14px; border: 0; border-radius: var(--pk-r-pill);
  background: color-mix(in srgb, var(--bg) 18%, transparent); color: inherit; font: 700 0.875rem / 1 var(--pk-f-body); cursor: pointer;
}
@media (prefers-reduced-motion: no-preference) {
  .round-btn { transition: transform var(--pk-dur-press) var(--pk-ease-out); }
  .round-btn:active { transform: scale(0.97); }
  .round-chip { transition: opacity var(--pk-dur-quick) var(--pk-ease-out), background-color var(--pk-dur-quick) var(--pk-ease-out); }
  .round-sheet[open] { animation: round-rise var(--pk-dur-sheet, 420ms) var(--pk-ease-sheet, var(--pk-ease-out)); }
  .round-sheet[open]::backdrop { animation: round-dim var(--pk-dur-base) var(--pk-ease-out); }
}
@keyframes round-rise { from { opacity: 0; transform: translateY(32px); } }
@keyframes round-dim { from { opacity: 0; } }
