/* Tandem. Flat surfaces, hairline borders, one blue for interface controls. Colour is reserved for people:
   each person has their own colour and it is the only strong colour on the page. */
:root {
  --bg: #F7F8FA; --surface: #FFFFFF; --sub: #F0F2F5; --line: #E1E4E9; --ink: #15181D; --mute: #5C6572;
  --accent: #2F5BD9; --on-accent: #FFFFFF; --accent-soft: #E7EDFC; --shared: #5B6B8C; --danger: #B3372F; --ok: #1D7A4B;
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r-surface: 12px; --r-ctl: 8px; --r-chip: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1013; --surface: #15181C; --sub: #1B1F25; --line: #272B33; --ink: #E8EAED; --mute: #9199A6;
    --accent: #8FA9F5; --on-accent: #0E1013; --accent-soft: #1B2540; --shared: #8D9BB8; --danger: #E0716C; --ok: #4FBF85;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font);
  padding-inline: 16px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
.mute { color: var(--mute); }
.sm { font-size: 13px; }
.mono { font-family: var(--mono); }
.spacer { flex: 1; }
.app { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
[hidden] { display: none !important; }

/* buttons and fields */
.btn { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 8px 14px; font-weight: 500; }
.btn:hover { background: var(--sub); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--danger); }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.btn.block { width: 100%; }
.iconbtn { background: none; border: 1px solid transparent; border-radius: var(--r-ctl); width: 38px; height: 38px; display: grid; place-items: center; color: var(--ink); }
.iconbtn:hover { background: var(--sub); }
.iconbtn svg { width: 20px; height: 20px; }
input[type="text"], input[type="date"], input[type="time"], input[type="search"], input[type="email"], input[type="password"], select, textarea {
  width: 100%; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 9px 11px;
}
textarea { min-height: 76px; resize: vertical; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--mute); min-width: 0; }
label.chk { display: flex; gap: 8px; align-items: center; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-size: 13px; color: var(--mute); padding: 0; margin-bottom: 6px; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.note { font-size: 13px; color: var(--mute); }
.err { color: var(--danger); font-size: 13px; }

/* header */
.top { display: flex; align-items: center; gap: 4px 10px; padding-block: 2px; border-bottom: 1px solid var(--line); }
.room { display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 8px 8px; margin-left: -8px; border-radius: var(--r-ctl); font-size: 16px; font-weight: 600; letter-spacing: -0.01em; min-width: 0; }
.room:hover { background: var(--sub); }
.room .rn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 24ch; }
.room svg { width: 16px; height: 16px; flex: none; color: var(--mute); }
.room .mark { width: 22px; height: 22px; border-radius: 6px; flex: none; }
.tabs { display: none; gap: 2px; margin-left: 8px; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 12px 11px 10px; color: var(--mute); font-weight: 500; border-radius: 0; margin-bottom: -3px; }
.tab:hover { color: var(--ink); }
.tab[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
@media (min-width: 720px) { .tabs { display: flex; } }
.status { font: 12px var(--mono); color: var(--mute); white-space: nowrap; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; background: var(--surface); }
.seg button { background: none; border: 0; padding: 7px 12px; border-right: 1px solid var(--line); color: var(--mute); font-weight: 500; }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--sub); color: var(--ink); }
.navgrp { display: inline-flex; align-items: center; gap: 4px; }
.period { font-weight: 600; font-size: 16px; min-width: 7ch; }
.people { display: flex; flex-wrap: wrap; gap: 8px; }
.person { display: inline-flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 8px; font-size: 14px; }
.person[aria-pressed="false"] { opacity: 0.5; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--shared)); flex: none; }
.addbtn { display: none; align-items: center; gap: 6px; }
.addbtn svg { width: 16px; height: 16px; }
@media (min-width: 720px) { .addbtn { display: inline-flex; } }

/* event colour bar: one person, two people split in half, otherwise the shared colour */
.bar { background: var(--c1, var(--shared)); }
.bar.two { background: linear-gradient(var(--c1) 50%, var(--c2) 50%); }

