/* NEXE-work 0.1.0 — one stylesheet, no build step.
   Idea: a production call sheet. Times sit in a fixed column on a coloured rail
   (the team's colour), so "what happens when" reads at a glance on every screen. */

:root {
  --paper: #F2F4F7;
  --surface: #FFFFFF;
  --sunk: #E8ECF1;
  --ink: #18202B;
  --muted: #5A6574;
  --line: #D9DFE6;
  --team: #2F6FED;
  --cue: #B86E0E;
  --cue-soft: #FCEFD9;
  --danger: #B93524;
  --danger-soft: #FBE6E2;
  --ok: #1F7A55;
  --ok-soft: #E1F3EA;
  --focus: #2F6FED;
  --shadow: 0 1px 2px rgba(24, 32, 43, 0.06), 0 8px 24px rgba(24, 32, 43, 0.08);
  --radius-panel: 14px;
  --radius-control: 9px;
  --font: "Noto Sans TC", "PingFang TC", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Microsoft JhengHei", "Yu Gothic UI", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sidebar: 248px;
  --tabbar: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #11161D; --surface: #182029; --sunk: #1F2833; --ink: #E7ECF2; --muted: #97A3B2; --line: #2A3542;
    --cue: #F0A93E; --cue-soft: #3A2C17; --danger: #F07A6A; --danger-soft: #3A1E1A; --ok: #5CC79A; --ok-soft: #173327;
    --focus: #7EA8FF; --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #11161D; --surface: #182029; --sunk: #1F2833; --ink: #E7ECF2; --muted: #97A3B2; --line: #2A3542;
  --cue: #F0A93E; --cue-soft: #3A2C17; --danger: #F07A6A; --danger-soft: #3A1E1A; --ok: #5CC79A; --ok-soft: #173327;
  --focus: #7EA8FF; --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1 { font-size: 26px; line-height: 1.25; font-weight: 750; letter-spacing: -0.01em; }
h2 { font-size: 17px; line-height: 1.35; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
a { color: var(--team); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
code { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 13px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.lead { font-size: 17px; color: var(--muted); max-width: 60ch; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 68ch; }
.hint { font-size: 13px; color: var(--muted); }
.danger-text { color: var(--danger) !important; }
.stack { display: grid; gap: 16px; }
.stack-sm { display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.actions.wrap { justify-content: flex-start; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.section-title { font-size: 14px; font-weight: 700; color: var(--muted); }
.icon { flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Brand ---------------------------------------------------------------- */

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: 0.01em; }
.brand-mark { width: 26px; height: 26px; flex: none; background: url(/mark.svg) center / contain no-repeat; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-mark { background-image: url(/mark-dark.svg); } }
:root[data-theme="dark"] .brand-mark, .auth-art .brand-mark { background-image: url(/mark-dark.svg); }

/* ---- Buttons & controls --------------------------------------------------- */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 16px; border-radius: var(--radius-control);
  border: 1px solid transparent; font-weight: 650; white-space: nowrap; text-decoration: none !important;
  transition: background-color 0.15s, border-color 0.15s, transform 0.08s;
}
.button:active:not(:disabled) { transform: translateY(1px); }
.button:disabled { opacity: 0.55; }
.button.primary { background: var(--team); color: #fff; }
.button.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--team) 88%, #000); }
.button.ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.button.ghost:hover:not(:disabled) { border-color: color-mix(in srgb, var(--team) 45%, var(--line)); }
.button.danger { background: var(--danger); color: #fff; }
.button.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.button.block { width: 100%; }
.icon-button {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: transparent; border: 0; color: var(--ink); position: relative;
}
.icon-button:hover { background: var(--sunk); text-decoration: none; }

.field { display: grid; gap: 6px; }
.field > label, fieldset > legend { font-size: 14px; font-weight: 650; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--radius-control);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--focus) 55%, transparent); outline-offset: 0; border-color: var(--focus); }
input[type=checkbox], input[type=radio] { accent-color: var(--team); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset > legend { padding: 0; margin-bottom: 6px; }

.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; }

.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 99px; background: var(--line); position: relative; margin: 0; transition: background 0.15s; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.switch input:checked { background: var(--team); }
.switch input:checked::after { transform: translateX(16px); }

.segmented-track { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--sunk); border-radius: 11px; width: fit-content; max-width: 100%; }
.segment { position: relative; }
.segment input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segment span, .segment-button {
  display: block; min-height: 36px; padding: 7px 14px; border-radius: 8px; border: 0; background: transparent;
  font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap;
}
.segment input:checked + span, .segment-button.is-on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.segment input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 1px; }
.segment-button:disabled { opacity: 0.55; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-toggle { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 12px 4px 5px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); font-size: 14px; cursor: pointer; }
.chip-toggle input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip-toggle:has(input:checked) { border-color: var(--team); background: color-mix(in srgb, var(--team) 12%, var(--surface)); font-weight: 650; }
.chip-toggle:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }

.language-select { width: auto !important; min-height: 38px !important; padding: 6px 30px 6px 10px !important; font-size: 14px; }

/* ---- Tags, avatars, dots -------------------------------------------------- */

.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; background: var(--sunk); color: var(--muted); white-space: nowrap; }
.tag-cue, .tag-high, .tag-important { background: var(--cue-soft); color: var(--cue); }
.tag-urgent { background: var(--danger-soft); color: var(--danger); }
.tag-progress { background: color-mix(in srgb, var(--team) 14%, var(--surface)); color: var(--team); }
.tag-draft { background: var(--sunk); color: var(--muted); }
.status { display: inline-flex; width: fit-content; padding: 2px 10px; border-radius: 6px; font-size: 13px; font-weight: 700; background: var(--sunk); color: var(--muted); }
.status-ACTIVE, .status-active { background: color-mix(in srgb, var(--team) 14%, var(--surface)); color: var(--team); }
.status-DONE, .status-done { background: var(--ok-soft); color: var(--ok); }
.status-ON_HOLD, .status-on_hold { background: var(--cue-soft); color: var(--cue); }
.status-CANCELLED, .status-cancelled { background: var(--danger-soft); color: var(--danger); }

.avatar {
  display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%;
  background: color-mix(in srgb, var(--team) 18%, var(--surface)); color: var(--ink);
  font-size: 13px; font-weight: 700; letter-spacing: -0.02em; overflow: hidden; white-space: nowrap;
}
.avatar-sm { width: 30px; height: 30px; font-size: 11px; }
.avatar-xs { width: 26px; height: 26px; font-size: 10px; }
.avatars { display: flex; align-items: center; }
.avatars .avatar { border: 2px solid var(--surface); margin-left: -6px; }
.avatars .avatar:first-child { margin-left: 0; }

.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.dot-meeting { background: var(--team); }
.dot-work { background: #6B7C93; }
.dot-event { background: var(--ok); }
.dot-deadline { background: var(--danger); }
.dot-other { background: var(--cue); }

.badge { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }

/* ---- App layout ------------------------------------------------------------ */

.layout { min-height: 100vh; }
.sidebar { display: none; }
.content { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: max(8px, env(safe-area-inset-top)) 12px 8px 16px;
  background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.main { padding: 20px 16px calc(var(--tabbar) + 32px + env(safe-area-inset-bottom)); max-width: 1180px; margin: 0 auto; display: grid; gap: 20px; outline: none; }

.team-switch { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; min-height: 44px; padding: 4px 10px 4px 4px; border: 0; border-radius: 10px; background: transparent; font-weight: 700; text-align: left; }
.team-switch:hover { background: var(--sunk); }
.team-switch .icon { color: var(--muted); }
.team-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-mark { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--team); color: #fff; font-weight: 800; font-size: 15px; }

.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 20; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--line);
}
.nav-link.tab { display: grid; place-items: center; align-content: center; gap: 2px; color: var(--muted); font-size: 11px; font-weight: 650; text-decoration: none; }
.nav-link.tab.is-active { color: var(--team); }
.desktop-only.tab { display: none; }

@media (min-width: 960px) {
  .layout { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
  .sidebar {
    position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px;
    padding: 20px 14px; border-right: 1px solid var(--line); background: var(--surface);
  }
  .sidebar .brand { padding: 0 8px; }
  .sidebar .team-switch { width: 100%; padding: 6px; border: 1px solid var(--line); }
  .side-nav { display: grid; gap: 2px; }
  .nav-link.side { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 10px; border-radius: 9px; color: var(--muted); font-weight: 650; text-decoration: none; }
  .nav-link.side:hover { background: var(--sunk); color: var(--ink); }
  .nav-link.side.is-active { background: color-mix(in srgb, var(--team) 12%, var(--surface)); color: var(--ink); }
  .nav-link.side.is-active .icon { color: var(--team); }
  .side-foot { margin-top: auto; }
  .side-foot .nav-link span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar { justify-content: flex-end; padding: 10px 28px; }
  .topbar-team { display: none; }
  .tabbar { display: none; }
  .main { padding: 28px 32px 56px; gap: 24px; }
}

/* ---- Page structure --------------------------------------------------------- */

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.page-head > div:first-child p { margin-bottom: 2px; }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 650; color: var(--muted); width: fit-content; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-panel); padding: 16px; min-width: 0; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.panel-head a { font-size: 14px; font-weight: 650; }
.panel-danger { border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.panel-danger h2 { color: var(--danger); }
.panel-attention { border-color: color-mix(in srgb, var(--cue) 55%, var(--line)); background: color-mix(in srgb, var(--cue-soft) 55%, var(--surface)); }
.filters { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.empty { display: grid; justify-items: start; gap: 10px; padding: 14px 2px; color: var(--muted); }
.notice { padding: 10px 12px; border-radius: 10px; background: var(--sunk); font-size: 14px; }
.notice-danger { background: var(--danger-soft); color: var(--danger); font-weight: 650; }
.notice-ok { background: var(--ok-soft); color: var(--ok); }
.fatal { min-height: 70vh; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; text-align: center; }

.list > li + li { border-top: 1px solid var(--line); }
.list-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 4px;
  background: transparent; border: 0; color: var(--ink); text-align: left; text-decoration: none !important;
}
@media (hover: hover) { a.list-row:hover, button.list-row:hover:not(:disabled) { background: color-mix(in srgb, var(--sunk) 60%, transparent); } }
.list-row.is-current { font-weight: 700; }
.list-row.is-unread strong::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--team); margin-right: 8px; vertical-align: middle; }
.list-row .icon { color: var(--muted); }
.row-main { display: grid; gap: 1px; min-width: 0; flex: 1; }
.row-main strong { overflow-wrap: anywhere; }
.row-main .muted { font-size: 13px; }
.row-side { display: flex; align-items: center; gap: 8px; flex: none; }

