/* Event OS design system: dark on-set theme, Promura brand, iOS feel */
:root {
  color-scheme: dark;
  --ink: #0a0a0a;
  --surface: #141414;
  --surface-2: #1c1c1e;
  --surface-3: #2c2c2e;
  --hairline: rgba(255, 255, 255, 0.08);
  --cream: #faf4eb;
  --muted: #8a8a8a;
  --muted-2: #5a5a5a;
  --pink: #ff3daa;
  --pink-deep: #d63d75;
  --pink-soft: rgba(255, 61, 170, 0.16);
  --success: #30d158;
  --warn: #ffd60a;
  --danger: #ff453a;
  --blue: #0a84ff;
  --r-lg: 18px;
  --r-md: 10px;
  --r-sm: 6px;
  --r-pill: 999px;
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, system-ui, sans-serif;
  --font-display: Fraunces, Georgia, "Times New Roman", serif;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --nav-h: 44px;
  --tab-h: 50px;
  --press: 120ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.35;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  position: fixed;
  inset: 0;
  width: 100%;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; touch-action: manipulation; }
img { display: block; max-width: 100%; }
a { color: var(--pink); }
::selection { background: var(--pink-soft); }
[hidden] { display: none !important; }

/* Press feedback (haptic feel) */
.pressable { transition: transform var(--press), opacity var(--press), background-color var(--press); }
.pressable:active { transform: scale(0.96); opacity: 0.85; }

/* ---------- App frame ---------- */
#app { position: fixed; inset: 0; display: flex; flex-direction: column; }

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  padding-top: var(--sat);
  height: calc(var(--nav-h) + var(--sat));
  display: flex; align-items: center; justify-content: space-between;
  padding-left: calc(16px + var(--sal)); padding-right: calc(16px + var(--sar));
  background: rgba(10, 10, 10, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid transparent;
  transition: border-color 200ms;
}
.nav.collapsed { border-bottom-color: var(--hairline); }
.nav .nav-title {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-weight: 600; font-size: 17px; letter-spacing: -0.2px;
  opacity: 0; transition: opacity 180ms; pointer-events: none;
  max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav.collapsed .nav-title { opacity: 1; }
.nav .nav-left, .nav .nav-right { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.wordmark {
  font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.3px; line-height: 26px;
  display: inline-flex; align-items: center; gap: 8px; color: var(--cream);
}
.wordmark img { width: 26px; height: 26px; border-radius: 7px; }
.wordmark .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--pink); margin-left: -4px; margin-top: 8px; }

#view {
  position: fixed; inset: 0; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-top: calc(var(--nav-h) + var(--sat));
  padding-bottom: calc(var(--tab-h) + var(--sab) + 16px);
  padding-left: var(--sal); padding-right: var(--sar);
  scroll-behavior: auto;
}
#view.no-chrome { padding-top: var(--sat); padding-bottom: var(--sab); }

.large-title {
  font-family: var(--font-display); font-weight: 700; font-size: 34px; letter-spacing: -0.5px; line-height: 1.1;
  margin: 8px 16px 12px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
}
.large-title .title-action { font-family: var(--font-ui); font-size: 15px; font-weight: 600; color: var(--pink); margin-bottom: 6px; min-height: 44px; display: inline-flex; align-items: center; padding: 0 4px; }
.subtitle { color: var(--muted); font-size: 13px; margin: -6px 16px 12px; }

