/* Tischzeit 1.2 – "Glass" design. Royal navy, white, black and gold.
   Tablet first, works on phones. Light + dark (system or manual).
   Glass = translucent layer + blur + bright top edge + soft shadow.
   Motion = spring easing; everything calms down with prefers-reduced-motion. */
@font-face {
  font-family: "Instrument Sans"; src: url("/fonts/InstrumentSans.woff") format("woff");
  font-weight: 400 700; font-stretch: 75% 100%; font-display: swap;
}

:root {
  /* brand */
  --navy-950: #040b20; --navy-900: #071434; --navy-800: #0b1d4a; --navy-700: #10296a; --navy-600: #1b3d91; --navy-500: #2a56b8; --navy-300: #8ea6e0;
  --gold-300: #f7d98f; --gold-400: #f0c35f; --gold-500: #dea53a; --gold-600: #b9821c; --gold-700: #8a5f10;
  --gold-grad: linear-gradient(180deg, #f9dc8e 0%, #ecbb52 48%, #cf9226 100%);
  --navy-grad: linear-gradient(180deg, #2f5cc4 0%, #173a8d 52%, #0e2766 100%);

  /* light theme */
  --bg: #eef1f8; --bg-2: #e3e8f4;
  --ink: #0a0f1c; --ink-2: #3a4459; --ink-3: #6a7389; --ink-inv: #ffffff;
  --line: rgb(16 41 106 / .10); --line-2: rgb(16 41 106 / .18);
  --glass: rgb(255 255 255 / .58); --glass-2: rgb(255 255 255 / .78); --glass-solid: rgb(255 255 255 / .9);
  --glass-edge: rgb(255 255 255 / .85); --glass-rim: rgb(16 41 106 / .10);
  --glass-hi: inset 0 1px 0 rgb(255 255 255 / .95), inset 0 -1px 0 rgb(16 41 106 / .06);
  --shadow-1: 0 1px 2px rgb(6 18 51 / .06), 0 6px 18px -8px rgb(6 18 51 / .22);
  --shadow-2: 0 2px 6px rgb(6 18 51 / .06), 0 24px 60px -18px rgb(6 18 51 / .38);
  --primary: var(--navy-700); --primary-ink: #fff; --accent: var(--gold-600); --accent-soft: rgb(222 165 58 / .16);
  --ok: #1f8a57; --ok-soft: rgb(31 138 87 / .13); --amber: #b26d0b; --amber-soft: rgb(222 150 40 / .17);
  --bad: #c03a33; --bad-soft: rgb(192 58 51 / .12);
  --aura-1: rgb(42 86 184 / .30); --aura-2: rgb(240 195 95 / .30); --aura-3: rgb(16 41 106 / .22);

  --font: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 14px; --r-lg: 22px;
  --blur: blur(22px) saturate(1.8);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --spring-soft: cubic-bezier(.22, 1.2, .36, 1);
  --out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --spring: linear(0, .009, .035 2.1%, .141, .281 6.7%, .723 12.9%, .938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, .991, .977 51%, .974 53.8%, .975 57.1%, .997 69.8%, 1.003 76.9%, 1.004 83.8%, 1);
    --spring-soft: linear(0, .023 2%, .089 4.2%, .337 9.6%, .626 15.6%, .839 21.4%, .97 27.1%, 1.04 33.1%, 1.065 38.9%, 1.06 45%, 1.024 58.2%, 1.004 71.8%, .998 86.6%, 1);
  }
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --dark: 1; } }
:root[data-theme="dark"] { --dark: 1; }

/* dark theme (system or manual) */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #050b1e; --bg-2: #081232;
  --ink: #f2f5fb; --ink-2: #b9c2d8; --ink-3: #8390ad; --ink-inv: #050b1e;
  --line: rgb(255 255 255 / .08); --line-2: rgb(255 255 255 / .16);
  --glass: rgb(20 36 82 / .42); --glass-2: rgb(24 42 94 / .62); --glass-solid: rgb(14 28 66 / .92);
  --glass-edge: rgb(255 255 255 / .16); --glass-rim: rgb(255 255 255 / .06);
  --glass-hi: inset 0 1px 0 rgb(255 255 255 / .14), inset 0 -1px 0 rgb(0 0 0 / .25);
  --shadow-1: 0 1px 2px rgb(0 0 0 / .3), 0 8px 22px -10px rgb(0 0 0 / .6);
  --shadow-2: 0 2px 8px rgb(0 0 0 / .3), 0 28px 70px -20px rgb(0 0 0 / .8);
  --primary: var(--navy-500); --accent: var(--gold-400); --accent-soft: rgb(240 195 95 / .14);
  --ok: #5fd39a; --ok-soft: rgb(95 211 154 / .13); --amber: #f2b552; --amber-soft: rgb(242 181 82 / .14);
  --bad: #ff8b80; --bad-soft: rgb(255 139 128 / .12);
  --aura-1: rgb(42 86 184 / .38); --aura-2: rgb(222 165 58 / .16); --aura-3: rgb(27 61 145 / .45);
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #050b1e; --bg-2: #081232;
  --ink: #f2f5fb; --ink-2: #b9c2d8; --ink-3: #8390ad; --ink-inv: #050b1e;
  --line: rgb(255 255 255 / .08); --line-2: rgb(255 255 255 / .16);
  --glass: rgb(20 36 82 / .42); --glass-2: rgb(24 42 94 / .62); --glass-solid: rgb(14 28 66 / .92);
  --glass-edge: rgb(255 255 255 / .16); --glass-rim: rgb(255 255 255 / .06);
  --glass-hi: inset 0 1px 0 rgb(255 255 255 / .14), inset 0 -1px 0 rgb(0 0 0 / .25);
  --shadow-1: 0 1px 2px rgb(0 0 0 / .3), 0 8px 22px -10px rgb(0 0 0 / .6);
  --shadow-2: 0 2px 8px rgb(0 0 0 / .3), 0 28px 70px -20px rgb(0 0 0 / .8);
  --primary: var(--navy-500); --accent: var(--gold-400); --accent-soft: rgb(240 195 95 / .14);
  --ok: #5fd39a; --ok-soft: rgb(95 211 154 / .13); --amber: #f2b552; --amber-soft: rgb(242 181 82 / .14);
  --bad: #ff8b80; --bad-soft: rgb(255 139 128 / .12);
  --aura-1: rgb(42 86 184 / .38); --aura-2: rgb(222 165 58 / .16); --aura-3: rgb(27 61 145 / .45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--bg); }
body {
  min-height: 100vh; min-height: 100dvh; background: transparent; color: var(--ink);
  font: 400 16px/1.45 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
/* living background: three soft lights drifting slowly behind the glass */
body::after {
  content: ""; position: fixed; inset: -20vmax; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38vmax 38vmax at 18% 12%, var(--aura-1), transparent 70%),
    radial-gradient(30vmax 30vmax at 86% 22%, var(--aura-2), transparent 70%),
    radial-gradient(44vmax 44vmax at 60% 92%, var(--aura-3), transparent 70%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  animation: drift 38s ease-in-out infinite alternate;
}
@keyframes drift { 0% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(-3vmax, 2vmax, 0) scale(1.05); } 100% { transform: translate3d(2vmax, -2vmax, 0) scale(1.02); } }

[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tnum { font-variant-numeric: tabular-nums; }
.gold { color: var(--accent); }
::selection { background: var(--gold-300); color: var(--navy-900); }

/* ---------- glass surfaces ---------- */
.glass {
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi), var(--shadow-1);
}

