/* biome-ignore-all lint/style/noDescendingSpecificity: component layers intentionally follow app.css order */
/* biome-ignore-all lint/complexity/noImportantStyles: reduced-motion must override all animations */
/* Shared look: tokens, fonts, base type and components. Loaded after app.css, so the token
   names app.css already uses are redefined here and existing screens pick up the new palette.
   Source of truth: docs/mockups/2026-11-11-visual-direction.html. No inline styles anywhere. */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/manrope-400.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/manrope-600.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/manrope-700.woff2") format("woff2");
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/schibsted-grotesk-600.woff2") format("woff2");
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/schibsted-grotesk-700.woff2") format("woff2");
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/static/schibsted-grotesk-800.woff2") format("woff2");
}

/* ---------- tokens ---------- */
:root {
  --bg: #f3f7fc;
  --card: #ffffff;
  --alt: #f6f9fd;
  --ink: #0d1728;
  --text: #3a475c;
  --mute: #5c6c84;
  --line: #dde6f1;
  --pri: #1566d6;
  --pri2: #0e8fb3;
  --on: #ffffff;
  --soft: #e8f1fe;
  --ok: #12805c;
  --ok-soft: #e1f5ed;
  --warm: #9a5808;
  --warm-soft: #fdf1df;
  --vio: #6b4fd8;
  --vio-soft: #eeeafc;
  --rose: #bd2f56;
  --rose-soft: #fbe8ee;
  --cyan-t: #0a748c;
  --cyan-soft: #dff6fb;
  --bad: #c23a31;
  --bad-soft: #fbeceb;
  --grad: linear-gradient(120deg, #1e7af0, #19c2e6);
  --btn-grad: linear-gradient(120deg, #1259bf, #0b78b8);
  --on-btn: #ffffff;
  --sh1: 0 1px 2px rgba(13, 23, 40, 0.05), 0 8px 24px rgba(13, 23, 40, 0.07);
  --sh2: 0 2px 4px rgba(13, 23, 40, 0.05), 0 24px 60px rgba(13, 23, 40, 0.12);
  --glow: rgba(21, 102, 214, 0.3);
  /* Aliases for the names app.css uses. */
  --muted: var(--mute);
  --cyan: var(--pri2);
  --pri-soft: var(--soft);
  --on-pri: var(--on-btn);
  --green: var(--ok);
  --green-soft: var(--ok-soft);
  --amber: var(--warm);
  --amber-soft: var(--warm-soft);
  --red: var(--bad);
  --red-soft: var(--bad-soft);
  --disp: "Schibsted Grotesk", Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #080e1a;
    --card: #121b2e;
    --alt: #0e1627;
    --ink: #eef3fb;
    --text: #c3cee0;
    --mute: #8d9bb3;
    --line: #22304a;
    --pri: #4a9bff;
    --pri2: #3fd3f0;
    --on: #06101f;
    --soft: #172848;
    --ok: #4fd1a1;
    --ok-soft: #12332b;
    --warm: #f0b461;
    --warm-soft: #3a2c14;
    --vio: #a593ff;
    --vio-soft: #241f45;
    --rose: #f08aa5;
    --rose-soft: #3b1b27;
    --cyan-t: #3fd3f0;
    --cyan-soft: #10303a;
    --bad: #ef6c62;
    --bad-soft: #3a1d1f;
    --grad: linear-gradient(120deg, #2f86f5, #2cc9ea);
    --btn-grad: linear-gradient(120deg, #4a9bff, #3fd3f0);
    --on-btn: #06101f;
    --sh1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
    --sh2: 0 24px 60px rgba(0, 0, 0, 0.5);
    --glow: rgba(74, 155, 255, 0.3);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #080e1a;
  --card: #121b2e;
  --alt: #0e1627;
  --ink: #eef3fb;
  --text: #c3cee0;
  --mute: #8d9bb3;
  --line: #22304a;
  --pri: #4a9bff;
  --pri2: #3fd3f0;
  --on: #06101f;
  --soft: #172848;
  --ok: #4fd1a1;
  --ok-soft: #12332b;
  --warm: #f0b461;
  --warm-soft: #3a2c14;
  --vio: #a593ff;
  --vio-soft: #241f45;
  --rose: #f08aa5;
  --rose-soft: #3b1b27;
  --cyan-t: #3fd3f0;
  --cyan-soft: #10303a;
  --bad: #ef6c62;
  --bad-soft: #3a1d1f;
  --grad: linear-gradient(120deg, #2f86f5, #2cc9ea);
  --btn-grad: linear-gradient(120deg, #4a9bff, #3fd3f0);
  --on-btn: #06101f;
  --sh1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
  --sh2: 0 24px 60px rgba(0, 0, 0, 0.5);
  --glow: rgba(74, 155, 255, 0.3);
  color-scheme: dark;
}

/* Colour per item: a fixed set of classes, never a style attribute. */
.tone-blue {
  --tone: var(--pri);
  --tone-soft: var(--soft);
}
.tone-cyan {
  --tone: var(--cyan-t);
  --tone-soft: var(--cyan-soft);
}
.tone-green {
  --tone: var(--ok);
  --tone-soft: var(--ok-soft);
}
.tone-amber {
  --tone: var(--warm);
  --tone-soft: var(--warm-soft);
}
.tone-violet {
  --tone: var(--vio);
  --tone-soft: var(--vio-soft);
}
.tone-rose {
  --tone: var(--rose);
  --tone-soft: var(--rose-soft);
}

/* ---------- base ---------- */
body {
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
h4 {
  font-family: var(--disp);
  color: var(--ink);
  text-wrap: balance;
  letter-spacing: -0.01em;
}
:focus-visible {
  outline: 3px solid var(--pri);
  outline-offset: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
svg.i {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ava {
  border-radius: 50%;
  background: var(--btn-grad);
  color: var(--on-btn);
  display: grid;
  place-items: center;
  font-weight: 800;
  flex: none;
  font-family: var(--disp);
  overflow: hidden;
  width: var(--ava, 40px);
  height: var(--ava, 40px);
}
.ava img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ava.s32 {
  width: 32px;
  height: 32px;
  font-size: 12px;
}
.ava.s40 {
  width: 40px;
  height: 40px;
  font-size: 14px;
}
.ava.s56 {
  width: 56px;
  height: 56px;
  font-size: 19px;
}
.ava.s76 {
  width: 76px;
  height: 76px;
  font-size: 25px;
}
.ava.s88 {
  width: 88px;
  height: 88px;
  font-size: 28px;
}

/* ---------- buttons ---------- */
.btn {
  border-radius: 12px;
  font-weight: 700;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.12s,
    border-color 0.15s,
    box-shadow 0.15s;
}
.btn:active {
  transform: scale(0.97);
}
.btn.p {
  background: var(--btn-grad);
  color: var(--on-btn);
  border-color: transparent;
  box-shadow: 0 10px 22px var(--glow);
}
.btn.p:hover {
  box-shadow: 0 14px 28px var(--glow);
}
.btn.ghost:hover {
  border-color: var(--pri);
}
.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}
.btn.plain {
  background: var(--card);
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.row-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* ---------- chips ---------- */
.chip.pill {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  background: var(--alt);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
}
.chip.pill svg.i {
  width: 14px;
  height: 14px;
  color: var(--tone, var(--pri));
}
.chip.pill.lock {
  background: var(--warm-soft);
  color: var(--warm);
  border-color: transparent;
}
.chip.pill.lock svg.i {
  color: var(--warm);
}

/* ---------- booking card ---------- */
.book {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--sh2);
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  overflow: hidden;
  min-width: 0;
  width: 100%;
  max-width: 980px;
}
.book .host {
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  min-width: 0;
}
.cover {
  height: 92px;
  background: var(--grad);
  position: relative;
  overflow: hidden;
}
.cover::before,
.cover::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}
.cover::before {
  width: 180px;
  height: 180px;
  right: -50px;
  top: -90px;
  animation: drift 9s ease-in-out infinite alternate;
}
.cover::after {
  width: 110px;
  height: 110px;
  left: 30px;
  top: 40px;
  animation: drift 11s ease-in-out infinite alternate-reverse;
}
.hostin {
  padding: 0 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.hostin .ava {
  margin-top: -38px;
  border: 4px solid var(--card);
  position: relative;
  box-shadow: var(--sh1);
}
.who {
  font-size: 13px;
  font-weight: 700;
  color: var(--mute);
}
.hostin h2 {
  font-size: 22px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.note {
  font-size: 14px;
  color: var(--text);
  border-left: 3px solid var(--pri2);
  padding: 2px 0 2px 12px;
  margin: 2px 0 0;
}
.when {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--soft);
  color: var(--ink);
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 14px;
  animation: rise 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.when svg.i {
  color: var(--pri);
}
.when small {
  display: block;
  font-weight: 600;
  color: var(--mute);
}
.main {
  padding: 22px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.steps {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps li,
.steps b {
  height: 5px;
  flex: 1;
  max-width: 56px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
  position: relative;
}
.steps li::after,
.steps b::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--btn-grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.steps li.on::after,
.steps b.on::after {
  transform: none;
}
.steps .steps-label {
  height: auto;
  max-width: none;
  flex: none;
  background: none;
  margin-left: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--mute);
  overflow: visible;
}
.steps .steps-label::after {
  content: none;
}
.pane {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: slide 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.pick {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 0fr;
  gap: 0;
  transition:
    grid-template-columns 0.45s cubic-bezier(0.2, 0.7, 0.2, 1),
    gap 0.45s;
}
.pick.open {
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 22px;
}
.mhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.mhead h3 {
  font-size: 17px;
}
.mhead .nav {
  display: flex;
  gap: 6px;
  min-height: 0;
  line-height: normal;
  border: 0;
  border-radius: 0;
}
.mhead .nav button,
.mhead .nav a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  display: grid;
  place-items: center;
  transition:
    background 0.15s,
    transform 0.12s;
}
.mhead .nav button:hover,
.mhead .nav a:hover {
  background: var(--soft);
  color: var(--pri);
}
.mhead .nav button:active {
  transform: scale(0.92);
}
.mhead .nav button:disabled {
  opacity: 0.35;
  cursor: default;
}
.cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-top: 10px;
}
.cal span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--mute);
  text-align: center;
  padding: 6px 0;
}
.cal button,
.cal a,
.cal i {
  aspect-ratio: 1;
  min-height: 40px;
  max-height: 48px;
  width: 100%;
  max-width: 48px;
  justify-self: center;
  border-radius: 50%;
  border: 0;
  background: none;
  display: grid;
  place-items: center;
  font-style: normal;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--mute);
  position: relative;
  text-decoration: none;
}
.cal i {
  opacity: 0.6;
}
.cal button,
.cal a {
  background: var(--soft);
  color: var(--pri);
  font-weight: 800;
  transition:
    transform 0.14s,
    background 0.18s,
    color 0.18s,
    box-shadow 0.18s;
  animation: pop 0.35s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}
.cal button:hover,
.cal a:hover {
  transform: scale(1.08);
  box-shadow: 0 0 0 2px var(--pri);
}
.cal .sel {
  background: var(--btn-grad);
  color: var(--on-btn);
  box-shadow: 0 8px 18px var(--glow);
}
.cal .today::after {
  content: "";
  position: absolute;
  bottom: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}
.tz {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}
.tzp {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.tzp svg.i {
  color: var(--pri);
}
.seg {
  display: inline-flex;
  background: var(--alt);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 2px;
}
.seg button {
  border: 0;
  background: none;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
  min-height: 32px;
  border-radius: 8px;
  color: var(--mute);
}
.seg button.on {
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--sh1);
}
.slotcol {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.slotcol h4 {
  font-size: 15px;
  white-space: nowrap;
}
.slotcol p {
  margin: 0;
  font-size: 12.5px;
  color: var(--mute);
  white-space: nowrap;
}
.slots.stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 330px;
  overflow: auto;
  padding: 2px;
}
.srow {
  display: grid;
  grid-template-columns: 1fr 0fr;
  gap: 0;
  transition:
    grid-template-columns 0.28s cubic-bezier(0.2, 0.7, 0.2, 1),
    gap 0.28s;
  animation: rise 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.srow.sel {
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.srow .slot {
  min-height: 46px;
  border: 1.5px solid var(--line);
  background: var(--card);
  border-radius: 12px;
  font-weight: 800;
  color: var(--pri);
  white-space: nowrap;
  transition:
    border-color 0.15s,
    background 0.15s,
    transform 0.12s;
}
.srow .slot:hover {
  border-color: var(--pri);
}
.srow .slot:active {
  transform: scale(0.97);
}
.srow.sel .slot {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--card);
}
.srow .go {
  min-width: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: var(--btn-grad);
  color: var(--on-btn);
  font-weight: 800;
  white-space: nowrap;
  padding: 0;
}
.quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.quick em {
  font-style: normal;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--mute);
}
.quick button,
.quick a {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 12px;
  min-height: 44px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  text-decoration: none;
  transition:
    border-color 0.15s,
    transform 0.12s;
}
.quick button:hover,
.quick a:hover {
  border-color: var(--pri);
  transform: translateY(-1px);
}
.quick svg.i {
  width: 14px;
  height: 14px;
  color: var(--warm);
}
.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.f {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  min-width: 0;
}
.f.w {
  grid-column: 1 / -1;
}
.f input,
.f textarea,
.f select {
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  min-height: 44px;
  min-width: 0;
  width: 100%;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.f input:focus,
.f textarea:focus,
.f select:focus {
  outline: 0;
  border-color: var(--pri);
  box-shadow: 0 0 0 4px var(--soft);
}
.f .err {
  color: var(--bad);
  font-weight: 700;
  font-size: 12.5px;
}
.secure {
  font-size: 12.5px;
  color: var(--mute);
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.done {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  text-align: center;
  padding: 14px 0 6px;
  position: relative;
}
.ring {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
  display: grid;
  place-items: center;
  animation: pop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both;
  position: relative;
}
.ring svg {
  width: 42px;
  height: 42px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ring path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw 0.45s ease 0.35s forwards;
}
.ring u {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--ok);
  opacity: 0;
  animation: burst 0.9s cubic-bezier(0.1, 0.7, 0.3, 1) 0.3s forwards;
}
.ring u:nth-child(2) {
  --x: 46px;
  --y: -38px;
  background: var(--pri);
}
.ring u:nth-child(3) {
  --x: -46px;
  --y: -30px;
  background: var(--warm);
}
.ring u:nth-child(4) {
  --x: 40px;
  --y: 40px;
  background: var(--vio);
}
.ring u:nth-child(5) {
  --x: -38px;
  --y: 42px;
  background: var(--rose);
}
.done h3 {
  font-size: 24px;
}
.done p {
  margin: 0;
  color: var(--mute);
  max-width: 40ch;
}
.addcal {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 440px;
}
.addcal .btn {
  padding: 10px 8px;
  font-size: 13px;
}
.links {
  font-size: 13px;
  font-weight: 700;
  color: var(--mute);
  display: flex;
  gap: 16px;
}

/* ---------- cards and lists ---------- */
.frame {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--sh1);
  overflow: hidden;
  min-width: 0;
}
.pcover {
  height: 110px;
  background: var(--grad);
  position: relative;
  overflow: hidden;
}
.pbody {
  padding: 0 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pbody .ava {
  margin-top: -44px;
  border: 4px solid var(--card);
  position: relative;
}
.mcards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mcard {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  min-height: 44px;
  background: var(--card);
  color: inherit;
  text-decoration: none;
  min-width: 0;
  transition:
    transform 0.16s,
    box-shadow 0.16s,
    border-color 0.16s;
}
.mcard:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh1);
  border-color: var(--pri);
}
.mcard:hover .arr {
  transform: translateX(3px);
  color: var(--pri);
}
.tile {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--tone-soft, var(--soft));
  color: var(--tone, var(--pri));
  display: grid;
  place-items: center;
  flex: none;
}
.tile svg.i {
  width: 22px;
  height: 22px;
}
.mcard .t {
  flex: 1;
  min-width: 0;
}
.mcard h4 {
  font-size: 15px;
  overflow-wrap: anywhere;
}
.mcard small {
  color: var(--mute);
  font-weight: 600;
  font-size: 12.5px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.mcard small span {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.mcard small svg.i {
  width: 13px;
  height: 13px;
}
.arr {
  color: var(--mute);
  transition:
    transform 0.16s,
    color 0.16s;
  flex: none;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.stat {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: var(--alt);
}
.stat b {
  display: block;
  font-family: var(--disp);
  font-weight: 800;
  font-size: 22px;
  color: var(--ink);
}
.stat small {
  font-size: 12px;
  font-weight: 700;
  color: var(--mute);
}
.next {
  border-radius: 16px;
  background: var(--btn-grad);
  color: var(--on-btn);
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.next .ava {
  background: rgba(255, 255, 255, 0.22);
  color: inherit;
}
.next b {
  display: block;
  font-size: 15px;
}
.next small {
  font-weight: 600;
}
.next .btn {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.2);
  border-color: transparent;
  color: inherit;
  padding: 8px 12px;
  font-size: 13px;
}
.lbl {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}

/* ---------- copy ---------- */
.copyfield {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}
.copyfield input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--alt);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  min-height: 44px;
}
.copy {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: none;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    transform 0.12s;
}
.copy:hover {
  background: var(--soft);
  color: var(--pri);
}
.copy:active {
  transform: scale(0.92);
}
.copy.ok {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: transparent;
}
html:not(.js) .copyfield .copy {
  display: none;
}

/* ---------- switch (a real checkbox) ---------- */
.sw-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}
.sw-wrap label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
}
input.sw {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  width: 40px;
  height: 24px;
  border-radius: 99px;
  background: var(--mute);
  border: 0;
  position: relative;
  flex: none;
  cursor: pointer;
  transition: background 0.2s;
}
input.sw::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s cubic-bezier(0.2, 1.3, 0.4, 1);
}
input.sw:checked {
  background: var(--ok);
}
input.sw:checked::after {
  transform: translateX(16px);
}
.sw-state {
  font-size: 12px;
  font-weight: 700;
  color: var(--mute);
}
.sw-state::before {
  content: "Off";
}
input.sw:checked ~ .sw-state::before {
  content: "On";
}
.js .sw-save {
  display: none;
}

/* ---------- tabs, toast ---------- */
.tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  border-top: 1px solid var(--line);
  padding: 8px 0;
}
.tabs a,
.tabs span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 44px;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--mute);
  text-decoration: none;
}
.tabs .on {
  color: var(--pri);
}
.toast-host {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  max-width: calc(100vw - 32px);
}
.toast {
  background: var(--ink);
  color: var(--card);
  font-weight: 700;
  font-size: 14px;
  border-radius: 12px;
  padding: 10px 16px;
  box-shadow: var(--sh2);
  animation: rise 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
@keyframes slide {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
}
@keyframes pop {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes burst {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x, 0px)), calc(-50% + var(--y, 0px))) rotate(220deg);
  }
}
@keyframes drift {
  to {
    transform: translate(-18px, 14px) scale(1.08);
  }
}

@media (max-width: 820px) {
  .book {
    grid-template-columns: minmax(0, 1fr);
    border-radius: 20px;
  }
  .book .host {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .cover {
    height: 72px;
  }
  .main {
    padding: 18px 16px;
  }
  .pick,
  .pick.open {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .pick:not(.open) .slotcol {
    display: none;
  }
  .slots.stack {
    max-height: none;
  }
  .form {
    grid-template-columns: 1fr;
  }
  .addcal {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .ring path {
    stroke-dashoffset: 0;
  }
  .ring u {
    display: none;
  }
}
