/* ==========================================================================
   Travel Memory — design system
   Off-white canvas · white cards · turquoise primary · near-black ink
   ========================================================================== */
:root {
  --bg: #F6F7F6;
  --surface: #FFFFFF;
  --surface-2: #F1F4F3;
  --ink: #12191B;
  --ink-2: #3E4A4C;
  --muted: #7B8688;
  --line: #E6EAE9;
  --line-2: #EFF2F1;
  --primary: #0EA5B0;
  --primary-600: #0A8B95;
  --primary-700: #08727A;
  --primary-50: #EAF7F8;
  --primary-100: #D3EFF1;
  --pos: #12825A;
  --neg: #C0412C;
  --warn: #A86A12;
  --star: #E0A526;

  --r-xl: 22px;
  --r-lg: 18px;
  --r: 14px;
  --r-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(18, 25, 27, .04);
  --shadow: 0 1px 2px rgba(18, 25, 27, .04), 0 8px 24px -12px rgba(18, 25, 27, .10);
  --shadow-lg: 0 24px 60px -20px rgba(18, 25, 27, .30);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --sat: env(safe-area-inset-top, 0px);
  --font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.5 var(--font); letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
body.no-scroll { overflow: hidden; }
body { padding-top: var(--sat); }
body::before { content: ''; position: fixed; z-index: 95; left: 0; right: 0; top: 0; height: var(--sat); background: var(--bg); pointer-events: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.ic { flex: none; }

/* ---------- utilities ---------- */
.muted { color: var(--muted); }
.muted2 { color: var(--muted); display: block; }
.small { font-size: 13px; }
.ink { color: var(--ink); }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.link { color: var(--primary-600); font-weight: 500; font-size: 14px; display: inline-flex; align-items: center; gap: 2px; }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.eyebrow.light { color: rgba(255, 255, 255, .8); }
.h3 { font-size: 16px; font-weight: 600; margin: 4px 0 10px; }
.prose { color: var(--ink-2); line-height: 1.65; }
.hint { font-size: 13px; color: var(--muted); margin-top: 10px; display: flex; gap: 6px; align-items: flex-start; }
.hint .ic { margin-top: 2px; }
.hint.center { justify-content: center; }
.list-gap { display: grid; gap: 10px; }
.pad { padding: 16px; }

/* ---------- boot ---------- */
.boot { min-height: 60vh; display: grid; place-items: center; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--primary-100); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- layout ---------- */
.app { min-height: 100vh; }
.main { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 24px); outline: none; }
.app.chromeless .tabbar, .app.chromeless .sidebar { display: none; }
.app.chromeless .main { padding-bottom: 32px; }
.page { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.view-enter { animation: viewIn .28s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.sidebar { display: none; }
.tabbar {
  position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 500; transition: color .15s; }
.tabbar a.on { color: var(--primary-600); }
.tabbar a.on .ic { stroke-width: 2; }

@media (min-width: 960px) {
  .app { display: grid; grid-template-columns: 248px 1fr; }
  .tabbar { display: none; }
  .main { padding-bottom: 48px; min-width: 0; }
  .sidebar {
    display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh;
    padding: 22px 14px; border-right: 1px solid var(--line); background: var(--surface);
  }
  .page { padding: 0 32px; }
}
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 10px 18px; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; background: var(--primary); color: #fff; display: grid; place-items: center; }
.brand b { display: block; font-size: 15.5px; letter-spacing: -0.01em; }
.brand small { display: block; font-size: 10.5px; color: var(--muted); letter-spacing: .01em; }
.side-nav { display: grid; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: var(--ink-2); font-weight: 500; transition: background .15s, color .15s; }
.side-nav a:hover { background: var(--surface-2); }
.side-nav a.on { background: var(--primary-50); color: var(--primary-700); }
.side-user { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; }
.side-user:hover { background: var(--surface-2); }
.side-user b { display: block; font-size: 14px; }
.side-user small { color: var(--muted); font-size: 12px; }

/* ---------- topbar ---------- */
.topbar { display: flex; align-items: center; gap: 8px; min-height: 64px; padding: 20px 0 10px; }
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; }
.topbar-title p { color: var(--muted); font-size: 13px; margin-top: 1px; }
.topbar-actions { display: flex; align-items: center; gap: 4px; }
.topbar-trip {
  position: sticky; top: var(--sat); z-index: 20; margin: 0 -16px; padding: 12px 12px 8px;
  background: rgba(246, 247, 246, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.topbar-trip .topbar-title h1 { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-trip .topbar-title p { font-size: 12px; }
@media (min-width: 960px) { .topbar-trip { margin: 0 -32px; padding: 12px 28px 8px; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 12px; font-weight: 600; font-size: 14.5px; white-space: nowrap;
  transition: transform .12s var(--ease), background .15s, box-shadow .15s, color .15s;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 4px 14px -6px rgba(14, 165, 176, .6); }
.btn-primary:hover { background: var(--primary-600); }
.btn-soft { background: var(--primary-50); color: var(--primary-700); }
.btn-soft:hover { background: var(--primary-100); }
.btn-ghost { background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); }
.btn-ghost:hover, .btn-ghost.on { background: var(--surface-2); }
.btn-danger { background: var(--neg); color: #fff; }
.btn-sm { height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; gap: 6px; }
.btn-block { width: 100%; }
.btn-pill { border-radius: 999px; padding: 0 22px; }
.danger-text { color: var(--neg); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; color: var(--ink-2); flex: none;
  transition: background .15s, transform .12s;
}
.icon-btn:hover { background: rgba(18, 25, 27, .05); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; font-size: 18px; }
.icon-btn.danger { color: var(--neg); }
.glass-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: rgba(18, 25, 27, .28); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
@media (max-width: 420px) { .hide-xs { display: none; } }

/* ---------- segmented, chips ---------- */
.seg { display: flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: 12px; margin: 4px 0 16px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1; min-width: max-content; height: 36px; padding: 0 10px; border-radius: 9px; font-size: 13.5px; font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .15s, color .15s; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); font-weight: 600; }
.seg-n { font-size: 11.5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: rgba(18,25,27,.06); display: inline-grid; place-items: center; }
.seg button.on .seg-n { background: var(--primary-50); color: var(--primary-700); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 4px -16px 14px; padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }
.chips.static { margin: 10px 0 0; padding: 0; flex-wrap: wrap; }
.chip { flex: none; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; font-weight: 500; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; transition: all .15s; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
span.chip { height: 30px; font-size: 12.5px; }
.year-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; }
.year-tabs button { flex: none; height: 36px; padding: 0 16px; border-radius: 10px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.year-tabs button.on { background: var(--ink); color: #fff; }

/* ---------- cards, lists ---------- */
.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); border: 1px solid rgba(18,25,27,.035); }
.list-card { padding: 4px 0; overflow: hidden; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; width: 100%; text-align: left; position: relative; transition: background .15s; }
.list-row + .list-row::before { content: ''; position: absolute; left: 16px; right: 16px; top: 0; border-top: 1px solid var(--line-2); }
.list-card [role=button].list-row:hover, a.list-row:hover, button.list-row:hover { background: #FAFBFB; }
.list-row > .ic { color: var(--muted); }
.list-ic { width: 38px; height: 38px; border-radius: 11px; background: var(--primary-50); color: var(--primary-700); display: grid; place-items: center; flex: none; }
.list-ic.off { background: var(--surface-2); color: var(--muted); }
.list-thumb { width: 46px; height: 46px; border-radius: 11px; overflow: hidden; flex: none; background: var(--surface-2); }
.list-thumb .img { width: 100%; height: 100%; }
.list-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.list-body b { font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.list-body small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.amount { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.link-row { display: flex; align-items: center; gap: 10px; padding: 14px 4px; color: var(--ink-2); font-weight: 500; margin-top: 8px; }
.link-row span { flex: 1; }
.link-row > .ic:first-child { color: var(--primary-600); }

/* ---------- avatars ---------- */
.avatar {
  width: var(--s); height: var(--s); border-radius: 50%; flex: none; display: inline-grid; place-items: center;
  background: var(--c); color: #fff; font-weight: 600; font-size: calc(var(--s) * .38); letter-spacing: .01em; user-select: none;
}
.avatar.more { background: var(--surface-2); color: var(--ink-2); }
.avatars { display: inline-flex; align-items: center; }
.avatars .avatar { box-shadow: 0 0 0 2px var(--surface); }
.avatars .avatar + .avatar { margin-left: calc(var(--s) * -0.28); }

/* ---------- progress, pills, tags, stars ---------- */
.progress { height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--primary); transition: width .5s var(--ease); }
.progress.thin { height: 4px; }
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; flex: none; }
.pill-upcoming { background: var(--primary-50); color: var(--primary-700); }
.pill-ongoing { background: #E7F5EE; color: var(--pos); }
.pill-completed { background: var(--surface-2); color: var(--ink-2); }
.pill-ok { background: #E7F5EE; color: var(--pos); }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 7px; background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-weight: 500; white-space: nowrap; }
.tag-sm { height: 21px; padding: 0 7px; font-size: 11.5px; }
.tag-warn { background: #FBF1E1; color: var(--warn); }
.tag-hi { background: #FBEDEA; color: var(--neg); height: 20px; font-size: 11px; }
.stars { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; white-space: nowrap; }
.stars .star-ic { color: var(--star); fill: var(--star); }
.stars b { font-weight: 600; }

/* ---------- images ---------- */
.img { width: 100%; height: 100%; object-fit: cover; background: linear-gradient(110deg, #ECEFEE 30%, #F4F6F5 50%, #ECEFEE 70%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; opacity: 0; transition: opacity .35s; }
.img.ld { opacity: 1; animation: none; background: var(--surface-2); }
img.img:not([src]):not([data-file]) { opacity: 1; }
.img.img-err, .img.img-missing { opacity: 1; animation: none; background: linear-gradient(135deg, #DCEFF1, #EEF3F2); color: transparent; }
.img.ph { opacity: 1; animation: none; display: grid; place-items: center; background: linear-gradient(135deg, #DCEFF1, #EEF3F2); color: var(--primary-600); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- empty states ---------- */
.empty { text-align: center; padding: 44px 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-ic { width: 60px; height: 60px; border-radius: 18px; background: var(--primary-50); color: var(--primary-600); display: grid; place-items: center; margin-bottom: 6px; }
.empty h3 { font-size: 17px; font-weight: 600; }
.empty p { color: var(--muted); max-width: 340px; font-size: 14px; }
.empty .btn { margin-top: 10px; }
.empty-sm { padding: 28px 16px; }
.empty-sm .empty-ic { width: 48px; height: 48px; border-radius: 14px; }

/* ---------- sections ---------- */
.section { margin-top: 26px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
.tab-body { animation: viewIn .22s var(--ease); }

/* ==========================================================================
   HOME
   ========================================================================== */
.home-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 28px 0 4px; }
.home-head h1 { font-size: 27px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; margin: 2px 0 2px; }
.home-date { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.home-head-actions { display: flex; align-items: center; gap: 8px; }
.home-grid { display: grid; gap: 0 28px; }
@media (min-width: 960px) { .home-grid { grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); } .home-side .section:first-child { margin-top: 26px; } }

.hero-card { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow); overflow: hidden; border: 1px solid rgba(18,25,27,.035); }
.hero-media { position: relative; aspect-ratio: 16 / 11; cursor: pointer; overflow: hidden; }
@media (min-width: 600px) { .hero-media { aspect-ratio: 16 / 8.5; } }
.hero-media .img { position: absolute; inset: 0; transition: transform .8s var(--ease), opacity .35s; }
.hero-media:hover .img { transform: scale(1.03); }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,16,18,0) 35%, rgba(10,16,18,.62) 100%); }
.hero-over { position: absolute; left: 18px; right: 18px; bottom: 16px; color: #fff; }
.hero-chip { display: inline-flex; height: 24px; align-items: center; padding: 0 10px; border-radius: 99px; background: rgba(255,255,255,.92); color: var(--primary-700); font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 10px; }
.hero-over h3 { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.hero-date { font-size: 14px; font-weight: 500; letter-spacing: .04em; margin-top: 6px; opacity: .95; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; opacity: .9; margin-top: 4px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 5px; }
.hero-panel { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; padding: 16px 18px 6px; }
.countdown { display: grid; grid-template-columns: repeat(3, 58px); gap: 8px; }
.countdown div { background: var(--surface-2); border-radius: 12px; padding: 8px 0 7px; text-align: center; }
.countdown b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.countdown span { font-size: 10.5px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.hero-prep { display: grid; gap: 7px; min-width: 0; }
.hero-prep-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--ink-2); }
.hero-prep-row b { font-variant-numeric: tabular-nums; }
.hero-btn { margin: 12px 18px 18px; width: calc(100% - 36px); height: 48px; border-radius: 14px; }
@media (max-width: 380px) { .countdown { grid-template-columns: repeat(3, 50px); } .hero-panel { gap: 12px; } }

.ongoing { display: flex; gap: 14px; align-items: center; padding: 12px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); cursor: pointer; border: 1px solid rgba(18,130,90,.18); }
.ongoing-img { width: 64px; height: 64px; border-radius: 14px; overflow: hidden; flex: none; }
.ongoing-body { flex: 1; min-width: 0; }
.ongoing-body h3 { font-size: 16px; font-weight: 600; }
.ongoing-body p { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.live-dot { font-size: 11.5px; font-weight: 600; color: var(--pos); display: inline-flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: .05em; }
.live-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--pos); box-shadow: 0 0 0 0 rgba(18,130,90,.5); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(18,130,90,0); } 100% { box-shadow: 0 0 0 0 rgba(18,130,90,0); } }

.year-snap { display: block; padding: 16px; transition: box-shadow .2s; }
.year-snap:hover { box-shadow: var(--shadow), 0 0 0 1px var(--primary-100); }
.year-snap-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stats > div { display: flex; flex-direction: column; }
.stats b { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stats span { font-size: 12px; color: var(--muted); }
.stats-5 { grid-template-columns: repeat(5, 1fr); }
.stats-card { padding: 16px; margin-top: 12px; }
@media (max-width: 400px) { .stats-5 b { font-size: 18px; } .stats-5 span { font-size: 11px; } }

.goals { padding: 6px 16px; }
.goal { display: flex; gap: 12px; align-items: center; padding: 11px 0; }
.goal + .goal { border-top: 1px solid var(--line-2); }
.goal-ic { width: 36px; height: 36px; border-radius: 11px; background: var(--primary-50); color: var(--primary-700); display: grid; place-items: center; flex: none; }
.goal-body { flex: 1; min-width: 0; display: grid; gap: 7px; }
.goal-top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.goal-top b { font-variant-numeric: tabular-nums; }

.activity { padding: 4px 16px; }
.act { display: flex; gap: 12px; padding: 11px 0; align-items: flex-start; cursor: pointer; }
.act + .act { border-top: 1px solid var(--line-2); }
.act p { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.act p b { color: var(--ink); font-weight: 600; }
.act span { font-size: 12px; color: var(--muted); }

/* ---------- trip cards ---------- */
.trip-row { display: flex; gap: 14px; padding: 10px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); cursor: pointer; border: 1px solid rgba(18,25,27,.035); transition: transform .15s var(--ease), box-shadow .2s; }
.trip-row:hover { box-shadow: var(--shadow), 0 0 0 1px var(--primary-100); }
.trip-row:active { transform: scale(.99); }
.trip-row-img { width: 96px; height: 96px; border-radius: 13px; overflow: hidden; flex: none; }
.trip-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding-right: 4px; }
.trip-row-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.trip-row-top h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.trip-row-date { font-size: 12.5px; font-weight: 600; color: var(--ink-2); letter-spacing: .02em; }
.trip-row-meta { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; min-width: 0; }
.trip-row-meta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trip-row-prep { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: center; font-size: 12px; color: var(--primary-700); font-weight: 500; margin-top: 3px; }

.trip-photo { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: var(--r-lg); overflow: hidden; cursor: pointer; box-shadow: var(--shadow); }
.trip-photo .img { position: absolute; inset: 0; transition: transform .8s var(--ease), opacity .35s; }
.trip-photo:hover .img { transform: scale(1.04); }
.trip-photo-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,16,18,0) 40%, rgba(10,16,18,.66)); }
.trip-photo-body { position: absolute; left: 16px; right: 16px; bottom: 14px; color: #fff; }
.trip-photo-body h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.trip-photo-body p { font-size: 12.5px; opacity: .92; letter-spacing: .03em; }
.trip-photo-meta { display: flex; flex-wrap: wrap; gap: 3px 12px; margin-top: 3px; }
.trip-photo-meta span { display: inline-flex; align-items: center; gap: 4px; letter-spacing: 0; }

/* ---------- archive ---------- */
.archive-head { padding: 16px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); margin-bottom: 18px; }
.archive-head .eyebrow { display: block; margin-bottom: 10px; color: var(--primary-700); }
.timeline-year { display: grid; gap: 22px; }
.tly-month { display: grid; grid-template-columns: 56px 1fr; gap: 12px; position: relative; }
.tly-month::before { content: ''; position: absolute; left: 27px; top: 46px; bottom: -22px; border-left: 1px dashed var(--line); }
.tly-month:last-child::before { display: none; }
.tly-label { text-align: center; padding-top: 4px; }
.tly-label b { display: block; font-size: 15px; font-weight: 700; letter-spacing: .04em; }
.tly-label span { font-size: 11px; color: var(--muted); }
.tly-trips { display: grid; gap: 12px; }
@media (min-width: 720px) { .tly-trips { grid-template-columns: repeat(2, 1fr); } }

/* ==========================================================================
   TRIP
   ========================================================================== */
.trip-hero { position: relative; margin: 0 -16px; height: 300px; overflow: hidden; background: var(--surface-2); }
.trip-hero .img { position: absolute; inset: 0; }
.trip-hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,16,18,.32) 0%, rgba(10,16,18,0) 30%, rgba(10,16,18,0) 60%, rgba(10,16,18,.25) 100%); }
.trip-hero-shade.strong { background: linear-gradient(180deg, rgba(10,16,18,.3) 0%, rgba(10,16,18,0) 30%, rgba(10,16,18,.72) 100%); }
.trip-hero-bar { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; }
@media (min-width: 960px) { .trip-hero { margin: 24px 0 0; height: 380px; border-radius: var(--r-xl); } }
.trip-head { position: relative; margin: -30px 0 0; background: var(--surface); border-radius: var(--r-xl); padding: 20px 18px 14px; box-shadow: var(--shadow); border: 1px solid rgba(18,25,27,.035); }
@media (min-width: 960px) { .trip-head { margin: -48px 28px 0; padding: 24px 24px 16px; } }
.trip-head-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.trip-head h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
.trip-head-date { margin-top: 6px; font-size: 14px; font-weight: 500; color: var(--ink-2); letter-spacing: .02em; }
.trip-head-meta { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.trip-head-members { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 13px; color: var(--muted); cursor: pointer; }
.trip-actions { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.trip-actions button { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-2); font-weight: 500; padding: 4px 0; border-radius: 10px; transition: background .15s; }
.trip-actions button:hover:not(:disabled) { background: var(--surface-2); }
.trip-actions .ic { color: var(--primary-600); }

.trip-tabs { position: sticky; top: 0; z-index: 19; margin: 14px -16px 0; overflow-x: auto; scrollbar-width: none; background: rgba(246,247,246,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.trip-page:not(.is-overview) .trip-tabs { top: 64px; margin-top: 0; }
.trip-tabs::-webkit-scrollbar { display: none; }
.trip-tabs-inner { display: flex; gap: 2px; padding: 0 12px; min-width: max-content; }
.trip-tabs a { position: relative; padding: 13px 10px 12px; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; transition: color .15s; }
.trip-tabs a:hover { color: var(--ink); }
.trip-tabs a.on { color: var(--ink); font-weight: 600; }
.trip-tabs a.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2.5px; border-radius: 2px; background: var(--primary); }
@media (min-width: 960px) { .trip-tabs { margin: 18px -32px 0; } .trip-tabs-inner { padding: 0 26px; } }
.trip-body { padding-top: 18px; }

/* overview */
.phases { display: flex; justify-content: space-between; position: relative; padding: 2px 4px 0; margin-bottom: 18px; }
.phases::before { content: ''; position: absolute; left: 22px; right: 22px; top: 7px; border-top: 1.5px solid var(--line); }
.phase { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.phase-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--line); position: relative; }
.phase.done .phase-dot { background: var(--primary); border-color: var(--primary); }
.phase.on .phase-dot { background: var(--surface); border: 3px solid var(--primary); box-shadow: 0 0 0 4px var(--primary-50); }
.phase.on { color: var(--primary-700); font-weight: 600; }
.memory-cta { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r-lg); margin-bottom: 16px; background: var(--ink); color: #fff; box-shadow: var(--shadow); }
.memory-cta .eyebrow { color: #7FD9E0; }
.memory-cta h3 { font-size: 17px; font-weight: 600; margin: 2px 0; }
.memory-cta p { font-size: 13px; opacity: .7; }
.memory-cta > div { flex: 1; }
.memory-cta-ic { width: 46px; height: 46px; border-radius: 14px; background: rgba(255,255,255,.1); display: grid; place-items: center; }
.ov-desc { color: var(--ink-2); line-height: 1.6; margin-bottom: 16px; }
.ov-stats { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 14px 4px; margin-bottom: 12px; }
.ov-stats div { text-align: center; display: flex; flex-direction: column; }
.ov-stats div + div { border-left: 1px solid var(--line-2); }
.ov-stats b { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ov-stats span { font-size: 11.5px; color: var(--muted); }
.ov-grid { display: grid; gap: 12px; }
@media (min-width: 640px) { .ov-grid { grid-template-columns: 1fr 1fr; } }
.ov-card { padding: 16px; display: grid; gap: 10px; transition: box-shadow .2s; }
.ov-card:hover { box-shadow: var(--shadow), 0 0 0 1px var(--primary-100); }
.ov-card-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 14px; }
.ov-card-head span { display: inline-flex; gap: 8px; align-items: center; }
.ov-card-head .ic { color: var(--primary-600); }
.ov-card p { font-size: 13px; }
.ov-money { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ov-money b { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ov-money span { font-size: 12.5px; color: var(--muted); }
.mini-tl { padding: 4px 0; }
.mini-tl-item { display: flex; gap: 12px; align-items: center; padding: 11px 16px; position: relative; }
.mini-tl-item + .mini-tl-item::before { content: ''; position: absolute; left: 16px; right: 16px; top: 0; border-top: 1px solid var(--line-2); }
.mini-tl-time { width: 48px; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14px; display: flex; flex-direction: column; line-height: 1.2; }
.mini-tl-time small { font-size: 11px; color: var(--muted); font-weight: 500; }
.mini-tl-ic { width: 32px; height: 32px; border-radius: 10px; background: var(--primary-50); color: var(--primary-700); display: grid; place-items: center; flex: none; }
.mini-tl-body { display: flex; flex-direction: column; min-width: 0; }
.mini-tl-body b { font-weight: 600; font-size: 14px; }
.mini-tl-body small { color: var(--muted); font-size: 12.5px; }
.h-scroll { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 4px; scroll-snap-type: x mandatory; }
.h-scroll::-webkit-scrollbar { display: none; }
.place-chip { flex: none; width: 140px; scroll-snap-align: start; }
.place-chip .img { height: 100px; border-radius: 13px; }
.place-chip span { display: block; font-size: 13px; font-weight: 500; margin-top: 6px; line-height: 1.3; }
.ov-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: var(--r); overflow: hidden; }
.ov-photos a { aspect-ratio: 1; }
@media (min-width: 640px) { .ov-photos { grid-template-columns: repeat(6, 1fr); } }

/* itinerary */
.day-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 2px 16px; }
.day-tabs::-webkit-scrollbar { display: none; }
.day-tab { flex: none; min-width: 84px; padding: 9px 14px; border-radius: 13px; background: var(--surface); border: 1px solid var(--line); text-align: left; transition: all .15s; }
.day-tab b { display: block; font-size: 14px; font-weight: 600; }
.day-tab span { font-size: 11.5px; color: var(--muted); letter-spacing: .03em; }
.day-tab.on { background: var(--primary-50); border-color: var(--primary); }
.day-tab.on b { color: var(--primary-700); }
.it-tools { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 13px; }
.it-tools-r { display: flex; gap: 6px; }
.it-day { margin-top: 18px; }
.it-day-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 10px; }
.it-day-head h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; cursor: pointer; }
.tl { position: relative; }
.tl-item { display: grid; grid-template-columns: 46px 22px 1fr; align-items: stretch; }
.tl-time { font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; padding-top: 14px; }
.tl-rail { position: relative; display: flex; justify-content: center; }
.tl-rail::before { content: ''; position: absolute; top: 0; bottom: 0; border-left: 1.5px solid var(--primary-100); }
.tl-item:first-child .tl-rail::before { top: 20px; }
.tl-item:last-child .tl-rail::before { bottom: calc(100% - 20px); }
.tl-dot { position: relative; margin-top: 15px; width: 11px; height: 11px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--primary); }
.tl-card { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 10px 4px; padding: 12px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); cursor: pointer; transition: box-shadow .2s, transform .15s; position: relative; }
.tl-card:hover { box-shadow: var(--shadow), 0 0 0 1px var(--primary-100); }
.tl-card:active { transform: scale(.995); }
.tl-card-body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.tl-card h4 { font-size: 15px; font-weight: 600; line-height: 1.3; }
.tl-sub { font-size: 13px; color: var(--ink-2); }
.tl-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.tl-note { font-size: 12.5px; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tl-thumb { width: 76px; height: 76px; border-radius: 11px; overflow: hidden; flex: none; }
.tl-order { display: flex; flex-direction: column; gap: 2px; }
.it-empty { padding: 14px 16px; border: 1px dashed var(--line); border-radius: var(--r); font-size: 13.5px; color: var(--muted); }
.it-empty .link { font-size: 13.5px; }
.fab-row { position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px); display: flex; justify-content: center; margin-top: 18px; pointer-events: none; z-index: 5; }
.fab-row .btn { pointer-events: auto; box-shadow: 0 10px 30px -10px rgba(14,165,176,.7); }
@media (min-width: 960px) { .fab-row { bottom: 20px; } }

/* map */
.map-box { position: relative; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); background: #E9EEED; }
.map-canvas { height: 46vh; min-height: 300px; max-height: 520px; }
.map-loading { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 13.5px; text-align: center; padding: 20px; }
.map-loading.error { color: var(--ink-2); }
.map-route-btn { position: absolute; z-index: 500; left: 12px; bottom: 12px; display: inline-flex; gap: 6px; align-items: center; height: 36px; padding: 0 12px; border-radius: 10px; background: rgba(255,255,255,.95); font-size: 13px; font-weight: 600; color: var(--primary-700); box-shadow: var(--shadow); }
.mk { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface); color: var(--primary-700); font: 700 13px/1 var(--font); border: 2.5px solid var(--primary); box-shadow: 0 4px 12px -4px rgba(0,0,0,.35); transition: transform .15s; }
.mk.on { background: var(--primary); color: #fff; transform: scale(1.15); }
.leaflet-container { font-family: var(--font); background: #E9EEED; }
.osm-tiles { filter: saturate(.55) contrast(.95) brightness(1.03); }
.leaflet-control-attribution { font-size: 10px; }
.map-card { margin-top: 12px; padding: 14px 16px; }
.map-card-head { display: flex; gap: 12px; align-items: flex-start; }
.map-card-head h3 { font-size: 16px; font-weight: 600; }
.map-card-head p { font-size: 13px; color: var(--muted); }
.map-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.map-num { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; flex: none; }
.map-num.sm { width: 24px; height: 24px; font-size: 12px; background: var(--primary-50); color: var(--primary-700); }
.stop-list { margin-top: 14px; display: grid; gap: 6px; }
.stop-list li { display: flex; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 13px; cursor: pointer; transition: background .15s; }
.stop-list li:hover { background: var(--surface); }
.stop-list li.on { background: var(--surface); box-shadow: var(--shadow); }
.stop-list li.on .map-num { background: var(--primary); color: #fff; }
.stop-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.stop-body b { font-size: 14px; font-weight: 600; }
.stop-body small { font-size: 12px; color: var(--muted); }
.stop-img { width: 52px; height: 40px; border-radius: 9px; overflow: hidden; flex: none; }

/* bookings */
.bk-list { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .bk-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bk { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 16px; border: 1px solid rgba(18,25,27,.035); transition: box-shadow .4s; }
.bk.flash { box-shadow: var(--shadow), 0 0 0 2px var(--primary); }
.bk-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.bk-brand { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 14.5px; }
.bk-brand .ic { color: var(--primary-600); }
.bk-brand b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-brand span { color: var(--muted); font-weight: 500; font-size: 13px; }
.bk-date { font-size: 13px; color: var(--muted); margin-top: 8px; }
.bk-route { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 10px 0 14px; }
.bk-route b { display: block; font-size: 26px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; }
.bk-time { display: block; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bk-route small { color: var(--muted); font-size: 12px; }
.bk-line { display: flex; align-items: center; gap: 6px; color: var(--primary-600); }
.bk-line::before, .bk-line::after { content: ''; width: 22px; border-top: 1.5px dashed var(--line); }
.r { text-align: right; }
.bk-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 0; border-top: 1px dashed var(--line); }
.bk-meta small { display: block; color: var(--muted); font-size: 11.5px; }
.bk-meta b { font-size: 16px; font-weight: 700; }
.bk-stay { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 12px 0; }
.bk-stay small { display: block; color: var(--muted); font-size: 11.5px; }
.bk-stay b { display: block; font-size: 16px; font-weight: 600; }
.bk-stay span { font-size: 13px; color: var(--ink-2); }
.bk-nights { font-size: 12px; font-weight: 600; color: var(--primary-700); background: var(--primary-50); border-radius: 99px; padding: 3px 10px; }
.bk-note { font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-bottom: 8px; }
.bk-note span { color: var(--muted); }
.bk-actions { display: flex; gap: 8px; align-items: center; padding-top: 4px; }
.bk-actions .btn { flex: 1; min-width: 0; height: 42px; padding: 0 10px; }

/* documents */
.doc-row { cursor: pointer; }

/* expenses */
.exp-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.exp-summary .card { padding: 14px 16px; display: flex; flex-direction: column; }
.exp-summary small { color: var(--muted); font-size: 12.5px; }
.exp-summary b { font-size: 23px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.3; }
.exp-summary span { font-size: 12px; color: var(--muted); }
@media (max-width: 380px) { .exp-summary b { font-size: 19px; } }
.exp-day { margin-bottom: 14px; }
.exp-day-head { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); font-weight: 500; padding: 0 4px 6px; }
.split-row .amount { font-size: 15px; }
.split-row .amount.pos { color: var(--pos); }
.split-row .amount.neg { color: var(--neg); }
.transfer-mid { flex: 1; display: flex; align-items: center; gap: 6px; font-size: 14px; min-width: 0; }
.sticky-actions { position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-b) + 10px); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; padding: 10px; background: rgba(255,255,255,.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: 18px; box-shadow: var(--shadow-lg); z-index: 5; }
@media (min-width: 960px) { .sticky-actions { bottom: 16px; max-width: 460px; margin-left: auto; } }
.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: minmax(96px, 128px) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.bar-label { display: flex; align-items: center; gap: 7px; color: var(--ink-2); white-space: nowrap; overflow: hidden; }
.bar-label .ic { color: var(--muted); }
.bar { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.bar-val { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.bar-val small { color: var(--muted); font-weight: 500; margin-left: 6px; }
.amount-input { display: flex; align-items: baseline; justify-content: center; gap: 4px; border-bottom: 1.5px solid var(--line); padding: 6px 0 8px; }
.amount-input:focus-within { border-color: var(--primary); }
.amount-input input { border: 0; outline: 0; background: none; font-size: 34px; font-weight: 700; letter-spacing: -0.02em; text-align: center; width: 100%; font-variant-numeric: tabular-nums; }
.amount-input span { font-size: 22px; font-weight: 600; color: var(--muted); }
.amount-hint { text-align: center; font-size: 12.5px; color: var(--muted); margin: 6px 0 4px; }
.cat-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cat-opt input { position: absolute; opacity: 0; pointer-events: none; }
.cat-opt span { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 12px; border: 1px solid var(--line); font-size: 12.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; transition: all .15s; }
.cat-opt input:checked + span { border-color: var(--primary); background: var(--primary-50); color: var(--primary-700); }
.cat-opt input:focus-visible + span { outline: 2px solid var(--primary); }

/* todo */
.todo-head { padding: 16px; display: grid; gap: 10px; }
.todo-head-top { display: flex; justify-content: space-between; align-items: baseline; }
.todo-head-top b { font-size: 15px; font-weight: 600; }
.todo-pct { font-size: 20px; font-weight: 700; color: var(--primary-700); font-variant-numeric: tabular-nums; }
.quick-add { display: flex; align-items: center; gap: 8px; margin: 12px 0; padding: 6px 6px 6px 12px; background: var(--surface); border-radius: 14px; border: 1px solid var(--line); transition: border-color .15s, box-shadow .15s; }
.quick-add:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
.quick-add-ic { color: var(--muted); display: grid; }
.quick-add input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; height: 36px; font-size: 14.5px; }
.quick-add select { border: 0; outline: 0; background: var(--surface-2); height: 34px; border-radius: 9px; padding: 0 8px; font-size: 13px; color: var(--ink-2); max-width: 92px; }
.todo-list { padding: 2px 0; }
.todo-item { display: flex; align-items: center; gap: 12px; padding: 11px 16px; position: relative; }
.todo-item + .todo-item::before { content: ''; position: absolute; left: 50px; right: 16px; top: 0; border-top: 1px solid var(--line-2); }
.check { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid #C8D0CF; display: grid; place-items: center; color: transparent; flex: none; transition: all .18s var(--ease); }
.check.on { background: var(--primary); border-color: var(--primary); color: #fff; animation: pop .25s var(--ease); }
@keyframes pop { 50% { transform: scale(1.15); } }
.todo-body { flex: 1; min-width: 0; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.todo-title { font-size: 14.5px; transition: color .2s; }
.todo-item.done .todo-title { color: var(--muted); text-decoration: line-through; text-decoration-color: #C8D0CF; }
.todo-meta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.todo-meta span { display: inline-flex; gap: 4px; align-items: center; }
.todo-meta .late { color: var(--neg); }

/* media */
.media-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.media-head p { font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.m-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: var(--r); overflow: hidden; }
.m-grid > :first-child { grid-column: span 2; grid-row: span 2; }
@media (min-width: 720px) { .m-grid { grid-template-columns: repeat(5, 1fr); gap: 6px; } }
.m-tile { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--surface-2); display: block; width: 100%; }
.m-tile .img, .m-tile video { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), opacity .35s; }
.m-tile:hover .img { transform: scale(1.05); }
.m-play { position: absolute; right: 7px; bottom: 7px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 6px; border-radius: 99px; background: rgba(10,16,18,.55); color: #fff; font-size: 11.5px; font-weight: 600; backdrop-filter: blur(6px); }
.m-group { margin-bottom: 18px; }
.m-group-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 14px; }
.m-group-head span { color: var(--muted); font-size: 12.5px; }
.up-preview { display: flex; gap: 6px; flex-wrap: wrap; }
.up-thumb, .up-more { width: 60px; height: 60px; border-radius: 10px; background: var(--surface-2) center / cover; display: grid; place-items: center; color: var(--muted); font-size: 13px; font-weight: 600; }

/* journal */
.jr-timeline { display: grid; gap: 4px; }
.jr-day { display: grid; grid-template-columns: 48px 1fr; gap: 12px; position: relative; padding-bottom: 14px; }
.jr-day::before { content: ''; position: absolute; left: 23px; top: 52px; bottom: 0; border-left: 1.5px solid var(--line); }
.jr-day:last-child::before { display: none; }
.jr-date { text-align: center; padding-top: 4px; }
.jr-date b { display: block; font-size: 22px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.jr-date span { font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--muted); }
.jr-entries { display: grid; gap: 12px; min-width: 0; }
.jr-card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 16px; display: grid; gap: 10px; border: 1px solid rgba(18,25,27,.035); }
.jr-card h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; margin-top: 2px; }
.jr-card .eyebrow a { color: var(--primary-700); }
.jr-body { color: var(--ink-2); line-height: 1.7; font-size: 15px; white-space: pre-line; }
.jr-photos { display: grid; gap: 4px; border-radius: 12px; overflow: hidden; }
.jr-photos.n2 { grid-template-columns: 1fr 1fr; }
.jr-photos.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.jr-photos.n3 .jr-ph:first-child { grid-row: span 2; }
.jr-photos.n4 { grid-template-columns: repeat(4, 1fr); }
.jr-ph { position: relative; aspect-ratio: 4 / 3; overflow: hidden; display: block; width: 100%; }
.jr-photos.n1 .jr-ph { aspect-ratio: 16 / 9; }
.jr-photos.n3 .jr-ph:first-child { aspect-ratio: auto; }
.jr-photos.n4 .jr-ph { aspect-ratio: 1; }
.jr-more { position: absolute; inset: 0; background: rgba(10,16,18,.5); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 16px; }
.jr-foot { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.jr-author { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 500; }
.jr-places { display: inline-flex; align-items: center; gap: 4px; flex: 1; min-width: 0; }
.jr-places a { color: var(--primary-700); }
.jr-write { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-radius: var(--r); border: 1px dashed #CDD5D4; color: var(--muted); font-size: 14px; width: 100%; transition: all .15s; }
.jr-write:hover { border-color: var(--primary); color: var(--primary-700); background: var(--primary-50); }
.jr-trip { margin-bottom: 26px; }
.jr-trip-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.jr-trip-head > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.jr-trip-head b { font-size: 17px; font-weight: 600; }
.jr-trip-head small { font-size: 12.5px; color: var(--muted); }

/* members */
.role { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 7px; white-space: nowrap; }
.role-admin { background: var(--primary-50); color: var(--primary-700); }
.role-member { background: var(--surface-2); color: var(--ink-2); }
.members > .btn { margin-top: 12px; }
.perm-grid { display: grid; gap: 10px; }
@media (min-width: 640px) { .perm-grid { grid-template-columns: 1fr 1fr; } }
.perm h4 { display: flex; gap: 8px; align-items: center; font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.perm h4 .ic { color: var(--primary-600); }
.perm li { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--ink-2); padding: 3px 0; }
.perm li .ic { color: var(--pos); }

/* recap */
.recap-hero { position: relative; margin: 0 -16px; height: 420px; overflow: hidden; background: var(--ink); }
.recap-hero .img { position: absolute; inset: 0; }
.recap-title { position: absolute; left: 20px; right: 20px; bottom: 46px; color: #fff; display: grid; gap: 6px; justify-items: start; }
.recap-title h1 { font-size: 40px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; text-transform: uppercase; }
.recap-title p { font-size: 14px; letter-spacing: .06em; opacity: .9; margin-bottom: 6px; }
@media (min-width: 960px) { .recap-hero { margin: 24px 0 0; border-radius: var(--r-xl); height: 460px; } .recap-title { left: 32px; bottom: 64px; } .recap-title h1 { font-size: 52px; } }
.recap-stats { display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); margin-top: -26px; position: relative; padding: 16px 4px; }
.recap-stats div { text-align: center; display: flex; flex-direction: column; }
.recap-stats b { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.recap-stats span { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
@media (min-width: 960px) { .recap-stats { margin: -40px 28px 0; } }
.recap-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.recap-act { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 8px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); text-align: center; transition: box-shadow .2s; }
.recap-act:hover { box-shadow: var(--shadow), 0 0 0 1px var(--primary-100); }
.recap-act > span { width: 46px; height: 46px; border-radius: 14px; background: var(--primary-50); color: var(--primary-700); display: grid; place-items: center; margin-bottom: 4px; }
.recap-act b { font-size: 13.5px; font-weight: 600; }
.recap-act small { font-size: 12px; color: var(--muted); }
.recap-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.recap-strip::-webkit-scrollbar { display: none; }
.recap-strip .img { flex: none; width: 150px; height: 200px; border-radius: 14px; }
.video-recap { display: grid; gap: 6px; }
.video-recap h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.video-recap .sub { font-size: 14px; font-weight: 600; margin-top: 12px; }
.video-recap .seg { margin: 4px 0 0; }
.video-recap > .btn { margin-top: 16px; height: 50px; }
.style-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.style-opt { display: grid; gap: 6px; text-align: center; font-size: 12.5px; }
.style-opt b { font-weight: 500; color: var(--ink-2); }
.style-img { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--surface-2); outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s; }
.style-img .m-play { left: 50%; top: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%); padding: 7px; }
.style-opt.on .style-img { outline-color: var(--primary); }
.style-opt.on b { color: var(--primary-700); font-weight: 600; }
.toggle-list { display: grid; gap: 2px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; cursor: pointer; position: relative; }
.toggle-row span { font-size: 14px; display: flex; gap: 8px; align-items: baseline; }
.toggle-row small { color: var(--muted); font-size: 12px; }
.toggle-row input { position: absolute; opacity: 0; }
.toggle-row i { width: 42px; height: 26px; border-radius: 99px; background: #D5DCDB; position: relative; transition: background .2s; flex: none; }
.toggle-row i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s var(--ease); }
.toggle-row input:checked + i { background: var(--primary); }
.toggle-row input:checked + i::after { transform: translateX(16px); }
.toggle-row input:disabled + i { opacity: .4; }
.toggle-row input:focus-visible + i { outline: 2px solid var(--primary); outline-offset: 2px; }
.recap-queue { margin-top: 12px; border-top: 1px solid var(--line-2); }
.recap-queue .list-row { padding-left: 0; padding-right: 0; }

/* place */
.place-hero { height: 320px; }
.place-rating { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 10px; }
.place-rating > span { display: inline-flex; gap: 6px; align-items: center; }
.place-rating small { font-size: 11.5px; }
.place-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.trip-head .tag { margin-bottom: 8px; }
.place-page .seg { margin-top: 16px; }
.place-body .section:first-child { margin-top: 4px; }
.kv-card { margin-top: 16px; }
.kv-card .list-row > .ic { color: var(--primary-600); }
.food-list { display: flex; flex-wrap: wrap; gap: 8px; }
.food { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); border: 1px solid var(--line); font-size: 13.5px; font-weight: 500; }
.food .ic { color: var(--primary-600); }
.visit-tl { display: grid; gap: 8px; }
.visit-tl li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); cursor: pointer; }
.visit-year { font-size: 13px; font-weight: 700; color: var(--primary-700); background: var(--primary-50); padding: 4px 8px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.visit-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.visit-body b { font-weight: 600; font-size: 14.5px; }
.visit-body small { font-size: 12px; color: var(--muted); letter-spacing: .03em; }
.review-sum { display: grid; gap: 16px; margin-bottom: 12px; }
@media (min-width: 640px) { .review-sum { grid-template-columns: 160px 1fr; align-items: center; } }
.review-big { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.review-big > b { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.review-big small { color: var(--muted); font-size: 12px; }
.review { margin-bottom: 10px; }
.review-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.review-head .stars { margin-left: auto; }
.review p { color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.rate-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; font-size: 14px; }
.rate-stars { display: flex; gap: 2px; }
.rate-stars button { color: #D5DCDB; padding: 2px; transition: color .12s, transform .12s; }
.rate-stars button.on { color: var(--star); }
.rate-stars button.on .ic { fill: var(--star); }
.rate-stars button:active { transform: scale(.9); }

/* group & profile */
.group-hero { padding: 18px; display: grid; gap: 14px; margin-bottom: 18px; }
.group-hero-top { display: flex; gap: 14px; align-items: center; }
.group-hero h2 { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.group-hero p { font-size: 13.5px; }
.group-mark { width: 52px; height: 52px; border-radius: 16px; background: var(--primary); color: #fff; display: grid; place-items: center; flex: none; }
.goal-grid { display: grid; gap: 10px; margin-bottom: 18px; }
@media (min-width: 720px) { .goal-grid { grid-template-columns: 1fr 1fr; } }
.goal-card { padding: 14px 16px; display: grid; gap: 12px; position: relative; }
.goal-card-top { display: flex; gap: 12px; align-items: center; }
.goal-card-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.goal-card-title b { font-size: 15px; font-weight: 600; }
.goal-card-title small { font-size: 12px; color: var(--muted); }
.goal-card-progress { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.goal-num { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.goal-num b { font-size: 20px; color: var(--ink); font-weight: 700; }
.goal-pct { font-size: 13px; font-weight: 600; color: var(--primary-700); font-variant-numeric: tabular-nums; }
.stepper { position: absolute; right: 12px; bottom: 44px; display: none; }
.goal-card:hover .stepper, .goal-card:focus-within .stepper { display: flex; gap: 2px; }
@media (hover: none) { .stepper { display: flex; position: static; justify-content: flex-end; gap: 6px; margin-top: -4px; } }
.stepper .icon-btn { background: var(--surface-2); }
.profile-hero { padding: 20px; display: flex; gap: 16px; align-items: center; }
.profile-hero h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.about { text-align: center; color: var(--muted); font-size: 12px; margin: 30px 0 10px; display: flex; gap: 6px; justify-content: center; align-items: center; }
.shared-day { margin-bottom: 10px; }
.shared-day h3 { font-size: 16px; font-weight: 600; margin: 2px 0 6px; }
.shared-day li { display: flex; gap: 12px; padding: 5px 0; font-size: 14px; }
.shared-day li b { width: 44px; font-variant-numeric: tabular-nums; flex: none; }
.shared-day small { color: var(--muted); }
.shared-page .ov-desc { margin-top: 18px; }

/* ==========================================================================
   SHEETS, FORMS, TOASTS
   ========================================================================== */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(12,18,20,.42); opacity: 0; transition: opacity .22s; }
.sheet {
  position: relative; width: 100%; max-height: calc(100vh - var(--sat) - 16px); display: flex; flex-direction: column;
  background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-lg);
  transform: translateY(100%); transition: transform .28s var(--ease); padding-bottom: var(--safe-b);
}
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }
@media (min-width: 720px) {
  .sheet-wrap { align-items: center; padding: 24px; }
  .sheet { max-width: 520px; border-radius: 22px; transform: translateY(16px) scale(.98); opacity: 0; transition: transform .24s var(--ease), opacity .2s; }
  .sheet-wrap.open .sheet { opacity: 1; }
  .sheet-grip { display: none; }
  .sheet-sm { max-width: 400px; }
  .sheet-lg { max-width: 640px; }
  .sheet-viewer { max-width: 860px; }
}
.sheet-grip { width: 38px; height: 4px; border-radius: 4px; background: #D9DFDE; margin: 8px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 4px 20px; flex: none; }
.sheet-head h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.sheet-body { padding: 8px 20px 16px; overflow-y: auto; overscroll-behavior: contain; flex: 1; }
.sheet-foot { display: flex; gap: 10px; padding: 12px 16px 14px; border-top: 1px solid var(--line-2); flex: none; align-items: center; }
.sheet-foot .btn { flex: 1; min-width: 0; padding: 0 12px; }
.sheet-foot .icon-btn { flex: none; }
.sheet-detail .sheet-body { padding: 0 0 8px; }
.sheet-detail .sheet-head { position: absolute; right: 0; top: 0; z-index: 2; padding: 10px; }
.sheet-detail .sheet-head h3 { display: none; }
.sheet-detail .sheet-head .icon-btn { background: rgba(255,255,255,.9); }
.detail-img { height: 200px; overflow: hidden; border-radius: 22px 22px 0 0; margin-top: -12px; }
@media (min-width: 720px) { .detail-img { margin-top: 0; } }
.detail-body { padding: 16px 20px 0; display: grid; gap: 6px; justify-items: start; }
.detail-body h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.detail-sub { color: var(--ink-2); }
.kv { display: grid; gap: 10px; margin-top: 8px; width: 100%; }
.kv > div { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.kv > div > .ic { color: var(--primary-600); margin-top: 2px; }
.kv a { color: var(--primary-700); font-weight: 500; }
.kv small { display: block; color: var(--muted); font-size: 12.5px; }
.confirm-text { font-size: 15px; line-height: 1.55; padding-top: 12px; }
.share-preview { background: var(--surface-2); border-radius: 14px; padding: 14px; max-height: 44vh; overflow: auto; }
.share-preview pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: 13.5px/1.6 var(--font); color: var(--ink-2); }
.share-link { margin-top: 16px; }
.share-link-row { display: flex; gap: 6px; margin-top: 6px; }
.share-link-row input { flex: 1; min-width: 0; height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; font-size: 13px; background: var(--surface-2); }
.radio-list { display: grid; gap: 8px; }
.radio-row { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); cursor: pointer; transition: all .15s; }
.radio-row input { position: absolute; opacity: 0; }
.radio-row > span:nth-of-type(1) { color: var(--muted); display: grid; }
.radio-row > span:nth-of-type(2) { display: flex; flex-direction: column; }
.radio-row b { font-weight: 600; font-size: 14.5px; }
.radio-row small { color: var(--muted); font-size: 12.5px; }
.radio-row:has(input:checked) { border-color: var(--primary); background: var(--primary-50); }
.radio-row:has(input:checked) > span:nth-of-type(1) { color: var(--primary-700); }
.radio-row:has(input:disabled) { opacity: .55; cursor: default; }
.menu-list { display: grid; }
.menu-item { display: flex; align-items: center; gap: 14px; padding: 13px 4px; text-align: left; font-size: 15px; font-weight: 500; border-radius: 10px; width: 100%; }
.menu-item + .menu-item { border-top: 1px solid var(--line-2); }
.menu-item > span:not(.avatar):not(.list-thumb) { flex: 1; display: flex; flex-direction: column; }
.menu-item small { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.menu-item > .ic:first-child { color: var(--primary-600); }
.menu-item.danger, .menu-item.danger .ic { color: var(--neg); }
.sheet-viewer .sheet-body { padding: 0 12px 12px; }
.viewer-img { width: 100%; max-height: 72vh; object-fit: contain; border-radius: 12px; background: var(--surface-2); }
.viewer-frame { width: 100%; height: 70vh; border: 0; border-radius: 12px; background: var(--surface-2); }

/* lightbox */
.sheet-lightbox { background: #0B1012; color: #fff; max-height: 100vh; height: 100%; border-radius: 0; }
@media (min-width: 720px) { .sheet-wrap:has(.sheet-lightbox) { padding: 0; } .sheet.sheet-lightbox { max-width: none; border-radius: 0; height: 100vh; } }
.sheet-lightbox .sheet-grip { display: none; }
.sheet-lightbox .sheet-head { position: absolute; top: 0; right: 0; z-index: 3; padding: calc(var(--sat) + 10px) 10px 10px; }
.sheet-lightbox .sheet-head h3 { display: none; }
.sheet-lightbox .sheet-head .icon-btn { color: #fff; background: rgba(255,255,255,.12); border-radius: 50%; }
.sheet-lightbox .sheet-body { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.lb-stage { flex: 1; position: relative; display: grid; place-items: center; min-height: 0; }
.lb-media { max-width: 100%; max-height: calc(100vh - 90px); object-fit: contain; }
.lb-poster { position: relative; display: grid; place-items: center; }
.lb-badge { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 99px; background: rgba(0,0,0,.55); font-size: 12.5px; white-space: nowrap; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; }
.lb-nav.prev { left: 12px; }
.lb-nav.next { right: 12px; }
@media (hover: none) { .lb-nav { display: none; } }
.lb-info { display: flex; align-items: center; gap: 12px; padding: 14px 16px calc(14px + var(--safe-b)); }
.lb-info > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lb-info b { font-size: 14.5px; font-weight: 600; }
.lb-info small { color: rgba(255,255,255,.6); font-size: 12.5px; }
.lb-count { color: rgba(255,255,255,.6); font-size: 13px; font-variant-numeric: tabular-nums; }
.lb-info .icon-btn { color: #fff; }

/* forms */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field-label { font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; justify-content: space-between; align-items: center; }
.field-hint { font-size: 12px; color: var(--muted); }
.field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea {
  width: 100%; height: 44px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface);
  font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; min-width: 0;
}
.field input[type=date], .field input[type=time], .field input[type=datetime-local] { display: block; font-size: 14.5px; }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237B8688' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; }
.field textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-row > [hidden] { display: none; }
.field-row:has(> [hidden]) { grid-template-columns: 1fr; }
.form-error { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 11px; background: #FBEDEA; color: var(--neg); font-size: 13.5px; font-weight: 500; animation: viewIn .2s; }
.cover-input { display: flex; gap: 8px; align-items: center; }
.cover-input input { flex: 1; }
.member-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.member-opt { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 99px; border: 1px solid var(--line); cursor: pointer; font-size: 13.5px; font-weight: 500; transition: all .15s; position: relative; }
.member-opt input { position: absolute; opacity: 0; pointer-events: none; }
.member-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-50); color: var(--primary-700); }
.member-opt:not(:has(input:checked)) .avatar { filter: grayscale(1); opacity: .5; }
.member-opt:has(input:focus-visible) { outline: 2px solid var(--primary); }
.drop { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; border: 1.5px dashed #CDD5D4; cursor: pointer; transition: all .15s; }
.drop:hover { border-color: var(--primary); background: var(--primary-50); }
.drop-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--primary-50); color: var(--primary-700); display: grid; place-items: center; flex: none; }
.drop-text { display: flex; flex-direction: column; min-width: 0; }
.drop-text b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop-text small { color: var(--muted); font-size: 12.5px; }
.drop-sm { padding: 10px; }
.drop-sm .drop-ic { width: 34px; height: 34px; }
.chip-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-opt input { position: absolute; opacity: 0; }
.chip-opt span { display: inline-flex; height: 32px; align-items: center; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); font-size: 13px; cursor: pointer; transition: all .15s; }
.chip-opt input:checked + span { background: var(--primary-50); border-color: var(--primary); color: var(--primary-700); font-weight: 500; }
.pick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; max-height: 240px; overflow-y: auto; border-radius: 10px; }
.pick-cell { position: relative; aspect-ratio: 1; cursor: pointer; overflow: hidden; border-radius: 6px; }
.pick-cell input { position: absolute; opacity: 0; }
.pick-check { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.25); color: transparent; display: grid; place-items: center; transition: all .15s; }
.pick-cell:has(input:checked) .pick-check { background: var(--primary); color: #fff; }
.pick-cell:has(input:checked) .img { opacity: .8; }
.new-place { display: grid; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface-2); margin-top: 10px; }
.new-place[hidden] { display: none; }

.toasts { position: fixed; z-index: 200; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
@media (min-width: 960px) { .toasts { bottom: 24px; } }
.toast { display: flex; gap: 8px; align-items: center; padding: 11px 16px; border-radius: 13px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(10px); transition: all .25s var(--ease); max-width: 420px; }
.toast .ic { color: #7FD9E0; flex: none; }
.toast.error .ic { color: #FFB4A6; }
.toast.in { opacity: 1; transform: none; }

/* ==========================================================================
   PERSONAL CLOUD STORAGE (Google Drive)
   ========================================================================== */
.m-owner { position: absolute; left: 6px; bottom: 6px; display: grid; }
.m-owner .avatar { box-shadow: 0 0 0 2px rgba(255,255,255,.95); }
.m-lock { position: absolute; left: 6px; top: 6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(10,16,18,.55); color: #fff; }
.m-st { position: absolute; right: 6px; top: 6px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; gap: 3px; background: rgba(255,255,255,.92); color: var(--primary-700); font-size: 11px; font-weight: 600; }
.m-st.busy::after { content: attr(data-pct); }
.m-st.err { background: #FBEDEA; color: var(--neg); }
.m-grid > :first-child .m-owner .avatar { --s: 26px !important; }

.drive-box { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--primary-50); color: var(--primary-700); margin-bottom: 12px; }
.drive-box > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.drive-box b { font-size: 14px; font-weight: 600; }
.drive-box small { font-size: 12.5px; color: var(--primary-600); overflow-wrap: anywhere; }
.drive-box.warn { background: #FBF4E6; color: #7A4F0E; }
.drive-box.warn small { color: #8F6420; }
.note-warn { display: flex; gap: 8px; align-items: flex-start; padding: 9px 12px; border-radius: 12px; background: #FBF4E6; color: #7A4F0E; font-size: 13px; margin-bottom: 12px; }
.note-warn .ic { margin-top: 2px; }
.vis-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.vis-opt input { position: absolute; opacity: 0; pointer-events: none; }
.vis-opt span { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 10px 4px; border-radius: 12px; border: 1px solid var(--line); font-size: 12px; font-weight: 500; color: var(--ink-2); cursor: pointer; line-height: 1.25; transition: all .15s; }
.vis-opt input:checked + span { border-color: var(--primary); background: var(--primary-50); color: var(--primary-700); }
.vis-opt input:focus-visible + span { outline: 2px solid var(--primary); }

.lb-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 0 16px calc(14px + var(--safe-b)); margin-top: -2px; }
.lb-store { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: rgba(255,255,255,.72); width: 100%; }
.lb-where { display: inline-flex; align-items: center; gap: 6px; width: 100%; }
.lb-btn, .lb-chip { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 9px; background: rgba(255,255,255,.12); color: #fff; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.lb-btn:hover { background: rgba(255,255,255,.2); }
.lb-chip { background: transparent; border: 1px solid rgba(255,255,255,.2); }
.sheet-lightbox .lb-info { padding-bottom: 10px; }
.lb-frame { width: min(100%, 960px); aspect-ratio: 16 / 9; border: 0; background: #000; }

.store-card { display: grid; gap: 10px; }
.store-title { font-size: 15px; font-weight: 600; }
.store-opt { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 13px; border: 1px solid var(--line); }
.store-opt > .ic { color: var(--muted); }
.store-opt.on { border: 2px solid var(--primary); background: var(--primary-50); }
.store-opt.on > .ic { color: var(--primary-700); }
.store-opt.off { opacity: .55; }
.store-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.store-body b { font-weight: 600; font-size: 14.5px; }
.store-body small { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.store-quota { display: grid; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.store-quota > div:first-child { display: flex; justify-content: space-between; }
.store-folder { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.store-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mem-store { display: inline-flex !important; align-items: center; gap: 4px; flex-direction: row !important; }
.mem-store.off { color: var(--warn) !important; }

.up-tray {
  position: fixed; z-index: 90; left: 50%; transform: translate(-50%, 20px); bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px);
  display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100% - 32px); padding: 10px 14px; overflow: hidden;
  border-radius: 14px; background: var(--ink); color: #fff; font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--ease);
}
.up-tray.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.up-tray .ic { color: #7FD9E0; flex: none; }
.up-tray b { font-variant-numeric: tabular-nums; }
.tray-bar { position: absolute; left: 0; bottom: 0; height: 3px; background: #7FD9E0; transition: width .3s; }
.tray-btn { height: 28px; padding: 0 10px; border-radius: 8px; background: rgba(255,255,255,.14); color: #fff; font-size: 12.5px; font-weight: 600; }
@media (min-width: 960px) { .up-tray { bottom: 24px; left: calc(50% + 124px); } }
body:has(.sheet-wrap) .up-tray { opacity: 0; pointer-events: none; }

/* ==========================================================================
   TRIP NAV (2 rows of buttons), CENTER "+", PIN, COMMENTS
   ========================================================================== */
.trip-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 14px 0 0; }
.trip-page:not(.is-overview) .trip-nav { margin-top: 4px; }
.trip-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 58px; padding: 8px 0; border-radius: 13px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: 11px; font-weight: 500; line-height: 1.2; text-align: center; white-space: nowrap; letter-spacing: -0.01em; min-width: 0; transition: background .15s, border-color .15s, color .15s; }
.trip-nav a .ic { color: var(--primary-600); }
.trip-nav a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
@media (max-width: 350px) { .trip-nav { gap: 4px; } .trip-nav a { font-size: 10px; } }
.pin-badge { white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 99px; background: var(--primary-50); color: var(--primary-700); font-size: 12px; font-weight: 600; }
.trip-head-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.trip-nav a:hover { border-color: var(--primary-100); }
.trip-nav a.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.trip-nav a.on .ic { color: #fff; }
@media (min-width: 960px) { .trip-nav { grid-template-columns: repeat(10, minmax(0, 1fr)); margin-top: 18px; } }

.tabbar { align-items: stretch; }
.tab-add { display: flex; align-items: center; justify-content: center; }
.tab-add span { width: 50px; height: 50px; border-radius: 17px; background: var(--primary); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 20px -8px rgba(14,165,176,.8); transform: translateY(-6px); transition: transform .15s var(--ease); }
.tab-add:active span { transform: translateY(-6px) scale(.94); }
.side-add { margin: 0 4px 12px; }

.hero-pin { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px; border-radius: 99px; background: rgba(18,25,27,.38); color: #fff; font-size: 12.5px; font-weight: 600; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); z-index: 2; }
.hero-pin.on { background: #fff; color: var(--primary-700); }

.sheet-detail .sheet-body > .detail-body:first-child { padding-top: 54px; }
.detail-top { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.detail-tools { display: inline-flex; gap: 2px; }
.detail-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; width: 100%; margin-top: 14px; }
.detail-actions .btn { min-width: 0; padding: 0 10px; }
.cm-section { width: 100%; margin-top: 18px; border-top: 1px solid var(--line-2); padding-top: 14px; }
.cm-section h4 { display: flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 600; margin-bottom: 8px; }
.cm-section h4 .ic { color: var(--primary-600); }
.cm-section h4 span { color: var(--muted); font-weight: 500; }
.cm-list { display: grid; gap: 12px; }
.cm { display: flex; gap: 10px; align-items: flex-start; }
.cm-body { flex: 1; min-width: 0; background: var(--surface-2); border-radius: 4px 14px 14px 14px; padding: 8px 12px; }
.cm-head { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.cm-head b { font-size: 13px; font-weight: 600; }
.cm-head span { color: var(--muted); }
.cm-del { margin-left: auto; color: var(--muted); display: grid; padding: 2px; border-radius: 6px; }
.cm-body p { font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.cm-empty { font-size: 13px; color: var(--muted); }
.cm-form { display: flex; align-items: center; gap: 8px; width: 100%; }
.cm-form input { flex: 1; min-width: 0; height: 42px; padding: 0 14px; border-radius: 21px; border: 1px solid var(--line); background: var(--surface-2); outline: none; font-size: 14.5px; }
.cm-form input:focus { border-color: var(--primary); background: var(--surface); }
.cm-send { color: var(--primary-700); }
.tl-cm { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--muted); font-weight: 500; }

.qa-trip { position: relative; display: flex; align-items: center; gap: 10px; padding: 0 12px; height: 46px; border-radius: 13px; background: var(--primary-50); color: var(--primary-700); margin-bottom: 14px; }
.qa-trip select { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--primary-700); font-size: 14.5px; font-weight: 600; outline: none; -webkit-appearance: none; appearance: none; }
.qa-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.qa-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 4px 12px; border-radius: 16px; border: 1px solid var(--line); font-size: 13px; font-weight: 500; color: var(--ink-2); text-align: center; transition: background .15s, border-color .15s; }
.qa-btn span { width: 46px; height: 46px; border-radius: 14px; background: var(--primary-50); color: var(--primary-700); display: grid; place-items: center; }
.qa-btn:hover { border-color: var(--primary-100); background: #FAFBFB; }
.qa-btn:active { transform: scale(.97); }
.qa-new { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 44px; margin-top: 12px; border-radius: 12px; border: 1px dashed #CDD5D4; color: var(--ink-2); font-weight: 500; font-size: 14px; }

/* ---------- login (pick name → PIN) ---------- */
.app.is-login .main { padding-bottom: 0; }
.login { min-height: calc(100vh - var(--sat)); max-width: 440px; margin: 0 auto; padding: 48px 20px 32px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.lg-logo { width: 72px; height: 72px; border-radius: 22px; background: var(--primary); color: #fff; display: grid; place-items: center; box-shadow: 0 12px 30px -12px rgba(14,165,176,.8); }
.login h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-top: 16px; }
.lg-sub { color: var(--muted); margin: 4px 0 22px; }
.lg-users { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 10px; width: 100%; }
.lg-user { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 4px 12px; border-radius: 18px; background: var(--surface); border: 1.5px solid var(--line); font-size: 14px; font-weight: 500; transition: border-color .15s, background .15s, transform .12s; }
.lg-user:active { transform: scale(.97); }
.lg-user.on { border-color: var(--primary); background: var(--primary-50); color: var(--primary-700); }
.lg-pin { display: flex; gap: 8px; width: 100%; max-width: 320px; margin-top: 20px; }
.lg-pin.hidden { display: none; }
.lg-pin input { flex: 1; min-width: 0; height: 50px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); text-align: center; font-size: 22px; letter-spacing: 10px; outline: none; }
.lg-pin input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
.lg-pin .btn { height: 50px; padding: 0 22px; border-radius: 14px; }
.lg-err { min-height: 20px; margin-top: 12px; color: var(--neg); font-size: 14px; font-weight: 500; }
.lg-empty { color: var(--muted); padding: 20px; }
.lg-form { width: 100%; display: grid; gap: 14px; text-align: left; }
.color-pick { display: flex; flex-wrap: wrap; gap: 10px; }
.color-pick input { position: absolute; opacity: 0; }
.color-pick span { display: block; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px transparent; transition: box-shadow .15s; }
.color-pick input:checked + span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.logout { margin-top: 12px; color: var(--neg); }

/* ---------- comment badges ---------- */
.cm-badge { display: inline-flex; align-items: center; gap: 3px; height: 30px; min-width: 30px; padding: 0 8px; border-radius: 9px; color: var(--muted); font-size: 12.5px; font-weight: 600; flex: none; justify-content: center; transition: background .15s, color .15s; }
.cm-badge:hover { background: var(--surface-2); }
.cm-badge.has { color: var(--primary-700); background: var(--primary-50); }
.bk-actions .cm-badge { height: 42px; min-width: 42px; border-radius: 12px; border: 1px solid var(--line); }
.map-card-actions { grid-template-columns: 1fr 1fr auto; }
.map-card-actions .cm-badge { height: 44px; min-width: 44px; border-radius: 12px; border: 1px solid var(--line); }
.lb-cm .cm-badge { color: #fff; background: rgba(255,255,255,.12); }
.lb-cm .cm-badge.has { color: #7FD9E0; }
.sheet-lightbox ~ * .cm-list { color: var(--ink); }

/* ---------- tab badge, profile link ---------- */
.tabbar a { position: relative; }
.tab-badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--neg); color: #fff; font: 700 10.5px/18px var(--font); font-style: normal; text-align: center; box-shadow: 0 0 0 2px #fff; }
.profile-link { display: grid; margin-left: 4px; border-radius: 50%; }
@media (min-width: 960px) { .profile-link { display: none; } }

/* ---------- chat ---------- */
.chat-page { display: flex; flex-direction: column; min-height: calc(100vh - var(--sat) - var(--tabbar-h) - var(--safe-b) - 24px); }
.ch-rooms { margin-bottom: 6px; }
.ch-unread { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--neg); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.ch-list { flex: 1; display: flex; flex-direction: column; gap: 3px; padding: 8px 0 12px; }
.ch-day { text-align: center; margin: 14px 0 8px; }
.ch-day span { font-size: 12px; color: var(--muted); background: var(--surface-2); padding: 4px 10px; border-radius: 99px; }
.ch-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 86%; margin-top: 8px; }
.ch-msg.cont { margin-top: 0; }
.ch-msg.me { align-self: flex-end; flex-direction: row-reverse; }
.ch-av { width: 30px; flex: none; }
.ch-bubble { background: var(--surface); border-radius: 18px 18px 18px 6px; padding: 8px 12px 6px; box-shadow: var(--shadow-sm); border: 1px solid var(--line-2); min-width: 0; }
.ch-msg.me .ch-bubble { background: var(--primary); color: #fff; border-color: var(--primary); border-radius: 18px 18px 6px 18px; }
.ch-bubble b { display: block; font-size: 12px; font-weight: 600; color: var(--primary-700); margin-bottom: 1px; }
.ch-bubble p { font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.ch-bubble time { display: block; text-align: right; font-size: 10.5px; opacity: .6; margin-top: 2px; }
.ch-empty { margin: auto; text-align: center; color: var(--muted); display: grid; justify-items: center; gap: 10px; padding: 40px 20px; }
.ch-empty .ic { color: var(--primary-600); }
.ch-compose { position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-b)); margin: 0 -16px; padding: 8px 12px 10px; background: rgba(246,247,246,.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
@media (min-width: 960px) { .ch-compose { bottom: 0; margin: 0 -32px; padding: 10px 28px 14px; } }
.ch-quick { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; }
.ch-quick::-webkit-scrollbar { display: none; }
.ch-quick button { flex: none; height: 30px; padding: 0 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.ch-form { display: flex; gap: 8px; align-items: center; }
.ch-form input { flex: 1; min-width: 0; height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); outline: none; font-size: 15px; }
.ch-form input:focus { border-color: var(--primary); }
.ch-send { width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; flex: none; }
.ch-ann { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--warn); background: #FBF4E6; }
.ch-announce { align-self: stretch; margin: 12px 0 6px; padding: 14px 16px; border-radius: 16px; background: #FFFBF2; border: 1px solid #F1DDB4; }
.ch-announce.new { border-color: var(--warn); box-shadow: 0 0 0 3px #FBF1E1; }
.ch-announce header { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--warn); }
.ch-announce header time { margin-left: auto; color: var(--muted); font-weight: 500; }
.ch-announce h4 { font-size: 16px; font-weight: 700; margin: 6px 0 2px; }
.ch-announce p { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); white-space: pre-wrap; }
.ch-announce footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 8px; }
.ch-announce .link { gap: 4px; }
.ch-pinned { position: sticky; top: calc(var(--sat) + 4px); z-index: 6; display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; margin: 2px 0 4px; border-radius: 13px; background: #FFFBF2; border: 1px solid #F1DDB4; color: var(--warn); text-align: left; box-shadow: var(--shadow-sm); }
.ch-pinned span { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--ink); }
.ch-pinned b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-pinned small { font-size: 12px; color: var(--muted); }
.ch-pinned i { font-style: normal; font-size: 11.5px; font-weight: 700; color: #fff; background: var(--warn); padding: 2px 8px; border-radius: 99px; }
.ann-pop { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 4px 4px 8px; }
.ann-ic { width: 56px; height: 56px; border-radius: 18px; background: #FBF1E1; color: var(--warn); display: grid; place-items: center; margin-bottom: 4px; }
.ann-pop h3 { font-size: 19px; font-weight: 700; }
.ann-pop p { font-size: 15px; line-height: 1.6; color: var(--ink-2); white-space: pre-wrap; }
.ann-pop small { color: var(--muted); font-size: 12.5px; }
.ann-text { white-space: pre-wrap; color: var(--ink-2); line-height: 1.6; margin-bottom: 12px; }
.sub { font-size: 14px; font-weight: 600; margin: 4px 0 8px; }

/* ---------- bell + announcements inbox ---------- */
.bell { position: relative; }
.bell i { position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--neg); color: #fff; font: 700 10.5px/17px var(--font); font-style: normal; text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.bell.has { color: var(--warn); }
.hero-bar-r { display: flex; gap: 8px; }
.hero-bar-r .bell { width: 40px; height: 40px; border-radius: 50%; color: #fff; background: rgba(18,25,27,.28); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.hero-bar-r .bell i { box-shadow: none; }
.home-head-actions .bell { width: 42px; height: 42px; }
.inbox-seg { margin-top: 0; }
.inbox { display: grid; gap: 10px; }
.inbox-item { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.inbox-item.new { border-color: var(--warn); background: #FFFBF2; }
.inbox-item header { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--warn); }
.inbox-item header time { margin-left: auto; color: var(--muted); font-weight: 500; }
.inbox-item h4 { font-size: 15.5px; font-weight: 700; margin: 6px 0 2px; }
.inbox-item p { font-size: 14px; line-height: 1.55; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.inbox-item footer { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.inbox-by { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); flex: 1; min-width: 0; }
.inbox-ok { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--pos); font-weight: 600; }

.app:has(.chat-page) .main { padding-bottom: calc(var(--tabbar-h) + var(--safe-b)); }

.steps { margin: 4px 0 8px; padding-left: 20px; list-style: decimal; display: grid; gap: 10px; font-size: 15px; color: var(--ink-2); }
.steps b { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