/* ---------- buttons: liquid glass ---------- */
.btn, .icon-btn, .dchip, .chips button, .seg, .jump, .toast button {
  -webkit-user-select: none; user-select: none; touch-action: manipulation;
}
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  font-weight: 600; letter-spacing: .005em; color: var(--ink);
  background: linear-gradient(180deg, rgb(255 255 255 / .62), rgb(255 255 255 / .26));
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-hi), var(--shadow-1);
  -webkit-backdrop-filter: blur(14px) saturate(1.8); backdrop-filter: blur(14px) saturate(1.8);
  transition: transform .55s var(--spring), box-shadow .35s var(--out), background .35s var(--out), color .25s, opacity .25s;
}
:where(:root[data-theme="dark"]) .btn { background: linear-gradient(180deg, rgb(255 255 255 / .13), rgb(255 255 255 / .04)); }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) .btn { background: linear-gradient(180deg, rgb(255 255 255 / .13), rgb(255 255 255 / .04)); } }
/* specular light that follows the finger / cursor */
.btn::before, .icon-btn::before, .dchip::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(110px circle at var(--mx, 50%) var(--my, -30%), rgb(255 255 255 / .75), transparent 62%);
  opacity: 0; transition: opacity .4s var(--out);
}
/* glossy top sheen */
.btn::after {
  content: ""; position: absolute; inset: 1px 1px 52% 1px; border-radius: 999px 999px 60% 60% / 999px 999px 30% 30%;
  background: linear-gradient(180deg, rgb(255 255 255 / .55), rgb(255 255 255 / 0)); pointer-events: none; z-index: -1; opacity: .7;
}
@media (hover: hover) {
  .btn:hover, .icon-btn:hover, .dchip:hover { --lift: -1px; }
  .btn:hover::before, .icon-btn:hover::before, .dchip:hover::before { opacity: .55; }
  .btn:hover { box-shadow: var(--glass-hi), var(--shadow-2); transform: translateY(-1px); }
}
.btn.is-pressed, .icon-btn.is-pressed, .dchip.is-pressed, .chips button.is-pressed, .seg button.is-pressed, .toast button.is-pressed {
  transform: scale(.94); transition-duration: .12s; transition-timing-function: var(--out);
}
.btn.is-pressed::before, .icon-btn.is-pressed::before, .dchip.is-pressed::before { opacity: 1; }
.btn.primary { color: #fff; background: var(--navy-grad); border-color: rgb(255 255 255 / .28); text-shadow: 0 1px 0 rgb(0 0 0 / .2); }
.btn.primary::after { opacity: .45; }
.btn.gold { color: #1a1204; background: var(--gold-grad); border-color: rgb(255 248 220 / .8); text-shadow: 0 1px 0 rgb(255 255 255 / .35);
  box-shadow: var(--glass-hi), 0 8px 24px -8px rgb(222 165 58 / .7), 0 1px 2px rgb(0 0 0 / .1); }
.btn.ghost { background: linear-gradient(180deg, rgb(255 255 255 / .34), rgb(255 255 255 / .10)); }
:where(:root[data-theme="dark"]) .btn.ghost { background: linear-gradient(180deg, rgb(255 255 255 / .08), rgb(255 255 255 / .02)); }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) .btn.ghost { background: linear-gradient(180deg, rgb(255 255 255 / .08), rgb(255 255 255 / .02)); } }
.btn.ok { color: #fff; background: linear-gradient(180deg, #3cc283, #1d8a56); border-color: rgb(255 255 255 / .3); text-shadow: 0 1px 0 rgb(0 0 0 / .18); }
.btn.ok::after { opacity: .45; }
.btn.small { min-height: 38px; padding: 0 14px; font-size: .9rem; }
.btn.link { background: none; border: 0; box-shadow: none; padding: 0 6px; min-height: 36px; color: var(--ink-2); text-decoration: underline;
  text-underline-offset: 3px; font-weight: 500; -webkit-backdrop-filter: none; backdrop-filter: none; }
.btn.link::after, .btn.link::before { display: none; }
.btn.wide { width: 100%; min-height: 50px; font-size: 1.02rem; }
.btn[disabled] { opacity: .5; cursor: default; transform: none; }
a.btn { text-decoration: none; }

.icon-btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; background: transparent; color: var(--ink-2); font-size: 1.4rem; line-height: 1;
  transition: transform .55s var(--spring), background .3s var(--out), border-color .3s, color .2s, box-shadow .3s;
}
.topbar .icon-btn, .stepper .icon-btn, .sheet-head .icon-btn {
  background: linear-gradient(180deg, rgb(255 255 255 / .5), rgb(255 255 255 / .18)); border-color: var(--glass-edge); box-shadow: var(--glass-hi), var(--shadow-1); color: var(--ink);
}
:where(:root[data-theme="dark"]) :is(.topbar, .stepper, .sheet-head) .icon-btn { background: linear-gradient(180deg, rgb(255 255 255 / .12), rgb(255 255 255 / .03)); }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) :is(.topbar, .stepper, .sheet-head) .icon-btn { background: linear-gradient(180deg, rgb(255 255 255 / .12), rgb(255 255 255 / .03)); } }
.icon-btn:hover { color: var(--ink); }
.icon-btn.small { width: 38px; height: 44px; }

/* tap ripple */
.rip { position: absolute; border-radius: 50%; pointer-events: none; z-index: -1; width: 12px; height: 12px; margin: -6px 0 0 -6px;
  background: radial-gradient(circle, rgb(255 255 255 / .85), rgb(255 255 255 / 0) 70%); transform: scale(0); opacity: .9;
  animation: rip .7s var(--out) forwards; }
.btn.gold .rip { background: radial-gradient(circle, rgb(255 255 255 / .95), rgb(255 255 255 / 0) 70%); }
@keyframes rip { to { transform: scale(var(--rs, 22)); opacity: 0; } }

/* ---------- login / setup ---------- */
.center-screen { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left)); }
.panel { width: min(420px, 100%); display: grid; gap: 16px; padding: 30px 26px 26px; border-radius: 28px;
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi), var(--shadow-2); animation: rise .8s var(--spring-soft) both; }
.brand-lg { display: flex; align-items: center; gap: 14px; font-size: 2.1rem; font-weight: 680; letter-spacing: -.03em; }
.brand-lg img { border-radius: 15px; box-shadow: 0 8px 24px -8px rgb(6 18 51 / .5); }
.brand-lg .gold, .brand .gold { color: var(--gold-500); }
.lede { margin: 0; color: var(--ink-2); font-size: 1.05rem; }
.fine { margin: 0; color: var(--ink-3); font-size: .85rem; }
.panel h1 { margin: 0; font-size: 1.5rem; }

/* ---------- form fields ---------- */
.field { display: grid; gap: 7px; min-width: 0; }
.field > span { font-size: .74rem; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.field input, .field textarea, .field select, .stepper input {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: var(--r); font-size: 1rem;
  border: 1px solid var(--line-2); background: var(--glass-2); box-shadow: inset 0 1px 2px rgb(6 18 51 / .06);
  transition: border-color .25s, box-shadow .35s var(--out), background .25s;
}
.field input:focus, .field textarea:focus, .stepper input:focus { outline: none; border-color: var(--gold-500);
  box-shadow: 0 0 0 4px rgb(222 165 58 / .22), inset 0 1px 2px rgb(6 18 51 / .06); background: var(--glass-solid); }
.field textarea { resize: vertical; min-height: 68px; }
.form-error { margin: 0; min-height: 1.2em; color: var(--bad); font-size: .92rem; }
.form-error.ok { color: var(--ok); font-weight: 600; }
.form-error:not(:empty) { animation: shake .45s var(--out); }
.form-error.ok:not(:empty) { animation: pop .5s var(--spring); }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.warn { margin: 0; padding: 11px 14px; border-radius: var(--r); background: var(--amber-soft); color: var(--amber); font-size: .92rem; animation: rise .5s var(--spring-soft); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- top bar ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--glass-2); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--glass-rim); box-shadow: inset 0 -1px 0 var(--glass-edge);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 1.08rem; }
.brand img { border-radius: 9px; flex: none; box-shadow: 0 4px 12px -4px rgb(6 18 51 / .45); }
.brand b { font-weight: 700; letter-spacing: -.02em; }
.brand .sep { color: var(--line-2); }
.brand #r-name { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sync { font-size: .8rem; color: var(--ink-3); margin-right: 4px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.sync::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: live 2.4s ease-out infinite; }
.sync.off { color: var(--bad); }
.sync.off::before { background: var(--bad); animation: none; }
@keyframes live { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } 100% { box-shadow: 0 0 0 8px transparent; } }

/* ---------- day strip ---------- */
.stripbar { display: flex; align-items: center; gap: 4px; padding: 10px max(8px, env(safe-area-inset-right)) 10px max(8px, env(safe-area-inset-left)); }
.strip { flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; padding: 4px 2px 8px; }
.strip::-webkit-scrollbar { display: none; }
.dchip {
  position: relative; isolation: isolate; overflow: hidden;
  flex: none; scroll-snap-align: start; width: 76px; padding: 9px 6px 8px; border-radius: 18px; cursor: pointer; text-align: center;
  display: grid; gap: 1px; color: var(--ink);
  background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(1.7); backdrop-filter: blur(16px) saturate(1.7);
  border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi), var(--shadow-1);
  transition: transform .55s var(--spring), background .35s var(--out), color .25s, box-shadow .35s;
}
.dchip .wd { font-size: .7rem; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.dchip .dn { font-size: 1.4rem; font-weight: 650; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.dchip .ct { font-size: .72rem; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dchip.today .wd { color: var(--accent); }
.dchip.closed { color: var(--ink-3); background: repeating-linear-gradient(-45deg, var(--glass) 0 6px, transparent 6px 12px); }
.dchip.closed .dn { color: var(--ink-3); }
.dchip[aria-current="date"] { background: var(--navy-grad); border-color: rgb(255 255 255 / .3); color: #fff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), 0 10px 24px -10px rgb(16 41 106 / .8); transform: translateY(-2px) scale(1.04); }
.dchip[aria-current="date"] .dn, .dchip[aria-current="date"] .ct { color: #fff; }
.dchip[aria-current="date"] .wd { color: var(--gold-300); }
.jump { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; color: var(--ink); cursor: pointer;
  background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi), var(--shadow-1); transition: transform .5s var(--spring); }
.jump:active { transform: scale(.92); }
.jump input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }

/* ---------- layout: day + activity ---------- */
.home { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.home-main { min-width: 0; }
.home .activity { order: -1; }   /* phones/tablets in portrait: activity first */
@media (min-width: 1100px) { .home .activity { order: 0; } }
@media (min-width: 1100px) {
  .home { grid-template-columns: minmax(0, 1fr) 370px; gap: 8px; padding-right: max(16px, env(safe-area-inset-right)); }
  .home .activity { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 76px); align-self: start; margin: 14px 0 24px;
    max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px); display: flex; flex-direction: column; }
  .home .activity .act-list { overflow-y: auto; overscroll-behavior: contain; }
  .home .activity .act-more { display: none; }
}

/* ---------- activity feed ---------- */
.activity { margin: 10px max(16px, env(safe-area-inset-right)) 4px max(16px, env(safe-area-inset-left)); padding: 14px 8px 8px; border-radius: var(--r-lg);
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi), var(--shadow-1); animation: rise .7s var(--spring-soft) both; }
@media (min-width: 1100px) { .home .activity { margin-left: 0; margin-right: 0; } }
.act-head { display: flex; align-items: center; gap: 10px; padding: 0 10px 8px; }
.act-head h2 { margin: 0; font-size: .78rem; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
.act-head .live { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-500); animation: live-gold 2.4s ease-out infinite; }
@keyframes live-gold { 0% { box-shadow: 0 0 0 0 rgb(222 165 58 / .6); } 100% { box-shadow: 0 0 0 9px rgb(222 165 58 / 0); } }
.act-head .count { margin-left: auto; color: var(--ink-3); font-size: .82rem; }
.act-list { display: grid; gap: 2px; }
.act {
  position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 2px 12px; align-items: center;
  padding: 9px 10px; border-radius: 14px; border: 0; background: transparent; text-align: left; cursor: pointer; color: inherit; width: 100%;
  transition: background .3s var(--out), transform .5s var(--spring);
}
.act:hover { background: var(--glass-2); }
.act.is-pressed { transform: scale(.98); transition-duration: .1s; }
.act .ic { grid-row: 1 / span 2; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: var(--glass-2); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi); color: var(--navy-600); }
.act .ic svg { width: 19px; height: 19px; stroke-width: 2; }
.act .ttl { font-weight: 650; font-size: .95rem; min-width: 0; line-height: 1.3; }
.act .sub { grid-column: 2; color: var(--ink-2); font-size: .86rem; min-width: 0; line-height: 1.35; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.act .ago { grid-column: 3; grid-row: 1 / span 2; align-self: start; padding-top: 2px; max-width: 92px; font-size: .8rem; color: var(--ink-3); font-variant-numeric: tabular-nums; text-align: right; }
.act .ago.recent { color: var(--accent); font-weight: 650; }
.act.k-new .ic { background: var(--gold-grad); color: #2b1d04; border-color: rgb(255 248 220 / .8); }
.act.k-ai .ic { background: var(--navy-grad); color: var(--gold-300); border-color: rgb(255 255 255 / .25); }
.act.k-arrived .ic { background: var(--ok-soft); color: var(--ok); }
.act.k-cancelled .ic { background: var(--bad-soft); color: var(--bad); }
.act.k-no_show .ic, .act.k-cb .ic { background: var(--amber-soft); color: var(--amber); }
.act.k-dark .ic { color: var(--ink-2); }
:where(:root[data-theme="dark"]) .act .ic { color: var(--navy-300); }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) .act .ic { color: var(--navy-300); } }
.act.fresh { animation: fresh 1.1s var(--spring-soft) both; }
.act.fresh::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 1.5px rgb(222 165 58 / .7), 0 0 24px rgb(222 165 58 / .35); animation: glow 2.6s ease-out forwards; }
@keyframes fresh { from { opacity: 0; transform: translateY(-14px) scale(.97); } }
@keyframes glow { 0%, 40% { opacity: 1; } 100% { opacity: 0; } }
.act-empty { padding: 14px 12px 16px; color: var(--ink-3); font-size: .92rem; }
.act-more { display: flex; justify-content: center; padding: 6px 0 4px; }
@media (max-width: 1099.98px) { .activity.collapsed .act:nth-child(n+5) { display: none; } }