/* month */
.mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--surface); border-radius: var(--r-surface); overflow: hidden; }
.mgrid .dh { padding: 6px 8px; font: 11px var(--mono); color: var(--mute); text-transform: uppercase; background: var(--sub); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cell { display: flex; flex-direction: column; gap: 3px; text-align: left; min-height: 104px; padding: 5px; background: var(--surface); border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; overflow: hidden; min-width: 0; }
.cell:hover { background: var(--sub); }
.cell.out { background: var(--bg); color: var(--mute); }
.cell.wkend { background: var(--sub); }
.cell .dn { font: 500 12px var(--mono); padding: 1px 6px; border-radius: var(--r-chip); align-self: flex-start; }
.cell.today .dn { background: var(--accent); color: var(--on-accent); }
.chips { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chip { display: flex; gap: 5px; align-items: stretch; font-size: 12px; line-height: 1.3; background: var(--sub); border-radius: 4px; overflow: hidden; min-width: 0; }
.cell.wkend .chip { background: var(--surface); }
.chip .bar { width: 3px; flex: none; }
.chip .t { padding: 1px 4px 1px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip .tm { font: 11px var(--mono); color: var(--mute); margin-right: 4px; }
.more { font-size: 11px; color: var(--mute); padding-left: 4px; }
.dots { display: none; gap: 3px; flex-wrap: wrap; }
@media (max-width: 720px) {
  .cell { min-height: 58px; padding: 4px 3px; }
  .chips { display: none; } .dots { display: flex; }
  .mgrid .dh { text-align: center; padding: 5px 2px; font-size: 10px; }
}

/* week and agenda */
.wgrid { display: grid; gap: 8px; grid-template-columns: repeat(7, minmax(0, 1fr)); }
@media (max-width: 1000px) { .wgrid { grid-template-columns: minmax(0, 1fr); } }
.dcol { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-surface); padding: 10px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dcol.today { border-color: var(--accent); }
.dcol h3 { font-size: 13px; display: flex; justify-content: space-between; font-weight: 600; }
.dcol.today h3 span:first-child { color: var(--accent); }
.item { display: flex; gap: 10px; align-items: stretch; width: 100%; text-align: left; background: var(--sub); border: 0; border-radius: var(--r-ctl); padding: 0; overflow: hidden; }
.item .bar { width: 4px; flex: none; }
.item .in { padding: 7px 8px 7px 0; min-width: 0; }
.item .tt { font-weight: 500; overflow-wrap: anywhere; }
.item .sub { font-size: 12px; color: var(--mute); }
.agenda { display: flex; flex-direction: column; gap: 14px; }
.agenda section { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }
@media (max-width: 560px) { .agenda section { grid-template-columns: minmax(0, 1fr); gap: 6px; } }
.agenda h3 { font-size: 14px; font-weight: 600; padding-top: 6px; }
.agenda .list { display: flex; flex-direction: column; gap: 6px; }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r-surface); padding: 24px; text-align: center; color: var(--mute); }

/* Home. A widget is one small instrument. Colour is used only for the people in the events. One grid unit is a small widget; medium spans two columns; large spans two columns and two rows. */
.boardbar { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.hello h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.hello p { color: var(--mute); font-size: 14px; margin-top: 2px; }
.board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 168px; gap: 12px; }
@media (min-width: 760px) { .board { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.w { --wc: var(--c, var(--accent)); border-radius: 14px; padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; overflow: hidden; position: relative; }
.w.s { grid-column: span 1; } .w.m { grid-column: span 2; } .w.l { grid-column: span 2; grid-row: span 2; }
.st-plain { background: var(--surface); border: 1px solid var(--line); }
.st-tint { background: color-mix(in srgb, var(--wc) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--wc) 28%, var(--line)); }
.st-outline { background: transparent; border: 1.5px solid color-mix(in srgb, var(--wc) 55%, var(--line)); }
.w h4 { display: flex; align-items: baseline; gap: 8px; font-size: 14px; font-weight: 600; letter-spacing: -0.005em; color: var(--ink); }
.w h4 span { font-size: 12px; font-weight: 400; color: var(--mute); }
.w .sub, .w small { font-size: 12.5px; color: var(--mute); }
.w .calm { color: var(--mute); font-size: 14px; margin-top: 2px; }
.w .more { font-size: 12.5px; color: var(--mute); margin-top: auto; }
.w .wl { display: flex; flex-direction: column; gap: 6px; min-height: 0; overflow: hidden; }
.tl { display: grid; grid-template-columns: 4.6ch 3px minmax(0, 1fr); gap: 9px; align-items: stretch; font-size: 13.5px; }
.tl .tm { font: 12px var(--mono); color: var(--mute); padding-top: 1px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl .bar { border-radius: 2px; min-height: 28px; }
.tl .tx { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.tl .tx b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl .tx small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl.past { opacity: 0.5; }
.tl.opt { opacity: 0.6; } .tl.opt .tx b { font-style: italic; }
.tl.hid { opacity: 0.4; } .tl.hid .tx b { text-decoration: line-through; }
.nowrow { display: flex; align-items: center; gap: 8px; color: var(--danger); font: 11px var(--mono); margin: -1px 0; }
.nowrow i { flex: 1; height: 0; border-top: 1.5px solid var(--danger); order: 2; }
.nowrow span { order: 1; min-width: 4.6ch; }
.hero { display: flex; flex-direction: column; gap: 3px; margin-top: 2px; }
.hero .when { font-size: 13px; font-weight: 500; color: var(--mute); }
.hero .what { font-size: 26px; line-height: 1.1; font-weight: 600; letter-spacing: -0.025em; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.w.s .hero .what { font-size: 20px; }
.cd { display: flex; flex-direction: column; gap: 4px; margin-top: auto; }
.cdn { display: flex; align-items: baseline; gap: 6px; }
.cdn b { font-size: 52px; line-height: 0.95; font-weight: 600; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.cdn span { font-size: 14px; color: var(--mute); }
.cdt { font-size: 14.5px; font-weight: 500; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cdt.big { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.ld { display: flex; flex-direction: column; gap: 2px; }
.ldn { display: flex; align-items: baseline; gap: 6px; }
.ldn b { font-size: 34px; line-height: 1; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ldn span { font-size: 13px; color: var(--mute); }
.bars { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; align-items: end; }
.bar1 { height: 100%; display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 0; }
.bar1 .v { font: 10.5px var(--mono); color: var(--mute); height: 13px; }
.bar1 .col { flex: 1; min-height: 0; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.bar1 .fill { width: 100%; max-width: 26px; min-height: 2px; border-radius: 4px 4px 2px 2px; background: color-mix(in srgb, var(--mute) 40%, var(--surface)); }
.bar1.today .fill { background: var(--wc); }
.bar1 .dl { font-size: 11px; color: var(--mute); }
.bar1.today .dl { color: var(--ink); font-weight: 600; }
.wk2 { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.wk2 .wd { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0 4px; border: 0; background: none; border-radius: 8px; min-width: 0; color: var(--ink); }
.wk2 .wd:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.wk2 .wd.today { background: color-mix(in srgb, var(--wc) 14%, transparent); }
.wk2 .dl { font-size: 11px; color: var(--mute); }
.wk2 .dn2 { font: 600 14px var(--mono); }
.wk2 .dots2 { display: flex; gap: 2px; min-height: 6px; }
.wk2 .dots2 i { width: 5px; height: 5px; border-radius: 50%; background: var(--c, var(--shared)); }
.wk2 .track { position: relative; flex: 1; width: 100%; max-width: 30px; min-height: 28px; border-radius: 4px; background: repeating-linear-gradient(to bottom, color-mix(in srgb, var(--ink) 6%, transparent) 0 1px, transparent 1px 25%); }
.wk2 .track b { position: absolute; left: 1px; right: 1px; border-radius: 3px; background: var(--c, var(--shared)); min-height: 3px; }
.wk2 .track b.opt { opacity: 0.45; } .wk2 .track b.hid { opacity: 0.2; }
.fd { flex: 1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; align-items: center; min-height: 0; }
.fdc { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px 0; border-radius: 8px; }
.fdc.today { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.fdc .dl { font-size: 11.5px; color: var(--mute); }
.fdc i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); box-sizing: border-box; }
.fdc.free i { border-color: var(--ok); }
.fdc.evening i { border-color: var(--ink); background: linear-gradient(90deg, transparent 50%, var(--ink) 50%); }
.fdc.busy i { background: var(--ink); }
.fdc .st { font-size: 10.5px; color: var(--mute); }
.mini { flex: 1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 1px; font-size: 11.5px; text-align: center; min-height: 0; }
.mini .hd { font-size: 10px; color: var(--mute); display: grid; place-items: center; }
.mini button, .mini span:not(.hd) { position: relative; display: grid; place-items: center; border: 0; background: none; color: var(--ink); border-radius: 6px; font: 12px var(--mono); padding: 0; min-height: 0; }
.mini button:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.mini .today { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.mini .has i { position: absolute; bottom: 2px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; opacity: 0.8; }
.mini .out { opacity: 0.35; }
/* editing */
.w.editing > :not(.wedit) { opacity: 0.35; pointer-events: none; }
.w.editing { border-style: dashed; }
.wedit { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 6px; z-index: 2; box-shadow: 0 4px 14px rgba(8, 10, 14, 0.14); }
.wedit select { width: auto; padding: 4px 6px; font-size: 12px; }
.wedit button { display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; font-size: 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--sub); }
.wedit button svg { width: 15px; height: 15px; }
.wedit button.rm { color: var(--danger); margin-left: auto; }
.wedit button:disabled { opacity: 0.35; cursor: default; }

/* dialogs */
dialog.sheet { border: 0; padding: 0; width: min(560px, calc(100% - 24px)); max-height: calc(100% - 32px); border-radius: 16px; background: var(--surface); color: var(--ink); overflow: auto; }
dialog.sheet::backdrop { background: rgba(8, 10, 14, 0.55); }
.sheet-in { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.sheet-in h2 { font-size: 20px; }
.sheet-in h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--mute); font-weight: 600; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sect { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.sect:first-of-type { border-top: 0; padding-top: 0; }
@media (max-width: 620px) {
  dialog.sheet { margin: auto 0 0; width: 100%; max-width: none; border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
}
.whochips { display: flex; flex-wrap: wrap; gap: 8px; }
.whochips button { display: inline-flex; gap: 7px; align-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px 6px 9px; }
.whochips button[aria-pressed="true"] { border-color: var(--ink); background: var(--sub); font-weight: 500; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatches button { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--surface); background: var(--c); box-shadow: 0 0 0 1px var(--line); }
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
.listrow { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 12px 2px; }
.listrow:last-child { border-bottom: 0; }
.listrow .grow { flex: 1; min-width: 0; }
.code { font: 600 28px var(--mono); letter-spacing: 0.18em; text-align: center; padding: 12px; background: var(--sub); border-radius: var(--r-ctl); }
.linkbox { font: 12px var(--mono); word-break: break-all; background: var(--sub); border-radius: var(--r-ctl); padding: 10px; }

/* welcome */
.welcome { max-width: 520px; margin: 6vh auto 0; display: flex; flex-direction: column; gap: 18px; }
.welcome .logo { width: 72px; height: 72px; border-radius: 18px; }
.welcome h1 { font-size: 30px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-surface); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.foot { margin-top: 18px; font-size: 13px; color: var(--mute); text-align: center; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

.boardbar h2 { font-size: 18px; font-weight: 600; }
.gal { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.pick { all: unset; cursor: pointer; display: block; flex: 0 0 auto; border-radius: 18px; }
.pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.pv { display: block; pointer-events: none; }
.pvs { width: 150px; } .pvm { width: 290px; }
.pv .w { height: 168px; }

p { margin: 0; }
a.btn { text-decoration: none; display: inline-block; color: var(--ink); }

/* events that belong to another calendar are drawn hollow and dashed so they read as read only */
.bar.ov { background: repeating-linear-gradient(180deg, var(--c1, var(--shared)) 0 5px, transparent 5px 8px); }
.item.ov { background: transparent; border: 1px dashed var(--line); }
.chip.ov { background: transparent; border: 1px dashed var(--line); }
.cell.wkend .chip.ov { background: transparent; }
.dot.ov { background: transparent; border: 2px solid var(--c, var(--shared)); }
.person.ovp { border-style: dashed; }
.notice { background: var(--accent-soft); border-radius: var(--r-ctl); padding: 10px 12px; font-size: 13px; }
.shrow { display: flex; gap: 10px; align-items: center; }
.shrow .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.shrow select { width: auto; max-width: 60%; }
input[type="file"] { max-width: 100%; font-size: 13px; }

/* accounts, personal rules, imports and tickets */
.tag { display: inline-block; font: 500 10px var(--mono); text-transform: uppercase; letter-spacing: 0.04em; color: var(--mute); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; vertical-align: 2px; margin-left: 4px; }
.item.opt, .chip.opt { opacity: 0.62; background: transparent; border: 1px dashed var(--line); }
.item.opt .tt, .chip.opt .t { font-style: italic; }
.item.hid, .chip.hid { opacity: 0.4; background: transparent; border: 1px dotted var(--line); }
.item.hid .tt, .chip.hid .t { text-decoration: line-through; }
.linkbtn { background: none; border: 0; padding: 4px 0; color: var(--accent); text-align: left; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
details.disc { border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 10px 12px; }
details.disc summary, details.card summary { cursor: pointer; font-weight: 500; }
details.disc[open] summary, details.card[open] summary { margin-bottom: 10px; }
details.card { display: block; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; font-size: 14px; }
.kv .k { color: var(--mute); }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--sub); border-radius: var(--r-ctl); padding: 10px 12px; font-size: 14px; }
.ticketbox { border: 1px solid var(--line); border-radius: var(--r-surface); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.implist { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 10px; }
.implist .chk { align-items: flex-start; }
.implist .chk input { margin-top: 2px; flex: none; }
.implist .tt { font-weight: 500; }
.controls .btn { white-space: nowrap; }

/* application layout: the calendar beside the selected day on a large screen */
.layout { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1040px) { .layout:not(.solo) { grid-template-columns: minmax(0, 1fr) 360px; } .layout .aside { position: sticky; top: 10px; } }
.aside { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.aside .card { gap: 8px; }
.dayhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.dayhead h3 { font-size: 16px; font-weight: 600; }
.pill { font: 11px var(--mono); padding: 2px 7px; border-radius: var(--r-chip); border: 1px solid var(--line); background: var(--sub); color: var(--mute); white-space: nowrap; }
.pill.acc { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.cell.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.cell.sel:hover { background: var(--surface); }
button.chip { border: 0; text-align: left; width: 100%; padding: 0; cursor: pointer; }
.instbtn { display: none; }
@media (min-width: 900px) { .instbtn { display: inline-flex; } }
.top .iconbtn, .top .btn { flex: none; }

/* hours */
.tg { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-surface); overflow: hidden; --px: 48px; }
.tgrow { display: grid; grid-template-columns: 46px repeat(var(--n), minmax(0, 1fr)); min-width: 0; }
.tgh { border-bottom: 1px solid var(--line); background: var(--sub); }
.tgd { background: none; border: 0; border-left: 1px solid var(--line); padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--mute); font: 500 11px var(--mono); text-transform: uppercase; }
.tgd b { font: 600 16px var(--font); color: var(--ink); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 999px; text-transform: none; }
.tgd.today b { background: var(--accent); color: var(--on-accent); }
.tgd.sel:not(.today) b { box-shadow: inset 0 0 0 2px var(--accent); }
.tgd:hover { background: var(--surface); }
.tga { border-bottom: 1px solid var(--line); }
.tgac { border-left: 1px solid var(--line); padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tgl { font: 11px var(--mono); color: var(--mute); padding: 6px 6px 0 0; text-align: right; }
.tga .tgl { padding-top: 8px; white-space: nowrap; font-size: 10px; }
.tgb { position: relative; }
.tgax { position: relative; padding: 0; }
.tgax span { position: absolute; right: 6px; transform: translateY(-50%); font: 11px var(--mono); color: var(--mute); }
.tgax span:first-child { transform: none; }
.tgc { position: relative; border-left: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px var(--px)); cursor: cell; min-width: 0; }
.tgc.today { background-color: color-mix(in srgb, var(--accent) 4%, transparent); }
.tev { position: absolute; display: flex; flex-direction: column; gap: 1px; text-align: left; padding: 3px 6px; overflow: hidden; border: 0; border-left: 3px solid var(--c1, var(--shared)); border-radius: 5px; background: color-mix(in srgb, var(--c1, var(--shared)) 16%, var(--surface)); color: var(--ink); font-size: 12px; line-height: 1.25; cursor: pointer; }
.tev:hover { background: color-mix(in srgb, var(--c1, var(--shared)) 26%, var(--surface)); }
.tev .tm { font: 11px var(--mono); color: var(--mute); }
.tev .tt { font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.tev .pl { color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tev.opt { opacity: 0.65; border-left-style: dashed; background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.tev.hid { opacity: 0.4; background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.tev.hid .tt { text-decoration: line-through; }
.tev.ov { background: transparent; box-shadow: inset 0 0 0 1px var(--line); border-left-style: dashed; }
.nowline { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--danger); z-index: 2; pointer-events: none; }
.nowline::before { content: ""; position: absolute; left: -5px; top: -6px; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); }

/* bottom navigation on a phone */
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); }
.bottomnav button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; color: var(--mute); font-size: 11px; font-weight: 500; border-radius: var(--r-ctl); }
.bottomnav button svg { width: 22px; height: 22px; }
.bottomnav button[aria-current="page"] { color: var(--accent); }
.bottomnav .bn-add { width: 52px; height: 52px; margin: -22px auto 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); justify-content: center; border: 4px solid var(--bg); padding: 0; }
.bottomnav .bn-add svg { width: 22px; height: 22px; }
@media (min-width: 720px) { .bottomnav { display: none; } body { padding-bottom: 48px; } }

/* banners, first steps, install guide */
.banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--accent-soft); border-radius: var(--r-surface); padding: 10px 12px; font-size: 14px; }
.banner .grow { flex: 1; min-width: 200px; }
.banner .sub { font-size: 13px; color: var(--mute); }
.start h3, .card > h3 { font-size: 15px; font-weight: 600; }
.tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.tile { text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 14px; background: var(--sub); border: 1px solid var(--line); border-radius: var(--r-surface); }
.tile:hover { border-color: var(--accent); }
.tile b { font-weight: 600; }
.tile span { font-size: 13px; color: var(--mute); }
.check { display: flex; flex-direction: column; }
.ck { display: flex; align-items: center; gap: 10px; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 2px; }
.ck:last-child { border-bottom: 0; }
.ck:hover:not(.done) { background: var(--sub); }
.ck .box { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--mute); flex: none; display: grid; place-items: center; }
.ck.done .box { background: var(--ok); border-color: var(--ok); }
.ck.done .box::after { content: ""; width: 5px; height: 9px; border: solid var(--on-accent); border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.ck.done { color: var(--mute); text-decoration: line-through; cursor: default; }
.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.steps li { padding-left: 4px; }
.inl { display: inline-grid; place-items: center; vertical-align: -5px; width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 6px; background: var(--sub); }
.inl svg { width: 15px; height: 15px; }
.listrow .tt { font-weight: 500; }

/* Otto the otter and the chat window */
.otter { position: fixed; right: 18px; bottom: 0; z-index: 6; width: 96px; }
.ot-btn { display: block; width: 96px; height: 92px; padding: 0; border: 0; background: none; border-radius: 28px 28px 0 0; cursor: pointer; overflow: visible; }
.ot-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ot-svg { display: block; width: 96px; height: 92px; overflow: visible; transition: transform 0.22s ease; transform-origin: 50% 100%; }
.ot-btn:hover .ot-svg { transform: translateY(-5px) rotate(-3deg); }
.ot-lid { transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(0); transition: transform 0.06s linear; }
.ot-svg.blink .ot-lid { transform: scaleY(1); }
.ot-glad { display: none; }
.ot-svg.glad .ot-eyes { display: none; }
.ot-svg.glad .ot-glad { display: inline; }
.ot-scarf { transform-box: fill-box; transform-origin: 50% 0; }
.ot-btn:hover .ot-scarf { animation: ot-sway 0.7s ease-in-out; }
.ot-btn.hop .ot-svg { animation: ot-hop 0.45s ease-out; }
@keyframes ot-hop { 0% { transform: translateY(0); } 35% { transform: translateY(-14px); } 70% { transform: translateY(2px); } 100% { transform: translateY(0); } }
@keyframes ot-sway { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(5deg); } 65% { transform: rotate(-4deg); } }
.ot-tip { position: absolute; right: 78px; bottom: 54px; width: max-content; max-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px 12px 4px 12px; padding: 8px 12px; font-size: 14px; }
.ot-panel { position: fixed; right: 18px; bottom: 104px; z-index: 7; width: min(392px, calc(100vw - 24px)); height: min(560px, calc(100vh - 140px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 36px rgba(8, 10, 14, 0.28); overflow: hidden; }
.ot-panel[hidden] { display: none; }
.ot-head { display: flex; align-items: center; gap: 6px; padding: 10px 10px 10px 14px; border-bottom: 1px solid var(--line); }
.ot-title { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 6px; }
.ot-title b { font-size: 16px; }
.ot-set { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; max-height: 60%; overflow: auto; }
.ot-log { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ot-msg { max-width: 88%; padding: 9px 12px; border-radius: 12px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.ot-msg.bot { align-self: flex-start; background: var(--sub); border-bottom-left-radius: 4px; }
.ot-msg.user { align-self: flex-end; background: var(--accent-soft); border-bottom-right-radius: 4px; }
.ot-day { margin-top: 8px; font-size: 13px; }
.ot-day b { display: block; font-weight: 600; }
.ot-day div + div { color: var(--mute); }
.ot-card { margin-top: 8px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; gap: 8px; }
.ot-ev .tt { font-weight: 600; }
.ot-typing { display: flex; gap: 4px; align-items: center; padding: 12px 14px; }
.ot-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--mute); animation: ot-dot 1s infinite ease-in-out; }
.ot-typing i:nth-child(2) { animation-delay: 0.15s; } .ot-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes ot-dot { 0%, 80%, 100% { opacity: 0.3; } 40% { opacity: 1; } }
.ot-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px 10px; }
.ot-chip { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; font-size: 13px; color: var(--ink); }
.ot-chip:hover { background: var(--sub); }
.ot-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.ot-form input { flex: 1; }
@media (max-width: 719px) {
  .otter { right: 10px; bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }
  .ot-panel { right: 8px; left: 8px; width: auto; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); height: min(70vh, 560px); }
  .ot-tip { right: 70px; }
}
@media (prefers-reduced-motion: reduce) { .ot-svg, .ot-lid { transition: none; } .ot-btn:hover .ot-svg { transform: none; } .ot-btn:hover .ot-scarf, .ot-btn.hop .ot-svg, .ot-typing i { animation: none; } }

.tl.d { grid-template-columns: 8ch 3px minmax(0, 1fr); }
.roomrow { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.roomrow:last-child { border-bottom: 0; }
.roomrow .listrow { border-bottom: 0; flex: 1; min-width: 0; }

.ot-choices { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.ot-pick { text-align: left; display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; color: var(--ink); }
.ot-pick:hover { border-color: var(--accent); }
.ot-pick span { font-size: 12.5px; color: var(--mute); }
.wk2 .track b { box-shadow: 0 0 0 1px var(--surface); }

/* guided tour and the offer */
.tour { position: fixed; inset: 0; z-index: 50; }
.tour-hole { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(8, 10, 14, 0.62); outline: 2px solid var(--accent); outline-offset: 0; pointer-events: none; transition: left 0.2s ease, top 0.2s ease, width 0.2s ease, height 0.2s ease; }
.tour-card, .tour-offer { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: 0 12px 36px rgba(8, 10, 14, 0.35); display: flex; flex-direction: column; gap: 10px; }
.tour-card { position: fixed; }
.tour-card p { font-size: 14.5px; line-height: 1.5; }
.tour-head { display: flex; gap: 10px; align-items: center; }
.tour-head b { font-size: 15px; }
.tour-otter svg { width: 50px; height: 48px; display: block; }
.tour-offer { position: fixed; right: 18px; bottom: 104px; z-index: 40; width: min(340px, calc(100vw - 24px)); }
@media (max-width: 719px) { .tour-offer { right: 12px; left: 12px; width: auto; bottom: calc(132px + env(safe-area-inset-bottom, 0px)); } }
@media (prefers-reduced-motion: reduce) { .tour-hole { transition: none; } }
/* the private payout page */
.payout-slot { min-height: 420px; }
.payout-host { position: absolute; z-index: 2; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg); }
.payout-host[hidden] { display: none; }
.payout-host iframe { display: block; width: 100%; height: 100%; border: 0; }
.payout-msg { padding: 14px; }
.payout-msg:empty { display: none; }
