/* pull up — "kippu" direction. tokens in design/direction.md */
:root {
  --fog: #EDEEEA; --chalk: #FAFAF8; --graphite: #17191C; --slate: #6E737A; --line: #DCDED8;
  --felt: #E4F35A; --felt-ink: #1C2003; --go: #2FB66A;
  --bg: var(--fog); --surface: var(--chalk); --ink: var(--graphite); --muted: var(--slate);
  --ink-soft: rgba(23, 25, 28, .06); --scrim: rgba(18, 19, 21, .38);
  --av-l: 84%; --av-s: 42%;
  --display: "Funnel Display", ui-sans-serif, system-ui, sans-serif;
  --body: "Funnel Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r-sm: 10px; --r: 16px; --r-lg: 22px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121315; --surface: #1B1C1F; --ink: #ECECE8; --muted: #8C9097; --line: #2A2C30;
    --ink-soft: rgba(236, 236, 232, .07); --scrim: rgba(0, 0, 0, .55); --av-l: 32%; --av-s: 28%;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121315; --surface: #1B1C1F; --ink: #ECECE8; --muted: #8C9097; --line: #2A2C30;
  --ink-soft: rgba(236, 236, 232, .07); --scrim: rgba(0, 0, 0, .55); --av-l: 32%; --av-s: 28%;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
a, button, label, input, textarea, select { touch-action: manipulation; }
html.is-locked, html.is-locked body { overflow: hidden; }
body { background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; min-height: 100vh; min-height: 100dvh; overflow-x: hidden; overflow-x: clip; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::selection { background: var(--felt); color: var(--felt-ink); }

h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
h1 { font-size: clamp(28px, 6vw, 36px); }
h2 { font-size: 19px; }
.muted { color: var(--muted); }
.fine { color: var(--muted); font-size: 13px; }
.eyebrow { font: 500 10.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.icon { width: 20px; height: 20px; flex: none; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-between { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.grow { flex: 1; min-width: 0; }
.center { display: flex; justify-content: center; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--go); display: inline-block; flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--go) 22%, transparent); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent; background: var(--ink-soft); font-weight: 600; font-size: 14.5px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .15s var(--ease), background .15s, border-color .15s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn .icon { width: 17px; height: 17px; }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-felt { background: var(--felt); color: var(--felt-ink); }
.btn-line { background: transparent; border-color: var(--line); }

.btn-quiet { background: transparent; color: var(--muted); }

.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-xs { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn-lg { min-height: 54px; font-size: 16px; }
.btn-block { width: 100%; }
.linklike { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-weight: 600; color: var(--ink); }
.status { font: 500 11px/1 var(--mono); color: var(--muted); padding: 0 6px; white-space: nowrap; }

@media (hover: hover) {
  .btn-line:hover { border-color: var(--ink); }
  .btn-quiet:hover { color: var(--ink); background: var(--ink-soft); }
  .chip:hover { border-color: var(--ink); }
  .chip-static:hover { border-color: var(--line); }
  a.ticket:hover { transform: translateY(-2px); }
}
a.ticket:active { transform: scale(.985); }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; }
.chips-center { justify-content: center; }
.chip-scroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.chip-scroll::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; font-weight: 500; white-space: nowrap; cursor: pointer; text-decoration: none; user-select: none; transition: background .15s, border-color .15s, color .15s; }
.chip .icon { width: 15px; height: 15px; }

.chip { position: relative; }
.chip input { position: absolute; inset: 0; opacity: 0; pointer-events: none; margin: 0; }
.chip.is-on, .chip:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.chip-sm { min-height: 32px; padding: 0 12px; font-size: 13px; }
.chip-static { cursor: default; }


/* ---------- avatars ---------- */
.av { --size: 40px; width: var(--size); height: var(--size); border-radius: 50%; flex: none; display: grid; place-items: center; position: relative; background: hsl(var(--h) var(--av-s) var(--av-l)); color: var(--ink); font: 600 calc(var(--size) * .36)/1 var(--display); letter-spacing: -.02em; }
.av.is-free::after { content: ""; position: absolute; right: 0; bottom: 0; width: 28%; height: 28%; min-width: 9px; min-height: 9px; border-radius: 50%; background: var(--go); border: 2px solid var(--surface); }
.av-xs { --size: 24px; border: 2px solid var(--surface); }
.av-sm { --size: 32px; }
.av-xl { --size: 88px; }
.faces { display: flex; }
.faces .av + .av { margin-left: -7px; }

/* ---------- app layout ---------- */
.app { min-height: 100dvh; }
.main { padding: 0 16px calc(120px + env(safe-area-inset-bottom, 0px)); max-width: 640px; margin: 0 auto; }
.main.no-tabs { padding-bottom: 0; }
.rail { display: none; }
.topbar { display: flex; justify-content: space-between; align-items: center; height: 60px; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); margin: 0 -16px; padding: 0 16px; }
.topbar a { text-decoration: none; }
.wordmark { font: 700 21px/1 var(--display); letter-spacing: -.035em; text-decoration: none; display: inline-flex; align-items: baseline; gap: 8px; }
.wordmark-batch { font: 500 10px/1 var(--mono); color: var(--muted); letter-spacing: .04em; }

.tabbar { position: fixed; z-index: 10; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 6px; border-radius: 999px; background: var(--graphite); color: #ECECE8; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .45); }
:root[data-theme="dark"] .tabbar { background: #26282C; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabbar { background: #26282C; } }
.tab { position: relative; display: flex; align-items: center; gap: 6px; height: 46px; padding: 0 14px; border-radius: 999px; text-decoration: none; color: rgba(236, 236, 232, .62); transition: background .2s var(--ease), color .2s; }
.tab span:not(.badge) { display: none; font-size: 13px; font-weight: 600; }
.tab.is-active { background: rgba(255, 255, 255, .1); color: #fff; }
.tab.is-active span:not(.badge) { display: inline; }
.tab-new { width: 46px; padding: 0; justify-content: center; background: var(--felt); color: var(--felt-ink); margin: 0 4px; }
.tab-new .icon { width: 22px; height: 22px; }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--felt); color: var(--felt-ink); font: 600 10.5px/18px var(--mono); text-align: center; }
.tab .badge { position: absolute; top: 5px; right: 6px; min-width: 16px; height: 16px; line-height: 16px; font-size: 9.5px; }
.tab.is-active .badge { position: static; }

@media (min-width: 960px) {
  .app { display: grid; grid-template-columns: 220px minmax(0, 620px); justify-content: center; gap: 48px; padding: 0 24px; }
  .main { padding: 36px 0 80px; margin: 0; max-width: none; }
  .topbar, .tabbar { display: none; }
  .rail-left { display: flex; flex-direction: column; gap: 28px; position: sticky; top: 0; height: 100dvh; padding: 32px 0 28px; }
  .nav { display: flex; flex-direction: column; gap: 2px; }
  .nav-item { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 12px; text-decoration: none; color: var(--muted); font-weight: 500; }
  .nav-item:hover { color: var(--ink); background: var(--ink-soft); }
  .nav-item.is-active { color: var(--ink); background: var(--surface); font-weight: 600; }
  .nav-item .badge { margin-left: auto; }
  .me-mini { margin-top: auto; display: flex; gap: 10px; align-items: center; text-decoration: none; padding: 8px; border-radius: 12px; }
  .me-mini:hover { background: var(--ink-soft); }
  .me-mini span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
  .me-mini b { font-weight: 600; font-size: 14px; }
  .me-mini small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
  .only-narrow { display: none !important; }
  .chip-scroll { flex-wrap: wrap; margin: 0; padding: 2px 0; overflow: visible; }
}
@media (min-width: 1240px) {
  .app { grid-template-columns: 220px minmax(0, 620px) 280px; }
  .rail-right { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 0; height: 100dvh; padding: 36px 0; overflow-y: auto; }
}
@media (max-width: 959px) { .hide-narrow { display: none; } }

/* ---------- page pieces ---------- */
.page-head { padding: 12px 0 20px; display: flex; flex-direction: column; gap: 6px; }
.page-head.row-between { flex-direction: row; }
.page-head .muted { max-width: 46ch; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 14px; margin: 8px 0 4px; }
.back:hover { color: var(--ink); }
.back .icon { width: 17px; height: 17px; }
.block { padding: 22px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.nudge { background: var(--surface); border-radius: var(--r); padding: 12px 14px; gap: 12px; margin-bottom: 4px; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 14px; }

.panel, .linkcard { background: var(--surface); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.mini-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.mini-list li { display: flex; align-items: center; gap: 10px; }
.mini-list a { flex: 1; min-width: 0; display: flex; flex-direction: column; text-decoration: none; line-height: 1.25; }
.mini-list b { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-list small { color: var(--muted); font-size: 12px; }
.linkcard-url { font: 500 12.5px/1.4 var(--mono); word-break: break-all; }
.linkcard-help { color: var(--muted); font-size: 13px; }
.rail-foot { font: 500 10.5px/1.5 var(--mono); color: var(--muted); padding: 0 4px; }

/* ---------- around ---------- */
.filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.search { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.search:focus-within { border-color: var(--ink); }
.search input { flex: 1; border: 0; background: none; outline: none; color: var(--ink); min-width: 0; }
.search input::placeholder { color: var(--muted); }
.toggles .chip .dot { width: 6px; height: 6px; box-shadow: none; }

.free-strip { background: var(--surface); border-radius: var(--r); padding: 14px 0 12px; margin-bottom: 16px; }
.free-strip .eyebrow { padding: 0 16px 12px; }
.free-scroll { display: flex; gap: 14px; overflow-x: auto; padding: 0 16px; scrollbar-width: none; }
.free-scroll::-webkit-scrollbar { display: none; }
.free-item { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; font-size: 12px; font-weight: 500; min-width: 48px; position: relative; }
.free-item small { position: absolute; top: 26px; left: 50%; margin-left: 10px; font-size: 13px; }

.list-meta, .list-more { font: 500 10.5px/1 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; padding: 14px 0 6px; }
.list-more { text-align: center; padding: 20px 0; text-transform: none; letter-spacing: 0; }
.people { list-style: none; padding: 0; }
.person { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.person:last-child { border-bottom: 0; }
.person-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-decoration: none; }
.person-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.person-name { font-weight: 600; text-decoration: none; }
.person-meta { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.free-tag { font-style: normal; color: var(--go); font-weight: 600; margin-right: 6px; }
.free-tag::after { content: " ·"; color: var(--muted); font-weight: 400; }
.tags { display: none; gap: 2px; }
.tag { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; font-size: 14px; filter: grayscale(.85); opacity: .55; }
.tag.is-shared { filter: none; opacity: 1; background: var(--felt); }
@media (min-width: 520px) { .tags { display: flex; } }
.people-compact .person { padding: 10px 0; }

/* ---------- pods (PODS-SPEC.md) ---------- */
.near-entry { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 16px; border-radius: var(--r); background: var(--surface); text-decoration: none; transition: transform .15s var(--ease); }
.near-entry:active { transform: scale(.985); }
.near-entry .grow { display: flex; flex-direction: column; gap: 4px; line-height: 1.3; }
.near-entry b { font-weight: 600; }
.near-entry small:not(.eyebrow) { color: var(--muted); font-size: 13px; }
.near-entry > .icon { color: var(--muted); width: 18px; height: 18px; }
.near-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--ink-soft); flex: none; }
.near-entry.is-live .near-icon { background: var(--ink); color: var(--bg); }
@media (hover: hover) { .near-entry:hover { box-shadow: inset 0 0 0 1px var(--line); } }

.area-form { margin-bottom: 8px; }
.field select { width: 100%; min-height: 50px; padding: 12px 40px 12px 16px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%236E737A' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 16px center; font-size: 16px; -webkit-appearance: none; appearance: none; outline: none; cursor: pointer; }
.field select:focus { border-color: var(--ink); }
.area-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 6px 6px 16px; border: 1px dashed var(--line); border-radius: 999px; margin-bottom: 8px; }
.area-bar-text { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 14px; }
.area-bar-text > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.area-bar-text .icon { width: 18px; height: 18px; color: var(--muted); }
.how-pods { padding: 8px 0 8px 20px; display: flex; flex-direction: column; gap: 10px; color: var(--muted); }
.how-pods b { color: var(--ink); font-weight: 600; }
.ink { color: var(--ink); }

.pods { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pod { background: var(--surface); border-radius: var(--r); padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.pod.is-in { box-shadow: inset 0 0 0 1.5px var(--ink); }
.pod-head { display: flex; align-items: center; gap: 12px; }
.pod-emoji { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--ink-soft); font-size: 19px; flex: none; }
.pod-title { font-size: 18px; }
.pod-where { font: 500 10.5px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 4px; }
.pod-count { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.pod-count b { font: 600 30px/1 var(--display); letter-spacing: -.04em; }
.pod-count small { font: 500 9.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 4px; }
.pod-going { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); min-width: 0; }
.pod-going .faces { flex: none; }
.av-anon { background: transparent; border: 1.5px dashed var(--line); color: var(--muted); font: 500 10px/1 var(--mono); }
.av-xs.av-anon { border: 1.5px dashed var(--muted); opacity: .6; }

.almost-list { list-style: none; padding: 0; }
.almost { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.almost:last-child { border-bottom: 0; }
.almost .grow { line-height: 1.3; }
.almost b { font-weight: 600; }
.almost .person-meta { white-space: normal; }
.almost .pod-emoji { width: 34px; height: 34px; font-size: 16px; }
.progress { display: flex; gap: 4px; flex: none; }
.progress i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--muted); opacity: .5; }
.progress i.is-on { background: var(--ink); border-color: var(--ink); opacity: 1; }
@media (max-width: 420px) { .progress { display: none; } }

.privacy ul { padding-left: 18px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 13.5px; }
.block + .fine { padding-bottom: 8px; }

/* ---------- tickets (the signature) ---------- */
.tickets { display: flex; flex-direction: column; gap: 12px; }
.day { margin-bottom: 26px; }
.day-label { font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 12px; }
.ticket {
  --stub: 92px; --notch: 9px;
  display: grid; grid-template-columns: 1fr var(--stub); text-decoration: none; color: var(--ink);
  background: var(--surface); border-radius: var(--r);
  -webkit-mask: radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 0, #0000 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
          mask: radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 0, #0000 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
  transition: transform .25s var(--ease);
}

.ticket-main { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ticket-when { display: flex; align-items: baseline; gap: 10px; }
.ticket-time { font: 500 26px/1 var(--mono); letter-spacing: -.04em; }
.ticket-day { font: 500 10.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.ticket-title { font-size: 18px; font-weight: 600; margin-top: 8px; display: flex; gap: 8px; align-items: baseline; }
.ticket-emoji { font-size: 16px; }
.ticket-place { color: var(--muted); font-size: 13.5px; }
.ticket-going { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.ticket-going > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket-stub { background: var(--felt); color: var(--felt-ink); border-left: 1.5px dashed rgba(28, 32, 3, .28); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 14px 8px; position: relative; }
.stub-n { font: 600 38px/1 var(--display); letter-spacing: -.04em; }
.stub-word { font-size: 22px; }
.stub-l { font: 500 9.5px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .08em; margin-top: 4px; }
.ticket-code { position: absolute; bottom: 10px; left: 0; right: 0; font: 500 9.5px/1 var(--mono); letter-spacing: .06em; opacity: .6; }
.ticket.is-full .ticket-stub { background: var(--ink-soft); color: var(--muted); border-left-color: var(--line); }
.ticket.is-in .ticket-stub, .ticket.is-yours .ticket-stub { background: var(--ink); color: var(--bg); border-left-color: transparent; }
.ticket-big { --stub: 108px; --notch: 11px; }
.ticket-big .ticket-main { padding: 22px 22px 20px; }
.ticket-big .ticket-time { font-size: 40px; }
.ticket-big .ticket-title { font-size: 24px; }
.ticket-big .stub-n { font-size: 48px; }

.plan-hero { padding: 10px 0 16px; }
.plan-action { margin-bottom: 8px; }
.share { gap: 14px; }
.share.is-new { background: var(--surface); border: 0; border-radius: var(--r); padding: 20px; margin: 8px 0 16px; }
.share-url { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 6px 6px 16px; border: 1px dashed var(--line); border-radius: 999px; font: 500 12.5px/1 var(--mono); min-width: 0; }
.share-url span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- forms ---------- */
.stack { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; border: 0; padding: 0; min-width: 0; }
.field > span, .field legend { font-weight: 600; font-size: 14px; padding: 0; margin-bottom: 0; }
.field legend { margin-bottom: 8px; }
.field small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.field input, .field textarea, .time-input, .search input, .signin input { font-size: 16px; }
.field input, .field textarea, .time-input { width: 100%; min-height: 50px; padding: 12px 16px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); outline: none; resize: vertical; }
.field input:focus, .field textarea:focus, .time-input:focus { border-color: var(--ink); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .8; }
.time-input { margin-top: 10px; width: 100%; max-width: 200px; font-family: var(--mono); -webkit-appearance: none; appearance: none; text-align: left; }
.code-input { font: 500 26px/1 var(--mono) !important; letter-spacing: .5em; text-align: center; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper input { width: 72px; text-align: center; font: 600 18px/1 var(--mono); min-height: 44px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14.5px; }
.switch input { appearance: none; width: 44px; height: 26px; border-radius: 13px; background: var(--line); position: relative; cursor: pointer; transition: background .2s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); transition: transform .2s var(--ease); }
.switch input:checked { background: var(--ink); }
.switch input:checked::after { transform: translateX(18px); }
.note { font-size: 13px; color: var(--muted); background: var(--ink-soft); border-radius: var(--r-sm); padding: 10px 12px; }

.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--ink-soft); width: max-content; }
.seg-item { border: 0; background: none; height: 34px; padding: 0 16px; border-radius: 999px; cursor: pointer; font-size: 13.5px; font-weight: 500; color: var(--muted); }
.seg-item.is-on { background: var(--surface); color: var(--ink); }

.freebox { background: var(--surface); border-radius: var(--r); padding: 20px; border: 0; margin-bottom: 16px; }
.freebox.is-on { box-shadow: inset 0 0 0 1.5px var(--go); }

.actionbar { position: sticky; bottom: 0; z-index: 4; margin: 0 -16px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to bottom, transparent, var(--bg) 26%); }
@media (min-width: 960px) { .actionbar { margin: 0; padding-inline: 0; } }

/* ---------- inbox ---------- */
.inbox-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.msg { background: var(--surface); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.msg-head { display: flex; gap: 12px; align-items: center; }
.msg-head .person-meta { white-space: normal; }
.msg-note { font-size: 15px; padding-left: 52px; }
.msg-note::before { content: "“"; } .msg-note::after { content: "”"; }
.msg .row, .msg .contact { padding-left: 52px; }
.msg-row { flex-direction: row; align-items: center; padding: 12px 16px; }
.msg-row .person-meta { white-space: normal; }

/* ---------- profile ---------- */
.profile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 28px 0; }
.profile h1 { margin-top: 8px; }
.profile-bio { font-size: 17px; max-width: 36ch; margin: 6px 0; }
.profile-action { width: 100%; max-width: 340px; margin-top: 12px; }
.profile .contact { justify-content: center; }
.profile .share-url { width: 100%; max-width: 380px; margin-top: 8px; }
.free-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--go); }

/* ---------- bare (logged out) ---------- */
.bare { max-width: 1120px; margin: 0 auto; padding: 0 16px 48px; overflow-x: clip; }
.bare-top { display: flex; justify-content: space-between; align-items: center; height: 72px; }
.narrow { max-width: 560px; margin: 0 auto; }
.auth { max-width: 420px; margin: 8vh auto 0; display: flex; flex-direction: column; gap: 16px; }
.auth-wide { max-width: 520px; margin-top: 4vh; }
.auth .stack { margin-top: 8px; }
.devhint { font: 500 11.5px/1.5 var(--mono); color: var(--muted); background: var(--surface); border-radius: var(--r-sm); padding: 10px 12px; }

.hero { display: grid; gap: 48px; padding: 6vh 0 64px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 20px; }
.hero-title { font-size: clamp(40px, 8.5vw, 72px); font-weight: 600; letter-spacing: -.045em; line-height: .98; }
.hero-soft { color: var(--muted); }
.hero-sub { font-size: 17px; max-width: 42ch; color: var(--muted); }
.signin { display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); max-width: 440px; }
.signin:focus-within { border-color: var(--ink); }
.signin input { flex: 1; min-width: 0; border: 0; background: none; outline: none; padding: 0 14px; }
.hero-tickets { display: flex; flex-direction: column; gap: 14px; }
.hero-tickets .ticket { animation: deal .7s var(--ease) both; }
.hero-tickets .ticket:nth-child(1) { animation-delay: .05s; }
.hero-tickets .ticket:nth-child(2) { animation-delay: .15s; }
.hero-tickets .ticket:nth-child(3) { animation-delay: .25s; }
@keyframes deal { from { opacity: 0; transform: translateY(24px) rotate(var(--r, 0deg)); } }
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.15fr 1fr; padding-top: 10vh; }
  .hero-tickets { position: relative; padding-right: 24px; }
  .hero-tickets .ticket:nth-child(1) { --r: -2.5deg; transform: rotate(-2.5deg); }
  .hero-tickets .ticket:nth-child(2) { --r: 1.5deg; transform: rotate(1.5deg) translateX(28px); }
  .hero-tickets .ticket:nth-child(3) { --r: -1deg; transform: rotate(-1deg) translateX(-8px); }
  .hero-tickets a.ticket:hover { transform: rotate(0) translateY(-3px); }
}
.moments { display: grid; grid-auto-flow: column; grid-auto-columns: min(62vw, 240px); gap: 12px; padding: 8px 16px 40px; margin: 0 -16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; scrollbar-width: none; }
.moments::-webkit-scrollbar { display: none; }
.moment { position: relative; margin: 0; aspect-ratio: 3 / 4; border-radius: var(--r); overflow: hidden; background: var(--surface); scroll-snap-align: start; }
.moment img { width: 100%; height: 100%; object-fit: cover; display: block; }
.moment figcaption { position: absolute; inset: auto 0 0; padding: 40px 14px 13px; display: flex; flex-direction: column; gap: 2px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .72)); }
.moment b { font: 600 15px/1.2 var(--display); letter-spacing: -.01em; }
.moment span { font-size: 12.5px; opacity: .85; }
.moment:nth-child(even) { transform: translateY(14px); }
@media (min-width: 900px) {
  .moments { grid-auto-flow: row; grid-template-columns: repeat(6, 1fr); margin: 0; padding: 8px 0 56px; overflow: visible; }
}
.auth-photo { width: 100%; height: auto; aspect-ratio: 840 / 380; object-fit: cover; border-radius: var(--r); margin-bottom: 4px; }
.how { display: grid; gap: 28px; padding: 40px 0; border-top: 1px solid var(--line); }
.how h2 { font-size: 20px; margin-bottom: 6px; }
.how p { color: var(--muted); max-width: 32ch; }
@media (min-width: 760px) { .how { grid-template-columns: repeat(3, 1fr); } }
.foot { font: 500 10.5px/1.5 var(--mono); color: var(--muted); padding-top: 24px; }