/* ---------- new bookings bar / callbacks ---------- */
.newbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--ink);
  margin: 10px max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); padding: 12px 14px; border-radius: var(--r-lg);
  background: linear-gradient(120deg, rgb(240 195 95 / .28), rgb(240 195 95 / .10) 60%), var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid rgb(240 195 95 / .55); box-shadow: var(--glass-hi), var(--shadow-1);
  animation: rise .6s var(--spring-soft) both; }
.newbar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold-500); flex: none; animation: live-gold 2s ease-out infinite; }
.newbar b { font-weight: 680; }
.newbar .spacer { flex: 1; }
.cbbar { margin: 10px max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); padding: 12px; border-radius: var(--r-lg); display: grid; gap: 8px;
  background: linear-gradient(120deg, rgb(242 160 60 / .22), transparent 70%), var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid rgb(242 160 60 / .45); box-shadow: var(--glass-hi), var(--shadow-1); animation: rise .6s var(--spring-soft) both; }
.cb-head { padding: 0 4px; }
.cb-head b { font-weight: 680; }
.cb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 11px 13px; border-radius: 16px; background: var(--glass-2); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi); }
.cb-who { flex: 1; min-width: 200px; }
.cb-who .tnum { color: var(--ink-2); margin-left: 6px; }
.cb-why { margin-top: 2px; overflow-wrap: anywhere; }
.cb-when { font-size: .82rem; color: var(--ink-3); margin-top: 2px; }
.cb-acts { display: flex; gap: 6px; }

/* ---------- day header ---------- */
.dayhead { display: flex; flex-wrap: wrap; align-items: end; gap: 14px 28px;
  padding: 22px max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left)); }
.dayhead h1 { margin: 0; font-size: clamp(1.7rem, 3.8vw, 2.5rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.05; }
.dayhead .rel { display: block; font-size: .76rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.stats { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.stat { display: grid; align-content: end; padding: 9px 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi), var(--shadow-1);
  -webkit-backdrop-filter: blur(16px) saturate(1.7); backdrop-filter: blur(16px) saturate(1.7); }
.stat small { font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.stat b { font-size: 1.4rem; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat b.bump { animation: pop .55s var(--spring); }
@keyframes pop { 0% { transform: scale(.85); } 100% { transform: scale(1); } }
.meter { width: 150px; height: 7px; border-radius: 99px; background: var(--line-2); overflow: hidden; margin-top: 7px; }
.meter i { display: block; height: 100%; background: var(--navy-grad); border-radius: 99px; transition: width .9s var(--spring-soft); }
.meter.over i { background: linear-gradient(90deg, var(--gold-500), var(--bad)); }
.dayhead .day-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.closed-banner { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 14px; border-radius: var(--r);
  background: var(--glass); border: 1px dashed var(--line-2); color: var(--ink-2); animation: rise .5s var(--spring-soft); }

/* ---------- bookings list ---------- */
.list { padding: 0 max(16px, env(safe-area-inset-right)) 120px max(16px, env(safe-area-inset-left)); }
@media (min-width: 1100px) { .home .list { padding-right: 8px; } .home .dayhead { padding-right: 8px; } }
.period { margin-top: 16px; }
.period-head { display: flex; align-items: baseline; gap: 12px; padding: 6px 6px 8px; }
.period-head h2 { margin: 0; font-size: .78rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.period-head h2::before { content: ""; display: inline-block; width: 18px; height: 2px; border-radius: 2px; background: var(--gold-500); vertical-align: middle; margin-right: 8px; }
.period-head span { color: var(--ink-3); font-size: .88rem; font-variant-numeric: tabular-nums; }
.res {
  display: grid; grid-template-columns: 78px 54px minmax(0, 1fr) auto; gap: 4px 16px; align-items: center;
  padding: 13px 14px; margin: 8px 0; border-radius: 20px; scroll-margin-top: 150px;
  background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi), var(--shadow-1);
  transition: background .45s var(--out), opacity .45s, transform .55s var(--spring), box-shadow .35s;
}
.res.enter { animation: rise .7s var(--spring-soft) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.985); } }
.res .t { font-size: 1.45rem; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.res .g { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; font-weight: 700; font-size: 1.15rem;
  background: var(--glass-2); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi); font-variant-numeric: tabular-nums; color: var(--navy-700); }
:where(:root[data-theme="dark"]) .res .g { color: var(--ink); }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) .res .g { color: var(--ink); } }
.res .who { min-width: 0; }
.res .nm { font-size: 1.1rem; font-weight: 650; overflow-wrap: anywhere; letter-spacing: -.01em; }
.res .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 9px; color: var(--ink-2); font-size: .92rem; margin-top: 3px; }
.res .meta a { color: inherit; text-decoration: none; font-variant-numeric: tabular-nums; }
.res .meta a:hover { text-decoration: underline; }
.res .nt { margin-top: 5px; color: var(--ink); font-size: .93rem; font-style: italic; overflow-wrap: anywhere; }
.res .acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.res .acts .btn, .res .more .btn { -webkit-backdrop-filter: none; backdrop-filter: none; }
.res .more { grid-column: 3 / -1; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; animation: rise .45s var(--spring-soft); }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: .74rem; font-weight: 680;
  letter-spacing: .03em; background: var(--glass-2); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.chip.web { color: var(--navy-600); border-color: rgb(42 86 184 / .25); }
.chip.ai { background: var(--navy-grad); color: var(--gold-300); border-color: transparent; }
.chip.new { background: var(--gold-grad); color: #2b1d04; border-color: transparent; animation: pop .6s var(--spring); }
.chip.over { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.chip.arrived { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.no_show { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.chip.cancelled { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
:where(:root[data-theme="dark"]) .chip.web { color: var(--navy-300); }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) .chip.web { color: var(--navy-300); } }
.res.st-arrived { background: linear-gradient(90deg, var(--ok-soft), transparent 70%), var(--glass); }
.res.st-arrived .g { background: var(--ok); color: #fff; border-color: transparent; }
.res.st-cancelled, .res.st-no_show { opacity: .6; }
.res.st-cancelled .nm { text-decoration: line-through; text-decoration-color: var(--bad); }
.res.is-new { border-color: rgb(240 195 95 / .7); box-shadow: var(--glass-hi), 0 0 0 1px rgb(240 195 95 / .35), 0 10px 30px -12px rgb(222 165 58 / .55); }
.res.is-new .g { background: var(--gold-grad); color: #2b1d04; border-color: transparent; }
.res.flash { animation: flash 2.4s var(--out) 1; }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 3px rgb(240 195 95 / .9), 0 0 40px rgb(240 195 95 / .5); transform: scale(1.01); } 100% { } }
.empty { padding: 48px 16px; margin-top: 10px; color: var(--ink-2); text-align: center; display: grid; gap: 14px; justify-items: center; border-radius: var(--r-lg);
  background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi), var(--shadow-1); animation: rise .7s var(--spring-soft) both; }
.empty b { color: var(--ink); font-size: 1.2rem; }

@media (max-width: 720px) {
  .res { grid-template-columns: 62px 44px minmax(0, 1fr); padding: 12px; }
  .res .t { font-size: 1.2rem; }
  .res .g { width: 40px; height: 40px; font-size: 1rem; border-radius: 13px; }
  .res .acts, .res .more { grid-column: 1 / -1; justify-content: flex-start; }
  .top-actions .btn.gold span[data-i18n] { display: none; }
  .top-actions .btn.gold { width: 44px; padding: 0; font-size: 1.5rem; }
  .sync { display: none; }
  .dayhead .day-actions { margin-left: 0; }
  .stat { padding: 8px 12px; }
}
@media (max-width: 480px) {
  .stripbar [data-action="strip-prev"], .stripbar [data-action="strip-next"] { display: none; }
  .stripbar { padding-left: max(12px, env(safe-area-inset-left)); gap: 8px; }
  .dchip { width: 64px; border-radius: 16px; }
  .dchip .dn { font-size: 1.25rem; }
  .brand .sep, .brand #r-name { display: none; }
  .topbar { flex-wrap: nowrap; }
  .meter { width: 110px; }
}

/* ---------- sheets ---------- */
dialog.sheet {
  width: min(580px, 100%); max-height: min(92vh, 900px); margin: auto; padding: 0; border-radius: 28px; color: var(--ink);
  background: var(--glass-solid); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8);
  border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi), var(--shadow-2);
}
dialog.sheet[open] { animation: sheet-in .6s var(--spring-soft); }
dialog.sheet.closing { animation: sheet-out .26s var(--out) forwards; }
dialog.sheet::backdrop { background: rgb(4 11 32 / .38); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade .35s var(--out); }
dialog.sheet.closing::backdrop { animation: fade .26s var(--out) reverse forwards; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(30px) scale(.96); } }
@keyframes sheet-out { to { opacity: 0; transform: translateY(24px) scale(.97); } }
@keyframes fade { from { opacity: 0; } }
dialog.sheet form { display: flex; flex-direction: column; max-height: inherit; margin: 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 14px 6px 24px; }
.sheet-head h2 { margin: 0; font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; }
.sheet-body { padding: 8px 24px 16px; overflow-y: auto; display: grid; gap: 15px; }
.sheet-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 24px max(16px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  dialog.sheet { margin: auto 0 0; width: 100%; max-width: 100%; max-height: 94vh; border-radius: 28px 28px 0 0; border-bottom: 0; }
  dialog.sheet[open] { animation: sheet-up .55s var(--spring-soft); }
  dialog.sheet.closing { animation: sheet-down .26s var(--out) forwards; }
  .row2 { grid-template-columns: 1fr; }
  .sheet-head::before { content: ""; position: absolute; left: 50%; top: 7px; width: 38px; height: 5px; margin-left: -19px; border-radius: 99px; background: var(--line-2); }
}
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-down { to { transform: translateY(100%); } }

