/* Headquarters web app. One token system, light and dark (see DESIGN.md). */
@font-face { font-family: "Inter"; src: url(/fonts/InterVariable.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --page: #FDFDFD;
  --card: #FFFFFF;
  --well: #F6F6F6;
  --chip: #F4F4F4;
  --chip-hover: #EEEEEE;
  --chip-press: #EAE9E9;
  --ink: #17181C;
  --ink-2: #3B3D45;
  --muted: #5E6073;
  --faint: #A3A5B0;
  --dots: #C9CDD4;
  --line: #EEEEEE;
  --border: rgba(0, 0, 0, .06);
  --on-ink: #FDFDFD;
  --accent: #0073E5;
  --accent-soft: rgba(0, 115, 229, .09);
  --ok: #1F9D55; --ok-soft: rgba(31, 157, 85, .10);
  --warn: #B76E00; --warn-soft: rgba(183, 110, 0, .10);
  --bad: #D93036; --bad-soft: rgba(217, 48, 54, .09);
  --glass: rgba(253, 253, 253, .78);
  --glass-chip: rgba(255, 255, 255, .72);
  --scrim: rgba(23, 24, 28, .28);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, .04);
  --shadow-menu: 0 0 0 1px rgba(0, 0, 0, .06), 0 2px 6px rgba(0, 0, 0, .05), 0 4px 42px rgba(0, 0, 0, .06);
  --shadow-lift: 0 0 0 1px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06), 0 24px 64px rgba(0, 0, 0, .06);
  --aurora-o: .38;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;

  --r-pill: 999px; --r-card: 24px; --r-well: 16px; --r-tile: 12px; --r-small: 8px;
  --gutter: 16px;
  --max: 1240px;

  --dur-micro: 80ms; --dur-quick: 150ms; --dur-fast: 250ms; --dur-med: 350ms; --dur-slow: 400ms; --dur-xslow: 500ms;
  --stagger: 40ms;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-bounce: cubic-bezier(.34, 1.36, .64, 1);
  --ease-close: cubic-bezier(.4, 0, .2, 1);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #121212; --card: #181818; --well: #1F1F1F;
  --chip: rgba(255, 255, 255, .07); --chip-hover: rgba(255, 255, 255, .10); --chip-press: rgba(255, 255, 255, .08);
  --ink: #EDEDED; --ink-2: #CFCFD2; --muted: #8E8E93; --faint: #5C5C61; --dots: #3A3A3E;
  --line: rgba(255, 255, 255, .08); --border: rgba(255, 255, 255, .08);
  --on-ink: #121212;
  --accent: #55CFFF; --accent-soft: rgba(85, 207, 255, .12);
  --ok: #4ADE80; --ok-soft: rgba(74, 222, 128, .12);
  --warn: #FBBF24; --warn-soft: rgba(251, 191, 36, .12);
  --bad: #FF6166; --bad-soft: rgba(255, 97, 102, .12);
  --glass: rgba(18, 18, 18, .72); --glass-chip: rgba(255, 255, 255, .08);
  --scrim: rgba(0, 0, 0, .55);
  --shadow-card: none;
  --shadow-menu: 0 0 0 1px rgba(255, 255, 255, .08), 0 2px 6px rgba(0, 0, 0, .3), 0 4px 42px rgba(0, 0, 0, .24);
  --shadow-lift: 0 0 0 1px rgba(255, 255, 255, .06), 0 24px 64px rgba(0, 0, 0, .5);
  --aurora-o: .6;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #121212; --card: #181818; --well: #1F1F1F;
    --chip: rgba(255, 255, 255, .07); --chip-hover: rgba(255, 255, 255, .10); --chip-press: rgba(255, 255, 255, .08);
    --ink: #EDEDED; --ink-2: #CFCFD2; --muted: #8E8E93; --faint: #5C5C61; --dots: #3A3A3E;
    --line: rgba(255, 255, 255, .08); --border: rgba(255, 255, 255, .08);
    --on-ink: #121212;
    --accent: #55CFFF; --accent-soft: rgba(85, 207, 255, .12);
    --ok: #4ADE80; --ok-soft: rgba(74, 222, 128, .12);
    --warn: #FBBF24; --warn-soft: rgba(251, 191, 36, .12);
    --bad: #FF6166; --bad-soft: rgba(255, 97, 102, .12);
    --glass: rgba(18, 18, 18, .72); --glass-chip: rgba(255, 255, 255, .08);
    --scrim: rgba(0, 0, 0, .55);
    --shadow-card: none;
    --shadow-menu: 0 0 0 1px rgba(255, 255, 255, .08), 0 2px 6px rgba(0, 0, 0, .3), 0 4px 42px rgba(0, 0, 0, .24);
    --shadow-lift: 0 0 0 1px rgba(255, 255, 255, .06), 0 24px 64px rgba(0, 0, 0, .5);
    --aurora-o: .6;
  }
}
@media (min-width: 720px) { :root { --gutter: 24px; } }
@media (min-width: 1100px) { :root { --gutter: 32px; } }

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 400 15px/1.5 var(--sans); letter-spacing: -.006em;
  font-optical-sizing: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; min-height: 100dvh;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 600px; }