/* Display font (Fraunces) loads non-blocking with display=swap. Every element that uses it pins its
   line-height, so the swap from the serif fallback can never move the layout. */

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px);
  background: rgba(20, 20, 20, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-top: 0.5px solid var(--hairline);
  display: flex; align-items: stretch;
}
.tabbar button {
  flex: 1 1 0; min-width: 0; height: var(--tab-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: 0.1px;
  position: relative;
}
.tabbar button svg { width: 26px; height: 26px; }
.tabbar button.active { color: var(--pink); }
.tabbar button:active { opacity: 0.6; }
.tabbar .badge {
  position: absolute; top: 4px; left: calc(50% + 6px);
  min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 17px; text-align: center;
}

/* ---------- Grouped cards ---------- */
.section-label {
  margin: 20px 32px 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between;
}
.section-label:first-child { margin-top: 4px; }
.section-label .mini-action { text-transform: none; letter-spacing: 0; color: var(--pink); font-weight: 600; min-height: 32px; display: inline-flex; align-items: center; font-size: 14px; }
.group {
  background: var(--surface); border-radius: var(--r-lg); margin: 0 16px 20px; overflow: hidden;
  border: 0.5px solid var(--hairline);
}
.group.pad { padding: 16px; }
.row {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 16px;
  width: 100%; text-align: left; color: inherit; position: relative;
}
.row + .row::before, .row + .row-form::before, .row-form + .row::before, .row-form + .row-form::before {
  content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 0.5px; background: var(--hairline);
}
.row.indent + .row::before { left: 64px; }
.row.pressable:active { background: var(--surface-2); transform: none; opacity: 1; }
.row .body { flex: 1 1 auto; min-width: 0; }
.row .title { font-size: 16px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .sub { font-size: 13px; color: var(--muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .trail { flex: 0 0 auto; color: var(--muted); font-size: 15px; display: flex; align-items: center; gap: 6px; }
.chev { width: 8px; height: 13px; flex: 0 0 auto; color: var(--muted-2); }
.row-form { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 16px; position: relative; }
.row-form label { flex: 0 0 auto; color: var(--cream); font-size: 16px; min-width: 96px; }
.row-form input, .row-form select { flex: 1 1 auto; min-width: 0; text-align: right; min-height: 40px; }

/* ---------- Inputs ---------- */
input[type="text"], input[type="search"], input[type="tel"], input[type="password"], input[type="time"], input[type="number"], input[type="date"], textarea, select {
  -webkit-appearance: none; appearance: none;
  background: transparent; border: 0; outline: 0; color: var(--cream); font-size: 16px; min-height: 44px; padding: 0;
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
.field {
  background: var(--surface-2); border-radius: var(--r-md); padding: 0 14px; min-height: 48px; display: flex; align-items: center; gap: 10px;
  border: 0.5px solid var(--hairline);
}
.field input, .field select { flex: 1 1 auto; width: 100%; text-align: left; }
.field.multiline { padding: 10px 14px; align-items: flex-start; }
.field textarea { width: 100%; min-height: 96px; resize: none; line-height: 1.4; }
.field:focus-within { border-color: rgba(255, 61, 170, 0.6); }
.field-label { font-size: 13px; color: var(--muted); margin: 14px 4px 6px; font-weight: 500; }
.pin-input { letter-spacing: 8px; font-size: 24px !important; font-weight: 600; text-align: center !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px;
  background: var(--pink); color: #fff; font-weight: 600; font-size: 16px; letter-spacing: -0.1px;
  transition: transform var(--press), opacity var(--press), background-color var(--press);
  white-space: nowrap; user-select: none; -webkit-user-select: none;
}
.btn:active { transform: scale(0.96); }
.btn.secondary { background: var(--surface-3); color: var(--cream); }
.btn.soft { background: var(--pink-soft); color: var(--pink); }
.btn.ghost { background: transparent; color: var(--pink); }
.btn.danger { background: rgba(255, 69, 58, 0.16); color: var(--danger); }
.btn.danger.solid { background: var(--danger); color: #fff; }
.btn.success { background: rgba(48, 209, 88, 0.16); color: var(--success); }
.btn.block { width: 100%; }
.btn.big { min-height: 56px; font-size: 18px; border-radius: 16px; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn[disabled], .btn.busy { opacity: 0.55; pointer-events: none; }
.btn.busy::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row .btn { flex: 1 1 auto; padding: 0 10px; }
.icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 22px; color: var(--pink); }
.icon-btn svg { width: 24px; height: 24px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Segmented control ---------- */
.seg { display: flex; background: var(--surface-2); border-radius: 10px; padding: 2px; margin: 0 16px 14px; gap: 2px; }
.seg.tight { margin: 0; }
.seg button {
  flex: 1 1 0; min-width: 0; min-height: 40px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background-color 160ms, color 160ms;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.seg button.active { background: var(--surface-3); color: var(--cream); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); }
.seg button .dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }

/* ---------- Chips ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; min-height: 36px; padding: 0 14px; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--muted); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px;
  border: 0.5px solid var(--hairline);
}
.chip.active { background: var(--pink-soft); color: var(--pink); border-color: rgba(255, 61, 170, 0.35); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 700; letter-spacing: 0.2px; line-height: 1.3; white-space: nowrap;
}
.pill.pink { background: var(--pink-soft); color: var(--pink); }
.pill.green { background: rgba(48, 209, 88, 0.16); color: var(--success); }
.pill.yellow { background: rgba(255, 214, 10, 0.16); color: var(--warn); }
.pill.red { background: rgba(255, 69, 58, 0.16); color: var(--danger); }
.pill.gray { background: var(--surface-3); color: var(--muted); }
.pill.blue { background: rgba(10, 132, 255, 0.16); color: #6fb2ff; }
.pill svg { width: 12px; height: 12px; }
.pill .live-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.4s ease-in-out infinite; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }
.tag.commander { background: rgba(214, 61, 117, 0.25); color: #ff7fc4; }
.tag.photographer { background: rgba(94, 92, 230, 0.25); color: #a5a3ff; }
.tag.staff { background: rgba(172, 142, 104, 0.25); color: #d9bc95; }
.tag.creator { background: var(--pink-soft); color: var(--pink); }

/* Connection pill */
.conn { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 0.5px solid var(--hairline); }
.conn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); }
.conn.live .dot { background: var(--success); box-shadow: 0 0 0 3px rgba(48, 209, 88, 0.2); }
.conn.reconnecting .dot { background: var(--warn); animation: pulse 1s ease-in-out infinite; }
.conn.offline { color: var(--danger); }
.conn.offline .dot { background: var(--danger); }

/* ---------- Avatars / bubbles ---------- */
.bubble {
  position: relative; width: 64px; height: 64px; border-radius: 50%; flex: 0 0 auto;
  background: var(--surface-3); display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--cream); font-size: 22px; overflow: visible;
}
.bubble img, .bubble .initials { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: flex; align-items: center; justify-content: center; }
.bubble .initials { background: linear-gradient(160deg, #2c2c2e, #1c1c1e); }
.bubble .initials svg, .bubble > svg { width: 50%; height: 50%; }
.bubble.xs { width: 24px; height: 24px; font-size: 10px; }
.bubble.sm { width: 36px; height: 36px; font-size: 13px; }
.bubble.md { width: 44px; height: 44px; font-size: 15px; }
.bubble.lg { width: 72px; height: 72px; font-size: 24px; }
.bubble.xl { width: 96px; height: 96px; font-size: 32px; }
.bubble.ring::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 2.5px solid var(--pink); box-shadow: 0 0 18px rgba(255, 61, 170, 0.45);
}
.bubble.ring .pulse {
  position: absolute; right: 1px; bottom: 1px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--pink); border: 2.5px solid var(--ink); z-index: 2; animation: pulse 1.4s ease-in-out infinite;
}
.bubble .status-dot { position: absolute; right: 1px; bottom: 1px; width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid var(--surface); }
.bubble.lg .status-dot { width: 16px; height: 16px; right: 2px; bottom: 2px; }
.status-onsite { background: var(--success); }
.status-shooting { background: var(--pink); }
.status-break { background: var(--warn); }
.status-offsite { background: var(--muted-2); }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: 0.55; } }
.bubble-stack { display: flex; align-items: center; }
.bubble-stack .bubble { margin-left: -8px; border: 2px solid var(--surface); }
.bubble-stack .bubble:first-child { margin-left: 0; }
.bubble-col { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 88px; text-align: center; }
.bubble-col .name { font-size: 13px; font-weight: 600; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bubble-col .role { font-size: 11px; color: var(--muted); }

/* ---------- Now tab ---------- */
.hero { margin: 0 16px 16px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.hero .event-name { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--muted); letter-spacing: 0.1px; line-height: 1.3; }
.hero .clock { font-size: 44px; font-weight: 700; letter-spacing: -1.5px; line-height: 1; font-variant-numeric: tabular-nums; margin-top: 4px; }
.hero .clock small { font-size: 16px; letter-spacing: 0; color: var(--muted); font-weight: 600; margin-left: 4px; }
.hero .right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.stat-strip { display: flex; gap: 8px; padding: 0 16px 16px; }
.stat-strip::-webkit-scrollbar { display: none; }
.stat { flex: 1 1 0; min-width: 0; background: var(--surface); border: 0.5px solid var(--hairline); border-radius: 12px; padding: 10px 10px; }
.stat .n { font-size: 20px; font-weight: 700; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600; margin-top: 2px; }

.station-card { position: relative; }
.station-card.is-live { border-color: rgba(255, 61, 170, 0.35); box-shadow: 0 0 0 0.5px rgba(255, 61, 170, 0.25), 0 12px 40px -20px rgba(255, 61, 170, 0.6); }
.station-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 10px; }
.station-head .names { flex: 1 1 auto; min-width: 0; }
.station-head .st-name { font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.station-head .st-name .dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.station-head .st-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-block { padding: 6px 16px 16px; display: flex; align-items: center; gap: 14px; }
.live-block .creators { display: flex; gap: 16px; flex: 0 0 auto; padding: 6px 0 6px 4px; }
.live-block .info { flex: 1 1 auto; min-width: 0; }
.live-block .slot-title { font-size: 17px; font-weight: 600; margin: 4px 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-block .timers { display: flex; flex-wrap: wrap; gap: 6px; }
.live-block .timers .pill { font-variant-numeric: tabular-nums; font-size: 13px; }
.idle-block { padding: 6px 16px 14px; color: var(--muted); font-size: 15px; display: flex; align-items: center; gap: 10px; }
.idle-block .ghost-bubble { width: 44px; height: 44px; border-radius: 50%; border: 1.5px dashed var(--muted-2); flex: 0 0 auto; }
.upnext { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 0.5px solid var(--hairline); background: rgba(255, 255, 255, 0.02); }
.upnext .label { font-size: 11px; font-weight: 700; letter-spacing: 0.5px; color: var(--muted); text-transform: uppercase; white-space: nowrap; }
.upnext .info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.upnext .t { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.upnext .countdown { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 15px; color: var(--pink); white-space: nowrap; }
.upnext .countdown.soon { color: var(--warn); }
.upnext .countdown.late { color: var(--danger); }
.actions { display: flex; gap: 8px; padding: 12px 16px 16px; border-top: 0.5px solid var(--hairline); flex-wrap: wrap; }
.actions .btn { flex: 1 1 auto; min-width: 0; padding: 0 10px; font-size: 15px; }
.actions .btn.narrow { flex: 0 0 auto; min-width: 56px; }

/* ---------- Empty / skeleton ---------- */
.empty { text-align: center; padding: 36px 24px; color: var(--muted); }
.empty .ico { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 18px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.empty .ico svg { width: 28px; height: 28px; }
.empty h3 { margin: 0 0 4px; font-size: 17px; color: var(--cream); font-weight: 600; }
.empty p { margin: 0 0 14px; font-size: 14px; }
.skel { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 8px; }
.skel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.06) 50%, transparent 100%);
  transform: translateX(-100%); animation: shimmer 1.3s ease-in-out infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.skel.line { height: 14px; margin: 8px 0; }
.skel.circle { border-radius: 50%; }

/* ---------- Schedule / timeline ---------- */
.day-strip { display: flex; gap: 8px; padding: 0 16px 12px; overflow-x: auto; scrollbar-width: none; }
.day-strip::-webkit-scrollbar { display: none; }
.day-pill { flex: 0 0 auto; min-width: 62px; min-height: 60px; border-radius: 14px; background: var(--surface); border: 0.5px solid var(--hairline); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); }
.day-pill .dow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.day-pill .dom { font-size: 20px; font-weight: 700; color: var(--cream); letter-spacing: -0.5px; }
.day-pill.active { background: var(--pink); border-color: var(--pink); color: rgba(255, 255, 255, 0.85); }
.day-pill.active .dom { color: #fff; }
.day-pill.today:not(.active) .dom { color: var(--pink); }

.station-swipe { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; gap: 16px; padding: 0 16px; }
.station-swipe::-webkit-scrollbar { display: none; }
.station-col { flex: 0 0 100%; width: 100%; scroll-snap-align: center; min-width: 0; }
.timeline { position: relative; background: var(--surface); border: 0.5px solid var(--hairline); border-radius: var(--r-lg); overflow: hidden; }
.tl-hour { position: absolute; left: 0; right: 0; height: 0; border-top: 0.5px solid var(--hairline); }
.tl-hour span { position: absolute; left: 10px; top: 4px; font-size: 11px; color: var(--muted-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.tl-now { position: absolute; left: 0; right: 0; height: 0; border-top: 1.5px solid var(--danger); z-index: 3; pointer-events: none; }
.tl-now::before { content: ""; position: absolute; left: 0; top: -5px; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); }
.tl-slot {
  position: absolute; left: 52px; right: 8px; border-radius: 10px; padding: 6px 10px; text-align: left;
  background: var(--surface-2); border: 0.5px solid var(--hairline); border-left-width: 3px; overflow: hidden;
  display: flex; align-items: flex-start; gap: 8px; color: inherit; width: auto;
  transition: transform var(--press);
}
.tl-slot:active { transform: scale(0.98); }
.tl-slot .body { flex: 1 1 auto; min-width: 0; }
.tl-slot .t { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.tl-slot .t svg { width: 13px; height: 13px; flex: 0 0 auto; color: var(--muted); }
.tl-slot .times { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-slot .times s { color: var(--muted-2); margin-right: 4px; }
.tl-slot .times .drift { color: var(--warn); font-weight: 600; }
.tl-slot .badges { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.tl-slot.scheduled { border-left-color: var(--blue); }
.tl-slot.live { border-left-color: var(--pink); background: var(--pink-soft); box-shadow: 0 0 0 0.5px rgba(255, 61, 170, 0.4); }
.tl-slot.done { border-left-color: var(--success); opacity: 0.6; }
.tl-slot.skipped { border-left-color: var(--muted-2); opacity: 0.5; }
.tl-slot.skipped .t { text-decoration: line-through; }
.tl-slot.locked { border-left-color: var(--warn); background: repeating-linear-gradient(135deg, var(--surface-2) 0 8px, #202022 8px 16px); }
.tl-slot.conflict { border-color: rgba(255, 69, 58, 0.5); }
.tl-slot .bubble-stack { flex: 0 0 auto; }
.tl-slot .bubble-stack .bubble { border-color: var(--surface-2); }
.legend { display: flex; gap: 12px; padding: 10px 16px 0; color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------- People ---------- */
.people-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 8px; padding: 8px 16px 20px; }
.person-cell { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; min-width: 0; color: inherit; width: 100%; padding: 4px 0; border-radius: 12px; }
.person-cell .name { font-size: 13px; font-weight: 600; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-cell .meta { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Inbox ---------- */
.msg { display: flex; gap: 12px; padding: 12px 16px; position: relative; }
.msg + .msg::before { content: ""; position: absolute; top: 0; left: 64px; right: 0; height: 0.5px; background: var(--hairline); }
.msg .body { flex: 1 1 auto; min-width: 0; }
.msg .who { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.msg .who b { font-size: 15px; font-weight: 600; }
.msg .who time { font-size: 12px; color: var(--muted); flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.msg .text { font-size: 15px; margin-top: 2px; white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; line-height: 1.4; }
.msg.announcement { background: linear-gradient(180deg, rgba(255, 61, 170, 0.08), transparent); }
.msg.announcement .who b::before { content: "PINNED"; font-size: 10px; color: var(--pink); font-weight: 800; letter-spacing: 0.5px; margin-right: 8px; vertical-align: 1px; }
.msg.system .text { color: var(--muted); font-style: italic; }
.msg.system .bubble { background: var(--surface-2); }
.request { padding: 12px 16px; position: relative; }
.request + .request::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 0.5px; background: var(--hairline); }
.request .head { display: flex; align-items: center; gap: 10px; }
.request .head .body { flex: 1 1 auto; min-width: 0; }
.request .note { font-size: 15px; margin: 8px 0 10px; white-space: pre-wrap; word-break: break-word; }
.fab { position: fixed; right: calc(16px + var(--sar)); bottom: calc(var(--tab-h) + var(--sab) + 16px); z-index: 25; width: 56px; height: 56px; border-radius: 28px; background: var(--pink); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px -8px rgba(255, 61, 170, 0.7); }
.fab svg { width: 26px; height: 26px; }

/* ---------- Me ---------- */
.me-hero { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 16px 18px; text-align: center; }
.me-hero .avatar-btn { position: relative; border-radius: 50%; }
.me-hero .avatar-btn .cam { position: absolute; right: -2px; bottom: -2px; width: 32px; height: 32px; border-radius: 16px; background: var(--pink); border: 3px solid var(--ink); display: flex; align-items: center; justify-content: center; color: #fff; }
.me-hero .avatar-btn .cam svg { width: 16px; height: 16px; }
.me-hero .nm { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.me-hero .hd { font-size: 14px; color: var(--muted); }
.clock-card { margin: 0 16px 20px; border-radius: var(--r-lg); padding: 18px 16px; background: linear-gradient(160deg, #1b1218, #141414); border: 0.5px solid var(--hairline); text-align: center; }
.clock-card .timer { font-size: 40px; font-weight: 700; letter-spacing: -1.5px; font-variant-numeric: tabular-nums; line-height: 1; margin: 2px 0 4px; }
.clock-card .lbl { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.clock-card .btn { margin-top: 14px; }
.check { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--muted-2); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; color: transparent; transition: background-color 120ms, border-color 120ms; }
.check.on { background: var(--pink); border-color: var(--pink); color: #fff; }
.check svg { width: 14px; height: 14px; }
.row.done .title { text-decoration: line-through; color: var(--muted); }

/* ---------- Join ---------- */
.join { padding: 24px 20px 40px; max-width: 480px; margin: 0 auto; }
.join .brand { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 24px 0 20px; }
.join .brand img { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 20px 50px -20px rgba(255, 61, 170, 0.5); }
.join h1 { font-family: var(--font-display); font-weight: 700; font-size: 32px; letter-spacing: -0.5px; margin: 0; line-height: 1.15; }
.join .lead { color: var(--muted); font-size: 15px; text-align: center; margin: 0 0 22px; }
.role-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 6px; }
.role-card { min-height: 92px; border-radius: 16px; background: var(--surface); border: 1px solid var(--hairline); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.role-card svg { width: 28px; height: 28px; }
.role-card.active { background: var(--pink-soft); border-color: var(--pink); color: var(--pink); }
.link-btn { color: var(--pink); font-weight: 600; font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; }
.join .switcher { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 10px; }

/* ---------- Sheets ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.55); opacity: 0; transition: opacity 240ms; }
.sheet-backdrop.open { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51;
  background: var(--surface-2); border-radius: 18px 18px 0 0;
  max-height: calc(100% - var(--sat) - 24px); display: flex; flex-direction: column;
  transform: translateY(102%); transition: transform 320ms cubic-bezier(0.32, 0.72, 0, 1);
  padding-bottom: var(--sab); box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}
.sheet.open { transform: translateY(0); }
.sheet .grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--muted-2); margin: 8px auto 0; }
.sheet .sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px 6px; min-height: 52px; }
.sheet .sheet-head h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.3px; font-family: var(--font-display); line-height: 1.2; }
.sheet .sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 16px 16px; }
.sheet .sheet-body .group { margin-left: 0; margin-right: 0; background: var(--surface); }
.sheet .sheet-body .section-label { margin-left: 16px; margin-right: 16px; }
.sheet .sheet-body .seg { margin-left: 0; margin-right: 0; }
.sheet .sheet-foot { padding: 10px 16px 12px; display: flex; gap: 10px; }
.sheet .sheet-foot .btn { flex: 1 1 auto; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; font-size: 15px; position: relative; }
.kv + .kv::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 0.5px; background: var(--hairline); }
.kv .k { color: var(--muted); flex: 0 0 auto; }
.kv .v { text-align: right; min-width: 0; overflow-wrap: anywhere; }

/* ---------- Toast ---------- */
.toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + var(--sab) + 14px); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast {
  background: rgba(44, 44, 46, 0.92); color: var(--cream); padding: 10px 16px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); max-width: 100%;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  animation: toast-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1); display: flex; align-items: center; gap: 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.toast.error { background: rgba(255, 69, 58, 0.92); color: #fff; }
.toast.success { background: rgba(48, 209, 88, 0.9); color: #04250f; }
.toast.out { animation: toast-out 200ms forwards; }
@keyframes toast-in { from { transform: translateY(12px) scale(0.96); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toast-out { to { transform: translateY(8px); opacity: 0; } }

/* ---------- Misc ---------- */
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; }
.small { font-size: 13px; }
.center { text-align: center; }
.spacer { height: 8px; }
.color-swatches { display: flex; gap: 10px; flex-wrap: wrap; padding: 6px 0; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 3px solid transparent; }
.swatch.active { border-color: var(--cream); }
.import-result { font-size: 14px; padding: 8px 0 0; color: var(--muted); }
.import-result b { color: var(--cream); }
.audit-line { font-size: 13px; padding: 8px 16px; position: relative; display: flex; gap: 10px; }
.audit-line + .audit-line::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 0.5px; background: var(--hairline); }
.audit-line time { color: var(--muted); flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.audit-line span { min-width: 0; overflow-wrap: anywhere; }
.list-note { font-size: 13px; color: var(--muted); padding: 0 32px 12px; margin-top: -12px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
@media (min-width: 700px) {
  #view, .nav, .tabbar, .toasts, .sheet { left: 50%; right: auto; width: 640px; transform: translateX(-50%); }
  .sheet { transform: translate(-50%, 102%); }
  .sheet.open { transform: translate(-50%, 0); }
  .fab { right: calc(50% - 320px + 16px); }
}