/* segmented control with a sliding glass thumb */
.seg { position: relative; isolation: isolate; display: inline-flex; padding: 4px; border-radius: 999px; justify-self: start;
  background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: inset 0 1px 3px rgb(6 18 51 / .1); }
.seg .thumb { position: absolute; z-index: -1; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px; background: var(--navy-grad);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), 0 6px 16px -6px rgb(16 41 106 / .7);
  transform: translateX(var(--tx, 4px)); width: var(--tw, 0); transition: transform .6s var(--spring), width .6s var(--spring); }
.seg button { position: relative; border: 0; background: transparent; min-height: 40px; padding: 0 18px; border-radius: 999px; font-weight: 650; color: var(--ink-2); cursor: pointer;
  transition: color .3s, transform .5s var(--spring); }
.seg button[aria-checked="true"] { color: #fff; }
.seg:not(.has-thumb) button[aria-checked="true"] { background: var(--navy-grad); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips.inline { display: contents; }
.chips button { min-width: 46px; min-height: 40px; padding: 0 12px; border-radius: 999px; cursor: pointer; font-variant-numeric: tabular-nums; font-weight: 600;
  background: var(--glass-2); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi), 0 1px 2px rgb(6 18 51 / .06);
  transition: transform .5s var(--spring), background .3s var(--out), color .2s, box-shadow .3s; }
.chips button[aria-pressed="true"] { background: var(--navy-grad); color: #fff; border-color: rgb(255 255 255 / .3);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), 0 8px 18px -8px rgb(16 41 106 / .8); transform: scale(1.06); }
.chips .grp { width: 100%; font-size: .7rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-top: 4px; }
.stepper { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.stepper input { width: 84px; text-align: center; font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums; }

.results { display: grid; gap: 4px; }
.result { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 14px; padding: 12px; border-radius: 14px; text-align: left; cursor: pointer;
  background: transparent; border: 1px solid transparent; transition: background .25s, transform .45s var(--spring); animation: rise .45s var(--spring-soft) both; }
.result:hover { background: var(--glass-2); border-color: var(--glass-edge); }
.result:active { transform: scale(.98); }
.result .d { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.result .n { font-weight: 650; overflow-wrap: anywhere; }
.result .s { color: var(--ink-2); font-size: .9rem; grid-column: 2 / -1; }

.settings section { display: grid; gap: 10px; padding: 14px 16px; border-radius: 18px; background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi); }
.settings h3 { margin: 0; font-size: .74rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.settings p { margin: 0; color: var(--ink-2); }
.settings .status { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); }
.settings .status i { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); }
.settings .status.on i { background: var(--ok); }
.settings .status.off i { background: var(--amber); }
.settings .btns { display: flex; flex-wrap: wrap; gap: 8px; }
.settings ol { margin: 0; padding-left: 1.2em; color: var(--ink-2); display: grid; gap: 4px; }

/* iOS-style switch (a real checkbox underneath) */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-weight: 600; cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 52px; height: 32px; margin: 0; border-radius: 99px; cursor: pointer;
  background: var(--line-2); box-shadow: inset 0 1px 3px rgb(0 0 0 / .18); transition: background .35s var(--out); }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(180deg, #fff, #eef1f8); box-shadow: 0 3px 8px rgb(6 18 51 / .3), inset 0 1px 0 #fff; transition: transform .55s var(--spring); }
.switch input:checked { background: var(--navy-grad); }
.switch input:checked::after { transform: translateX(20px); }
.switch input:active::after { width: 30px; }
.switch input:checked:active::after { transform: translateX(16px); }

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 50; left: 50%; transform: translateX(-50%); bottom: max(16px, env(safe-area-inset-bottom)); width: min(560px, calc(100% - 32px)); display: grid; gap: 8px; }
.toast { display: flex; align-items: center; gap: 12px; padding: 13px 13px 13px 18px; border-radius: 20px; color: #fff;
  background: rgb(7 20 52 / .82); -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8);
  border: 1px solid rgb(255 255 255 / .16); box-shadow: inset 0 1px 0 rgb(255 255 255 / .18), var(--shadow-2); animation: toast-in .6s var(--spring); }
.toast.new { border-color: rgb(240 195 95 / .7); box-shadow: inset 0 1px 0 rgb(255 255 255 / .2), 0 0 0 1px rgb(240 195 95 / .25), 0 18px 50px -14px rgb(222 165 58 / .55); }
.toast.new .msg b { color: var(--gold-300); }
.toast.out { animation: toast-out .3s var(--out) forwards; }
.toast .msg { flex: 1; min-width: 0; }
.toast .msg b { display: block; }
.toast button { flex: none; min-height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid rgb(255 255 255 / .35); color: inherit; font-weight: 650; cursor: pointer;
  background: linear-gradient(180deg, rgb(255 255 255 / .2), rgb(255 255 255 / .05)); transition: transform .5s var(--spring); }