/* ---------------------------------------------------------------- type */
.display, .title, .heading { margin: 0; font-weight: 500; color: var(--ink); text-wrap: balance; }
.display { font-size: clamp(34px, 6.2vw, 56px); line-height: 1.04; letter-spacing: -.035em; }
.title { font-size: clamp(26px, 4vw, 34px); line-height: 1.1; letter-spacing: -.028em; }
.heading { font-size: 20px; line-height: 1.2; letter-spacing: -.018em; }
.tt .tail, .muted { color: var(--muted); }
.lede { font-size: 17px; line-height: 1.5; color: var(--muted); letter-spacing: -.01em; margin: 0; max-width: 56ch; }
.label { font-size: 13px; font-weight: 500; letter-spacing: -.005em; color: var(--muted); }
.small { font-size: 13px; }
.caption { font-size: 12px; font-weight: 500; color: var(--muted); }
p { margin: 0; }
.prose { font-size: 15px; line-height: 1.6; color: var(--ink-2); white-space: pre-line; }

/* The voice line: words arrive one at a time, from dim and soft to sharp. */
.w { display: inline-block; white-space: pre; }
.w.em { font-weight: 600; }
/* The typewriter: characters hold their place while hidden, so the line never reflows as it types. */
.voice:not(.typed) .ch { visibility: hidden; }
.voice .ch.on { visibility: visible; }
.voice.typing { cursor: pointer; }
.caret { position: relative; display: inline-block; width: 0; height: .9em; vertical-align: -.08em; pointer-events: none; }
.caret::after { content: ""; position: absolute; left: .04em; top: 0; bottom: 0; width: max(1.5px, .055em); border-radius: 1px; background: var(--ink); }
.caret.idle::after { animation: caret-blink 1s steps(1) infinite; }
.caret.gone { opacity: 0; transition: opacity 300ms var(--ease); }
@keyframes caret-blink { 50% { opacity: 0; } }

/* Entrances: opacity + travel + a little blur, staggered. */
.rise { animation: rise var(--dur-xslow) var(--ease) both; animation-delay: calc(var(--i, 0) * var(--stagger) + 60ms); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); filter: blur(3px); } to { opacity: 1; transform: none; filter: blur(0); } }
.fade { animation: fadein var(--dur-fast) var(--ease) both; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.leaving { animation: leave var(--dur-quick) var(--ease-close) both; }
@keyframes leave { to { opacity: 0; transform: translateY(-4px); filter: blur(2px); } }

/* ---------------------------------------------------------------- icons */
.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.i.sm { width: 16px; height: 16px; } .i.xs { width: 14px; height: 14px; } .i.lg { width: 22px; height: 22px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap;
  background: var(--chip); color: var(--ink);
  transition: transform var(--dur-quick) var(--ease), background-color var(--dur-quick) var(--ease), opacity var(--dur-quick) var(--ease), color var(--dur-quick) var(--ease);
}
.btn:hover { background: var(--chip-hover); }
.btn:active { transform: scale(.97); background: var(--chip-press); }
.btn.primary { background: var(--ink); color: var(--on-ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--ink) 88%, var(--page)); }
.btn.accent { background: var(--accent-soft); color: var(--accent); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--chip); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.ok { background: var(--ok-soft); color: var(--ok); }
.btn.lg { height: 48px; padding: 0 24px; font-size: 15px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.busy { opacity: .45; pointer-events: none; }
.btn.busy::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1.6px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: var(--chip); color: var(--ink);
  transition: transform var(--dur-quick) var(--ease), background-color var(--dur-quick) var(--ease);
}
.icon-btn:hover { background: var(--chip-hover); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.glass { background: var(--glass); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); box-shadow: 0 0 0 1px var(--border); }
.icon-btn.lg { width: 44px; height: 44px; }

/* ---------------------------------------------------------------- chips, pills, segmented */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter); scroll-padding: 0 var(--gutter); }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: var(--r-pill);
  background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink);
  font-size: 13px; font-weight: 500; white-space: nowrap; flex: none;
  transition: background-color var(--dur-quick) var(--ease), color var(--dur-quick) var(--ease), transform var(--dur-quick) var(--ease), box-shadow var(--dur-quick) var(--ease);
}
.chip:hover { background: var(--chip); }
.chip:active { transform: scale(.96); }
.chip .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.chip[aria-pressed="true"] .n { color: color-mix(in srgb, var(--on-ink) 60%, transparent); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 500; background: var(--chip); color: var(--ink-2); white-space: nowrap; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }
.pill.glass { background: var(--glass); color: var(--ink); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.pill.live .dot { animation: pulse 1.6s var(--ease) infinite; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.8); } }

