:root {
  --bg: #0b0d12; --bg2: #0f121a; --surface: #141824; --surface2: #1a2030; --border: #252c3f; --text: #e8ebf4; --muted: #8f98ae;
  --accent: #8b5cf6; --accent-ink: #fff; --good: #34d399; --warn: #fbbf24; --bad: #f87171; --radius: 14px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tabbar-h: 62px; --topbar-h: 56px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; min-height: 100dvh; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; } h1 { font-size: 1.7rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .tiny { font-size: .75rem; }
.hidden, [hidden] { display: none !important; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; } .row.nowrap { flex-wrap: nowrap; } .grow { flex: 1 1 auto; min-width: 0; }
.stack > * + * { margin-top: .9rem; } .gap-sm > * + * { margin-top: .5rem; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }

.loading { padding: 3rem 1rem; text-align: center; color: var(--muted); }
.app { max-width: 1060px; margin: 0 auto; padding: 1rem 1rem calc(var(--tabbar-h) + 1.5rem + env(safe-area-inset-bottom)); }
.app.wide { max-width: 1280px; }
.app.chat-mode { padding: 0; max-width: 1280px; }

/* top + bottom nav */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(11,13,18,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); height: var(--topbar-h); padding-top: env(safe-area-inset-top); }
.topbar-in { max-width: 1280px; margin: 0 auto; height: 100%; display: flex; align-items: center; gap: 1rem; padding: 0 1rem; }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 700; color: var(--text); letter-spacing: -.01em; } .brand:hover { text-decoration: none; }
.brand img { width: 26px; height: 26px; border-radius: 7px; }
.topnav { display: none; gap: .25rem; margin-left: .5rem; }
.topnav a, .tabbar a { color: var(--muted); padding: .45rem .75rem; border-radius: 10px; font-weight: 500; } .topnav a:hover { color: var(--text); text-decoration: none; background: var(--surface); }
.topnav a.active { color: var(--text); background: var(--surface2); }
.icon-btn { position: relative; background: none; border: 0; color: var(--text); padding: .45rem; border-radius: 10px; cursor: pointer; font-size: 1.15rem; line-height: 1; }
.icon-btn:hover { background: var(--surface); }
.badge { position: absolute; top: -2px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: .7rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.badge.inline { position: static; margin-left: .35rem; }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(15,18,26,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--border); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .68rem; border-radius: 0; padding: .35rem 0; position: relative; }
.tabbar a:hover { text-decoration: none; } .tabbar a .ico { font-size: 1.3rem; line-height: 1; } .tabbar a.active { color: var(--accent); }
.tabbar .badge { top: 4px; right: calc(50% - 22px); }
@media (min-width: 820px) { .topnav { display: flex; } .tabbar { display: none !important; } .app { padding-bottom: 3rem; } }