.facts { display: grid; gap: 10px; }
.facts > div { display: grid; grid-template-columns: minmax(84px, 30%) 1fr; gap: 12px; }
.facts dt { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.facts dd { overflow-wrap: anywhere; }

/* ---- The call sheet (signature element) ----------------------------------- */

.callsheet-list { display: grid; gap: 16px; }
.callsheet-date { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.cue {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 0 14px;
  min-height: 56px; padding: 8px 6px 8px 0; color: var(--ink); text-decoration: none !important; position: relative;
}
.cue-time {
  align-self: stretch; display: flex; align-items: center; padding-left: 12px; border-left: 3px solid var(--team);
  font-size: 17px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; white-space: nowrap;
}
.cue-main { display: grid; gap: 1px; min-width: 0; }
.cue-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cue-main .muted { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) { a.cue:hover { background: color-mix(in srgb, var(--sunk) 60%, transparent); } }

/* ---- Home -------------------------------------------------------------------- */

.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stat { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none !important; }
.stat:hover { border-color: color-mix(in srgb, var(--team) 40%, var(--line)); }
.stat-value { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat-label { font-size: 13px; color: var(--muted); }
.stat-alert { border-color: color-mix(in srgb, var(--cue) 55%, var(--line)); }
.stat-alert .stat-value { color: var(--cue); }
.home-grid { display: grid; gap: 16px; }
@media (min-width: 1100px) {
  .home-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
  .home-grid .panel-schedule { grid-row: span 2; }
}

/* ---- Schedule ---------------------------------------------------------------- */

.schedule { display: grid; gap: 16px; }
@media (min-width: 1100px) { .schedule { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); align-items: start; } }
.month-head { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }
.month-head h2 { min-width: 9em; text-align: center; font-variant-numeric: tabular-nums; }
.month-head .button { margin-left: 4px; }
.month-head .switch { margin-left: auto; }
.weekdays, .days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.weekdays span { padding: 4px 0 8px; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.days { gap: 2px; }
.day {
  display: grid; grid-template-rows: auto auto 1fr; justify-items: center; align-content: start; gap: 4px;
  min-height: 56px; padding: 6px 2px; border: 0; border-radius: 9px; background: transparent; color: var(--ink);
}
.day:hover { background: var(--sunk); }
.day.is-outside { color: color-mix(in srgb, var(--muted) 60%, transparent); }
.day-number { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.day.is-today .day-number { color: var(--team); box-shadow: inset 0 0 0 2px var(--team); }
.day.is-selected .day-number { background: var(--team); color: #fff; box-shadow: none; }
.day-dots { display: flex; gap: 3px; min-height: 6px; }
.day-titles { display: none; }
@media (min-width: 720px) {
  .day { min-height: 92px; justify-items: stretch; padding: 6px; }
  .day-number { justify-self: start; }
  .day-dots { display: none; }
  .day-titles { display: grid; gap: 2px; }
  .day-titles span { font-size: 11px; line-height: 1.35; padding: 1px 5px; border-radius: 4px; background: color-mix(in srgb, var(--team) 12%, var(--surface)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
}

.people { display: grid; gap: 8px; }
.people li { display: flex; align-items: center; gap: 10px; }
.people li > span:nth-child(2) { flex: 1; min-width: 0; }
.response { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 6px; background: var(--sunk); color: var(--muted); }
.response-accepted { background: var(--ok-soft); color: var(--ok); }
.response-declined { background: var(--danger-soft); color: var(--danger); }

/* ---- Tasks -------------------------------------------------------------------- */

.task-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 2px; min-height: 60px; }
.task-check { width: 22px; height: 22px; margin: 0; cursor: pointer; }
.task-main { display: grid; gap: 3px; min-width: 0; color: var(--ink); text-decoration: none !important; }
.task-main strong { overflow-wrap: anywhere; }
.task-main:hover strong { color: var(--team); }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; }
.task-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.task-row.is-done strong { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.due { color: var(--muted); }
.due.is-overdue { color: var(--danger); font-weight: 700; }

.comments { display: grid; gap: 14px; }
.comments li { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.comment-meta { font-size: 14px; }
.comment-form { display: grid; gap: 8px; }
.comment-form .button { justify-self: end; }

/* ---- Projects ------------------------------------------------------------------- */

.project-group { display: grid; gap: 10px; }
.project-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.project-card {
  display: grid; gap: 12px; height: 100%; padding: 16px; border-radius: var(--radius-panel);
  background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--team);
  color: var(--ink); text-decoration: none !important;
}
.project-card:hover { box-shadow: var(--shadow); }
.project-title { display: grid; gap: 2px; }
.project-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.project-grid { display: grid; gap: 16px; }
@media (min-width: 1100px) { .project-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.progress { position: relative; display: grid; gap: 6px; }
.progress::before { content: ""; height: 6px; border-radius: 99px; background: var(--sunk); grid-area: 1 / 1; }
.progress-bar { grid-area: 1 / 1; height: 6px; border-radius: 99px; background: var(--ok); max-width: 100%; }
.progress-label { font-size: 13px; color: var(--muted); }

/* ---- Announcements ---------------------------------------------------------------- */

.excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 14px; }
.readers summary, .role-guide summary { cursor: pointer; font-weight: 650; color: var(--team); min-height: 32px; display: flex; align-items: center; }
.readers[open] summary, .role-guide[open] summary { margin-bottom: 8px; }
.role-guide dl { display: grid; gap: 8px; }
.role-guide dt { font-weight: 700; }
.role-guide dd { color: var(--muted); font-size: 14px; }

/* ---- Members, invitations, settings ------------------------------------------------- */

.copy-box { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border-radius: 10px; background: var(--sunk); }
.copy-box code { flex: 1; min-width: 0; overflow-wrap: anywhere; user-select: all; }
.steps { list-style: decimal; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.settings-grid { display: grid; gap: 16px; }
@media (min-width: 1000px) { .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }

/* ---- Sheet (dialog) -------------------------------------------------------------------- */

.sheet {
  width: 100%; max-width: 100%; max-height: 92vh; margin: auto 0 0; padding: 0; border: 0;
  border-radius: 18px 18px 0 0; background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden;
}
.sheet:not([open]) { display: none; }
.sheet::backdrop { background: rgba(10, 14, 20, 0.45); }
.sheet[open] { animation: sheet-up 0.22s ease-out; }
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 8px 8px 20px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { overflow-wrap: anywhere; }
.sheet-body { padding: 16px 20px calc(24px + env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; }
@media (min-width: 720px) {
  .sheet { width: min(560px, calc(100vw - 48px)); margin: auto; border-radius: 16px; max-height: 86vh; }
  .sheet-wide { width: min(720px, calc(100vw - 48px)); }
  .sheet[open] { animation: sheet-in 0.18s ease-out; }
  @keyframes sheet-in { from { transform: scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* ---- Toasts ----------------------------------------------------------------------------- */

.toasts { position: fixed; z-index: 100; left: 50%; bottom: calc(var(--tabbar) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
@media (min-width: 960px) { .toasts { bottom: 24px; } }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: 14px; box-shadow: var(--shadow); transition: opacity 0.3s, transform 0.3s; }
.toast-success { border-left: 4px solid var(--ok); }
.toast-error { background: var(--danger); color: #fff; }
.toast-leaving { opacity: 0; transform: translateY(6px); }
body.is-offline::before { content: ""; position: fixed; inset: 0 0 auto 0; height: 3px; background: var(--cue); z-index: 200; }

/* ---- Auth & welcome --------------------------------------------------------------------- */

.auth { min-height: 100vh; display: grid; }
.auth-art { display: none; }
.auth-panel { display: grid; grid-template-rows: auto 1fr; padding: max(16px, env(safe-area-inset-top)) 20px 32px; }
.auth-top { display: flex; justify-content: flex-end; }
.auth-form { width: 100%; max-width: 400px; margin: 0 auto; align-self: center; display: grid; gap: 16px; padding: 24px 0; }
.auth-form > .muted { margin-top: -8px; }
.auth-switch { font-size: 14px; color: var(--muted); }
@media (min-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr) minmax(420px, 0.9fr); }
  .auth-art {
    position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 28px; padding: 40px clamp(28px, 4vw, 56px) 36px;
    background: radial-gradient(120% 70% at 85% 0%, color-mix(in srgb, var(--team) 30%, transparent), transparent 60%),
      radial-gradient(90% 60% at 0% 100%, color-mix(in srgb, var(--team) 16%, transparent), transparent 70%), #0B1017;
    color: #E7ECF2;
  }
  .auth-art-top { display: grid; gap: 14px; }
  .auth-tagline { font-size: 15px; line-height: 1.5; color: #A9B4C2; max-width: 32em; }
  .auth-panel { padding: 24px 48px; }
}

.welcome { min-height: 100vh; padding: max(16px, env(safe-area-inset-top)) 20px 40px; }
.welcome-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; max-width: 960px; margin: 0 auto; }
.welcome-body { max-width: 960px; margin: 0 auto; padding-top: 48px; display: grid; gap: 20px; }
.welcome-body.invite { max-width: 480px; }
.welcome-paths { display: grid; gap: 16px; }
@media (min-width: 760px) { .welcome-paths { grid-template-columns: 1fr 1fr; } }
.path { display: grid; align-content: start; gap: 12px; padding: 20px; border-radius: var(--radius-panel); background: var(--surface); border: 1px solid var(--line); }
.path:first-child { border-top: 3px solid var(--team); }

.noscript { padding: 24px; text-align: center; }

/* ---- Small screens -------------------------------------------------------------------- */

@media (max-width: 520px) {
  h1 { font-size: 22px; }
  .grid-2 { grid-template-columns: 1fr; }
  .page-head .row .button { flex: 1; }
  .facts > div { grid-template-columns: 1fr; gap: 2px; }
  .month-head .switch { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* =====================================================================================
   v0.2.0 motion & setup
   ===================================================================================== */

:root { --ease-out: cubic-bezier(.2, .8, .2, 1); --ease-spring: cubic-bezier(.34, 1.56, .64, 1); }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.button-lg { min-height: 52px; font-size: 16px; }
.shake { animation: shake .42s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---- Launch splash ------------------------------------------------------------------- */

.splash {
  position: fixed; inset: 0; z-index: 300; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--paper); color: var(--ink);
}
.splash-mark { position: relative; width: 132px; height: 132px; display: grid; place-items: center; }
.splash-halo { position: absolute; inset: 4px; border-radius: 38px; background: color-mix(in srgb, var(--team) 22%, transparent); animation: halo 1.2s ease-out .5s both; }
@keyframes halo { 0% { opacity: 0; transform: scale(.6); } 40% { opacity: 1; } 100% { opacity: 0; transform: scale(1.9); } }
.splash-mark svg { position: relative; overflow: visible; }
.sm-stem { fill: var(--ink); transform-box: fill-box; transform-origin: bottom; animation: stem .5s var(--ease-out) both; }
@keyframes stem { from { transform: scaleY(0); } to { transform: none; } }
.sm-ribbon { fill: color-mix(in srgb, var(--ink) 68%, var(--paper)); stroke: color-mix(in srgb, var(--ink) 68%, var(--paper)); stroke-width: 8; stroke-linejoin: round; clip-path: inset(0 100% 100% 0); animation: ribbon .55s var(--ease-out) .3s forwards; }
@keyframes ribbon { to { clip-path: inset(0 0 0 0); } }
.sm-today, .sm-cell { transform-box: fill-box; transform-origin: center; animation: pop .45s var(--ease-spring) both; }
.sm-today { fill: var(--team); animation-delay: .62s; }
.sm-cell { fill: var(--ink); }
.sm-cell-2 { animation-delay: .72s; }
.sm-cell-3 { animation-delay: .82s; }
@keyframes pop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }
.sm-check { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .4s ease-out 1s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.splash-word { margin-top: 28px; font-size: 24px; font-weight: 800; letter-spacing: .24em; padding-left: .24em; animation: word .7s ease-out .55s both; }
@keyframes word { from { opacity: 0; letter-spacing: .5em; } to { opacity: 1; letter-spacing: .24em; } }
.splash-sub { margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--team); letter-spacing: .5em; padding-left: .5em; animation: rise .5s ease-out .8s both; }
.splash-track { margin-top: 36px; width: 128px; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; animation: rise .4s ease-out .9s both; }
.splash-track span { display: block; width: 40%; height: 100%; border-radius: 3px; background: var(--team); animation: bar 1.1s cubic-bezier(.45, 0, .55, 1) infinite; }
@keyframes bar { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.splash-status { margin-top: 14px; min-height: 20px; font-size: 13px; color: var(--muted); animation: rise .5s ease-out 1s both; }
.splash-slow { position: absolute; left: 20px; right: 20px; bottom: 84px; max-width: 360px; margin: 0 auto; display: none; flex-direction: column; align-items: center; gap: 10px; padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-align: center; animation: rise .3s ease-out; }
.splash.is-slow .splash-slow { display: flex; }
.splash-version { position: absolute; bottom: calc(28px + env(safe-area-inset-bottom)); padding: 3px 12px; border-radius: 99px; background: var(--sunk); font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .08em; animation: rise .5s ease-out 1s both; }
.splash.is-leaving { animation: splash-out .45s ease-in forwards; }
@keyframes splash-out { to { opacity: 0; transform: scale(1.05); visibility: hidden; } }

/* ---- Page transition curtain (about 2 s) -------------------------------------------------------- */

.curtain { position: fixed; z-index: 90; inset: 0 0 calc(var(--tabbar) + env(safe-area-inset-bottom)) 0; overflow: hidden; pointer-events: auto; }
@media (min-width: 960px) { .curtain { inset: 0 0 0 var(--sidebar); } }
.curtain-panel {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: linear-gradient(160deg, color-mix(in srgb, var(--team) 92%, #fff) 0%, var(--team) 45%, color-mix(in srgb, var(--team) 70%, #000) 100%);
  color: #fff; clip-path: inset(100% 0 0 0); animation: curtain-in .38s var(--ease-out) forwards;
}
@keyframes curtain-in { to { clip-path: inset(0 0 0 0); } }
.curtain.is-leaving .curtain-panel { animation: curtain-out .42s cubic-bezier(.7, 0, .3, 1) forwards; clip-path: inset(0 0 0 0); }
@keyframes curtain-out { to { clip-path: inset(0 0 100% 0); } }
.curtain-glow { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .28), transparent 60%); animation: glow 1.6s ease-in-out .1s both; }
@keyframes glow { from { opacity: 0; transform: scale(.4); } 60% { opacity: 1; } to { opacity: .6; transform: scale(1.1); } }
.curtain-body { position: relative; display: grid; justify-items: center; gap: 14px; padding: 24px; text-align: center; }
.curtain-icon { display: grid; place-items: center; width: 108px; height: 108px; border-radius: 30px; background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); animation: pop .5s var(--ease-spring) .18s both; }
.curtain-icon .icon { stroke-width: 1.6; }
.curtain-icon path { stroke-dasharray: 120; stroke-dashoffset: 120; animation: draw .8s ease-out .32s forwards; }
.curtain-mark { display: grid; place-items: center; width: 108px; height: 108px; border-radius: 30px; background: #fff; color: var(--team); font-size: 48px; font-weight: 800; box-shadow: 0 18px 40px rgba(0, 0, 0, .22); animation: mark-in .6s var(--ease-spring) .15s both; }
@keyframes mark-in { from { opacity: 0; transform: scale(.4) rotate(-12deg); } to { opacity: 1; transform: none; } }
.curtain-title { font-size: clamp(26px, 5vw, 38px); font-weight: 800; letter-spacing: .02em; line-height: 1.2; max-width: 16em; }
.curtain-title span { display: inline-block; animation: letter .5s var(--ease-out) both; animation-delay: calc(.38s + var(--i) * 32ms); }
@keyframes letter { from { opacity: 0; transform: translateY(18px) scale(.9); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.curtain-sub { font-size: 15px; font-weight: 600; opacity: .85; animation: rise .5s ease-out .7s both; }
.curtain-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .2); }
.curtain-progress span { display: block; height: 100%; background: #fff; transform-origin: left; animation: progress var(--hold, 1600ms) linear .2s both; }
@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.main.page-enter > * { animation: rise .45s var(--ease-out) both; }
.main.page-enter > *:nth-child(2) { animation-delay: .05s; }
.main.page-enter > *:nth-child(3) { animation-delay: .1s; }
.main.page-enter > *:nth-child(4) { animation-delay: .15s; }
.main.page-enter > *:nth-child(n+5) { animation-delay: .2s; }
body.page-fade .main { animation: fade-in .25s ease-out; }

/* ---- Celebration burst --------------------------------------------------------------------- */

.burst { position: fixed; z-index: 400; width: 0; height: 0; pointer-events: none; }
.bit { position: absolute; width: 10px; height: 10px; border-radius: 3px; background: var(--team); opacity: 0; animation: bit 1.2s cubic-bezier(.15, .8, .3, 1) var(--d) forwards; }
.bit:nth-child(4n+1) { background: var(--cue); }
.bit:nth-child(4n+2) { background: color-mix(in srgb, var(--team) 45%, #fff); width: 7px; height: 14px; }
.bit-check { width: 12px; height: 12px; border-radius: 50%; background: var(--ok); }
@keyframes bit { 0% { opacity: 1; transform: translate(0, 0) scale(var(--s)) rotate(0); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 80px)) scale(var(--s)) rotate(var(--r)); } }

/* ---- Setup wizard ------------------------------------------------------------------------------ */

.setup { min-height: 100vh; padding: max(14px, env(safe-area-inset-top)) 18px 40px; background:
  radial-gradient(1200px 500px at 10% -10%, color-mix(in srgb, var(--team) 16%, transparent), transparent 70%),
  radial-gradient(900px 400px at 110% 10%, color-mix(in srgb, var(--team) 10%, transparent), transparent 70%), var(--paper);
  transition: background .6s ease; }
.setup-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; max-width: 760px; margin: 0 auto; }
.setup-progress { --fill: 0; position: relative; display: grid; grid-template-columns: repeat(4, 1fr); max-width: 560px; margin: 28px auto 8px; }
.setup-progress::before, .setup-progress::after { content: ""; position: absolute; top: 15px; left: 12.5%; right: 12.5%; height: 3px; border-radius: 3px; background: var(--line); }
.setup-progress::after { background: var(--team); transform-origin: left; transform: scaleX(var(--fill)); transition: transform .6s var(--ease-out), background .6s ease; }
.setup-dot { position: relative; z-index: 1; display: grid; justify-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.setup-dot-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); font-size: 13px; transition: all .35s var(--ease-out); }
.setup-dot.is-current .setup-dot-mark { border-color: var(--team); color: var(--team); transform: scale(1.12); box-shadow: 0 0 0 6px color-mix(in srgb, var(--team) 18%, transparent); }
.setup-dot.is-current { color: var(--ink); }
.setup-dot.is-done .setup-dot-mark { background: var(--team); border-color: var(--team); color: #fff; }
.setup-stage { position: relative; display: grid; max-width: 760px; margin: 18px auto 0; }
.setup-card { grid-area: 1 / 1; display: grid; gap: 18px; align-content: start; padding: 26px 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.setup-card > * { animation: rise .45s var(--ease-out) both; }
.setup-card > *:nth-child(2) { animation-delay: .06s; }
.setup-card > *:nth-child(3) { animation-delay: .12s; }
.setup-card > *:nth-child(4) { animation-delay: .18s; }
.setup-card > *:nth-child(n+5) { animation-delay: .24s; }
.setup-card.from-right { animation: from-right .38s var(--ease-out) both; }
.setup-card.from-left { animation: from-left .38s var(--ease-out) both; }
.setup-card.leave-left { animation: leave-left .26s ease-in forwards; pointer-events: none; }
.setup-card.leave-right { animation: leave-right .26s ease-in forwards; pointer-events: none; }
@keyframes from-right { from { opacity: 0; transform: translateX(48px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes from-left { from { opacity: 0; transform: translateX(-48px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes leave-left { to { opacity: 0; transform: translateX(-48px) scale(.98); } }
@keyframes leave-right { to { opacity: 0; transform: translateX(48px) scale(.98); } }
.setup-kicker { font-size: 13px; font-weight: 700; color: var(--team); }
.setup-card h1 { font-size: clamp(24px, 4vw, 32px); margin-top: -10px; }
.setup-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.setup-hero-row { display: flex; align-items: flex-end; gap: 14px; }
.input-hero { min-height: 56px !important; font-size: 20px !important; font-weight: 700; }
.team-mark-lg { width: 56px; height: 56px; border-radius: 16px; font-size: 24px; transition: background .5s ease; }
.team-mark-lg.pop { animation: pop .35s var(--ease-spring); }
.setup-more summary { cursor: pointer; font-weight: 650; color: var(--team); min-height: 32px; display: flex; align-items: center; }
.setup-more[open] summary { margin-bottom: 8px; }

.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.template-card { position: relative; display: grid; justify-items: start; gap: 10px; min-height: 96px; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; transition: border-color .2s, transform .2s var(--ease-spring), box-shadow .2s; }
.template-card input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.template-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--sunk); color: var(--muted); transition: all .25s var(--ease-out); }
.template-label { font-size: 14px; font-weight: 700; }
.template-card:hover { transform: translateY(-2px); }
.template-card:has(input:checked) { border-color: var(--team); box-shadow: 0 8px 22px color-mix(in srgb, var(--team) 22%, transparent); transform: translateY(-2px); }
.template-card:has(input:checked) .template-icon { background: var(--team); color: #fff; transform: rotate(-6deg) scale(1.08); }
.template-card:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }

.color-layout { display: grid; gap: 22px; align-items: center; }
@media (min-width: 720px) { .color-layout { grid-template-columns: 1fr 240px; } }
.swatches { display: grid; grid-template-columns: repeat(4, 56px); gap: 14px; }
.swatch { position: relative; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--c); cursor: pointer; transition: transform .25s var(--ease-spring); }
.swatch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.swatch span { color: #fff; opacity: 0; transform: scale(.4); transition: all .25s var(--ease-spring); display: grid; }
.swatch:has(input:checked) { transform: scale(1.12); box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--c); }
.swatch:has(input:checked) span { opacity: 1; transform: none; }
.swatch:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 6px; }
.bloom { position: absolute; inset: 0; border-radius: 50%; background: var(--c); animation: bloom .7s ease-out forwards; pointer-events: none; }
@keyframes bloom { from { opacity: .6; transform: scale(1); } to { opacity: 0; transform: scale(3.2); } }
.phone { justify-self: center; display: grid; gap: 10px; width: 220px; padding: 16px 14px 0; border-radius: 30px; border: 8px solid var(--ink); background: var(--paper); box-shadow: var(--shadow); overflow: hidden; animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }
.phone-top { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.phone-top .team-mark { width: 28px; height: 28px; border-radius: 8px; font-size: 13px; transition: background .5s ease; }
.phone-date { font-size: 11px; color: var(--muted); }
.phone-cue { display: grid; grid-template-columns: 50px 1fr; align-items: center; gap: 8px; min-height: 40px; padding: 4px 8px 4px 0; border-radius: 8px; background: var(--surface); font-size: 11px; line-height: 1.35; }
.phone-cue .cue-time { font-size: 13px; padding-left: 8px; transition: border-color .5s ease; }
.phone-button { margin-top: 2px; padding: 9px; border-radius: 9px; background: var(--team); color: #fff; font-size: 12px; font-weight: 700; text-align: center; transition: background .5s ease; }
.phone-tabs { display: grid; grid-template-columns: repeat(4, 1fr); margin: 6px -14px 0; padding: 10px 0 14px; background: var(--surface); border-top: 1px solid var(--line); color: var(--muted); justify-items: center; }
.phone-tabs .is-on { color: var(--team); transition: color .5s ease; }

.done-badge { justify-self: center; margin-top: 8px; }
.done-ring { fill: var(--team); transform-origin: center; animation: pop .55s var(--ease-spring) both; }
.done-tick { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 50; stroke-dashoffset: 50; animation: draw .45s ease-out .4s forwards; }
.done-list { display: grid; gap: 10px; max-width: 420px; width: 100%; justify-self: center; }
.done-list li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--sunk); font-weight: 600; animation: rise .4s var(--ease-out) both; }
.done-list li:nth-child(1) { animation-delay: .5s; } .done-list li:nth-child(2) { animation-delay: .6s; }
.done-list li:nth-child(3) { animation-delay: .7s; } .done-list li:nth-child(4) { animation-delay: .8s; }
.done-list .icon { color: var(--team); }
.copy-box.reveal { animation: pop .4s var(--ease-spring); }

/* ---- Plans ---------------------------------------------------------------------------------- */

.plan-hero { display: grid; gap: 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--team) 10%, var(--surface)), var(--surface) 60%); }
@media (min-width: 900px) { .plan-hero { grid-template-columns: 1fr 1.2fr; align-items: center; } }
.plan-hero-name { display: flex; align-items: center; gap: 14px; }
.plan-hero-name h2 { font-size: 24px; }
.plan-hero-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; background: var(--team); color: #fff; animation: pop .5s var(--ease-spring); }
.meters { display: grid; gap: 14px; }
.meter-top { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.meter-top strong { font-variant-numeric: tabular-nums; }
.meter-track { height: 10px; border-radius: 99px; background: var(--sunk); overflow: hidden; }
.meter-track span { display: block; height: 100%; border-radius: 99px; background: var(--team); transform-origin: left; animation: meter 1s var(--ease-out) .2s both; transform: scaleX(var(--to)); }
@keyframes meter { from { transform: scaleX(0); } }
.meter.is-full .meter-track span { background: var(--cue); }
.meter.is-unlimited .meter-track { background: repeating-linear-gradient(-45deg, var(--sunk) 0 6px, color-mix(in srgb, var(--team) 14%, var(--sunk)) 6px 12px); }
.meter.is-full strong { color: var(--cue); }
.plan-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.plan-card { position: relative; display: grid; align-content: start; gap: 12px; padding: 20px 18px; border-radius: 18px; background: var(--surface); border: 1.5px solid var(--line); animation: rise .5s var(--ease-out) both; animation-delay: calc(var(--i) * 80ms); transition: transform .25s var(--ease-out), box-shadow .25s; }
.plan-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.plan-card.is-featured { border-color: color-mix(in srgb, var(--team) 55%, var(--line)); }
.plan-card.is-featured::before { content: ""; position: absolute; inset: -1.5px; border-radius: 18px; padding: 1.5px; background: linear-gradient(120deg, var(--team), var(--cue), var(--team)); background-size: 200% 100%; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: sheen 4s linear infinite; pointer-events: none; }
@keyframes sheen { to { background-position: -200% 0; } }
.plan-card.is-current { background: color-mix(in srgb, var(--team) 6%, var(--surface)); border-color: var(--team); }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-head h3 { font-size: 19px; }
.plan-price { font-size: 15px; font-weight: 750; }
.plan-features { display: grid; gap: 8px; font-size: 14px; }
.plan-features li { display: flex; align-items: flex-start; gap: 8px; }
.plan-features .icon { margin-top: 3px; color: var(--ok); }
.plan-features li.is-off { color: var(--muted); }
.plan-features li.is-off .icon { color: var(--line); }
.plan-grid.is-compact .plan-card { padding: 16px; }
.code-form { display: flex; gap: 8px; flex-wrap: wrap; }
.code-input { flex: 1 1 240px; min-height: 52px !important; font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 20px !important; letter-spacing: .08em; text-transform: uppercase; }
.code-form .button { min-height: 52px; }
.usage-note { font-size: 14px; color: var(--muted); margin-top: -8px; }
.usage-note.is-full { color: var(--cue); font-weight: 650; }

@media (max-width: 520px) {
  .setup-card { padding: 22px 16px; }
  .setup-dot-label { font-size: 11px; }
  .swatches { grid-template-columns: repeat(4, 48px); gap: 12px; }
  .swatch { width: 48px; height: 48px; }
  .curtain-icon, .curtain-mark { width: 88px; height: 88px; border-radius: 24px; }
}

/* =====================================================================================
   v0.2.1 sign-in showcase
   ===================================================================================== */

.showcase { flex: 1; display: grid; grid-template-rows: 1fr auto auto; gap: 22px; align-content: center; min-height: 0; }
.sc-device {
  --team: #2F6FED;
  position: relative; align-self: center; width: 100%; max-width: 620px; justify-self: center; overflow: hidden;
  border-radius: 18px; background: var(--paper); color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), 0 0 0 6px rgba(255, 255, 255, 0.04);
  transform: perspective(1400px) rotateX(4deg); transform-origin: 50% 100%;
  animation: sc-float 7s ease-in-out infinite;
}
@keyframes sc-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
.sc-device::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(100deg, transparent 0%, var(--team) 30%, color-mix(in srgb, var(--team) 60%, #fff) 50%, var(--team) 70%, transparent 100%);
  transform: translateX(-110%); opacity: 0;
}
.sc-device.is-wiping::after { animation: sc-wipe .7s var(--ease-out); }
@keyframes sc-wipe { 0% { transform: translateX(-110%); opacity: .95; } 100% { transform: translateX(110%); opacity: .95; } }
.sc-bar { display: flex; gap: 6px; padding: 10px 14px; background: var(--sunk); border-bottom: 1px solid var(--line); }
.sc-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.sc-body { display: grid; grid-template-columns: 56px 1fr; height: clamp(270px, 33vh, 310px); }
.sc-nav { display: grid; align-content: start; justify-items: center; gap: 6px; padding: 12px 0; background: var(--surface); border-right: 1px solid var(--line); color: var(--muted); }
.sc-logo { width: 26px; height: 26px; margin-bottom: 8px; background: url(/mark.svg) center / contain no-repeat; }
:root[data-theme="dark"] .sc-logo { background-image: url(/mark-dark.svg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sc-logo { background-image: url(/mark-dark.svg); } }
.sc-nav-item { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; transition: background .4s ease, color .4s ease; }
.sc-nav-item.is-on { background: color-mix(in srgb, var(--team) 16%, transparent); color: var(--team); }
.sc-screen { position: relative; overflow: hidden; }
.sc-scene { position: absolute; inset: 0; display: grid; align-content: start; gap: 14px; padding: 16px 18px; font-size: 13px; line-height: 1.4; }
.sc-scene.is-out { animation: sc-out .35s ease forwards; }
@keyframes sc-out { to { opacity: 0; transform: translateY(-8px); } }
.sc-rise { animation: rise .55s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 90ms + 250ms); }
.sc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sc-head > strong { font-size: 17px; font-weight: 750; }
.sc-muted { color: var(--muted); font-size: 12px; }
.sc-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.sc-stack { display: grid; gap: 8px; }
.sc-cue { display: grid; grid-template-columns: 52px 1fr; align-items: center; min-height: 38px; padding-right: 8px; border-radius: 9px; background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.sc-cue > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-time { margin: 6px 0; padding-left: 9px; border-left: 3px solid var(--team); font-weight: 750; font-variant-numeric: tabular-nums; transition: border-color .6s ease; }
.sc-card { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.sc-label { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.sc-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 10px; background: var(--team); color: #fff; font-size: 11px; transition: background .6s ease; }
.sc-chip { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-radius: 8px; background: var(--sunk); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sc-chip svg { flex: none; color: var(--team); }

.sc-month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.sc-weekday { font-size: 10px; color: var(--muted); padding-bottom: 2px; }
.sc-day { position: relative; display: grid; place-items: center; height: 26px; border-radius: 7px; font-size: 11px; font-variant-numeric: tabular-nums; background: var(--surface); animation: fade-in .4s ease both; animation-delay: calc(var(--i) * 12ms + 200ms); }
.sc-day.is-blank { background: transparent; }
.sc-day i { position: absolute; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--team); }
.sc-day.is-today { background: var(--team); color: #fff; font-weight: 750; animation: fade-in .4s ease both, sc-pulse 1.6s ease 1s 2; animation-delay: calc(var(--i) * 12ms + 200ms), 1s; }
.sc-day.is-today i { background: #fff; }
@keyframes sc-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--team) 25%, transparent); } }
.sc-synced { display: flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 650; font-size: 11.5px; }

.sc-seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--sunk); font-size: 11px; }
.sc-seg > * { padding: 3px 8px; border-radius: 6px; color: var(--muted); }
.sc-seg b { background: var(--surface); color: var(--ink); }
.sc-task { display: grid; grid-template-columns: 20px 1fr auto auto; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 10px; background: var(--surface); }
.sc-box { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--line); color: transparent; }
.sc-task-name { justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: linear-gradient(currentColor, currentColor) 0 55% / 0 1.5px no-repeat; }
.sc-tag { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; background: var(--cue-soft); color: var(--cue); font-size: 10.5px; font-weight: 700; }
.sc-device .avatars .avatar { width: 24px; height: 24px; margin-left: -5px; font-size: 9px; letter-spacing: -.02em; border-color: var(--surface); animation: pop .35s var(--ease-spring) both; animation-delay: calc(var(--i) * 80ms + 700ms); }
.will-check .sc-box { animation: sc-check .35s var(--ease-spring) 1.6s forwards; }
.will-check .sc-task-name { animation: sc-strike .4s ease 1.75s forwards; }
.will-check { animation: rise .55s var(--ease-out) both, sc-done .4s ease 1.9s forwards; animation-delay: 340ms, 1.9s; }
@keyframes sc-check { 0% { transform: scale(.6); } 100% { transform: none; background: var(--ok); border-color: var(--ok); color: #fff; } }
@keyframes sc-strike { to { background-size: 100% 1.5px; color: var(--muted); } }
@keyframes sc-done { to { background: var(--ok-soft); } }

.sc-post { gap: 10px; padding: 16px; }
.sc-device .avatars .avatar:first-child { margin-left: 0; }
.sc-device .avatars .avatar:nth-child(5n+1) { background: #DCE7FF; color: #1D4DB8; }
.sc-device .avatars .avatar:nth-child(5n+2) { background: #D7F2E6; color: #13684A; }
.sc-device .avatars .avatar:nth-child(5n+3) { background: #FCE3D3; color: #A13A0B; }
.sc-device .avatars .avatar:nth-child(5n+4) { background: #E9DEFF; color: #5B2BB5; }
.sc-device .avatars .avatar:nth-child(5n+5) { background: #FBDCE7; color: #A01C4C; }
.sc-ghost { display: grid; gap: 8px; padding: 14px 16px; border-radius: 12px; border: 1px dashed var(--line); opacity: .7; }
.sc-post .sc-label { justify-content: flex-start; }
.sc-post-title { font-size: 15px; }
.sc-line { display: block; height: 8px; border-radius: 4px; background: var(--sunk); }
.sc-line.short { width: 62%; }
.sc-read { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.sc-read-text strong { font-size: 18px; color: var(--team); font-variant-numeric: tabular-nums; }
.sc-meter { height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; }
.sc-meter span { display: block; height: 100%; width: calc(var(--to, 0) * 100%); background: var(--team); border-radius: inherit; transition: width .12s linear; }

.sc-team { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; }
.sc-team .team-mark { width: 32px; height: 32px; border-radius: 9px; font-size: 14px; transition: background .6s ease; }
.sc-team .team-mark.pop { animation: pop .35s var(--ease-spring); }
.sc-button { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px; border-radius: 9px; background: var(--team); color: #fff; font-weight: 700; transition: background .6s ease; }
.sc-swatches { display: flex; gap: 10px; justify-content: center; }
.sc-swatch { width: 22px; height: 22px; border-radius: 50%; background: var(--c); transition: transform .3s var(--ease-spring), box-shadow .3s ease; }
.sc-swatch.is-on { transform: scale(1.2); box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--c); }

.sc-caption { display: grid; gap: 6px; max-width: 34em; }
.sc-step { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: color-mix(in srgb, var(--team) 55%, #fff); font-variant-numeric: tabular-nums; }
.sc-title { font-size: clamp(20px, 2.1vw, 26px); line-height: 1.3; font-weight: 750; min-height: 1.3em; }
.sc-char { display: inline-block; white-space: pre; animation: rise .5s var(--ease-out) both; animation-delay: calc(var(--i) * 22ms); }
.sc-text { color: #A9B4C2; font-size: 15px; min-height: 3em; }
.sc-fade { animation: fade-in .6s ease .25s both; }
.sc-dots { display: flex; gap: 8px; }
.sc-dot { position: relative; flex: 0 0 auto; width: 34px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; }
.sc-dot::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; background: rgba(255, 255, 255, .18); }
.sc-dot span { position: absolute; left: 0; top: 50%; height: 4px; margin-top: -2px; width: 0; border-radius: 2px; background: #fff; }
.sc-dot.is-done span { width: 100%; opacity: .55; }
.sc-dot.is-on { width: 56px; }
.sc-dot.is-on span { animation: sc-progress 5.5s linear forwards; }
.sc-dot { transition: width .35s var(--ease-out); }
.sc-dot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }
@keyframes sc-progress { from { width: 0; } to { width: 100%; } }
.showcase.is-paused .sc-dot.is-on span, .showcase.is-hidden .sc-dot.is-on span { animation-play-state: paused; }
.showcase.is-static .sc-dot.is-on span { animation: none; width: 100%; }
.showcase.is-static .sc-device { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .sc-dot.is-on span { animation: none !important; width: 100%; }
}

/* =====================================================================================
   v0.2.2 installed app
   ===================================================================================== */

.install-hint {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px;
  margin-bottom: 16px; padding: 10px 10px 10px 14px; border-radius: var(--radius-panel);
  background: color-mix(in srgb, var(--team) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--team) 30%, var(--line));
  animation: rise .5s var(--ease-out) both;
}
.install-hint p { display: grid; font-size: 13px; line-height: 1.4; }
.install-hint p > span { color: var(--muted); }
.install-hint-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--team); color: #fff; }
@media (max-width: 420px) { .install-hint { gap: 8px; padding-left: 10px; } .install-hint-icon { width: 30px; height: 30px; } }
/* Centred with margins, not transform: the entrance animation uses transform and would undo the centring. */
.update-bar {
  position: fixed; z-index: 250; left: 16px; right: 16px; bottom: calc(var(--tabbar) + 16px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 10px; width: fit-content; max-width: calc(100vw - 32px); margin: 0 auto;
  padding: 8px 8px 8px 14px; border-radius: 999px; background: var(--ink); color: var(--paper); box-shadow: var(--shadow);
  animation: rise .45s var(--ease-out) both;
}
.update-bar .icon { flex: none; }
.update-bar span { flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.35; }
.update-bar .button { flex: none; white-space: nowrap; }
body.in-call .update-bar { bottom: calc(var(--tabbar) + 76px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .update-bar { bottom: 24px; } }
.panel[id] { scroll-margin-top: 84px; }

/* =====================================================================================
   v0.2.5 features
   ===================================================================================== */

.block { display: block; }
.row.space-between { justify-content: space-between; }
.label { font-size: 14px; font-weight: 650; }
.icon-button.small { width: 32px; height: 32px; }
.count-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: 99px; background: var(--cue); color: #fff; font-size: 11px; font-weight: 800; }
.tag-done { background: var(--ok-soft); color: var(--ok); }
.tag-lock { background: var(--sunk); color: var(--muted); }
.search-input { width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; }

/* ---- Navigation ---------------------------------------------------------------------- */

@media (min-width: 960px) {
  .sidebar { overflow-y: auto; gap: 14px; }
  .side-nav { gap: 12px; }
  .side-group { display: grid; gap: 1px; }
  .side-heading { padding: 0 10px 2px; font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); opacity: .8; }
  .nav-link.side { min-height: 38px; }
  .nav-link.side.is-locked { opacity: .62; }
  .nav-lock { margin-left: auto; display: inline-grid; }
}
.more-grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.more-title { margin: 0 0 4px; }
.list-row.is-locked .icon { opacity: .55; }

/* ---- Locked features ----------------------------------------------------------------- */

.locked { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; border-style: dashed;
  background: color-mix(in srgb, var(--team) 5%, var(--surface)); }
.locked-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: color-mix(in srgb, var(--team) 14%, var(--surface)); color: var(--team); }
.locked.is-compact { padding: 12px 14px; gap: 12px; }
.locked.is-compact .locked-icon { width: 36px; height: 36px; border-radius: 10px; }
.locked .button { width: fit-content; }
.lock-hint, .attach-locked { display: flex; align-items: center; gap: 6px; }
.check.is-locked { opacity: .7; }
.segment-button.is-locked { opacity: .6; }
.segment-button .icon { vertical-align: -3px; margin-right: 4px; }

/* ---- Home: must-read banner ------------------------------------------------------------ */

.must-read { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-panel); text-decoration: none !important;
  background: color-mix(in srgb, var(--cue) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--cue) 45%, var(--line)); color: var(--ink);
  animation: rise .5s var(--ease-out) both; }
.must-read .row-main span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.must-read-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--cue); color: #fff; flex: none; animation: nudge 2.4s ease-in-out 1s infinite; }
@keyframes nudge { 0%, 86%, 100% { transform: none; } 90% { transform: rotate(-10deg); } 95% { transform: rotate(8deg); } }

/* ---- Tasks: checklist, board, mentions ------------------------------------------------- */

.checklist-count { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-variant-numeric: tabular-nums; }
.checklist-count.is-done { color: var(--ok); font-weight: 700; }
.checklist .progress-bar { transition: width .4s var(--ease-out); }
.checklist-items { display: grid; gap: 2px; }
.checklist-items li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 4px; border-radius: 8px; }
.checklist-items li:hover { background: var(--sunk); }
.checklist-items li.is-done .check > span:first-of-type { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.checklist-items .check input { width: 20px; height: 20px; flex: none; }
.checklist-add { display: flex; gap: 8px; }
.checklist-add input { flex: 1; }

.mention-wrap { position: relative; }
.mention-menu { position: absolute; z-index: 5; left: 0; bottom: calc(100% + 4px); min-width: 220px; max-width: 100%; padding: 4px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.mention-menu li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.mention-menu li.is-active, .mention-menu li:hover { background: color-mix(in srgb, var(--team) 12%, var(--surface)); }
.mention { color: var(--team); font-weight: 700; background: color-mix(in srgb, var(--team) 10%, transparent); border-radius: 4px; padding: 0 2px; }
.comment-form .hint .icon { vertical-align: -2px; }

.layout-switch .segment-button { display: inline-flex; align-items: center; }
.board { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(260px, 1fr)); overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.board-column { display: grid; align-content: start; gap: 10px; min-height: 240px; padding: 12px; border-radius: var(--radius-panel); background: var(--sunk);
  scroll-snap-align: start; transition: background .2s ease, box-shadow .2s ease; }
.board-column.is-over { background: color-mix(in srgb, var(--team) 14%, var(--sunk)); box-shadow: inset 0 0 0 2px var(--team); }
.board-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.board-head h2 { font-size: 15px; }
.board-count { min-width: 24px; padding: 1px 8px; border-radius: 99px; background: var(--surface); font-size: 12px; font-weight: 800; text-align: center; }
.status-in_progress .board-count { background: var(--team); color: #fff; }
.status-done .board-count { background: var(--ok); color: #fff; }
.board-cards { display: grid; gap: 8px; }
.board-card { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05); cursor: grab; animation: rise .4s var(--ease-out) both; }
.board-card.priority-high { border-left-color: var(--cue); }
.board-card.priority-urgent { border-left-color: var(--danger); }
.board-card.is-dragging { opacity: .45; transform: rotate(1.5deg); }
.board-title { color: var(--ink); font-weight: 700; text-decoration: none !important; overflow-wrap: anywhere; }
.board-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; }
.board-move { display: flex; gap: 2px; }
.board-empty { padding: 18px 4px; text-align: center; }
@media (max-width: 720px) { .board { grid-template-columns: repeat(3, 82%); } }
@media (hover: hover) and (pointer: fine) { .board-move { opacity: 0; transition: opacity .15s; } .board-card:hover .board-move, .board-card:focus-within .board-move { opacity: 1; } }

/* ---- Schedule: leave --------------------------------------------------------------------- */

.day { position: relative; }
.day-leave { position: absolute; top: 3px; right: 3px; display: inline-flex; align-items: center; gap: 1px; padding: 0 4px; border-radius: 6px;
  background: var(--cue-soft); color: var(--cue); font-size: 10px; font-weight: 800; }
.leave-line { display: flex; align-items: center; gap: 6px; margin: -4px 0 8px; padding: 6px 10px; border-radius: 9px; background: var(--cue-soft); color: var(--cue); font-size: 13px; font-weight: 650; }

/* ---- Groups ------------------------------------------------------------------------------- */

.group-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--team)); flex: none; }
.group-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.group-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 3px 10px; border-radius: 99px; font-size: 13px; font-weight: 650;
  border: 1px solid color-mix(in srgb, var(--c) 40%, var(--line)); background: color-mix(in srgb, var(--c) 10%, var(--surface)); color: var(--ink); cursor: pointer; }
.group-chip.static { cursor: default; min-height: 24px; padding: 1px 8px; font-size: 12px; }
button.group-chip:hover { background: color-mix(in srgb, var(--c) 20%, var(--surface)); }
.group-badge { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--c); color: #fff; font-weight: 800; }
.audience { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; }
.audience legend { font-size: 14px; font-weight: 650; padding: 0; margin-bottom: 2px; }
.audience .chip-toggle:has(input:checked) { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--surface)); }
.swatches.small { grid-template-columns: repeat(8, 32px); gap: 10px; }
.swatches.small .swatch { width: 32px; height: 32px; border: 0; }
.swatch.is-on { transform: scale(1.12); box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--c); }

/* ---- Must-read --------------------------------------------------------------------------- */

.ack-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--cue) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--cue) 40%, var(--line)); }
.notice-important { background: var(--cue-soft); color: var(--cue); font-weight: 650; }
.notice-urgent { background: var(--danger-soft); color: var(--danger); font-weight: 650; }
.notice .icon { vertical-align: -3px; }

/* ---- Files -------------------------------------------------------------------------------- */

.files-top { display: grid; gap: 12px; align-items: center; }
@media (min-width: 720px) { .files-top { grid-template-columns: minmax(0, 1fr) 320px; } }
.storage-meter { display: grid; gap: 6px; }
.storage-meter .meter-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; font-weight: 650; }
.crumbs a { display: inline-flex; align-items: center; gap: 4px; }
.file-list { display: grid; }
.file-row { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 6px 2px; border-top: 1px solid var(--line); }
.file-row:first-child { border-top: 0; }
.file-thumb { display: grid; place-items: center; width: 44px; height: 44px; flex: none; overflow: hidden; border-radius: 10px; background: var(--sunk); color: var(--muted); }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-thumb.is-folder { background: color-mix(in srgb, var(--team) 14%, var(--surface)); color: var(--team); }
.file-name { color: var(--ink); text-decoration: none !important; min-width: 0; }
.file-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachments .section-title { display: flex; align-items: center; gap: 6px; }
.drop-hint { justify-items: center; text-align: center; padding: 36px 12px; border: 2px dashed var(--line); border-radius: 14px; }
.main.is-dropping { outline: 3px dashed var(--team); outline-offset: -8px; border-radius: 18px; }
.upload-toast { position: fixed; z-index: 120; left: 50%; bottom: calc(var(--tabbar) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); padding: 12px 14px; border-radius: 12px; background: var(--ink); color: var(--paper); box-shadow: var(--shadow); font-size: 14px; }
.upload-toast .meter-track { background: color-mix(in srgb, var(--paper) 20%, transparent); }
.upload-toast .meter-track span { animation: none; transition: transform .2s linear; }
@media (min-width: 960px) { .upload-toast { bottom: 24px; } }

/* ---- Polls -------------------------------------------------------------------------------- */

.poll-options-edit { display: grid; gap: 8px; margin-bottom: 4px; }
.option-row { display: flex; align-items: center; gap: 6px; }
.option-row input { flex: 1; }
.poll-card { display: flex; align-items: center; gap: 12px; padding: 10px 4px; color: var(--ink); text-decoration: none !important; }
.poll-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: color-mix(in srgb, var(--team) 12%, var(--surface)); color: var(--team); }
.poll-card.is-waiting .poll-icon { background: var(--team); color: #fff; animation: nudge 2.4s ease-in-out 1s infinite; }
.poll-choice { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
  transition: border-color .15s, background .15s; }
.poll-choice input { width: 20px; height: 20px; margin: 0; }
.poll-choice:has(input:checked) { border-color: var(--team); background: color-mix(in srgb, var(--team) 10%, var(--surface)); font-weight: 700; }
.poll-results { display: grid; gap: 12px; }
.poll-results li { display: grid; gap: 5px; animation: rise .45s var(--ease-out) both; animation-delay: calc(var(--i) * 70ms); }
.poll-result-top { display: flex; justify-content: space-between; gap: 10px; }
.poll-result-top > span { display: inline-flex; align-items: center; gap: 6px; }
.poll-result-top strong .muted { margin-left: 6px; font-weight: 600; }
.poll-result-top .icon { color: var(--team); }
.poll-bar { height: 12px; border-radius: 99px; background: var(--sunk); overflow: hidden; }
.poll-bar span { display: block; height: 100%; border-radius: inherit; background: color-mix(in srgb, var(--team) 55%, var(--sunk));
  transform-origin: left; transform: scaleX(var(--to)); animation: meter .9s var(--ease-out) both; animation-delay: calc(var(--i) * 70ms + 150ms); }
.poll-results li.is-top .poll-bar span { background: var(--team); }
.poll-results li.is-mine strong { color: var(--team); }

/* ---- Shifts ------------------------------------------------------------------------------- */

.week-head { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.week-head h2 { font-size: 16px; margin: 0 4px; }
.week-head .switch { margin-left: auto; }
.shift-week { display: grid; gap: 10px; }
@media (min-width: 900px) { .shift-week { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; } }
.shift-day { display: grid; align-content: start; gap: 8px; padding: 10px; border-radius: var(--radius-panel); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.shift-day.is-today { border-color: var(--team); box-shadow: inset 0 3px 0 var(--team); }
.shift-day-head { display: flex; align-items: center; gap: 6px; }
.shift-day-head strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.shift-day-head .icon-button { margin-left: auto; }
.shift-weekday { font-size: 12px; font-weight: 700; color: var(--muted); }
.shift-leave { display: flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 7px; background: var(--cue-soft); color: var(--cue); font-size: 12px; font-weight: 650; }
.shift-list { display: grid; gap: 6px; }
.shift-chip { position: relative; display: grid; gap: 3px; width: 100%; padding: 8px 10px; border-radius: 10px; text-align: left; cursor: pointer;
  background: var(--sunk); border: 1px solid transparent; border-left: 4px solid var(--team); color: var(--ink); animation: rise .35s var(--ease-out) both; }
.shift-chip:hover { border-color: var(--line); border-left-color: var(--team); }
.shift-chip.is-mine { background: color-mix(in srgb, var(--team) 14%, var(--surface)); }
.shift-chip.is-open { background: transparent; border: 1px dashed color-mix(in srgb, var(--ok) 60%, var(--line)); border-left: 4px solid var(--ok); }
.shift-chip.has-conflict { border-left-color: var(--danger); }
.shift-time { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.shift-who { display: flex; align-items: center; gap: 6px; font-size: 13px; min-width: 0; }
.shift-who span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shift-chip.is-open .shift-who { color: var(--ok); font-weight: 700; }
.shift-position { font-size: 12px; color: var(--muted); }
.shift-warn { position: absolute; top: 6px; right: 8px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--danger); color: #fff; font-size: 12px; font-weight: 900; }
.shift-none { text-align: center; }
.swap-row .icon:first-child { color: var(--team); }
.swap-approved, .leave-approved { background: var(--ok-soft); color: var(--ok); }
.swap-rejected, .leave-rejected { background: var(--danger-soft); color: var(--danger); }
.leave-pending { background: var(--cue-soft); color: var(--cue); }

/* ---- Leave -------------------------------------------------------------------------------- */

.leave-kind { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--sunk); color: var(--muted); }
.leave-kind.kind-annual { background: color-mix(in srgb, var(--ok) 16%, var(--surface)); color: var(--ok); }
.leave-kind.kind-sick { background: var(--danger-soft); color: var(--danger); }
.leave-kind.kind-personal { background: var(--cue-soft); color: var(--cue); }
.leave-row .row-side { flex-wrap: wrap; justify-content: flex-end; }

/* ---- Clock ---------------------------------------------------------------------------------- */

.clock-panel { display: grid; justify-items: center; gap: 14px; text-align: center; padding: 24px 16px; }
.clock-shift { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; background: var(--sunk); font-weight: 650; }
.clock-button { position: relative; display: grid; place-items: center; align-content: center; gap: 4px; width: 200px; height: 200px; border-radius: 50%; border: 0;
  color: #fff; cursor: pointer; background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--team) 70%, #fff), var(--team) 70%);
  box-shadow: 0 18px 40px color-mix(in srgb, var(--team) 35%, transparent), inset 0 -6px 0 rgba(0, 0, 0, .12); transition: transform .2s var(--ease-spring); }
.clock-button.is-out { background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--cue) 65%, #fff), var(--cue) 70%); box-shadow: 0 18px 40px color-mix(in srgb, var(--cue) 35%, transparent), inset 0 -6px 0 rgba(0, 0, 0, .12); }
.clock-button:active { transform: scale(.96); }
.clock-button:disabled { opacity: .55; cursor: not-allowed; }
.clock-button strong { font-size: 20px; }
.clock-now { font-size: 14px; opacity: .85; font-variant-numeric: tabular-nums; }
.clock-ring { position: absolute; inset: -10px; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--team) 40%, transparent); animation: ring 2.4s ease-out infinite; pointer-events: none; }
.clock-button.is-out .clock-ring { border-color: color-mix(in srgb, var(--cue) 40%, transparent); }
.clock-button.is-locating .clock-ring { animation-duration: .9s; }
@keyframes ring { 0% { transform: scale(.92); opacity: 1; } 100% { transform: scale(1.18); opacity: 0; } }
.clock-message { min-height: 1.5em; font-weight: 650; }
.clock-message.is-error { color: var(--danger); }
.clock-timeline { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.clock-timeline li { display: grid; gap: 1px; padding: 8px 14px; border-radius: 12px; background: var(--sunk); border-top: 3px solid var(--team); min-width: 110px; }
.clock-timeline li.is-out { border-top-color: var(--cue); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table thead th { font-size: 12px; color: var(--muted); font-weight: 700; }
.table tbody th { font-weight: 650; }
.table .is-late { color: var(--danger); font-weight: 700; }

/* ---- Contacts ------------------------------------------------------------------------------- */

.contacts-search { position: relative; display: flex; align-items: center; }
.contacts-search .icon { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.contacts-search input.search-input { padding-left: 42px; }
.filter-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 36px; padding: 4px 14px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 650; cursor: pointer; }
.filter-chip.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filter-chip.is-on .muted { color: inherit; opacity: .7; }
.contact-row .row-side .group-chip { display: none; }
@media (min-width: 640px) { .contact-row .row-side .group-chip { display: inline-flex; } }
.icon-button.call { color: var(--ok); background: var(--ok-soft); width: 40px; height: 40px; }
.contact-group + .contact-group { margin-top: 6px; }
.contact-letter { position: sticky; top: 56px; z-index: 1; padding: 2px 6px; font-size: 12px; font-weight: 800; color: var(--team); background: var(--surface); }
.contact-hero { display: flex; align-items: center; gap: 14px; }
.contact-name { font-size: 20px; font-weight: 800; }
.avatar-lg { width: 60px; height: 60px; font-size: 20px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- Reports -------------------------------------------------------------------------------- */

.report-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.report-controls input[type=date] { width: auto !important; }
.stat-strip .stat .muted.small { margin-top: 2px; }
.rate { display: inline-flex; align-items: center; gap: 8px; }
.rate-bar { width: 64px; height: 7px; border-radius: 99px; background: var(--sunk); overflow: hidden; }
.rate-bar span { display: block; height: 100%; background: var(--ok); transform-origin: left; transform: scaleX(var(--to)); }

/* ---- Plan: add-ons -------------------------------------------------------------------------- */

.addon-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.addon-card { display: grid; gap: 6px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(160deg, color-mix(in srgb, var(--team) 8%, var(--surface)), var(--surface)); }
.addon-size { font-size: 26px; font-weight: 850; color: var(--team); }
.meters .storage-meter { margin-top: 2px; }
@media (max-width: 720px) {
  .week-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; }
  .week-head h2 { text-align: center; font-size: 14px; margin: 0; }
  .week-head .switch { grid-column: 2 / 4; justify-self: end; margin: 0; }
}

/* ==== v0.2.7: chat, calls, approvals, expenses, booking, templates, search ==== */

.check-row { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; }
.check-row input { width: 18px; height: 18px; flex: none; }
.color-choices { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.color-dot { position: relative; display: inline-grid; width: 32px; height: 32px; border-radius: 50%; background: var(--dot); cursor: pointer; transition: transform .2s var(--ease-spring); }
.color-dot input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.color-dot:has(input:checked) { transform: scale(1.1); box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--dot); }
.color-dot:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 4px; }
.cue-text { color: var(--cue); }
.space-between { justify-content: space-between; }

/* Navigation: badges on the chat tab and approvals link, search entry points. */
.nav-icon { position: relative; display: inline-grid; }
.nav-badge { top: -6px; right: -10px; }
.nav-link.side .nav-badge { position: absolute; }
.side-search { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--muted); font-weight: 600; }
.side-search span { flex: 1; text-align: left; }
.side-search kbd { padding: 0 6px; border: 1px solid var(--line); border-radius: 5px; font: 12px/18px ui-monospace, monospace; background: var(--surface); }
.side-search:hover { border-color: color-mix(in srgb, var(--team) 40%, var(--line)); color: var(--ink); }
.topbar { gap: 4px; }
.topbar-team { margin-right: auto; min-width: 0; }
@media (min-width: 960px) { .topbar-search { display: none; } }

/* ---- Chat layout ----------------------------------------------------------- */
.main.chat-main { max-width: none; padding: 0; gap: 0; }
.chat-layout { display: grid; height: calc(100dvh - 61px - var(--tabbar) - env(safe-area-inset-bottom)); min-height: 0; }
.chat-layout .room-pane-main { display: none; }
.chat-layout.has-room .room-pane { display: none; }
.chat-layout.has-room .room-pane-main { display: flex; }
body.in-chat-room .tabbar, body.in-chat-room .topbar { display: none; }
body.in-chat-room .chat-layout { height: 100dvh; }
@media (min-width: 960px) {
  .chat-layout, body.in-chat-room .chat-layout { grid-template-columns: 320px minmax(0, 1fr); height: calc(100dvh - 57px); }
  .chat-layout .room-pane, .chat-layout.has-room .room-pane { display: flex; border-right: 1px solid var(--line); }
  .chat-layout .room-pane-main { display: flex; }
  body.in-chat-room .topbar { display: flex; }
  .room-back { display: none; }
}
.room-pane { flex-direction: column; display: flex; gap: 10px; padding: 16px 12px 0; min-height: 0; background: var(--surface); }
.room-pane-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.room-pane .search-input { margin: 0 4px; width: auto; }
.room-list { overflow-y: auto; margin: 0 -12px; padding: 0 6px 12px; flex: 1; }
.room-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; color: var(--ink); text-decoration: none !important; }
.room-row:hover { background: var(--sunk); }
.room-row.is-current { background: color-mix(in srgb, var(--team) 12%, var(--surface)); }
.room-row-main { display: grid; gap: 2px; min-width: 0; flex: 1; }
.room-row-top, .room-row-bottom { display: flex; align-items: center; gap: 6px; min-width: 0; }
.room-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; font-weight: 650; }
.room-count { font-weight: 500; }
.room-time { flex: none; }
.room-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; font-size: 13.5px; }
.room-row.has-unread .room-name { font-weight: 800; }
.room-row.has-unread .room-preview { color: var(--ink); }
.room-row .count-badge { background: var(--ok); margin-left: 0; }
.tag-call { background: var(--ok-soft); color: var(--ok); }
.room-mark { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--room); color: #fff; font-weight: 800; font-size: 16px; }
.room-mark.room-team { border-radius: 12px; }
.room-mark.room-project { background: color-mix(in srgb, var(--room) 16%, var(--surface)); color: var(--room); }
.room-mark.room-mark-sm, .avatar.room-mark-sm { width: 36px; height: 36px; font-size: 13px; border-radius: 11px; }
.room-mark.room-mark-lg, .avatar.room-mark-lg { width: 56px; height: 56px; font-size: 20px; border-radius: 16px; }
.room-row .avatar { width: 44px; height: 44px; }
.chat-placeholder { place-content: center; justify-items: center; flex: 1; text-align: center; }
.room-info-head { display: flex; align-items: center; gap: 14px; }

.room-pane-main { flex-direction: column; min-width: 0; min-height: 0; background: var(--paper); position: relative; }
.room-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 6px; padding: max(6px, env(safe-area-inset-top)) 8px 0; background: var(--surface); border-bottom: 1px solid var(--line); }
.room-title { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px; border: 0; border-radius: 10px; background: transparent; text-align: left; }
.room-title:hover { background: var(--sunk); }
.room-title-text { display: grid; min-width: 0; line-height: 1.3; }
.room-title-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-actions { gap: 0; flex-wrap: nowrap; }
.icon-button.is-locked { opacity: .5; }
.room-tabs { grid-column: 1 / -1; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.room-tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px 10px; color: var(--muted); font-weight: 650; font-size: 14px; border-bottom: 2px solid transparent; text-decoration: none !important; white-space: nowrap; }
.room-tab.is-active { color: var(--ink); border-bottom-color: var(--team); }
.room-tab-body { padding: 16px; overflow-y: auto; flex: 1; display: grid; gap: 16px; align-content: start; }
@media (min-width: 960px) { .room-tab-body { padding: 24px; } }

.call-banner { display: flex; align-items: center; gap: 12px; margin: 8px 12px 0; padding: 10px 12px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); }
.call-banner .row-main { display: grid; min-width: 0; }
.call-banner .small { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); flex: none; box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.pinned-bar { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 14px; background: var(--surface); border-bottom: 1px solid var(--line); color: var(--muted); }
.pinned-text { display: flex; gap: 8px; min-width: 0; border: 0; background: none; padding: 4px 0; text-align: left; }
.pinned-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }

.chat-stage { position: relative; flex: 1; min-height: 0; display: flex; }
.chat-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 12px 10px 8px; display: flex; flex-direction: column; }
.chat-messages { display: grid; gap: 2px; margin-top: auto; }
.chat-earlier { margin: 0 auto 8px; }
.chat-day { display: flex; justify-content: center; margin: 12px 0 6px; }
.chat-day span { padding: 2px 12px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 9%, transparent); color: var(--muted); font-size: 12px; font-weight: 650; }
.chat-system { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 6px 0; text-align: center; font-size: 12.5px; color: var(--muted); }
.chat-system > span { padding: 3px 12px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 6%, transparent); max-width: 90%; }
.chat-row { display: flex; align-items: flex-end; gap: 8px; margin-top: 8px; }
.chat-row.is-grouped { margin-top: 2px; }
.chat-row.is-mine { flex-direction: row-reverse; }
.chat-row.is-found .bubble { box-shadow: 0 0 0 3px var(--cue); }
.chat-avatar-gap { width: 30px; flex: none; }
.chat-row.is-mine .chat-avatar-gap { display: none; }
.chat-body { display: grid; gap: 3px; max-width: min(78%, 560px); min-width: 0; }
.chat-row.is-mine .chat-body { justify-items: end; }
.chat-sender { font-size: 12px; color: var(--muted); padding-left: 4px; }
.bubble-line { display: flex; align-items: flex-end; gap: 6px; min-width: 0; }
.chat-row.is-mine .bubble-line { flex-direction: row-reverse; }
.bubble { display: grid; gap: 6px; min-width: 0; padding: 8px 12px; border-radius: 18px 18px 18px 6px; background: var(--surface); border: 1px solid var(--line); overflow-wrap: anywhere; white-space: pre-wrap; -webkit-user-select: text; user-select: text; }
.chat-row.is-grouped:not(.is-mine) .bubble { border-radius: 6px 18px 18px 6px; }
.chat-row.is-mine .bubble { background: var(--team); color: #fff; border-color: transparent; border-radius: 18px 18px 6px 18px; }
.chat-row.is-mine.is-grouped .bubble { border-radius: 18px 6px 6px 18px; }
.chat-row.is-mine .bubble a { color: #fff; text-decoration: underline; }
.bubble.is-deleted { background: transparent !important; color: var(--muted) !important; border: 1px dashed var(--line) !important; font-style: italic; }
.bubble.is-media { padding: 3px; background: var(--surface) !important; border: 1px solid var(--line) !important; }
.mention { font-weight: 750; color: var(--team); }
.chat-row.is-mine .mention { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.bubble-reply { display: grid; gap: 1px; padding: 4px 8px; border: 0; border-left: 3px solid currentColor; border-radius: 6px; background: color-mix(in srgb, currentColor 10%, transparent); color: inherit; font-size: 13px; text-align: left; opacity: .9; }
.bubble-reply span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.bubble-meta { display: grid; justify-items: end; flex: none; font-size: 11px; color: var(--muted); line-height: 1.3; padding-bottom: 2px; }
.chat-row:not(.is-mine) .bubble-meta { justify-items: start; }
.bubble-meta .read { color: var(--team); font-weight: 650; }
.bubble-more { width: 32px; height: 32px; min-height: 32px; opacity: 0; flex: none; color: var(--muted); }
.chat-row:hover .bubble-more, .bubble-more:focus-visible { opacity: 1; }
@media (pointer: coarse) { .bubble-more { display: none; } }
.chat-image { display: block; padding: 0; border: 0; background: none; border-radius: 15px; overflow: hidden; cursor: zoom-in; }
.chat-image img { display: block; max-width: min(320px, 64vw); max-height: 320px; object-fit: cover; }
.chat-file { display: flex; align-items: center; gap: 10px; min-width: 200px; padding: 6px 4px; color: inherit; text-decoration: none !important; }
.chat-file .row-main { display: grid; min-width: 0; }
.chat-file strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-file-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: color-mix(in srgb, currentColor 14%, transparent); }
.chat-row.is-mine .chat-file .muted { color: rgba(255, 255, 255, .8); }
.reactions { display: flex; flex-wrap: wrap; gap: 4px; }
.reaction { display: inline-flex; align-items: center; gap: 4px; min-height: 26px; padding: 0 8px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); font-size: 13px; }
.reaction span { font-size: 12px; font-weight: 700; color: var(--muted); }
.reaction.is-mine { border-color: var(--team); background: color-mix(in srgb, var(--team) 12%, var(--surface)); }
.reaction-picker { display: flex; justify-content: space-between; gap: 6px; }
.reaction-choice { flex: 1; min-height: 52px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-size: 26px; transition: transform .15s; }
.reaction-choice:hover { transform: scale(1.12); }
.is-uploading .bubble { min-width: 200px; background: var(--surface) !important; color: var(--ink) !important; border: 1px solid var(--line) !important; }
.is-uploading .meter-track span { animation: none; transition: transform .2s linear; }
.new-below { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px; border: 0; border-radius: 99px; background: var(--team); color: #fff; font-weight: 700; font-size: 13px; box-shadow: var(--shadow); }
.typing-line { min-height: 18px; padding: 0 16px; font-size: 12px; color: var(--muted); }

.composer { position: relative; display: grid; gap: 6px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.composer-row { display: flex; align-items: flex-end; gap: 2px; }
.composer-input { flex: 1; min-height: 42px; max-height: 160px; resize: none; padding: 9px 14px !important; border-radius: 21px !important; line-height: 1.45; background: var(--paper) !important; }
.send-button { color: var(--team); }
.send-button:disabled { color: var(--muted); opacity: .5; }
.composer-off { padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); text-align: center; background: var(--surface); border-top: 1px solid var(--line); }
.reply-bar { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border-left: 3px solid var(--team); border-radius: 8px; background: var(--sunk); }
.reply-bar .row-main { display: grid; min-width: 0; }
.reply-bar .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mention-list { position: absolute; bottom: calc(100% + 4px); left: 8px; z-index: 5; min-width: 220px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.mention-option { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 4px 10px; border: 0; border-radius: 8px; background: none; text-align: left; }
.mention-option:hover, .mention-option.is-active { background: var(--sunk); }

/* Notes and albums */
.note-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.note-card { display: grid; gap: 6px; align-content: start; width: 100%; min-height: 140px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); text-align: left; }
.note-card:hover { border-color: color-mix(in srgb, var(--team) 40%, var(--line)); }
.note-card.is-pinned { border-color: var(--cue); background: color-mix(in srgb, var(--cue-soft) 50%, var(--surface)); }
.note-card strong { display: flex; align-items: center; gap: 6px; }
.note-excerpt { color: var(--muted); font-size: 14px; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.note-body { max-width: none; }
.album-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.album-card { display: grid; gap: 4px; color: var(--ink); text-decoration: none !important; }
.album-cover { display: grid; place-items: center; aspect-ratio: 1; border-radius: 14px; background: var(--sunk); color: var(--muted); overflow: hidden; }
.album-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.album-card:hover img { transform: scale(1.04); }
.photo-grid { display: grid; gap: 4px; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.photo-grid li { position: relative; }
.photo-tile { display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: var(--sunk); cursor: zoom-in; }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; }
.photo-video { display: grid; place-items: center; align-content: center; gap: 4px; height: 100%; color: var(--muted); padding: 6px; overflow-wrap: anywhere; }
.photo-delete { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; min-height: 32px; background: rgba(0, 0, 0, .55); color: #fff; opacity: 0; }
.photo-grid li:hover .photo-delete, .photo-delete:focus-visible { opacity: 1; }
@media (pointer: coarse) { .photo-delete { opacity: 1; } }
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(5, 8, 12, .94); color: #fff; }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr; }
.lightbox::backdrop { background: rgba(5, 8, 12, .94); }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 64px); margin: auto; object-fit: contain; }
.lightbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: max(8px, env(safe-area-inset-top)) 8px 8px 16px; }
.lightbox .icon-button { color: #fff; }
.lightbox .icon-button:hover { background: rgba(255, 255, 255, .12); }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; }
.lightbox-nav.prev { left: 12px; }
.lightbox-nav.next { right: 12px; }

/* ---- Calls ---------------------------------------------------------------- */
.call-overlay { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: auto 1fr auto; background: #0D1117; color: #fff; }
.call-head { display: flex; align-items: center; gap: 10px; padding: max(10px, env(safe-area-inset-top)) 12px 10px; }
.call-head .icon-button { color: #fff; }
.call-head .icon-button:hover { background: rgba(255, 255, 255, .1); }
.call-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-timer { color: rgba(255, 255, 255, .7); font-variant-numeric: tabular-nums; }
.call-grid { display: grid; gap: 8px; padding: 0 8px; min-height: 0; grid-template-columns: 1fr; grid-auto-rows: 1fr; }
.call-grid[data-count="2"] { grid-template-rows: 1fr 1fr; }
.call-grid[data-count="3"], .call-grid[data-count="4"] { grid-template-columns: 1fr 1fr; }
.call-grid[data-count="5"], .call-grid[data-count="6"] { grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) {
  .call-grid { padding: 0 24px; gap: 12px; }
  .call-grid[data-count="2"] { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .call-grid[data-count="5"], .call-grid[data-count="6"] { grid-template-columns: repeat(3, 1fr); }
}
.call-tile { position: relative; min-height: 0; border-radius: 16px; overflow: hidden; background: #1C2430; display: grid; place-items: center; }
.call-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.call-tile.has-video video { opacity: 1; }
.call-tile.is-screen video { object-fit: contain; background: #000; }
.call-tile.is-me.is-mirrored video { transform: scaleX(-1); }
.call-tile.has-video .call-tile-avatar { visibility: hidden; }
.avatar.avatar-lg { width: 84px; height: 84px; font-size: 28px; background: rgba(255, 255, 255, .14); color: #fff; }
.call-tile-label { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; background: rgba(0, 0, 0, .5); font-size: 13px; font-weight: 650; }
.call-mic-off { display: inline-grid; color: #FF8A7A; }
.call-tile-state { position: absolute; top: 10px; left: 10px; right: 10px; padding: 4px 10px; border-radius: 8px; background: rgba(0, 0, 0, .5); text-align: center; }
.call-tile.is-failed .call-tile-state { background: rgba(185, 53, 36, .8); }
.call-controls { display: flex; justify-content: center; gap: 10px; padding: 14px 12px calc(14px + env(safe-area-inset-bottom)); }
.call-control { display: grid; justify-items: center; gap: 4px; min-width: 64px; padding: 10px 8px; border: 0; border-radius: 16px; background: rgba(255, 255, 255, .12); color: #fff; font-size: 12px; font-weight: 650; }
.call-control:hover { background: rgba(255, 255, 255, .2); }
.call-control.is-off { background: #fff; color: #0D1117; }
.call-control.is-on { background: var(--ok); }
.control-leave { background: #D93B2B; }
.control-leave:hover { background: #E5523F; }
.call-mini { display: none; }
.call-overlay.is-minimized { inset: auto 12px calc(var(--tabbar) + 12px + env(safe-area-inset-bottom)) auto; width: min(320px, calc(100vw - 24px)); grid-template-rows: auto; border-radius: 16px; box-shadow: var(--shadow); background: #11351F; }
.call-overlay.is-minimized > :not(.call-mini) { display: none; }
.call-overlay.is-minimized .call-grid { display: grid; position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.call-overlay.is-minimized .call-mini { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border: 0; background: none; color: #fff; text-align: left; }
.call-mini strong { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 960px) { .call-overlay.is-minimized { bottom: 24px; right: 24px; } }
.ring-card { position: fixed; z-index: 70; left: 50%; top: max(12px, env(safe-area-inset-top)); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; width: min(460px, calc(100vw - 24px)); padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); animation: sheet-up .25s ease-out; }
.ring-card .row-main { display: grid; min-width: 0; flex: 1; }

/* ---- Search palette --------------------------------------------------------- */
.palette { width: min(640px, calc(100vw - 24px)); max-height: min(70vh, 640px); margin: 10vh auto auto; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.palette[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.palette::backdrop { background: rgba(10, 14, 20, .45); }
.palette-bar { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette-input { flex: 1; border: 0 !important; outline: none !important; background: transparent !important; font-size: 17px; padding: 8px 4px !important; }
.palette-results { overflow-y: auto; padding: 6px; }
.palette-hint { padding: 14px 12px; }
.palette-heading { padding: 10px 10px 4px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.palette-option { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--ink); text-decoration: none !important; }
.palette-option .row-main { display: grid; min-width: 0; flex: 1; }
.palette-option strong, .palette-option .row-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-option.is-active, .palette-option:hover { background: color-mix(in srgb, var(--team) 12%, var(--surface)); }
.palette-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--sunk); color: var(--muted); flex: none; }

/* ---- Forms, approvals, expenses -------------------------------------------- */
.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.form-card { display: grid; gap: 6px; justify-items: start; width: 100%; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); text-align: left; }
.form-card:hover { border-color: var(--c); box-shadow: var(--shadow); }
.form-icon { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--c, var(--team)) 15%, var(--surface)); color: var(--c, var(--team)); }
.approval-pending { background: var(--cue-soft); color: var(--cue); }
.approval-approved, .approval-paid { background: var(--ok-soft); color: var(--ok); }
.approval-rejected { background: var(--danger-soft); color: var(--danger); }
.approval-cancelled { background: var(--sunk); color: var(--muted); }
.timeline { display: grid; gap: 0; }
.timeline-step { position: relative; display: flex; gap: 12px; padding-bottom: 18px; }
.timeline-step:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 2px; width: 2px; background: var(--line); }
.timeline-step .row-main { display: grid; gap: 2px; }
.timeline-dot { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--sunk); color: var(--muted); font-size: 13px; font-weight: 800; }
.timeline-step.is-approved .timeline-dot { background: var(--ok); color: #fff; }
.timeline-step.is-approved::before { background: var(--ok) !important; }
.timeline-step.is-rejected .timeline-dot, .timeline-step.is-cancelled .timeline-dot { background: var(--danger); color: #fff; }
.timeline-step.is-current .timeline-dot { background: var(--cue); color: #fff; box-shadow: 0 0 0 4px var(--cue-soft); }
.step-list, .field-list { display: grid; gap: 8px; counter-reset: step; }
.step-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; counter-increment: step; }
.step-row select { flex: 1; min-width: 140px; }
.step-number::before { content: counter(step); display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--sunk); font-size: 12px; font-weight: 800; }
.field-row { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.field-row-main { display: grid; grid-template-columns: minmax(0, 1fr) 130px auto; gap: 8px; align-items: center; }
.field-row-tools { justify-content: flex-end; }
@media (max-width: 520px) { .field-row-main { grid-template-columns: 1fr 1fr; } .field-row-main > :first-child { grid-column: 1 / -1; } }
.answers dd { white-space: pre-wrap; }
.expense-amount { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 4px; }
.expense-side { display: grid; justify-items: end; gap: 4px; font-variant-numeric: tabular-nums; }
.expense-cat { display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 11px; background: var(--sunk); color: var(--muted); }
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat-row > div { display: grid; padding: 10px 12px; border-radius: 12px; background: var(--paper); }
.stat-row strong { font-size: 18px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bars { display: grid; gap: 6px; }
.bars li { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 14px; }
.bar-track { height: 10px; border-radius: 99px; background: var(--sunk); overflow: hidden; }
.bar-track span { display: block; height: 100%; background: var(--team); border-radius: 99px; transform-origin: left; transform: scaleX(var(--to)); animation: meter .8s var(--ease-out) both; }
.bar-value { font-variant-numeric: tabular-nums; color: var(--muted); }

/* ---- Booking ---------------------------------------------------------------- */
.booking-mark { display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 11px; background: color-mix(in srgb, var(--c) 15%, var(--surface)); color: var(--c); }
.booking-row .row-side { flex-wrap: wrap; justify-content: flex-end; }
.booking-pending { background: var(--cue-soft); color: var(--cue); }
.booking-confirmed { background: var(--ok-soft); color: var(--ok); }
.booking-overdue, .booking-rejected { background: var(--danger-soft); color: var(--danger); }
.day-grid { display: grid; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.day-hours, .day-lane { display: grid; grid-template-columns: 120px minmax(560px, 1fr); align-items: center; gap: 8px; }
.day-hours > :last-child { display: none; }
.day-hours { grid-template-columns: 120px repeat(var(--hours), minmax(35px, 1fr)); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.day-lane-name { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-lane-track { position: relative; height: 40px; border-radius: 10px; cursor: copy;
  background: repeating-linear-gradient(90deg, var(--sunk) 0 calc(100% / var(--hours) - 1px), var(--line) calc(100% / var(--hours) - 1px) calc(100% / var(--hours))); }
.day-booking { position: absolute; top: 4px; bottom: 4px; left: calc(var(--l) * 100%); width: calc(var(--w) * 100%); min-width: 4px; padding: 0 6px; border-radius: 7px; background: var(--c); color: #fff; font-size: 11.5px; font-weight: 650; display: flex; align-items: center; overflow: hidden; white-space: nowrap; cursor: default; }
.day-booking.is-pending { background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--c) 55%, var(--surface)) 0 6px, color-mix(in srgb, var(--c) 35%, var(--surface)) 6px 12px); color: var(--ink); }
.day-booking.is-mine { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7); }
.day-booking span { overflow: hidden; text-overflow: ellipsis; }

/* ---- Templates -------------------------------------------------------------- */
.template-cards { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.template-card { position: relative; display: grid; gap: 2px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.template-card input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.template-card:has(input:checked) { border-color: var(--team); background: color-mix(in srgb, var(--team) 10%, var(--surface)); }
.template-card:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.template-preview { display: grid; gap: 4px; max-height: 260px; overflow-y: auto; padding: 8px; border-radius: 10px; background: var(--paper); font-size: 14px; }
.template-preview li { display: grid; grid-template-columns: 92px auto minmax(0, 1fr); align-items: center; gap: 8px; }
.template-offset { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.template-item { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 8px; }
.template-item summary { display: flex; justify-content: space-between; gap: 8px; cursor: pointer; }
.filters select, .filters input, .day-nav input { width: auto; min-width: 0; }
.day-nav { flex-wrap: nowrap; }
.palette-input::-webkit-search-cancel-button { display: none; }
.chat-empty { display: grid; justify-items: center; gap: 8px; padding: 48px 16px; color: var(--muted); text-align: center; }

/* ---- What's new (major releases) --------------------------------------------- */
.whats-new { width: min(560px, 100vw); max-width: none; max-height: min(92dvh, 860px); margin: auto; padding: 0; border: 0; border-radius: 22px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); overflow: hidden; }
.whats-new[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.whats-new::backdrop { background: rgba(8, 12, 20, .62); backdrop-filter: blur(4px); }
@media (max-width: 600px) { .whats-new { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; } }
.wn-hero { position: relative; overflow: hidden; padding: max(28px, env(safe-area-inset-top)) 28px 24px; background: linear-gradient(135deg, var(--team), color-mix(in srgb, var(--team) 55%, #7C3AED)); color: #fff; }
.wn-glow { position: absolute; inset: -40% -20% auto auto; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .35), transparent 65%); pointer-events: none; }
.wn-kicker { position: relative; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.wn-version { position: relative; display: flex; align-items: baseline; margin: 6px 0 4px; font-size: 64px; line-height: 1; font-weight: 900; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.wn-version span:first-child { font-size: 34px; margin-right: 4px; opacity: .8; }
.wn-title { position: relative; font-size: 24px; line-height: 1.3; }
.wn-lead { position: relative; margin-top: 6px; font-size: 15px; line-height: 1.6; opacity: .92; }
.wn-list { display: grid; gap: 4px; padding: 16px 16px 8px; overflow-y: auto; overscroll-behavior: contain; }
.wn-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px; border-radius: 14px; }
.wn-card:hover { background: var(--paper); }
.wn-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: color-mix(in srgb, var(--team) 13%, var(--surface)); color: var(--team); }
.wn-text { display: grid; gap: 2px; }
.wn-text span { font-size: 14px; line-height: 1.5; color: var(--muted); }
.wn-try { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.wn-foot { padding: 12px 20px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.wn-badge { display: inline-grid; place-items: center; min-width: 58px; padding: 4px 8px; border-radius: 8px; background: color-mix(in srgb, var(--team) 13%, var(--surface)); color: var(--team); font-weight: 800; font-size: 13px; }
.whats-new.is-animated[open] { animation: wn-in .5s var(--ease-out) both; }
.whats-new.is-animated .wn-version span { display: inline-block; animation: wn-digit .6s var(--ease-spring) both; animation-delay: calc(.25s + var(--c, 0) * 70ms); }
.whats-new.is-animated .wn-title, .whats-new.is-animated .wn-lead { animation: rise .5s var(--ease-out) .55s both; }
.whats-new.is-animated .wn-card { animation: rise .45s var(--ease-out) both; animation-delay: calc(.7s + var(--i) * 70ms); }
.whats-new.is-animated .wn-glow { animation: wn-glow 6s ease-in-out infinite alternate; }
.whats-new.is-leaving { animation: wn-out .26s ease-in both !important; }
@keyframes wn-in { from { opacity: 0; transform: translateY(24px) scale(.96); } }
@keyframes wn-out { to { opacity: 0; transform: translateY(16px) scale(.98); } }
@keyframes wn-digit { from { opacity: 0; transform: translateY(60%) scale(.6); } }
@keyframes wn-glow { to { transform: translate(-60px, 40px) scale(1.2); } }

/* ---- NEXELOGIC account (v0.2.8) ----------------------------------------------- */
.nexelink-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: #111827; color: #fff; border-color: #111827; text-decoration: none !important; }
.nexelink-button:hover { background: #1F2937; }
:root[data-theme="dark"] .nexelink-button { background: #F3F4F6; color: #111827; border-color: #F3F4F6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nexelink-button { background: #F3F4F6; color: #111827; border-color: #F3F4F6; } }
.nexelink-mark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, #2F6FED, #7C3AED); color: #fff; font-size: 13px; font-weight: 900; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
input.is-managed { background: var(--sunk); color: var(--muted); cursor: not-allowed; }