.testbar { font: 500 10.5px/1.4 var(--mono); text-align: center; padding: 6px 16px; background: var(--felt); color: var(--felt-ink); }

/* ---------- sheet + toast ---------- */
.sheet { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet-scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity .25s; }
.sheet.is-open .sheet-scrim { opacity: 1; }
.sheet-body { position: relative; width: 100%; max-width: 520px; max-height: 88vh; max-height: 88dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; background: var(--bg); color: var(--ink); border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 10px 20px 0; transform: translateY(100%); transition: transform .3s var(--ease); }
.sheet.is-open .sheet-body { transform: none; }
.sheet-grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 14px; }
.sheet-head { display: flex; gap: 12px; align-items: center; }
.sheet-head h2 { font-size: 22px; }
.sheet-actions { position: sticky; bottom: 0; background: var(--bg); margin: 0 -20px; padding: 12px 20px calc(16px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 640px) {
  .sheet { align-items: center; }
  .sheet-body { border-radius: var(--r-lg); padding: 10px 24px 0; }
  .sheet-actions { margin: 0 -24px; padding-inline: 24px; border-radius: 0 0 var(--r-lg) var(--r-lg); }
  .sheet-grab { visibility: hidden; margin-bottom: 6px; }
}

#toasts { position: fixed; z-index: 50; left: 0; right: 0; bottom: calc(84px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
@media (min-width: 960px) { #toasts { bottom: 28px; } }
.toast { background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; animation: toast-in .3s var(--ease); transition: opacity .3s, transform .3s; max-width: 100%; }
.toast.is-out { opacity: 0; transform: translateY(8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