.conn { position: fixed; top: 0; left: 0; right: 0; z-index: 60; text-align: center; background: var(--warn); color: #1a1300; font-size: .8rem; padding: 2px 0; font-weight: 600; }
.toasts { position: fixed; z-index: 70; left: 0; right: 0; bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: .5rem; pointer-events: none; padding: 0 1rem; }
@media (min-width: 820px) { .toasts { bottom: 20px; align-items: flex-end; right: 20px; left: auto; } }
.toast { pointer-events: auto; background: var(--surface2); border: 1px solid var(--border); border-left: 4px solid var(--accent); padding: .65rem .9rem; border-radius: 10px; max-width: 420px; box-shadow: 0 8px 30px rgba(0,0,0,.45); animation: pop .18s ease-out; cursor: default; }
.toast.error { border-left-color: var(--bad); } .toast.ok { border-left-color: var(--good); } .toast .t { font-weight: 600; } .toast.click { cursor: pointer; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* cards, forms, buttons */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.card.flush { padding: 0; overflow: hidden; } .card + .card { margin-top: 1rem; }
.grid { display: grid; gap: 1rem; } .grid.two { grid-template-columns: 1fr; } .grid.three { grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid.two { grid-template-columns: 1fr 1fr; } .grid.three { grid-template-columns: repeat(3, 1fr); } .grid.side { grid-template-columns: 2fr 1fr; } }
.btn { appearance: none; border: 1px solid var(--border); background: var(--surface2); color: var(--text); padding: .6rem 1rem; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 42px; text-decoration: none; }
.btn:hover { border-color: #3a4463; text-decoration: none; } .btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); } .btn.primary:hover { filter: brightness(1.08); }
.btn.danger { background: transparent; color: var(--bad); border-color: #4a2a30; } .btn.danger:hover { background: #2a1519; }
.btn.ghost { background: transparent; } .btn.sm { padding: .3rem .65rem; min-height: 32px; font-size: .85rem; } .btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .25rem; font-weight: 500; }
input, textarea, select { width: 100%; background: var(--bg2); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: .6rem .75rem; font: inherit; min-height: 42px; }
textarea { min-height: 96px; resize: vertical; } input[type=checkbox], input[type=radio] { width: auto; min-height: 0; }
input[type=color] { padding: 2px; height: 42px; width: 64px; }
input:focus, textarea:focus, select:focus, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.field { margin-bottom: .9rem; } .field .hint { font-size: .78rem; color: var(--muted); margin-top: .25rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; color: var(--text); } .check input { margin-top: .25rem; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 0 1rem; } @media (min-width: 640px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }
.error-text { color: var(--bad); font-size: .9rem; margin: .4rem 0; } .ok-text { color: var(--good); }
.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--surface2); border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.pill.good { color: var(--good); border-color: #1f5b45; background: #0f2a22; } .pill.warn { color: var(--warn); border-color: #5a4713; background: #2a2209; } .pill.bad { color: var(--bad); border-color: #5a2a30; background: #2a1216; }
.pill.accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; } .tag { padding: .2rem .65rem; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); font-size: .82rem; }
.tabs { display: flex; gap: .3rem; overflow-x: auto; border-bottom: 1px solid var(--border); margin-bottom: 1rem; -webkit-overflow-scrolling: touch; }
.tabs button { background: none; border: 0; color: var(--muted); padding: .6rem .9rem; font: inherit; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; } th, td { text-align: left; padding: .5rem .5rem; border-bottom: 1px solid var(--border); vertical-align: top; } th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.table-wrap { overflow-x: auto; }
.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; flex: none; text-transform: uppercase; background: var(--accent); }
.avatar.lg { width: 84px; height: 84px; font-size: 2rem; } .avatar.sm { width: 28px; height: 28px; font-size: .8rem; }
.copy-box { display: flex; gap: .5rem; } .copy-box input { font-family: ui-monospace, monospace; font-size: .82rem; }

/* modal */
.modal-bg { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; justify-content: center; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 18px 18px 0 0; padding: 1.2rem; width: 100%; max-width: 480px; max-height: 90vh; overflow: auto; }
@media (min-width: 640px) { .modal-bg { align-items: center; } .modal { border-radius: 18px; } }