.toast.new button { background: var(--gold-grad); color: #1a1204; border-color: transparent; }
@keyframes toast-in { from { transform: translateY(24px) scale(.92); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(12px) scale(.96); opacity: 0; } }

/* ---------- calm motion for people who prefer it ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
  body::after { animation: none; }
}

/* =====================================================================
   1.3.1 – The clock: classic watchmaking. Sunburst navy dial, applied gold batons,
   faceted dauphine hands, smooth sweeping seconds. No glow, no gloss, no numerals.
   ===================================================================== */
.cintro { display: none; }
html.clock-intro .cintro { display: grid; place-items: center; position: fixed; inset: 0; z-index: 100; cursor: pointer; color: #f4ead2;
  background: radial-gradient(120% 90% at 50% 40%, #0a1430 0%, #050a1b 55%, #020510 100%); }
html.clock-intro body { overflow: hidden; }
.cstage { position: relative; display: grid; justify-items: center; gap: 30px; text-align: center; }
.clock-host { width: min(66vmin, 400px); aspect-ratio: 1; position: relative; }
.clock { position: relative; width: 100%; height: 100%; border-radius: 50%;
  box-shadow: 0 40px 80px -30px rgb(0 0 0 / .9), 0 0 0 1px rgb(0 0 0 / .6); opacity: 0; animation: clockIn 1.4s var(--out) .1s forwards; }
@keyframes clockIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.c-dial { position: absolute; inset: 1.4%; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgb(255 255 255 / .05), transparent 58%),
    repeating-conic-gradient(from 0deg, rgb(255 255 255 / .045) 0deg .6deg, rgb(0 0 0 / .05) .6deg 1.2deg),
    conic-gradient(from 220deg, #12265e, #0b1a45 25%, #15306f 45%, #0a1840 70%, #11255a 85%, #12265e);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .5), inset 0 10px 30px rgb(0 0 0 / .45); }
.c-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.c-case { fill: none; stroke: url(#cgCase); stroke-width: 2.6; stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: cDraw 1.8s var(--out) .2s forwards; }
.c-chapter { fill: none; stroke: rgb(232 205 150 / .35); stroke-width: .35; stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: cDraw 1.8s var(--out) .5s forwards; }
@keyframes cDraw { to { stroke-dashoffset: 0; } }
@keyframes cFade { to { opacity: 1; } }
.c-ticks line { stroke: rgb(232 205 150 / .7); stroke-width: .45; opacity: 0; animation: cFade .6s var(--out) forwards; animation-delay: calc(.7s + var(--i) * 10ms); }
.c-idx rect { fill: url(#cgLight); stroke: #6b4a14; stroke-width: .25; opacity: 0; animation: idxIn .9s var(--out) forwards; animation-delay: calc(.9s + var(--i) * 55ms); transform-box: fill-box; transform-origin: center; }
@keyframes idxIn { from { opacity: 0; transform: scaleY(.3); } to { opacity: 1; transform: none; } }
.clock { container-type: inline-size; }
.c-brand, .c-zone { position: absolute; left: 0; right: 0; text-align: center; text-transform: uppercase; color: #e9d6a6; pointer-events: none;
  font-family: "Instrument Sans", system-ui, sans-serif; opacity: 0; -webkit-font-smoothing: antialiased; }
.c-brand { top: 30.5%; font-size: 2.55cqw; font-weight: 600; letter-spacing: .42em; padding-left: .42em; animation: cFade 1.2s var(--out) 1.6s forwards; }
.c-zone { bottom: 28.5%; font-size: 1.95cqw; font-weight: 500; letter-spacing: .36em; padding-left: .36em; color: rgb(233 214 166 / .65); animation: cFade 1.2s var(--out) 1.8s forwards; }
.c-hand { transform-origin: 100px 100px; opacity: 0; }
.clock.live .c-hand { opacity: 1; transition: opacity .8s var(--out); }
.c-hand .lt { fill: url(#cgLight); }
.c-hand .dk { fill: url(#cgDark); }
.c-hand .tail { fill: #8f6522; }
.c-hand { filter: drop-shadow(0 1.2px 1px rgb(0 0 0 / .55)); }
.c-sec line { stroke: #e9cf90; stroke-width: .7; stroke-linecap: round; }
.c-sec circle { fill: #e9cf90; }
.c-cap { fill: url(#cgCase); }
.c-cap2 { fill: #5a3d10; }
.cdate { font-size: .74rem; font-weight: 500; letter-spacing: .34em; text-transform: uppercase; color: rgb(244 234 210 / .72); font-variant-numeric: tabular-nums;
  opacity: 0; animation: wordIn 1.4s var(--out) 2s forwards; }
@keyframes wordIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.chint { position: absolute; bottom: max(30px, env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; font-size: .68rem; letter-spacing: .36em;
  text-transform: uppercase; color: rgb(244 234 210 / .5); opacity: 0; animation: hintIn 1.2s ease 3s forwards, breathe 3.6s ease-in-out 4.2s infinite; }
@keyframes hintIn { to { opacity: .55; } }
@keyframes breathe { 0%, 100% { opacity: .55; } 50% { opacity: .2; } }
html.clock-leaving .cintro { pointer-events: none; animation: cOut 1s var(--out) .3s forwards; }
html.clock-leaving .cdate, html.clock-leaving .chint { animation: wordOut .45s var(--out) forwards; }
@keyframes cOut { to { opacity: 0; visibility: hidden; } }
@keyframes wordOut { to { opacity: 0; transform: translateY(-8px); } }

/* login: the clock lives on, a greeting by time of day */
.login-clock { width: 92px; height: 92px; justify-self: center; margin-top: -6px; position: relative; }
.login-clock .clock { opacity: 1; animation: none; box-shadow: 0 14px 30px -12px rgb(6 18 51 / .7), 0 0 0 1px rgb(0 0 0 / .4); }
.login-clock .clock .c-ticks line, .login-clock .clock .c-idx rect, .login-clock .c-brand, .login-clock .c-zone { opacity: 1; animation: none; }
.login-clock .c-case, .login-clock .c-chapter { stroke-dashoffset: 0; animation: none; }
.login-clock .c-ticks, .login-clock .c-brand, .login-clock .c-zone { display: none; }
.greet { margin: 0; text-align: center; font-size: .78rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.panel .welcome { margin: -6px 0 0; text-align: center; font-size: clamp(1.7rem, 5vw, 2.1rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.panel .welcome .gold { color: var(--gold-500); }
.panel .lede { text-align: center; }
#v-login .panel > * { animation: rise .9s var(--spring-soft) both; }
#v-login .panel > :nth-child(1) { animation-delay: .05s; } #v-login .panel > :nth-child(2) { animation-delay: .15s; }
#v-login .panel > :nth-child(3) { animation-delay: .22s; } #v-login .panel > :nth-child(4) { animation-delay: .3s; }
#v-login .panel > :nth-child(5) { animation-delay: .38s; } #v-login .panel > :nth-child(6) { animation-delay: .46s; }
#v-login .panel > :nth-child(n+7) { animation-delay: .54s; }
.welcome .gold { background: linear-gradient(100deg, var(--gold-600), var(--gold-300) 45%, #fff 52%, var(--gold-400) 60%, var(--gold-600)); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: goldSheen 5s ease-in-out 1s infinite; }
@keyframes goldSheen { 0% { background-position: 100% 0; } 40%, 100% { background-position: 0% 0; } }

/* entering the reservation book after login / welcome back */
html.entering .topbar { animation: rise .8s var(--spring-soft) both; }
html.entering .stripbar { animation: rise .8s var(--spring-soft) .1s both; }
html.entering .dchip { animation: rise .7s var(--spring-soft) both; animation-delay: calc(.15s + var(--i, 0) * 35ms); }
html.entering .activity, html.entering .cbbar, html.entering .newbar { animation: rise .9s var(--spring-soft) .25s both; }
html.entering .dayhead > * { animation: rise .9s var(--spring-soft) .3s both; }
.welcome-banner { position: fixed; z-index: 60; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 84px); transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; padding: 12px 20px 12px 14px; border-radius: 26px; color: #fff; width: max-content; max-width: calc(100vw - 32px); line-height: 1.35;
  background: rgb(7 20 52 / .82); -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8);
  border: 1px solid rgb(240 195 95 / .6); box-shadow: inset 0 1px 0 rgb(255 255 255 / .18), 0 20px 50px -14px rgb(222 165 58 / .55);
  animation: banner 3.6s var(--spring-soft) forwards; pointer-events: none; }
.welcome-banner .mini { width: 34px; height: 34px; }
.welcome-banner b { color: var(--gold-300); font-weight: 650; }
@keyframes banner { 0% { opacity: 0; transform: translate(-50%, -16px) scale(.9); } 12%, 82% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; transform: translate(-50%, -10px) scale(.96); } }

/* day change: the list slides in from the direction of the new day */
.list.from-right .res.enter { animation-name: fromRight; }
.list.from-left .res.enter { animation-name: fromLeft; }
@keyframes fromRight { from { opacity: 0; transform: translateX(36px); } }
@keyframes fromLeft { from { opacity: 0; transform: translateX(-36px); } }
.dayhead.swap h1 { animation: rise .7s var(--spring-soft) both; }

/* gold glint sweeping across gold and primary buttons */
.btn .glint { position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit; overflow: hidden; }
.btn .glint::after { content: ""; position: absolute; top: 0; bottom: 0; width: 60%; left: -70%;
  background: linear-gradient(105deg, transparent, rgb(255 255 255 / .65) 50%, transparent); transform: skewX(-12deg); }
.btn.glinting .glint::after { animation: glint 1s var(--out) forwards; }
@keyframes glint { to { left: 120%; } }
.btn.gold.idle-glint .glint::after { animation: glint 1.2s var(--out) 1; }

/* sparkle burst on press */
.burst { position: fixed; z-index: 1000; pointer-events: none; width: 0; height: 0; }
.burst i { position: absolute; left: -4px; top: -4px; width: 7px; height: 7px; transform: rotate(45deg) scale(0);
  background: linear-gradient(135deg, #fff, #f7d98f 50%, #dea53a); box-shadow: 0 0 6px rgb(247 217 143 / .8); animation: shard .75s var(--out) forwards; }
@keyframes shard { 0% { transform: translate(0, 0) rotate(45deg) scale(.3); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) rotate(225deg) scale(0); opacity: 0; } }

/* stats count with a soft pop when the day changes */
.dayhead.swap .stat { animation: rise .7s var(--spring-soft) both; }
.dayhead.swap .stat:nth-child(2) { animation-delay: .06s; } .dayhead.swap .stat:nth-child(3) { animation-delay: .12s; }

@media (prefers-reduced-motion: reduce) { .welcome-banner { display: none; } .cwaves { animation: none; } }

html.clock-intro #v-login .panel > :not(.login-clock) { animation: none; opacity: 0; }
#v-login .panel > .login-clock { animation: none; }
html.clock-leaving.to-login .cintro { animation: none; }

/* =====================================================================
   1.4 – Clock screen on white: fine pattern, a barely-moving wave, digital time.
   Works on iPhone and iPad in portrait and landscape.
   ===================================================================== */
html.clock-intro .cintro {
  color: #0b1d4a;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cpath d='M22 2 L42 22 L22 42 L2 22Z' fill='none' stroke='%230b1d4a' stroke-opacity='.045' stroke-width='.8'/%3E%3Ccircle cx='22' cy='22' r='1.1' fill='%23b9821c' fill-opacity='.12'/%3E%3C/svg%3E") center/44px 44px,
    radial-gradient(120% 90% at 50% 38%, #ffffff 0%, #f7f8fc 55%, #eef1f8 100%);
}
.cwaves { position: absolute; left: 0; bottom: 0; width: 200%; height: 34vh; min-height: 160px; pointer-events: none;
  animation: waveDrift 70s linear infinite; }
.cwaves path { fill: #0b1d4a; stroke: none; }
.cwaves path:nth-child(1) { fill-opacity: .028; }
.cwaves path:nth-child(2) { fill-opacity: .022; animation: waveBob 14s ease-in-out infinite; transform-origin: 50% 100%; }
.cwaves path:nth-child(3) { fill: #b9821c; fill-opacity: .035; animation: waveBob 18s ease-in-out -6s infinite; transform-origin: 50% 100%; }
@keyframes waveDrift { to { transform: translateX(-50%); } }
@keyframes waveBob { 50% { transform: scaleY(1.08); } }
.clock { box-shadow: 0 46px 80px -46px rgb(11 29 74 / .55), 0 0 0 1px rgb(11 29 74 / .25), 0 2px 6px rgb(11 29 74 / .12); }
.cstage { gap: 26px; }
.cside { display: grid; justify-items: center; gap: 10px; }
.cdigital { display: flex; align-items: baseline; gap: .18em; font-variant-numeric: tabular-nums; color: #0b1d4a; line-height: 1;
 }
.cdigital .hm { font-size: clamp(2.6rem, 8vmin, 4.4rem); font-weight: 400; letter-spacing: -.02em; }
.cdigital .ss { font-size: clamp(1rem, 2.6vmin, 1.4rem); font-weight: 500; color: #b9821c; width: 1.4em; text-align: left; }
.cdate { color: rgb(11 29 74 / .62); }
.chint { color: rgb(11 29 74 / .55); }
/* landscape (iPad landscape, phones on their side): watch left, time right */
@media (orientation: landscape) and (max-height: 1100px) {
  .cstage { grid-auto-flow: column; align-items: center; gap: clamp(28px, 7vw, 110px); text-align: left; }
  .cside { justify-items: start; }
  .clock-host { width: min(72vh, 66vmin, 520px); }
  .cdigital .hm { font-size: clamp(2.6rem, 9vh, 5.6rem); }
}
@media (orientation: portrait) {
  .clock-host { width: min(72vw, 52vh, 520px); }
}
@media (max-height: 460px) { .chint { bottom: 10px; } .cstage { gap: 22px; } }

/* cancelled bookings: out of the way, in their own closed section */
.trash { margin-top: 26px; border-radius: 18px; background: var(--glass); border: 1px dashed var(--line-2); overflow: hidden; }
.trash > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 12px 14px; color: var(--ink-2); font-weight: 600; font-size: .92rem; }
.trash > summary::-webkit-details-marker { display: none; }
.trash > summary svg { width: 18px; height: 18px; }
.trash > summary .chev { margin-left: auto; transition: transform .5s var(--spring); }
.trash[open] > summary .chev { transform: rotate(180deg); }
.trash .res { margin: 6px 10px; }
.trash[open] .res { animation: rise .5s var(--spring-soft) both; }

/* =====================================================================
   Tischzeit 1.5 – "Clean" design layer.
   Same colours (royal navy, white, black, gold) used calmly: solid white
   surfaces, flat navy buttons, gold only as a small accent. No gloss,
   no blur, no drifting lights. Motion stays.
   ===================================================================== */
:root {
  --bg: #f4f5f8; --bg-2: #f4f5f8;
  --surface: #ffffff; --surface-2: #f7f8fb; --sunken: #eef0f5;
  --ink: #0b1220; --ink-2: #48526a; --ink-3: #7c859b;
  --line: #e5e8ef; --line-2: #d7dce6;
  --primary: #0b1d4a; --primary-hover: #13286a; --primary-soft: #e9edf7;
  --accent: #b9821c; --accent-soft: #fbf3e2; --gold-dot: #d9a23a;
  --shadow-1: 0 1px 2px rgb(11 18 32 / .05), 0 1px 1px rgb(11 18 32 / .03);
  --shadow-2: 0 12px 32px -12px rgb(11 18 32 / .22), 0 2px 6px rgb(11 18 32 / .05);
  --ring: 0 0 0 3px rgb(217 162 58 / .35);
  --r: 12px; --r-lg: 16px;
}
:root[data-theme="dark"] {
  --bg: #0a0f1c; --bg-2: #0a0f1c;
  --surface: #111a2e; --surface-2: #142038; --sunken: #0d1527;
  --ink: #eef1f7; --ink-2: #aab3c7; --ink-3: #7b86a0;
  --line: #1f2a42; --line-2: #2b3755;
  --primary: #e9b752; --primary-hover: #f2c66c; --primary-soft: #1a2746;
  --accent: #e9b752; --accent-soft: rgb(233 183 82 / .12); --gold-dot: #e9b752;
  --shadow-1: 0 1px 2px rgb(0 0 0 / .3); --shadow-2: 0 18px 40px -16px rgb(0 0 0 / .7);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0a0f1c; --bg-2: #0a0f1c;
  --surface: #111a2e; --surface-2: #142038; --sunken: #0d1527;
  --ink: #eef1f7; --ink-2: #aab3c7; --ink-3: #7b86a0;
  --line: #1f2a42; --line-2: #2b3755;
  --primary: #e9b752; --primary-hover: #f2c66c; --primary-soft: #1a2746;
  --accent: #e9b752; --accent-soft: rgb(233 183 82 / .12); --gold-dot: #e9b752;
  --shadow-1: 0 1px 2px rgb(0 0 0 / .3); --shadow-2: 0 18px 40px -16px rgb(0 0 0 / .7);
} }

html, body { background: var(--bg); }
body::after { display: none; }                         /* no drifting lights */
body::before { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }

/* surfaces: solid, hairline border, tiny shadow */
.glass, .activity, .cbbar, .newbar, .stat, .res, .empty, .settings section, .panel, .closed-banner {
  background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none;
  border: 1px solid var(--line); box-shadow: var(--shadow-1);
}
.topbar { background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line); box-shadow: none; }
.brand img { box-shadow: none; border-radius: 10px; }
.brand-lg img { box-shadow: none; }

/* ---------- buttons: flat, rounded, clear ---------- */
.btn {
  border-radius: 12px; min-height: 42px; padding: 0 16px; font-weight: 600; letter-spacing: 0;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-1);
  -webkit-backdrop-filter: none; backdrop-filter: none; text-shadow: none;
  transition: transform .45s var(--spring), background .2s, border-color .2s, color .2s, box-shadow .2s;
}
.btn::after, .btn::before, .icon-btn::before, .dchip::before { display: none; }
:where(:root[data-theme="dark"]) .btn, :where(:root[data-theme="dark"]) .btn.ghost { background: var(--surface); }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) .btn, :where(:root:not([data-theme="light"])) .btn.ghost { background: var(--surface); } }
@media (hover: hover) { .btn:hover { transform: none; background: var(--surface-2); box-shadow: var(--shadow-1); border-color: var(--line-2); } }
.btn.is-pressed, .icon-btn.is-pressed, .dchip.is-pressed, .chips button.is-pressed, .seg button.is-pressed, .toast button.is-pressed { transform: scale(.96); }
.btn.primary, .btn.gold {
  color: #fff; background: var(--primary); border-color: var(--primary); text-shadow: none;
  box-shadow: 0 1px 2px rgb(11 29 74 / .25), 0 6px 16px -8px rgb(11 29 74 / .45);
}
.btn.gold svg, .btn.gold .plus { color: var(--gold-dot); }
@media (hover: hover) { .btn.primary:hover, .btn.gold:hover { background: var(--primary-hover); border-color: var(--primary-hover); } }
:where(:root[data-theme="dark"]) :is(.btn.primary, .btn.gold) { color: #0b1220; }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) :is(.btn.primary, .btn.gold) { color: #0b1220; } }
.btn.ghost { background: transparent; border-color: var(--line-2); box-shadow: none; }
.btn.ok { color: #fff; background: #1f8a57; border-color: #1f8a57; text-shadow: none; box-shadow: var(--shadow-1); }
.btn.link { color: var(--ink-2); }
.glint, .rip, .burst { display: none !important; }      /* no sparkle effects */

.icon-btn { border-radius: 12px; }
.topbar .icon-btn, .stepper .icon-btn, .sheet-head .icon-btn {
  background: transparent; border: 1px solid transparent; box-shadow: none; color: var(--ink-2);
}
@media (hover: hover) { .topbar .icon-btn:hover, .sheet-head .icon-btn:hover, .stepper .icon-btn:hover { background: var(--sunken); color: var(--ink); } }
:where(:root[data-theme="dark"]) :is(.topbar, .stepper, .sheet-head) .icon-btn { background: transparent; }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) :is(.topbar, .stepper, .sheet-head) .icon-btn { background: transparent; } }
.stepper .icon-btn { border-color: var(--line-2); background: var(--surface); }

/* ---------- fields ---------- */
.field input, .field textarea, .field select, .stepper input {
  border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: none;
}
.field input:focus, .field textarea:focus, .stepper input:focus { border-color: var(--gold-dot); box-shadow: var(--ring); background: var(--surface); }
.field > span { letter-spacing: .04em; text-transform: none; font-size: .86rem; font-weight: 600; color: var(--ink-2); }

/* ---------- day strip ---------- */
.dchip { background: var(--surface); border: 1px solid var(--line); box-shadow: none; border-radius: 14px;
  -webkit-backdrop-filter: none; backdrop-filter: none; transition: transform .45s var(--spring), background .2s, color .2s, border-color .2s; }
@media (hover: hover) { .dchip:hover { border-color: var(--line-2); background: var(--surface-2); } }
.dchip .wd { letter-spacing: .06em; }
.dchip.today { border-color: color-mix(in srgb, var(--gold-dot) 55%, var(--line)); }
.dchip.today .wd { color: var(--accent); }
.dchip.closed { background: var(--sunken); color: var(--ink-3); }
.dchip[aria-current="date"] { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 6px 16px -8px rgb(11 29 74 / .55); transform: none; }
.dchip[aria-current="date"] .wd { color: var(--gold-dot); }
:where(:root[data-theme="dark"]) .dchip[aria-current="date"], :where(:root[data-theme="dark"]) .dchip[aria-current="date"] .dn, :where(:root[data-theme="dark"]) .dchip[aria-current="date"] .ct { color: #0b1220; }
:where(:root[data-theme="dark"]) .dchip[aria-current="date"] .wd { color: #0b1220; opacity: .7; }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) .dchip[aria-current="date"], :where(:root:not([data-theme="light"])) .dchip[aria-current="date"] :is(.dn, .ct) { color: #0b1220; }
  :where(:root:not([data-theme="light"])) .dchip[aria-current="date"] .wd { color: #0b1220; opacity: .7; } }
.jump { background: var(--surface); border: 1px solid var(--line); box-shadow: none; border-radius: 12px; }

/* ---------- activity ---------- */
.activity { padding: 14px 6px 6px; }
.act-head h2 { letter-spacing: .08em; font-size: .76rem; color: var(--ink-2); }
.act-head .live { background: var(--gold-dot); }
.act { border-radius: 12px; }
.act:hover { background: var(--surface-2); }
.act .ic { border-radius: 10px; border: 0; box-shadow: none; background: var(--sunken); color: var(--primary); }
:where(:root[data-theme="dark"]) .act .ic { color: var(--ink-2); }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) .act .ic { color: var(--ink-2); } }
.act.k-new .ic { background: var(--accent-soft); color: var(--accent); border: 0; }
.act.k-ai .ic { background: var(--primary-soft); color: var(--primary); border: 0; }
:where(:root[data-theme="dark"]) .act.k-ai .ic { color: var(--accent); }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) .act.k-ai .ic { color: var(--accent); } }
.act.fresh::after { box-shadow: inset 3px 0 0 var(--gold-dot); }

/* ---------- callbacks / new bookings bar ---------- */
.cbbar, .newbar { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); position: relative; overflow: hidden; }
.cbbar::before, .newbar::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--gold-dot); }
.cb { background: var(--surface-2); border: 1px solid var(--line); box-shadow: none; border-radius: 12px; }

/* ---------- day header / stats ---------- */
.stat { border-radius: 12px; box-shadow: none; }
.meter { background: var(--sunken); }
.meter i { background: var(--primary); }

/* ---------- bookings ---------- */
.res { border-radius: 14px; }
.res .g { border-radius: 12px; border: 0; box-shadow: none; background: var(--primary-soft); color: var(--primary); }
:where(:root[data-theme="dark"]) .res .g { color: var(--ink); }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) .res .g { color: var(--ink); } }
.res.is-new { border-color: var(--line); box-shadow: inset 3px 0 0 var(--gold-dot), var(--shadow-1); }
.res.is-new .g { background: var(--accent-soft); color: var(--accent); }
.res.st-arrived { background: var(--surface); box-shadow: inset 3px 0 0 #1f8a57, var(--shadow-1); }
.res.st-arrived .g { background: #e3f3ea; color: #1f8a57; }
.period-head h2::before { background: var(--gold-dot); width: 14px; }
.chip { background: var(--sunken); border: 0; color: var(--ink-2); }
.chip.web { background: var(--primary-soft); color: var(--primary); }
.chip.ai { background: var(--primary); color: #fff; }
.chip.new { background: var(--accent-soft); color: var(--accent); }
:where(:root[data-theme="dark"]) :is(.chip.web) { color: var(--ink); }
:where(:root[data-theme="dark"]) .chip.ai { color: #0b1220; }

/* ---------- sheets ---------- */
dialog.sheet { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-2); }
dialog.sheet::backdrop { background: rgb(11 18 32 / .35); -webkit-backdrop-filter: none; backdrop-filter: none; }
@media (max-width: 640px) { dialog.sheet { border-radius: 20px 20px 0 0; } }

/* segmented control: grey track, white thumb (iOS style) */
.seg { background: var(--sunken); border: 0; box-shadow: none; border-radius: 12px; padding: 3px; }
.seg .thumb { top: 3px; bottom: 3px; background: var(--surface); border-radius: 10px; box-shadow: 0 1px 3px rgb(11 18 32 / .14), 0 1px 1px rgb(11 18 32 / .06); }
.seg button { border-radius: 10px; min-height: 38px; }
.seg button[aria-checked="true"] { color: var(--ink); }
.seg:not(.has-thumb) button[aria-checked="true"] { background: var(--surface); }
.chips button { background: var(--surface); border: 1px solid var(--line-2); box-shadow: none; border-radius: 12px; }
.chips button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: none; transform: none; }
:where(:root[data-theme="dark"]) .chips button[aria-pressed="true"] { color: #0b1220; }
.switch input { background: var(--line-2); box-shadow: none; }
.switch input::after { background: #fff; box-shadow: 0 2px 4px rgb(11 18 32 / .25); }
.switch input:checked { background: var(--primary); }

/* toasts: solid dark pill */
.toast { background: #0b1220; border: 0; box-shadow: var(--shadow-2); -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 14px; }
.toast button { border-radius: 10px; background: rgb(255 255 255 / .1); border: 0; }
.toast.new button { background: var(--gold-dot); color: #0b1220; }

/* welcome banner: white card */
.welcome-banner { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-2); -webkit-backdrop-filter: none; backdrop-filter: none; }
.welcome-banner b { color: var(--accent); }

/* login panel */
.panel { border-radius: 20px; box-shadow: var(--shadow-2); }
.welcome .gold { animation: none; background: none; -webkit-text-fill-color: currentColor; color: var(--accent); }

/* ---------- activity: "seen" tick ---------- */
.act-head .count { margin-left: auto; }
.act-all { display: inline-grid; place-items: center; width: 34px; height: 34px; margin: -6px -2px -6px 2px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink-2); cursor: pointer; transition: background .2s, color .2s, transform .4s var(--spring); }
.act-all svg { width: 18px; height: 18px; stroke-width: 2; }
@media (hover: hover) { .act-all:hover { background: var(--primary); color: #fff; border-color: var(--primary); } }
.act-all:active { transform: scale(.92); }
.act-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px; border-radius: 12px;
  transition: opacity .3s var(--out), transform .38s var(--out), max-height .38s var(--out); max-height: 160px; }
.act-row .act { padding-right: 6px; }
.act-tick { flex: none; display: grid; place-items: center; width: 34px; height: 34px; margin-right: 6px; border-radius: 50%;
  border: 1.5px solid var(--line-2); background: var(--surface); color: var(--line-2); cursor: pointer;
  transition: border-color .2s, background .2s, color .2s, transform .4s var(--spring); }
.act-tick svg { width: 17px; height: 17px; stroke-width: 2.4; }
@media (hover: hover) { .act-tick:hover { border-color: #1f8a57; color: #1f8a57; } }
.act-tick:active { transform: scale(.88); }
.act-row.leaving .act-tick { background: #1f8a57; border-color: #1f8a57; color: #fff; }
.act-row.leaving { opacity: 0; transform: translateX(28px); max-height: 0; overflow: hidden; transition-delay: calc(var(--i, 0) * 40ms + 120ms); }
@media (max-width: 1099.98px) { .activity.collapsed .act-row:nth-child(n+5) { display: none; } .activity.collapsed .act:nth-child(n+5) { display: grid; } }
.act-empty { display: flex; align-items: center; gap: 10px; }
.act-empty svg { width: 20px; height: 20px; color: #1f8a57; stroke-width: 2.2; flex: none; }

/* ---------- digital clock: split-flap cards ---------- */
.cdigital { align-items: flex-end; gap: .12em; }
.cdigital .hm, .cdigital .ss { display: inline-flex; align-items: center; width: auto; letter-spacing: 0; }
.cdigital .ss { font-size: clamp(1.6rem, 4.4vmin, 2.5rem); margin-bottom: 0; margin-left: .15em; }
.ss .fd { margin: 0 .05em; }
.fd { position: relative; display: inline-block; width: .7em; height: 1.16em; margin: 0 .035em; perspective: 4em; line-height: 1; }
.fd i { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-weight: 500; border-radius: .11em;
  color: #f6ead0; background: linear-gradient(180deg, #13296a 0%, #0b1d4a 49.6%, #091840 50.4%, #0b1d4a 100%);
  -webkit-backface-visibility: hidden; backface-visibility: hidden; font-variant-numeric: tabular-nums; }
.ss .fd i { color: #e9b752; }
.fd .u, .fd .fu { clip-path: inset(0 0 50% 0); }
.fd .l, .fd .fl { clip-path: inset(50% 0 0 0); }
.fd .fu, .fd .fl { opacity: 0; transform-origin: 50% 50%; }
.fd::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; margin-top: -.5px; background: rgb(0 0 0 / .45); z-index: 3; pointer-events: none; }
.fd { box-shadow: 0 .06em .12em rgb(11 18 32 / .25); border-radius: .11em; }
.fd.flip .fu { opacity: 1; animation: fdTop .27s cubic-bezier(.55, 0, .9, .45) var(--delay, 0ms) both; }
.fd.flip .fl { opacity: 1; animation: fdBot .3s cubic-bezier(.2, .7, .3, 1.15) calc(var(--delay, 0ms) + .25s) both; }
.fd.flip .u { animation: fdShow 0s var(--delay, 0ms) both; }
@keyframes fdTop { from { transform: rotateX(0); filter: brightness(1); } to { transform: rotateX(-90deg); filter: brightness(.6); } }
@keyframes fdBot { from { transform: rotateX(90deg); filter: brightness(1.4); } to { transform: rotateX(0); filter: brightness(1); } }
@keyframes fdShow { from { visibility: hidden; } to { visibility: visible; } }
.fsep { display: inline-block; padding: 0 .04em; color: #0b1d4a; transform: translateY(-.04em); animation: sepBlink 2s steps(1) infinite; }
@keyframes sepBlink { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .fsep { animation: none; } }

/* =====================================================================
   1.6 – today's bookings first, compact booking cards, ⋯ menu
   ===================================================================== */
/* order on phones / iPad portrait: the day first, then callbacks, then recent activity */
.home .activity { order: 1; }
.home { padding-bottom: 110px; }
.list { padding-bottom: 8px; }
.home-main .cbbar { margin-top: 14px; }
@media (min-width: 1100px) { .home-main .cbbar { margin-left: max(16px, env(safe-area-inset-left)); margin-right: 8px; } }

/* compact booking card */
.res { grid-template-columns: 58px 38px minmax(0, 1fr) auto; gap: 2px 12px; padding: 9px 10px 9px 12px; margin: 6px 0; border-radius: 12px; }
.res .t { font-size: 1.15rem; }
.res .g { width: 36px; height: 36px; border-radius: 10px; font-size: .98rem; }
.res .nm { font-size: 1rem; line-height: 1.25; }
.res .meta { font-size: .86rem; margin-top: 1px; gap: 4px 8px; }
.res .meta:empty { display: none; }
.res .chip { height: 20px; padding: 0 8px; font-size: .68rem; }
.res .nt { margin-top: 2px; font-size: .86rem; }
.res .bk { margin-top: 2px; font-size: .74rem; color: var(--ink-3); letter-spacing: .01em; }
.res .acts { flex-wrap: nowrap; align-items: center; gap: 4px; }
.res .acts .btn.small { min-height: 34px; padding: 0 12px; font-size: .86rem; border-radius: 10px; }
.kebab { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid transparent; background: transparent;
  color: var(--ink-2); cursor: pointer; transition: background .2s, color .2s, transform .4s var(--spring); }
.kebab svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
@media (hover: hover) { .kebab:hover { background: var(--sunken); color: var(--ink); } }
.kebab:active, .kebab[aria-expanded="true"] { background: var(--sunken); color: var(--ink); }
.kebab:active { transform: scale(.92); }
@media (max-width: 720px) {
  .res { grid-template-columns: 50px 34px minmax(0, 1fr) auto; gap: 2px 10px; padding: 8px 8px 8px 10px; }
  .res .t { font-size: 1.05rem; }
  .res .g { width: 32px; height: 32px; font-size: .92rem; }
  .res .acts { grid-column: auto; justify-content: flex-end; }
  .res .acts .btn.small { padding: 0 10px; }
}
@media (max-width: 420px) { .res .acts .btn.ok .lbl { display: none; } .res .acts .btn.ok { width: 38px; padding: 0; } }

/* the ⋯ menu */
.rowmenu { position: fixed; z-index: 70; min-width: 190px; padding: 5px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-2); display: grid; animation: menuIn .18s var(--out); }
.rowmenu button { all: unset; box-sizing: border-box; padding: 10px 12px; border-radius: 8px; font-weight: 550; cursor: pointer; color: var(--ink); }
.rowmenu button:hover, .rowmenu button:focus-visible { background: var(--sunken); }
.rowmenu button.danger { color: var(--bad); }
@keyframes menuIn { from { opacity: 0; transform: translateY(-4px) scale(.97); } }

/* =====================================================================
   1.7 – "Today" button, guest profiles, value levels
   ===================================================================== */
.today-btn { gap: 6px; }
.today-btn svg { width: 18px; height: 18px; }
.today-btn.on { color: var(--accent); border-color: color-mix(in srgb, var(--gold-dot) 60%, var(--line-2)); }
@media (max-width: 480px) { .today-btn { padding: 0 10px; } .top-actions { gap: 4px; } #guestsBtn { width: 38px; } }

/* value levels */
.tier { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; height: 20px; padding: 0 8px; border-radius: 99px; font-size: .66rem; font-weight: 700;
  letter-spacing: .04em; vertical-align: 2px; white-space: nowrap; }
.tier i { font-style: normal; font-size: .55rem; letter-spacing: 1px; }
.tier.t-high { background: linear-gradient(135deg, #f6dfa8, #d9a23a); color: #3a2604; }
.tier.t-mid { background: var(--primary-soft); color: var(--primary); }
.tier.t-value { background: var(--sunken); color: var(--ink-2); }
:where(:root[data-theme="dark"]) .tier.t-mid { color: var(--ink); }
.res:has(.tier.t-high) { box-shadow: inset 3px 0 0 #d9a23a, var(--shadow-1); }

/* guest line on booking cards */
.nm-btn { all: unset; cursor: pointer; font: inherit; border-bottom: 1px dashed color-mix(in srgb, var(--ink-3) 60%, transparent); }
.nm-btn:hover, .nm-btn:focus-visible { border-bottom-color: var(--accent); color: var(--accent); }
.res .gx { display: flex; flex-wrap: wrap; gap: 2px 6px; margin-top: 2px; font-size: .76rem; color: var(--ink-2); }
.res .gx .vno { font-weight: 650; color: var(--primary); }
.res .gx .vno.first { color: #1f8a57; }
:where(:root[data-theme="dark"]) .res .gx .vno { color: var(--ink); }
.res .gx .dotsep { color: var(--ink-3); }
.res .gnote { display: flex; gap: 6px; align-items: flex-start; margin-top: 4px; padding: 5px 8px; border-radius: 8px; background: var(--accent-soft); color: var(--ink);
  font-size: .8rem; line-height: 1.35; overflow-wrap: anywhere; }
.res .gnote svg { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--accent); }

/* guest profile sheet */
.g-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: -6px; }
.g-phone { font-weight: 600; color: var(--primary); text-decoration: none; }
.g-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.g-stats > div { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); display: grid; gap: 2px; }
.g-stats b { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; }
.g-stats small { font-size: .7rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.g-stats .warnstat b { color: var(--amber); }
.seg.tiers { flex-wrap: wrap; justify-self: stretch; }
.seg.tiers button { flex: 1; padding: 0 10px; white-space: nowrap; }
.seg.tiers i, .seg i { font-style: normal; font-size: .6rem; letter-spacing: 1px; color: var(--accent); }
.g-hist { display: grid; gap: 4px; max-height: 260px; overflow-y: auto; }
.g-h { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center;
  padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: .88rem; }
.g-h:hover { border-color: var(--line-2); }
.g-h .chip { height: 20px; font-size: .66rem; }
.g-h.st-confirmed .chip { display: none; }
.gl-search { width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); }
.gl-search:focus { outline: none; border-color: var(--gold-dot); box-shadow: var(--ring); }
#gl-tier { justify-self: start; flex-wrap: wrap; }
.gl-row .d.tnum { font-weight: 700; color: var(--primary); min-width: 2.4em; }
/* level picker: 4 clear buttons (2×2 on phones) */
.tiergrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tiergrid button { min-height: 42px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2);
  font-weight: 650; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s, border-color .2s, transform .35s var(--spring); }
.tiergrid button i { font-style: normal; font-size: .6rem; letter-spacing: 1px; color: var(--accent); margin-right: 2px; }
.tiergrid button[aria-checked="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.tiergrid button[aria-checked="true"] i { color: var(--gold-dot); }
.tiergrid button[data-tier="high"][aria-checked="true"], .tiergrid button[data-gltier="high"][aria-checked="true"] { background: linear-gradient(135deg, #f6dfa8, #d9a23a); border-color: #d9a23a; color: #3a2604; }
.tiergrid button[data-tier="high"][aria-checked="true"] i, .tiergrid button[data-gltier="high"][aria-checked="true"] i { color: #3a2604; }
.tiergrid button:active { transform: scale(.96); }
:where(:root[data-theme="dark"]) .tiergrid button[aria-checked="true"] { color: #0b1220; }
@media (max-width: 480px) { .tiergrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.res .gx .pref { color: #b0445a; font-weight: 600; }
/* phones: keep the logo, drop the word "Tischzeit" so the Today button fits */
@media (max-width: 480px) { .topbar .brand b { display: none; } }

/* =====================================================================
   1.8 – Platin / Gold / Silber, visit count, prominent table
   ===================================================================== */
.tier.t-high { background: linear-gradient(135deg, #2b3445, #0f1623); color: #e7ebf2; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .18); }
.tier.t-high i { color: #c9d1de; }
.tier.t-mid { background: linear-gradient(135deg, #f6dfa8, #d9a23a); color: #3a2604; }
.tier.t-value { background: linear-gradient(135deg, #f3f4f7, #c9ced8); color: #2d3443; }
:where(:root[data-theme="dark"]) .tier.t-mid { color: #3a2604; }
.res:has(.tier.t-high) { box-shadow: inset 3px 0 0 #2b3445, var(--shadow-1); }
:where(:root[data-theme="dark"]) .res:has(.tier.t-high) { box-shadow: inset 3px 0 0 #c9d1de, var(--shadow-1); }
.res:has(.tier.t-mid) { box-shadow: inset 3px 0 0 #d9a23a, var(--shadow-1); }
.tiergrid button[data-tier="high"][aria-checked="true"], .tiergrid button[data-gltier="high"][aria-checked="true"] { background: linear-gradient(135deg, #2b3445, #0f1623); border-color: #0f1623; color: #e7ebf2; }
.tiergrid button[data-tier="high"][aria-checked="true"] i, .tiergrid button[data-gltier="high"][aria-checked="true"] i { color: #c9d1de; }
.tiergrid button[data-tier="mid"][aria-checked="true"], .tiergrid button[data-gltier="mid"][aria-checked="true"] { background: linear-gradient(135deg, #f6dfa8, #d9a23a); border-color: #d9a23a; color: #3a2604; }
.tiergrid button[data-tier="mid"][aria-checked="true"] i, .tiergrid button[data-gltier="mid"][aria-checked="true"] i { color: #3a2604; }
.tiergrid button[data-tier="value"][aria-checked="true"], .tiergrid button[data-gltier="value"][aria-checked="true"] { background: linear-gradient(135deg, #f3f4f7, #c9ced8); border-color: #aeb5c2; color: #2d3443; }
.tiergrid button[data-tier="value"][aria-checked="true"] i, .tiergrid button[data-gltier="value"][aria-checked="true"] i { color: #2d3443; }

.res .gx .vno { color: var(--ink-2); font-weight: 650; }

/* table: a clear badge under the time */
.res .t { display: grid; justify-items: start; gap: 5px; align-self: center; }
.res .tbl { display: inline-grid; justify-items: center; min-width: 44px; max-width: 100%; padding: 3px 7px 4px; border-radius: 8px;
  background: var(--primary); color: #fff; font-size: .95rem; font-weight: 750; line-height: 1.05; letter-spacing: -.01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; box-shadow: 0 2px 6px -2px rgb(11 29 74 / .45); }
.res .tbl small { font-size: .52rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-dot); }
:where(:root[data-theme="dark"]) .res .tbl { color: #0b1220; }
:where(:root[data-theme="dark"]) .res .tbl small { color: #0b1220; opacity: .7; }
@media (max-width: 720px) { .res .tbl { min-width: 40px; font-size: .88rem; padding: 3px 5px 4px; } }