.seg { position: relative; display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--chip); gap: 2px; }
.seg button { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: var(--r-pill); font-size: 13px; font-weight: 500; color: var(--muted); transition: color var(--dur-fast) var(--ease); }
.seg button[aria-pressed="true"] { color: var(--ink); }
.seg .knob { position: absolute; z-index: 0; top: 3px; bottom: 3px; border-radius: var(--r-pill); background: var(--card); box-shadow: 0 0 0 1px var(--border), 0 1px 3px rgba(0, 0, 0, .06); transition: transform var(--dur-med) var(--ease-bounce), width var(--dur-med) var(--ease); }
:root[data-theme="dark"] .seg .knob { background: rgba(255, 255, 255, .12); box-shadow: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg .knob { background: rgba(255, 255, 255, .12); box-shadow: none; } }

/* ---------------------------------------------------------------- surfaces */
.card { background: var(--card); border-radius: var(--r-card); box-shadow: 0 0 0 1px var(--border), var(--shadow-card); }
.card.pad { padding: 20px; }
.well { background: var(--well); border-radius: var(--r-tile); }
.hr { height: 1px; background: var(--line); border: 0; margin: 0; }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row.top { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- avatar */
.av { position: relative; flex: none; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; background: var(--chip); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--muted); }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.sm { width: 24px; height: 24px; font-size: 10px; } .av.md { width: 44px; height: 44px; font-size: 15px; } .av.lg { width: 72px; height: 72px; font-size: 22px; } .av.xl { width: 112px; height: 112px; font-size: 32px; }
.avs { display: inline-flex; } .avs .av { box-shadow: 0 0 0 2px var(--card); } .avs .av + .av { margin-left: -8px; }

/* photos fade in once loaded */
img[data-photo], img[data-src] { opacity: 0; transition: opacity var(--dur-slow) var(--ease); }
img.loaded { opacity: 1; }

/* ---------------------------------------------------------------- app chrome */
.top {
  position: sticky; top: 0; z-index: 40; height: 64px;
  background: var(--glass); backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid transparent; transition: border-color var(--dur-fast) var(--ease);
}
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { height: 100%; display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; letter-spacing: -.02em; }
.brand .mark { width: 28px; height: 28px; border-radius: 9px; display: block; background: url(/app/tile.png) center / cover, #16131F; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.brand .mark svg { display: none; }
.nav { display: none; gap: 2px; margin-left: 20px; }
.nav a { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: var(--r-pill); font-size: 14px; font-weight: 500; color: var(--muted); transition: color var(--dur-quick) var(--ease), background-color var(--dur-quick) var(--ease); }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--chip); }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--page); font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.top .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.me-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 4px 0 4px; border-radius: var(--r-pill); transition: background-color var(--dur-quick) var(--ease); }
.me-btn:hover { background: var(--chip); }
.me-btn .name { display: none; font-size: 14px; font-weight: 500; padding-right: 10px; }
@media (min-width: 900px) { .nav { display: flex; } .me-btn { padding-left: 4px; } .me-btn .name { display: inline; } }

.tabs {
  position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: space-between; height: 62px; padding: 6px;
  border-radius: var(--r-pill); background: var(--glass); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: 0 0 0 1px var(--border), 0 8px 32px rgba(0, 0, 0, .10);
}
:root[data-theme="dark"] .tabs { background: rgba(255, 255, 255, .08); box-shadow: 0 0 0 1px rgba(255, 255, 255, .10), 0 12px 40px rgba(0, 0, 0, .5); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabs { background: rgba(255, 255, 255, .08); box-shadow: 0 0 0 1px rgba(255, 255, 255, .10), 0 12px 40px rgba(0, 0, 0, .5); } }
.tabs .tab-knob { position: absolute; left: 0; top: 6px; bottom: 6px; border-radius: var(--r-pill); background: var(--ink); opacity: 0; transition: transform var(--dur-xslow) var(--ease-bounce), width var(--dur-xslow) var(--ease-bounce), opacity var(--dur-fast) var(--ease); }
.tabs a { position: relative; z-index: 1; flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 0; height: 50px; border-radius: var(--r-pill); color: var(--muted); -webkit-tap-highlight-color: transparent; transition: color var(--dur-fast) var(--ease), transform var(--dur-quick) var(--ease) }
.tabs a:active { transform: scale(.94); }
.tabs a[aria-current="page"] { flex-grow: 1.9; color: var(--on-ink); gap: 7px; }
.tabs .ic { position: relative; display: inline-grid; place-items: center; }
.tabs .ic .i { width: 22px; height: 22px; stroke-width: 1.5; }
.tabs .tl { max-width: 0; overflow: hidden; white-space: nowrap; font-size: 13px; font-weight: 600; letter-spacing: -.01em; opacity: 0; transition: max-width var(--dur-xslow) var(--ease-bounce), opacity var(--dur-fast) var(--ease); }
.tabs a[aria-current="page"] .tl { max-width: 80px; opacity: 1; }
.tabs .av.tabav { width: 26px; height: 26px; font-size: 10px; box-shadow: 0 0 0 1.5px var(--line); }
.tabs a[aria-current="page"] .av.tabav { box-shadow: 0 0 0 1.5px var(--on-ink); }
.tabs a[aria-current="page"] .badge { display: none; }
.tabs .badge { position: absolute; top: -5px; right: -9px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; box-shadow: 0 0 0 2px var(--page); }
@media (min-width: 900px) { .tabs { display: none; } }

main { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { main { padding-bottom: 96px; } }
main.bare { padding-bottom: 0; }
.page-head { padding: 40px 0 24px; display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 900px) { .page-head { padding: 64px 0 32px; } }
.section { padding: 24px 0; display: flex; flex-direction: column; gap: 16px; }
.section > .heading { display: flex; align-items: baseline; gap: 8px; }

/* menu (dropdown) */
.menu {
  position: absolute; z-index: 60; min-width: 220px; padding: 6px; border-radius: 16px;
  background: var(--card); box-shadow: var(--shadow-menu);
  transform-origin: var(--origin, top right);
  animation: menu-in var(--dur-fast) var(--ease) both;
}
.menu.closing { animation: menu-out var(--dur-quick) var(--ease-close) both; }
@keyframes menu-in { from { opacity: 0; transform: scale(.97) translateY(-4px); filter: blur(3px); } }
@keyframes menu-out { to { opacity: 0; transform: scale(.99); filter: blur(2px); } }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; padding: 0 10px; border-radius: 10px; font-size: 14px; font-weight: 500; text-align: left; color: var(--ink); transition: background-color var(--dur-micro) linear; }
.menu a:hover, .menu button:hover, .menu [aria-selected="true"] { background: var(--chip); }
.menu .i { color: var(--muted); }
.menu .sep { height: 1px; background: var(--line); margin: 6px 4px; }
.menu .meta { margin-left: auto; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.menu .danger { color: var(--bad); } .menu .danger .i { color: var(--bad); }

/* sheet / dialog */
.scrim { position: fixed; inset: 0; z-index: 80; background: var(--scrim); animation: fadein var(--dur-fast) var(--ease) both; }
.scrim.closing { animation: leave-fade var(--dur-quick) var(--ease-close) both; }
@keyframes leave-fade { to { opacity: 0; } }
.sheet {
  position: fixed; z-index: 81; left: 50%; bottom: 0; width: 100%; max-width: 520px; max-height: 92dvh; overflow: auto;
  transform: translateX(-50%); background: var(--card); border-radius: 28px 28px 0 0; padding: 8px 20px calc(20px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-lift); animation: sheet-in var(--dur-xslow) var(--ease-bounce) both;
}
.sheet::before { content: ""; display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
.sheet.closing { animation: sheet-out var(--dur-fast) var(--ease-close) both; }
@keyframes sheet-in { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
@keyframes sheet-out { to { transform: translate(-50%, 100%); } }
@media (min-width: 720px) {
  .sheet { top: 50%; bottom: auto; border-radius: 28px; padding: 24px; animation-name: dialog-in; transform: translate(-50%, -50%); }
  .sheet::before { display: none; }
  .sheet.closing { animation-name: dialog-out; }
  @keyframes dialog-in { from { opacity: 0; transform: translate(-50%, -50%) scale(.96); filter: blur(4px); } to { opacity: 1; transform: translate(-50%, -50%); } }
  @keyframes dialog-out { to { opacity: 0; transform: translate(-50%, -50%) scale(.99); filter: blur(2px); } }
}

/* toast */
.toasts { position: fixed; z-index: 90; left: 0; right: 0; bottom: calc(88px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
@media (min-width: 900px) { .toasts { bottom: 32px; } }
.toast { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; min-height: 44px; padding: 10px 18px; border-radius: var(--r-pill); background: var(--ink); color: var(--on-ink); font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lift); animation: toast-in var(--dur-xslow) var(--ease-bounce) both; }
.toast.err .i { color: var(--bad); }
.toast.out { animation: toast-out var(--dur-fast) var(--ease-close) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.96); filter: blur(4px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(.98); } }

/* ---------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font-size: 13px; font-weight: 500; color: var(--ink); }
.field > span small { font-weight: 400; color: var(--muted); font-size: 13px; }
.input, .textarea {
  width: 100%; min-width: 0; height: 44px; padding: 0 16px; border: 0; border-radius: 14px;
  background: var(--chip); color: var(--ink); font-size: 15px; outline: none;
  box-shadow: inset 0 0 0 1px transparent; transition: box-shadow var(--dur-quick) var(--ease), background-color var(--dur-quick) var(--ease);
}
.textarea { height: auto; min-height: 110px; padding: 12px 16px; line-height: 1.5; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .textarea:focus { background: var(--card); box-shadow: inset 0 0 0 1px var(--ink), 0 0 0 4px var(--chip); }
.input.code { font: 500 28px/1 var(--mono); letter-spacing: .3em; text-align: center; height: 60px; text-transform: uppercase; }
.err-text { color: var(--bad); font-size: 13px; min-height: 18px; }
.err-text:empty { display: none; }

.switch { position: relative; width: 44px; height: 26px; border-radius: 13px; background: var(--chip-hover); flex: none; transition: background-color var(--dur-fast) var(--ease); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform var(--dur-med) var(--ease-bounce); }
.switch[aria-checked="true"] { background: var(--ink); }
.switch[aria-checked="true"]::after { transform: translateX(18px); background: var(--on-ink); }

.stepper { display: inline-flex; align-items: center; gap: 12px; }
.stepper output { min-width: 20px; text-align: center; font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- aurora: the city's glow */
.aurora { position: absolute; inset: auto 0 0 0; height: 70%; pointer-events: none; overflow: hidden; border-radius: inherit; opacity: var(--aurora-o); transition: opacity var(--dur-xslow) var(--ease); }
.aurora i { position: absolute; bottom: -45%; width: 70%; height: 90%; border-radius: 50%; filter: blur(48px); transition: background-color 900ms var(--ease); }
.aurora i:nth-child(1) { left: -10%; background: var(--a1, #8B5CF6); animation: sweep-a 9s var(--ease) infinite alternate; }
.aurora i:nth-child(2) { left: 20%; width: 60%; background: var(--a2, #EC4899); animation: sweep-b 11s var(--ease) infinite alternate; }
.aurora i:nth-child(3) { right: -10%; background: var(--a3, #22D3EE); animation: sweep-a 13s var(--ease) infinite alternate-reverse; }
@keyframes sweep-a { from { transform: translateX(-8%) scaleY(.9); } to { transform: translateX(10%) scaleY(1.1); } }
@keyframes sweep-b { from { transform: translateX(8%) scale(1); } to { transform: translateX(-10%) scale(1.15); } }
.aurora.fixed { position: fixed; height: 46vh; border-radius: 0; z-index: 0; }

/* ---------------------------------------------------------------- explore */
.search {
  position: relative; display: grid; grid-template-columns: 1fr; gap: 0; padding: 6px;
  background: var(--card); border-radius: var(--r-card); box-shadow: 0 0 0 1px var(--border), 0 8px 32px rgba(0, 0, 0, .04);
}
.search .seg-field { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 1px; min-height: 56px; padding: 8px 16px; border-radius: 18px; text-align: left; transition: background-color var(--dur-quick) var(--ease); min-width: 0; }
.search .seg-field:hover, .search .seg-field[aria-expanded="true"] { background: var(--chip); }
.search .seg-field b { font-size: 12px; font-weight: 500; color: var(--muted); }
.search .seg-field span { font-size: 15px; font-weight: 500; color: var(--ink); }
.search .seg-field span.ph { color: var(--faint); }
.search .seg-field + .seg-field::before { content: ""; position: absolute; left: 16px; right: 16px; top: 0; height: 1px; background: var(--line); }
.search .go { margin: 6px 4px 4px; }
@media (min-width: 900px) {
  .search { grid-template-columns: 1.3fr 1fr 1fr .9fr auto; align-items: center; border-radius: var(--r-pill); padding: 6px; }
  .search .seg-field { border-radius: var(--r-pill); padding: 8px 24px; }
  .search .seg-field + .seg-field::before { left: 0; right: auto; top: 16px; bottom: 16px; width: 1px; height: auto; }
  .search .seg-field:hover::before, .search .seg-field:hover + .seg-field::before { opacity: 0; }
  .search .go { margin: 0 2px 0 6px; width: 52px; height: 52px; padding: 0; border-radius: 50%; }
  .search .go .t { display: none; }
}

.explore { display: flex; flex-direction: column; gap: 24px; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .grid.three, .explore .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.pcard { position: relative; display: flex; flex-direction: column; gap: 0; padding: 8px; border-radius: var(--r-card); background: var(--card); box-shadow: 0 0 0 1px var(--border), var(--shadow-card); transition: transform var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease); min-width: 0; }
.pcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.pcard:active { transform: scale(.985); }
.pwell { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-well); overflow: hidden; background: var(--well); }
.pwell .slides { display: flex; height: 100%; transition: transform var(--dur-xslow) var(--ease); }
.pwell .slides > * { flex: none; width: 100%; height: 100%; object-fit: cover; }
.pwell .art { width: 100%; height: 100%; }
.pwell .tl { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.pwell .nav-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; }
.pwell .nav-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .55); transition: background-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
.pwell .nav-dots i.on { background: #fff; transform: scale(1.15); }
.pwell .arrow { position: absolute; top: 50%; margin-top: -16px; width: 32px; height: 32px; opacity: 0; transition: opacity var(--dur-fast) var(--ease), transform var(--dur-quick) var(--ease); background: rgba(255, 255, 255, .86); color: #17181C; box-shadow: none; }
.pwell .arrow.prev { left: 10px; } .pwell .arrow.next { right: 10px; }
.pcard:hover .arrow { opacity: 1; }
@media (hover: none) { .pwell .arrow { display: none; } }
.pmeta { display: flex; flex-direction: column; gap: 4px; padding: 12px 8px 6px; min-width: 0; }
.ptitle { font-size: 15px; font-weight: 500; letter-spacing: -.012em; color: var(--ink); }
.psub { font-size: 13px; color: var(--muted); }
.phost { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--ink-2); min-width: 0; }
.phost .rel { color: var(--muted); }
.avail { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink); }
.avail .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.avail.ask .dot { background: var(--faint); }
.pcard.sel { box-shadow: 0 0 0 2px var(--ink); }

/* map */
.mapcard { position: relative; overflow: hidden; border-radius: var(--r-card); background: var(--card); box-shadow: 0 0 0 1px var(--border), var(--shadow-card); }
.mapbox { position: relative; width: 100%; height: 100%; min-height: 260px; }
.mapbox canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pin { position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px 0 10px; border-radius: var(--r-pill); background: var(--card); color: var(--ink); font-size: 12px; font-weight: 600; white-space: nowrap; box-shadow: var(--shadow-menu); transition: transform var(--dur-med) var(--ease-bounce), background-color var(--dur-quick) var(--ease), color var(--dur-quick) var(--ease); animation: pin-in var(--dur-xslow) var(--ease-bounce) both; animation-delay: calc(var(--i, 0) * 30ms + 120ms); }
.pin .c { width: 8px; height: 8px; border-radius: 50%; background: var(--pc, var(--accent)); }
.pin .n { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.pin:hover { transform: translate(-50%, -50%) scale(1.06); z-index: 3; }
.pin[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); z-index: 2; }
.pin[aria-pressed="true"] .n { color: color-mix(in srgb, var(--on-ink) 60%, transparent); }
@keyframes pin-in { from { opacity: 0; transform: translate(-50%, -30%) scale(.8); } }
.pin.dotpin { width: 18px; height: 18px; padding: 0; justify-content: center; z-index: 0; }
.pin.dotpin .c { width: 8px; height: 8px; }
.pin.dotpin::after { content: attr(data-name); position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%) translateY(4px); padding: 5px 10px; border-radius: var(--r-pill); background: var(--ink); color: var(--on-ink); font-size: 12px; font-weight: 500; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity var(--dur-quick) var(--ease), transform var(--dur-fast) var(--ease); }
.pin.dotpin:hover::after, .pin.dotpin:focus-visible::after { opacity: 1; transform: translateX(-50%); }
.pin:not(.dotpin) { z-index: 1; }
.map-wide { height: 240px; }
@media (min-width: 720px) { .map-wide { height: 320px; } }
@media (min-width: 1100px) { .map-wide { height: 380px; } }
.map-legend { position: absolute; left: 14px; bottom: 14px; right: 14px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.map-legend > * { pointer-events: auto; }

.empty { padding: 48px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty .glyph { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--chip); color: var(--muted); }

/* skeleton */
.sk { background: linear-gradient(90deg, var(--chip) 0%, var(--chip-hover) 50%, var(--chip) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--r-tile); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* calendar popover */
.cal { padding: 16px; width: min(640px, calc(100vw - 32px)); }
.cal .months { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 640px) { .cal .months { grid-template-columns: 1fr 1fr; } }
.cal .mh { display: flex; align-items: center; justify-content: center; height: 36px; font-size: 14px; font-weight: 600; position: relative; }
.cal .mh .icon-btn { position: absolute; top: 0; width: 32px; height: 32px; }
.cal .mh .prev { left: 0; } .cal .mh .next { right: 0; }
.cal .dow, .cal .days { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal .dow span { text-align: center; font-size: 11px; font-weight: 500; color: var(--faint); padding: 6px 0; }
.cal .days button, .cal .days span { position: relative; height: 40px; display: grid; place-items: center; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.cal .days button::before { content: ""; position: absolute; inset: 2px; border-radius: 50%; transition: background-color var(--dur-micro) linear, transform var(--dur-quick) var(--ease); z-index: 0; }
.cal .days button span, .cal .days button b { position: relative; z-index: 1; font-weight: inherit; }
.cal .days button:hover::before { background: var(--chip); }
.cal .days button[disabled] { color: var(--faint); text-decoration: line-through; text-decoration-color: transparent; pointer-events: none; }
.cal .days button.in { background: var(--chip); }
.cal .days button.s, .cal .days button.e { color: var(--on-ink); }
.cal .days button.s::before, .cal .days button.e::before { background: var(--ink); }
.cal .days button.s { border-radius: 20px 0 0 20px; } .cal .days button.e { border-radius: 0 20px 20px 0; }
.cal .days button.s.e { border-radius: 20px; }
.cal .days button.s.in, .cal .days button.e.in { background: var(--chip); }
.cal .days button.today b::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 3px; height: 3px; margin-left: -1.5px; border-radius: 50%; background: currentColor; }
.cal .days button.open:not(.s):not(.e) b { color: var(--ok); }
.cal .foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- place */
.crumbs { display: flex; align-items: center; gap: 10px; padding: 20px 0 0; }
.gallery { display: grid; gap: 8px; border-radius: var(--r-card); overflow: hidden; }
.gallery img, .gallery .art { width: 100%; height: 100%; object-fit: cover; background: var(--well); }
.gallery { grid-template-columns: 1fr; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 4 / 3; }
.gallery::-webkit-scrollbar { display: none; }
.gallery > * { scroll-snap-align: start; border-radius: 0; }
@media (min-width: 900px) {
  .gallery { aspect-ratio: auto; height: 480px; overflow: hidden; grid-auto-flow: row; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; grid-auto-columns: auto; }
  .gallery > :first-child { grid-row: span 2; }
  .gallery.one { grid-template-columns: 1fr; } .gallery.one > :first-child { grid-row: auto; }
  .gallery.two { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; } .gallery.two > :first-child { grid-row: auto; }
}
.place-grid { display: grid; grid-template-columns: 1fr; gap: 32px; padding-top: 28px; }
@media (min-width: 1000px) { .place-grid { grid-template-columns: minmax(0, 1fr) 400px; gap: 56px; } }
.facts { display: flex; flex-wrap: wrap; gap: 8px; }
.fact { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--r-pill); background: var(--chip); font-size: 13px; font-weight: 500; }
.fact .i { color: var(--muted); }
.host-card { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 20px; background: var(--chip); transition: background-color var(--dur-quick) var(--ease); }
.host-card:hover { background: var(--chip-hover); }
.reqcard { position: sticky; top: 88px; overflow: hidden; padding: 24px; display: flex; flex-direction: column; gap: 16px; isolation: isolate; }
.reqcard > :not(.aurora) { position: relative; z-index: 1; }
.reqcard .aurora { height: 55%; z-index: 0; }
.datebox { display: grid; grid-template-columns: 1fr 1fr; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); background: var(--card); overflow: hidden; }
.datebox button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 10px 14px; text-align: left; transition: background-color var(--dur-quick) var(--ease); }
.datebox button:hover { background: var(--chip); }
.datebox button + button { box-shadow: inset 1px 0 0 var(--line); }
.datebox b { font-size: 11px; font-weight: 500; color: var(--muted); }
.datebox span { font-size: 14px; font-weight: 500; }
.summary-line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ink-2); }
.bottom-bar { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; background: var(--glass); backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5); border-top: 1px solid var(--line); isolation: isolate; overflow: hidden; }
.bottom-bar > :not(.aurora) { position: relative; z-index: 1; }
.bottom-bar .aurora { height: 140%; z-index: 0; --aurora-o: .32; }
@media (min-width: 1000px) { .bottom-bar { display: none; } }
.has-bar .tabs { display: none; }
.reqcard-wrap { display: none; }
@media (min-width: 1000px) { .reqcard-wrap { display: block; } }

/* ---------------------------------------------------------------- stays */
.list { display: flex; flex-direction: column; }
.lrow { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 20px; transition: background-color var(--dur-quick) var(--ease); min-width: 0; }
.lrow:hover { background: var(--chip); }
.thumb { width: 56px; height: 56px; border-radius: 14px; overflow: hidden; flex: none; background: var(--well); }
.thumb img, .thumb .art { width: 100%; height: 100%; object-fit: cover; }
.lrow .t { font-size: 15px; font-weight: 500; letter-spacing: -.01em; }
.lrow .s { font-size: 13px; color: var(--muted); }
.lrow .actions { display: flex; gap: 6px; flex: none; }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

.stay-hero { position: relative; overflow: hidden; isolation: isolate; padding: 28px 22px; display: flex; flex-direction: column; gap: 18px; }
.stay-hero > :not(.aurora) { position: relative; z-index: 1; }
@media (min-width: 900px) { .stay-hero { padding: 40px; } }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.steps .st { display: flex; flex-direction: column; gap: 8px; font-size: 12px; font-weight: 500; color: var(--faint); min-width: 0; }
.steps .st i { height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; position: relative; }
.steps .st.on { color: var(--ink); }
.steps .st.on i::after { content: ""; position: absolute; inset: 0; background: var(--ink); transform-origin: left; animation: fill var(--dur-xslow) var(--ease) both; animation-delay: calc(var(--i, 0) * 120ms + 200ms); }
@keyframes fill { from { transform: scaleX(0); } }
.address { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 18px; background: var(--ok-soft); color: var(--ink); }
.address .i { color: var(--ok); margin-top: 2px; }

.thread { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 20px; font-size: 15px; line-height: 1.45; background: var(--chip); color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; animation: rise var(--dur-med) var(--ease) both; }
.bubble.mine { align-self: flex-end; background: var(--ink); color: var(--on-ink); border-bottom-right-radius: 6px; }
.bubble.theirs { align-self: flex-start; border-bottom-left-radius: 6px; }
.bubble-time { font-size: 11px; color: var(--faint); align-self: center; padding: 8px 0 2px; }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 18px; border-radius: 26px; background: var(--chip); }
.composer textarea { flex: 1; min-width: 0; border: 0; background: none; outline: none; resize: none; padding: 10px 0; font-size: 15px; line-height: 1.4; max-height: 140px; }
.composer .icon-btn { width: 40px; height: 40px; background: var(--ink); color: var(--on-ink); }

/* ---------------------------------------------------------------- profile + the card */
.profile-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 1000px) { .profile-grid { grid-template-columns: 440px minmax(0, 1fr); gap: 56px; align-items: start; } .profile-grid .card-col { position: sticky; top: 88px; } }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stats.three { grid-template-columns: repeat(3, 1fr); }
.stat { padding: 14px 16px; border-radius: 18px; background: var(--chip); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat b { font-size: 26px; font-weight: 500; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat span { font-size: 12px; font-weight: 500; color: var(--muted); }
@media (max-width: 520px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.pcard-stage { perspective: 1200px; display: flex; justify-content: center; }
.share-card { position: relative; width: 100%; max-width: 440px; aspect-ratio: 4 / 5; border-radius: 28px; overflow: hidden; transform-style: preserve-3d; transition: transform var(--dur-xslow) var(--ease), box-shadow var(--dur-xslow) var(--ease); box-shadow: var(--shadow-lift); will-change: transform; }
.share-card canvas { width: 100%; height: 100%; display: block; }
.share-card .shine { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .14), transparent 40%); mix-blend-mode: soft-light; opacity: 0; transition: opacity var(--dur-fast) var(--ease); }
.share-card:hover .shine { opacity: 1; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.card-page { min-height: calc(100dvh - 64px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 24px 0 48px; position: relative; }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.person { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 18px; transition: background-color var(--dur-quick) var(--ease); min-width: 0; }
.person:hover { background: var(--chip); }

/* segmented controls that may not fit a phone scroll sideways inside their row */
.seg-scroll { overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
.seg-scroll::-webkit-scrollbar { display: none; }

/* ---------------------------------------------------------------- place editor */
.two { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .two { grid-template-columns: 1fr 1fr; } }
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 110px; gap: 8px; }
@media (min-width: 640px) { .photo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 120px; } }
.ptile { position: relative; border-radius: var(--r-tile); overflow: hidden; background: var(--well); animation: rise var(--dur-med) var(--ease) both; }
.ptile:first-child { grid-column: span 2; grid-row: span 2; }
.ptile img { width: 100%; height: 100%; object-fit: cover; }
.ptile.busy img { filter: blur(6px) saturate(.6); opacity: .7; }
.ptile.busy::after { content: ""; position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px; border-radius: 50%; border: 2px solid #fff; border-right-color: transparent; animation: spin .7s linear infinite; }
.ptile .cover { position: absolute; left: 8px; top: 8px; }
.ptile .tools { position: absolute; right: 8px; top: 8px; display: flex; gap: 6px; }
.ptile .tools .icon-btn { width: 28px; height: 28px; }
.ptile.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 500; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); transition: background-color var(--dur-quick) var(--ease), color var(--dur-quick) var(--ease); }
.ptile.add:first-child { grid-row: span 1; }
.ptile.add:hover { background: var(--chip); color: var(--ink); }
.chip .rm { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: -6px; border-radius: 50%; color: var(--muted); }
.chip .rm:hover { background: var(--chip-hover); color: var(--ink); }

/* ---------------------------------------------------------------- invites */
.invite { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.invite .code { font: 500 26px/1 var(--mono); letter-spacing: .08em; }
.invite.used { opacity: .6; }
.linkbox { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 14px; border-radius: var(--r-pill); background: var(--chip); min-width: 0; }
.linkbox span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--muted); font-family: var(--mono); }
.linkbox .btn { height: 32px; padding: 0 12px; background: var(--card); box-shadow: 0 0 0 1px var(--border); }

/* ---------------------------------------------------------------- settings */
.setting { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); min-width: 0; }
.setting:first-child { border-top: 0; }
.setting .grow b { display: block; font-size: 15px; font-weight: 500; }
.setting .grow span { font-size: 13px; color: var(--muted); }
@media (max-width: 560px) { .setting.wrapy { flex-wrap: wrap; } }

/* ---------------------------------------------------------------- sign in (the voice screen) */
.voice-screen { position: relative; min-height: 100dvh; display: flex; flex-direction: column; isolation: isolate; overflow: hidden; }
.voice-screen .aurora { position: fixed; height: 44vh; border-radius: 0; z-index: -1; }
.voice-screen header { padding: 20px var(--gutter); display: flex; justify-content: space-between; align-items: center; }
.voice-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 28px; padding: 24px var(--gutter) 18vh; }
.voice-body .display { max-width: 15ch; }
.voice-form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 10px; }
.voice-form .input { height: 52px; border-radius: var(--r-pill); text-align: center; background: var(--glass-chip); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: inset 0 0 0 1px var(--border); }
.voice-form .input:focus { box-shadow: inset 0 0 0 1px var(--ink); }
.voice-form .btn { height: 52px; }

/* ---------------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 120ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 120ms !important; }
  .rise, .pin, .bubble, .toast, .menu, .sheet { animation-name: fadein !important; filter: none !important; }
  .aurora i { animation: none !important; }
  .share-card { transform: none !important; }
}