/* landing */
.hero { text-align: center; padding: 3.5rem 0 2rem; } .hero h1 { font-size: clamp(2rem, 6vw, 3.2rem); max-width: 14ch; margin: 0 auto .5em; }
.hero p { max-width: 52ch; margin-left: auto; margin-right: auto; color: var(--muted); font-size: 1.1rem; }
.gradient-text { background: linear-gradient(120deg, #a78bfa, #f472b6, #fbbf24); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-card { max-width: 440px; margin: 2rem auto; }

/* events */
.ev-card { display: flex; gap: .9rem; padding: .9rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); } .ev-card:hover { text-decoration: none; border-color: #3a4463; }
.ev-date { flex: none; width: 56px; text-align: center; border-radius: 12px; background: var(--surface2); padding: .35rem 0; } .ev-date .m { font-size: .68rem; text-transform: uppercase; color: var(--accent); font-weight: 700; letter-spacing: .06em; } .ev-date .d { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.ev-card .t { font-weight: 650; } .ev-meta { font-size: .85rem; color: var(--muted); }
.ev-card.cancelled { opacity: .55; } .ev-card.cancelled .t { text-decoration: line-through; }
.cal-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; } .cal-head h2 { margin: 0; min-width: 9ch; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cal-dow { background: var(--bg2); text-align: center; padding: .35rem 0; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.cal-cell { background: var(--surface); min-height: 64px; padding: 4px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; overflow: hidden; border: 0; color: var(--text); font: inherit; text-align: left; }
.cal-cell:hover { background: var(--surface2); } .cal-cell.out { background: var(--bg2); color: #566; } .cal-cell.sel { outline: 2px solid var(--accent); outline-offset: -2px; }
.cal-cell .n { font-size: .78rem; font-weight: 600; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.cal-cell.today .n { background: var(--accent); color: var(--accent-ink); }
.cal-chip { font-size: .66rem; padding: 1px 4px; border-radius: 4px; background: color-mix(in srgb, var(--accent) 22%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: none; }
.cal-dots { display: flex; gap: 3px; flex-wrap: wrap; padding-left: 3px; } .cal-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
@media (min-width: 720px) { .cal-cell { min-height: 98px; } .cal-chip { display: block; } .cal-dots { display: none; } }
.qr { background: #fff; padding: 12px; border-radius: 14px; width: min(300px, 80vw); aspect-ratio: 1; } .qr img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.ticket-code { font-family: ui-monospace, monospace; font-size: .75rem; word-break: break-all; color: var(--muted); }

/* profile theming */
.profile { --accent-soft: color-mix(in srgb, var(--accent) 18%, transparent); border-radius: 20px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.profile .cover { height: 120px; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 30%, #0b0d12)); }
.profile .head { padding: 0 1.2rem 1rem; margin-top: -42px; } .profile .avatar.lg { border: 4px solid var(--surface); background: var(--accent); }
.profile .body { padding: 0 1.2rem 1.4rem; } .profile .block { border: 1px solid var(--border); border-radius: 14px; padding: 1rem; background: var(--bg2); } .profile .block h3 { color: var(--accent); }
.theme-midnight { --surface: #141824; --bg2: #0f121a; }
.theme-ember { --surface: #1d1612; --bg2: #16100c; --border: #3a2a20; } .theme-forest { --surface: #111c17; --bg2: #0c1511; --border: #1f3a2d; }
.theme-ocean { --surface: #111a26; --bg2: #0c131d; --border: #1f3350; } .theme-rose { --surface: #1d1219; --bg2: #160d12; --border: #3d2030; }
.swatches { display: flex; gap: .5rem; flex-wrap: wrap; } .swatch { width: 38px; height: 38px; border-radius: 10px; border: 2px solid transparent; cursor: pointer; } .swatch.sel { border-color: #fff; }
.block-edit { border: 1px solid var(--border); border-radius: 12px; padding: .8rem; background: var(--bg2); margin-bottom: .75rem; }

/* chat */
.chat { display: grid; grid-template-columns: 1fr; height: calc(100dvh - var(--topbar-h) - var(--tabbar-h) - env(safe-area-inset-bottom)); }
@media (min-width: 820px) { .chat { grid-template-columns: 320px 1fr; height: calc(100dvh - var(--topbar-h)); } }
.chat-side { border-right: 1px solid var(--border); overflow-y: auto; background: var(--bg2); }
.chat-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.chat.in-room .chat-side { display: none; } .chat:not(.in-room) .chat-main { display: none; }
@media (min-width: 820px) { .chat.in-room .chat-side, .chat:not(.in-room) .chat-main { display: flex; flex-direction: column; } .chat .back { display: none; } }
.chat-side h4 { margin: 1rem 1rem .4rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.room-item { display: flex; gap: .7rem; padding: .7rem 1rem; align-items: center; cursor: pointer; border: 0; background: none; color: var(--text); width: 100%; text-align: left; font: inherit; border-left: 3px solid transparent; }
.room-item:hover { background: var(--surface); } .room-item.active { background: var(--surface); border-left-color: var(--accent); }
.room-item .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .room-item .last { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-item .badge { position: static; } .room-ico { width: 38px; height: 38px; border-radius: 12px; background: var(--surface2); display: flex; align-items: center; justify-content: center; flex: none; font-size: 1.1rem; }
.chat-top { display: flex; align-items: center; gap: .6rem; padding: .6rem 1rem; border-bottom: 1px solid var(--border); background: var(--bg2); }
.online-list { display: flex; gap: .3rem; align-items: center; font-size: .78rem; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); display: inline-block; } .dot.off { background: #555; }
.msgs { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .15rem; overscroll-behavior: contain; }
.msg { display: flex; gap: .6rem; padding: .15rem .3rem; border-radius: 8px; position: relative; } .msg:hover { background: var(--surface); }
.msg.cont { margin-top: -.05rem; } .msg .who { font-weight: 650; font-size: .92rem; } .msg .time { font-size: .7rem; color: var(--muted); margin-left: .4rem; }
.msg .text { white-space: pre-wrap; word-break: break-word; } .msg.deleted .text { color: var(--muted); font-style: italic; } .msg.mine .who { color: var(--accent); }
.msg .tools { position: absolute; right: 6px; top: -8px; display: none; gap: 2px; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 2px; } .msg:hover .tools { display: flex; }
@media (hover: none) { .msg .tools { display: flex; position: static; background: none; border: 0; opacity: .6; } }
.msg .tools button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 2px 6px; font-size: .78rem; border-radius: 6px; } .msg .tools button:hover { color: var(--text); background: var(--surface); }
.composer { display: flex; gap: .5rem; padding: .6rem 1rem calc(.6rem); border-top: 1px solid var(--border); background: var(--bg2); align-items: flex-end; }
.composer textarea { min-height: 42px; max-height: 140px; resize: none; } .typing { height: 1.2rem; padding: 0 1rem; font-size: .78rem; color: var(--muted); }
.load-more { align-self: center; margin-bottom: .5rem; }
.day-sep { align-self: center; font-size: .72rem; color: var(--muted); margin: .6rem 0; padding: .1rem .6rem; border: 1px solid var(--border); border-radius: 999px; }

/* checkin */
.scan-result { border-radius: 18px; padding: 1.4rem; text-align: center; font-weight: 700; font-size: 1.3rem; border: 2px solid var(--border); }
.scan-result.ok { background: #0f2a22; border-color: var(--good); color: var(--good); } .scan-result.bad { background: #2a1216; border-color: var(--bad); color: var(--bad); } .scan-result.warn { background: #2a2209; border-color: var(--warn); color: var(--warn); }
.scan-result .who { font-size: 1.8rem; color: var(--text); margin: .2rem 0; }
video.scan { width: 100%; max-height: 320px; border-radius: 14px; background: #000; object-fit: cover; }
.notif { display: flex; gap: .8rem; padding: .8rem 1rem; border-bottom: 1px solid var(--border); color: var(--text); cursor: pointer; } .notif:hover { background: var(--surface2); text-decoration: none; }
.notif.unread { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); } .notif.unread .nt { font-weight: 700; }

/* v1.01 event visibility colors: public=green, invite=blue, personal=red */
.ev-card.vis-public { background: color-mix(in srgb, #34d399 18%, var(--surface)); border-color: color-mix(in srgb, #34d399 45%, var(--border)); }
.ev-card.vis-invite { background: color-mix(in srgb, #60a5fa 18%, var(--surface)); border-color: color-mix(in srgb, #60a5fa 45%, var(--border)); }
.ev-card.vis-personal { background: color-mix(in srgb, #f87171 18%, var(--surface)); border-color: color-mix(in srgb, #f87171 45%, var(--border)); }
.pill.vis-public { color: #34d399; border-color: #1f5b45; background: #0f2a22; }
.pill.vis-invite { color: #93c5fd; border-color: #1e3a5f; background: #0f1a2a; }
.pill.vis-personal { color: #f87171; border-color: #5a2a30; background: #2a1216; }
.cal-chip.vis-public { background: color-mix(in srgb, #34d399 35%, transparent); }
.cal-chip.vis-invite { background: color-mix(in srgb, #60a5fa 35%, transparent); }
.cal-chip.vis-personal { background: color-mix(in srgb, #f87171 35%, transparent); }
.cal-dots i.vis-public { background: #34d399; }
.cal-dots i.vis-invite { background: #60a5fa; }
.cal-dots i.vis-personal { background: #f87171; }
.people-cols .people-col h3 { margin-top: 0; }

/* ---------- TRF trip (mobile-first; buttons keep a fixed 44px+ hit area so nothing jumps while loading) ---------- */
.trip .trip-head { display: grid; gap: .35rem; }
.trip .trip-title { font-size: 1.3rem; margin: 0; }
.trip-tabs { position: sticky; top: var(--topbar-h); z-index: 5; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; background: var(--bg); padding: 4px 0; }
.trip-tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 52px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: .78rem; font-weight: 600; text-decoration: none; }
.trip-tabs a .ico { font-size: 1.1rem; line-height: 1.2; }
.trip-tabs a.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.trip .btn { min-height: 44px; }
.trip .btn.sm { min-height: 36px; padding: .35rem .7rem; font-size: .85rem; }
.trip .btn.big { width: 100%; min-height: 56px; font-size: 1.05rem; }
.trip .btn.sq { width: 44px; padding: 0; font-size: 1.4rem; }
.trip .btn[aria-disabled="true"] { opacity: .35; pointer-events: none; }
.trip .btn:disabled { opacity: .6; }
.banner { border-radius: var(--radius); padding: .7rem .9rem; border: 1px solid var(--border); background: var(--surface); font-size: .92rem; }
.banner.good { border-color: #1f5f4a; background: #0f2a22; }
.banner.warn { border-color: #6b5214; background: #2a2210; color: var(--warn); }
.banner.muted { color: var(--text); background: var(--surface2); }
.banner .src { margin-left: .3rem; }
.pill.warn { color: var(--warn); border-color: #6b5214; } .pill.bad { color: var(--bad); border-color: #4a2a30; }
.daypick { display: flex; align-items: center; gap: .5rem; }
.daypick .center { text-align: center; display: flex; gap: .4rem; justify-content: center; align-items: center; }
.grow { flex: 1; }
.trip .item { padding: .55rem 0; border-top: 1px solid var(--border); gap: .5rem; }
.trip .card > .item:first-of-type, .trip .card h3 + .item { border-top: 0; }
.trip .item.done { opacity: .55; } .trip .item.mine { color: var(--accent); }
.pin .landmark { font-size: 1.05rem; font-weight: 600; margin: .4rem 0 .6rem; }
.pin.placeholder { border-style: dashed; } .empty-pin p { margin: .3rem 0 0; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .7rem; text-align: center; }
.stat b { display: block; font-size: 1.6rem; } .stat span { color: var(--muted); font-size: .8rem; }
.big-num { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.money-sum .cats { margin: .6rem 0 .2rem; display: grid; gap: .2rem; }
.trip details summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.trip-card { display: block; color: inherit; border-color: var(--accent); }
.trip-card:hover { text-decoration: none; }
.row.wrap { flex-wrap: wrap; }
.asof { min-height: 1.1em; }
/* v0.3 Executive board (mobile-first) */
.xboard h1{margin:.1rem 0}
.xstats{display:grid;grid-template-columns:repeat(4,1fr);gap:.4rem}
.xstats .stat{display:flex;flex-direction:column;align-items:center;padding:.5rem .2rem;border-radius:10px;background:rgba(255,255,255,.05)}
.xstats .stat b{font-size:1.2rem}
.xlane{display:flex;align-items:center;gap:.4rem;margin:.6rem 0 0;font-size:.9rem}
.xitem{display:flex;gap:.5rem;align-items:stretch;padding:.7rem}
.xlink{flex:1;min-width:0;color:inherit;text-decoration:none;display:flex;flex-direction:column;gap:.3rem}
.xlink b{overflow:hidden;text-overflow:ellipsis}
.xorder{display:flex;flex-direction:column;justify-content:center;gap:.2rem}
.xorder .icon-btn{min-width:36px;min-height:36px}
.xbar{flex:1;height:8px;border-radius:99px;background:rgba(255,255,255,.12);overflow:hidden}
.xbar span{display:block;height:100%;background:var(--accent,#8b5cf6)}
.xp-P0{background:#dc2626!important;color:#fff!important}.xp-P1{background:#ea580c!important;color:#fff!important}.xp-P2{background:#2563eb!important;color:#fff!important}.xp-P3{background:#475569!important;color:#fff!important}
.xgrid{display:grid;grid-template-columns:1fr 1fr;gap:.5rem}
.xgrid input,.xgrid select{width:100%}
.xrep{border-left:3px solid var(--accent,#8b5cf6);padding:.2rem .6rem}
.xpre{white-space:pre-wrap;margin:0}
.xhist{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.5rem}
.xhist li{border-bottom:1px solid rgba(255,255,255,.08);padding-bottom:.4rem;overflow-wrap:anywhere}
details>summary{cursor:pointer;list-style:none}

/* v0.4 exec board: categories/projects, chips, quick-add */
.xchips{display:flex;gap:.4rem;flex-wrap:wrap}
.xchips.xscroll{flex-wrap:nowrap;overflow-x:auto;padding-bottom:.2rem;scrollbar-width:none}
.xchips .chip{border:1px solid rgba(255,255,255,.18);background:transparent;color:inherit;border-radius:99px;padding:.35rem .75rem;min-height:36px;white-space:nowrap;font:inherit;font-size:.85rem;cursor:pointer;display:inline-flex;align-items:center;gap:.35rem}
.xchips .chip.on{background:var(--accent,#8b5cf6);border-color:transparent;color:#fff}
.xcount{font-size:.75rem;opacity:.8;background:rgba(0,0,0,.25);border-radius:99px;padding:0 .4rem}
.xcat{margin:.8rem 0 0;font-size:1.05rem}
.xproj{display:flex;flex-direction:column;gap:.35rem;color:inherit;text-decoration:none;padding:.75rem}
.xellip{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.xmini{display:flex;gap:.7rem;flex-wrap:wrap;opacity:.8}.xmini .bad{color:#f87171}
.xquick{width:100%;font-family:inherit}
.pill.muted{opacity:.75}

/* v0.4.1 sticky category/project picker: two native selects, fixed height (no layout shift) */
.xpick{position:sticky;top:var(--topbar-h);z-index:6;display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0 -1rem;padding:8px 1rem;
  background:var(--bg);border-bottom:1px solid var(--border);contain:layout paint}
.xsel{appearance:none;-webkit-appearance:none;width:100%;min-width:0;height:40px;padding:0 2rem 0 .8rem;border-radius:10px;border:1px solid var(--border);
  background:rgba(255,255,255,.05) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23aab' stroke-width='2'/%3E%3C/svg%3E") no-repeat right .8rem center;
  color:inherit;font:inherit;font-size:.92rem;font-weight:600;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;color-scheme:dark}
.xsel:focus{outline:none;border-color:var(--accent,#8b5cf6)}
.xsel option{background:#151821;color:#e8e8ee}

/* v0.4.2 read-only item detail */
.xmetas{display:grid;grid-template-columns:1fr 1fr;gap:10px}.xmeta{display:flex;flex-direction:column;gap:2px}
