/* Troupe — the native app's look: stock iOS 26 SwiftUI (insetGrouped Lists and Forms on systemGroupedBackground, glass
   toolbar buttons and capsules, segmented pickers, .borderedProminent capsules, material cards and the FeedbackBanner
   capsule) tinted with Troupe's AccentColor (0.42, 0.38, 0.85). System colours are UIKit's light and dark values.
   Follows the system appearance and the store's data-theme override set by /mobile.js. Adapted from src/pawkeep/pawkeep.css. */
:root {
  --accent: rgb(107, 97, 217);              /* AccentColor (0.42, 0.38, 0.85) */
  --tint: var(--accent);
  --text: #000;
  --text2: rgba(60, 60, 67, 0.6);
  --text3: rgba(60, 60, 67, 0.3);
  --grouped: #f2f2f7;                       /* systemGroupedBackground */
  --row: #fff;                              /* secondarySystemGroupedBackground */
  --sep: rgba(60, 60, 67, 0.22);
  --fill: rgba(120, 120, 128, 0.16);
  --fill2: rgba(118, 118, 128, 0.12);
  --material: rgba(255, 255, 255, 0.72);    /* .regularMaterial over the grouped background */
  --bar: rgba(249, 249, 249, 0.86);         /* .bar */
  --green: rgb(52, 199, 89); --red: rgb(255, 59, 48); --orange: rgb(255, 149, 0); --blue: rgb(0, 122, 255); --purple: rgb(175, 82, 222); --gray: rgb(142, 142, 147);
  --glass: rgba(255, 255, 255, 0.82);
  --glass-edge: rgba(0, 0, 0, 0.05);
  --sys: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: rgb(128, 119, 235);
    --text: #fff; --text2: rgba(235, 235, 245, 0.6); --text3: rgba(235, 235, 245, 0.3);
    --grouped: #000; --row: #1c1c1e; --sep: rgba(84, 84, 88, 0.6);
    --fill: rgba(120, 120, 128, 0.36); --fill2: rgba(118, 118, 128, 0.24);
    --material: rgba(44, 44, 46, 0.72); --bar: rgba(22, 22, 24, 0.86);
    --green: rgb(48, 209, 88); --red: rgb(255, 69, 58); --orange: rgb(255, 159, 10); --blue: rgb(10, 132, 255); --purple: rgb(191, 90, 242); --gray: rgb(142, 142, 147);
    --glass: rgba(44, 44, 46, 0.78); --glass-edge: rgba(255, 255, 255, 0.08);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --accent: rgb(128, 119, 235);
  --text: #fff; --text2: rgba(235, 235, 245, 0.6); --text3: rgba(235, 235, 245, 0.3);
  --grouped: #000; --row: #1c1c1e; --sep: rgba(84, 84, 88, 0.6);
  --fill: rgba(120, 120, 128, 0.36); --fill2: rgba(118, 118, 128, 0.24);
  --material: rgba(44, 44, 46, 0.72); --bar: rgba(22, 22, 24, 0.86);
  --green: rgb(48, 209, 88); --red: rgb(255, 69, 58); --orange: rgb(255, 159, 10); --blue: rgb(10, 132, 255); --purple: rgb(191, 90, 242); --gray: rgb(142, 142, 147);
  --glass: rgba(44, 44, 46, 0.78); --glass-edge: rgba(255, 255, 255, 0.08);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--grouped); color: var(--text); font: 17px/1.29 var(--sys); -webkit-font-smoothing: antialiased; letter-spacing: -0.01em; }
body { overflow: hidden; overscroll-behavior: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; letter-spacing: inherit; }
button:disabled { cursor: default; }
input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--tint); outline-offset: 2px; }
.nav-title:focus { outline: none; }
[hidden] { display: none !important; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- type (Dynamic Type "Large") ---------- */
.t-title { font-size: 28px; line-height: 34px; } .t-title2 { font-size: 22px; line-height: 28px; } .t-title3 { font-size: 20px; line-height: 25px; }
.t-headline { font-size: 17px; line-height: 22px; font-weight: 600; }
.t-subheadline { font-size: 15px; line-height: 20px; }
.t-footnote { font-size: 13px; line-height: 18px; }
.t-caption { font-size: 12px; line-height: 16px; letter-spacing: 0; }
.t-caption2 { font-size: 11px; line-height: 13px; letter-spacing: 0.01em; }
.w-medium { font-weight: 500; } .w-semibold { font-weight: 600; } .w-bold { font-weight: 700; }
.c-1 { color: var(--text) !important; } .c-2 { color: var(--text2); } .c-3 { color: var(--text3); } .c-red { color: var(--red) !important; } .c-green { color: var(--green) !important; } .c-orange { color: var(--orange) !important; } .c-purple { color: var(--purple) !important; }
.tint { color: var(--tint); }
.center { text-align: center; } .left { text-align: left; } .pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.mono { font-family: var(--mono); letter-spacing: 0; }
.tabnum { font-variant-numeric: tabular-nums; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.clamp2, .clamp4 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp2 { -webkit-line-clamp: 2; } .clamp4 { -webkit-line-clamp: 4; }
.vstack { display: flex; flex-direction: column; min-width: 0; }
.hstack { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hstack.top { align-items: flex-start; } .hstack.wrap { flex-wrap: wrap; } .center-items { align-items: center; }
.grow { flex: 1 1 auto; min-width: 0; } .full { width: 100%; }
.gap2 { gap: 2px; } .gap3 { gap: 3px; } .gap4 { gap: 4px; } .gap6 { gap: 6px; } .gap7 { gap: 7px; } .gap8 { gap: 8px; } .gap10 { gap: 10px; } .gap12 { gap: 12px; } .gap14 { gap: 14px; } .gap16 { gap: 16px; } .gap18 { gap: 18px; } .gap20 { gap: 20px; }
.sf { display: inline-block; vertical-align: -0.125em; flex: none; overflow: visible; }
.label { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.label > .sf { font-size: 1.05em; }
.label-text { min-width: 0; }
.ellipsis .label-text, .ellipsis.label .label-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.label-block { display: flex; align-items: flex-start; gap: 14px; min-width: 0; text-align: left; }
.lb-icon { width: 24px; display: grid; place-items: center; font-size: 19px; color: var(--tint); padding-top: 1px; flex: none; }
.lb-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; color: var(--text); }
.row-tint .lb-title { color: var(--tint); }
.big-sym { font-size: 46px; line-height: 1; display: grid; place-items: center; }

/* ---------- app frame ---------- */
#app { position: fixed; inset: 0; overflow: hidden; }
#stack, #sheets { position: absolute; inset: 0; }
#sheets { pointer-events: none; z-index: 20; }
#sheets > * { pointer-events: auto; }
#overlays { position: absolute; inset: 0; z-index: 40; pointer-events: none; }
#overlays > * { pointer-events: auto; }
#toast { position: absolute; left: 0; right: 0; bottom: calc(var(--sab) + 8px); z-index: 50; display: flex; justify-content: center; pointer-events: none; padding: 0 16px; }
#app:has(#stack > .screen:last-child .bottom-bar) #toast { bottom: calc(var(--sab) + 84px); }
#banner { position: absolute; left: 0; right: 0; top: 0; z-index: 45; pointer-events: none; display: flex; justify-content: center; }
.covered { visibility: hidden; }

/* ---------- screens + nav bar ---------- */
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--grouped); padding-top: var(--sat); will-change: transform; }
.screen.in-sheet { padding-top: 0; }
.navbar { position: relative; z-index: 3; display: grid; grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(max-content, 1fr); align-items: center; gap: 8px; min-height: 60px; padding: 8px 16px; flex: none; }
/* iOS 26 scroll edge effect: content fades under the bar instead of a hard bar background */
.navbar::before { content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: calc(-1 * var(--sat)); bottom: -18px; pointer-events: none;
  background: linear-gradient(var(--grouped) calc(var(--sat) + 40%), color-mix(in srgb, var(--grouped) 70%, transparent) 75%, transparent); opacity: 0; transition: opacity 0.2s; }
.navbar.scrolled::before { opacity: 1; }
.screen.in-sheet .navbar::before { top: 0; }
.nav-title { grid-column: 2; max-width: 260px; min-width: 0; font: 600 17px/22px var(--sys); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-title.hidden-title { visibility: hidden; }
.navbar.has-large .nav-title { opacity: 0; transition: opacity 0.18s; }
.navbar.has-large.show-title .nav-title { opacity: 1; }
.nav-leading { grid-column: 1; display: flex; align-items: center; justify-self: start; gap: 8px; }
.nav-trailing { grid-column: 3; display: flex; align-items: center; justify-self: end; gap: 8px; }
.screen-body { position: relative; flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding-bottom: calc(var(--sab) + 24px); scrollbar-width: thin; }
.large-title { font: 700 34px/41px var(--sys); letter-spacing: 0.01em; padding: 2px 20px 6px; max-width: 760px; margin: 0 auto; }
#stack .screen { --colw: 760px; }
@media (min-width: 700px) { #stack .navbar { padding-left: max(16px, calc((100% - var(--colw)) / 2)); padding-right: max(16px, calc((100% - var(--colw)) / 2)); } }

/* iOS 26 glass toolbar buttons */
.glass { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; min-width: 44px; padding: 0 16px; border-radius: 22px; font-size: 17px; color: var(--text);
  background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(1.8); backdrop-filter: blur(16px) saturate(1.8);
  box-shadow: 0 0 0 0.5px var(--glass-edge), 0 4px 16px rgba(0, 0, 0, 0.08); transition: transform 0.15s var(--ease), opacity 0.15s; white-space: nowrap; }
.glass-icon { padding: 0; width: 44px; font-size: 21px; }
.glass .sf { font-size: 21px; }
.glass-bold { font-weight: 600; }
.glass-prominent { background: var(--tint); color: #fff; box-shadow: 0 4px 16px color-mix(in srgb, var(--tint) 30%, transparent); }
.glass-subtle { color: var(--text2); }
.glass-subtle .sf { font-size: 19px; }
.glass.tint .sf, .gg-item.tint .sf { color: var(--tint); }
.glass:active:not(:disabled) { transform: scale(0.94); }
.glass:disabled { color: var(--text3); }
.glass-prominent:disabled { background: var(--fill); color: var(--text3); box-shadow: none; }
.nav-back .sf { font-size: 19px; margin-left: -2px; }
.glass-group { padding: 0 4px; gap: 0; }
.gg-item { display: inline-flex; align-items: center; justify-content: center; height: 44px; min-width: 40px; padding: 0 10px; border-radius: 22px; font-size: 17px; color: var(--text); white-space: nowrap; }
.gg-icon { padding: 0; width: 40px; }
.gg-item .sf { font-size: 20px; }
.gg-item:active { opacity: 0.5; }

/* ---------- insetGrouped list / form ---------- */
.list { padding-top: 4px; }
.form { padding: 4px 16px 24px; max-width: 720px; margin: 0 auto; width: 100%; }
.group { margin-top: 24px; }
.list > .group:first-child, .form > .group:first-child, .form > .import-head + .group { margin-top: 8px; }
.group-header { padding: 0 20px 8px; font-size: 17px; line-height: 22px; font-weight: 600; color: var(--text2); }
.group-header .sf { font-size: 16px; }
.group-footer { padding: 8px 20px 0; font-size: 13px; line-height: 18px; color: var(--text2); }
.group-rows { background: var(--row); border-radius: 26px; overflow: hidden; }
.row { position: relative; display: flex; align-items: center; width: 100%; min-height: 52px; padding: 12px 20px; text-align: left; color: var(--text); gap: 10px; }
.group-rows > .row + .row::before, .group-rows > .row + .swipeable::before { content: ""; position: absolute; left: 20px; right: 20px; top: 0; border-top: 0.5px solid var(--sep); z-index: 2; }
.group-rows > .row:has(> .row-main > .label-block, > .row-main > .label, > .label-block, > .label) + .row::before { left: 58px; }
.group-rows > .trip-row + .row::before, .group-rows > .trip-row + .swipeable::before { left: 84px; }
.group-rows > .item-row + .row::before, .group-rows > .item-row + .swipeable::before, .group-rows > .edit-row + .row::before { left: 66px; }
.row > .hstack, .row > .vstack, .row > .label-block { flex: 1 1 auto; }
.row-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; }
.row-btn { transition: background 0.15s; }
.row-btn:active { background: var(--fill2); }
.row-tint, .row-tint .label { color: var(--tint); }
.row-destructive { color: var(--red); }
.row-chevron { color: var(--text3); font-size: 13px; display: grid; place-items: center; flex: none; }
.row-chevron .sf { stroke-width: 3; }
.labeled { justify-content: space-between; }
.lc-label { flex: none; max-width: 62%; }
.lc-value { color: var(--text2); text-align: right; min-width: 0; overflow-wrap: anywhere; }
.unit { flex: none; }
.field { flex: 1; width: 100%; min-width: 0; border: 0; outline: none; background: none; padding: 0; font-size: 17px; line-height: 22px; color: var(--text); -webkit-appearance: none; appearance: none; }
.field::placeholder { color: var(--text3); }
.field-multi { resize: none; overflow: hidden; display: block; min-height: 22px; }
.field-trailing { text-align: right; }
.field-row { padding-top: 15px; padding-bottom: 15px; }
.picker-row { position: relative; cursor: pointer; }
.picker-value { display: inline-flex; align-items: center; gap: 5px; color: var(--text2); text-align: right; min-width: 0; overflow: hidden; }
.picker-value .sf { font-size: 13px; }
.picker-select { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; font-size: 17px; }
.toggle-row { justify-content: space-between; gap: 12px; cursor: pointer; }
.toggle-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.switch { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 63px; height: 28px; margin: 0; border-radius: 14px; background: var(--fill); cursor: pointer; transition: background 0.25s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 37px; height: 24px; border-radius: 12px; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16), 0 0 0 0.5px rgba(0, 0, 0, 0.04); transition: transform 0.3s var(--ease); }
.switch:checked { background: var(--green); }
.switch:checked::after { transform: translateX(22px); }
.switch:active::after { width: 41px; }
.switch:checked:active::after { transform: translateX(18px); }
.date-row { padding-top: 8px; padding-bottom: 8px; }
.date-pills { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.date-pill { position: relative; display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 999px; background: var(--fill2); font-size: 17px; white-space: nowrap; }
.pill-input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
.pill-input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.segmented { position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr); width: 100%; height: 34px; padding: 2px; border-radius: 17px; background: var(--fill2); isolation: isolate; }
.seg { position: relative; z-index: 1; display: grid; place-items: center; line-height: 1; font-size: 14px; font-weight: 500; text-align: center; border-radius: 15px; white-space: nowrap; overflow: hidden; }
.seg.on { font-weight: 600; }
.seg-thumb { position: absolute; z-index: 0; top: 2px; bottom: 2px; left: 2px; width: calc((100% - 4px) / var(--n)); border-radius: 15px; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.04); transform: translateX(calc(var(--i) * 100%)); transition: transform 0.32s var(--ease); }
:root[data-theme="dark"] .seg-thumb { background: #636366; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg-thumb { background: #636366; } }
.unavailable { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 22px 12px; text-align: center; }
.un-icon { font-size: 40px; color: var(--text2); margin-bottom: 6px; line-height: 1; }
.un-title { font-size: 22px; line-height: 28px; font-weight: 700; }
.un-desc { font-size: 15px; line-height: 20px; color: var(--text2); max-width: 440px; }
.un-actions { margin-top: 12px; }
.center-fill { min-height: 70%; display: grid; place-items: center; padding: 24px; }

/* ---------- buttons ---------- */
.btn-bordered { --btn: var(--tint); display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 999px; color: var(--btn); background: var(--fill2); white-space: nowrap; font-weight: 500; transition: opacity 0.12s, transform 0.15s var(--ease); }
.btn-bordered.size-regular { min-height: 34px; padding: 0 14px; font-size: 15px; }
.btn-bordered.size-small { min-height: 28px; padding: 0 11px; font-size: 13px; }
.btn-bordered.size-large { min-height: 50px; padding: 0 20px; font-size: 17px; font-weight: 600; width: 100%; }
.btn-bordered.prominent { background: var(--btn); color: #fff; }
.btn-bordered:active { opacity: 0.7; }
.btn-bordered:disabled { opacity: 0.4; }
.btn-bordered .label { gap: 6px; }
.text-btn { color: var(--tint); min-height: 30px; }
.text-btn:disabled { color: var(--text3); }
.text-btn:active { opacity: 0.4; }
.plain-btn { display: inline-flex; align-items: center; text-align: left; }
.plain-btn:active { opacity: 0.5; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; font-size: 19px; margin: -6px -6px -6px 0; flex: none; }
.icon-btn.tint { color: var(--tint); }
.icon-btn:active { opacity: 0.4; }
.link-text { overflow-wrap: anywhere; }

/* ---------- trips ---------- */
.empty-trips { min-height: 72%; display: grid; place-items: center; padding: 8px 24px 24px; }
.empty-trips .un-actions { margin-top: 18px; }
.empty-trips .btn-bordered { min-width: 236px; }
.free-note { max-width: 300px; margin-top: 4px; }
.trip-row { padding-top: 12px; padding-bottom: 12px; }
.big-emoji { font-size: 34px; line-height: 1; flex: none; }
.huge-emoji { font-size: 60px; line-height: 1.1; }
.emoji-tile { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; font-size: 28px; flex: none; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.trip-stats .label { gap: 4px; }
.trip-stats .sf { font-size: 14px; }
.phase-pill { --pc: var(--blue); flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; border-radius: 999px; font-size: 11px; line-height: 15px; font-weight: 500; letter-spacing: 0; color: var(--pc); background: color-mix(in srgb, var(--pc) 13%, transparent); white-space: nowrap; }
.phase-pill.big { font-size: 12px; line-height: 16px; font-weight: 600; padding: 3px 9px; }
.phase-pill.big .sf { font-size: 13px; }

/* TripStarterWizard */
.wizard-col { display: flex; flex-direction: column; gap: 14px; padding: 8px 16px 24px; max-width: 640px; margin: 0 auto; }
.tpl-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; border-radius: 14px; background: color-mix(in srgb, var(--fill) 70%, transparent); box-shadow: inset 0 0 0 2px transparent; text-align: left; transition: box-shadow 0.2s, transform 0.15s var(--ease); }
.tpl-card.on { box-shadow: inset 0 0 0 2px var(--accent); }
.tpl-card:active { transform: scale(0.985); }
.tpl-check { font-size: 22px; color: var(--text2); display: grid; place-items: center; flex: none; }
.tpl-card.on .tpl-check { color: var(--accent); }

/* ---------- trip detail ---------- */
.detail-body .form { max-width: 760px; }
.detail-body { display: flex; flex-direction: column; overflow: hidden !important; padding-bottom: 0 !important; }
.detail-title { font: 700 22px/27px var(--sys); letter-spacing: 0.005em; margin: -2px 0 2px; overflow-wrap: anywhere; }
.title-below .navbar .nav-title { visibility: hidden; }
.dash { display: flex; flex-direction: column; gap: 8px; padding: 6px 16px 4px; font-size: 15px; max-width: 760px; width: 100%; margin: 0 auto; flex: none; }
.dash .label { max-width: 100%; }
.seg-wrap { padding: 8px 16px; flex: none; max-width: 760px; width: 100%; margin: 0 auto; }
.tab-scroll { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding-bottom: calc(var(--sab) + 24px); scrollbar-width: thin; }
.bottom-bar { flex: none; display: flex; justify-content: center; padding: 12px 16px calc(var(--sab) + 12px); background: var(--bar); -webkit-backdrop-filter: blur(20px) saturate(1.8); backdrop-filter: blur(20px) saturate(1.8); box-shadow: 0 -0.5px 0 var(--sep); }
.bottom-bar > * { max-width: 728px; }
.more-btn { width: 44px; height: 44px; flex: none; display: grid; place-items: center; font-size: 25px; color: var(--tint); }
.more-btn:active { opacity: 0.4; }
.next-block .label { align-items: flex-start; }
.next-block .label .sf { margin-top: 3px; }
.next-block .btn-bordered { margin-top: 2px; }
.today .t-title3 .label .sf { color: var(--tint); }
.kind-tile { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-size: 17px; flex: none; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.it-row .mono { font-size: 12px; }
.item-row { cursor: pointer; }
.edit-row { padding-left: 14px; padding-right: 12px; gap: 10px; }
.edit-del { color: var(--red); font-size: 22px; display: grid; place-items: center; flex: none; width: 30px; height: 30px; }
.edit-moves { display: inline-flex; gap: 2px; flex: none; }
.move-btn { width: 34px; height: 34px; border-radius: 17px; display: grid; place-items: center; color: var(--tint); background: var(--fill2); font-size: 15px; }
.move-btn:disabled { color: var(--text3); background: none; }
.drag-handle { color: var(--text3); font-size: 18px; display: grid; place-items: center; flex: none; }
.route-chip-wrap { display: flex; justify-content: center; padding: 6px 0 2px; }
.route-chip { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--material); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 0 0 0.5px var(--glass-edge), 0 2px 10px rgba(0, 0, 0, 0.06); color: var(--text); }
.route-chip .sf { color: var(--tint); }
.stop-pin { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; flex: none; background: var(--material); box-shadow: 0 0 0 0.5px var(--glass-edge), 0 2px 8px rgba(0, 0, 0, 0.12); color: var(--text); }
.stop-n { position: absolute; right: -3px; bottom: -3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; letter-spacing: 0; }
.leg-row { min-height: 40px; padding-top: 6px; padding-bottom: 6px; font-size: 13px; }
.leg { display: flex; align-items: center; gap: 22px; }
.leg-line { width: 2px; height: 26px; margin-left: 19px; border-radius: 1px; background: repeating-linear-gradient(var(--accent) 0 4px, transparent 4px 7px); opacity: 0.7; }
.group-rows > .leg-row + .row::before, .group-rows > .row + .leg-row::before { display: none; }
.sheet-pad { padding: 8px 20px 28px; max-width: 560px; margin: 0 auto; width: 100%; }
.invite-col { padding-top: 16px; }

/* expenses */
.balance-row { min-height: 48px; }
.expense-row { padding-top: 10px; padding-bottom: 10px; }
.settled-tag { margin-top: 1px; }
.settle-row { padding-top: 14px; padding-bottom: 14px; }
.pay-link { display: inline-flex; align-items: center; gap: 5px; padding: 8px 14px; border-radius: 999px; background: var(--tint); color: #fff; font-size: 15px; font-weight: 700; }
.pay-link:active { opacity: 0.7; }

/* extras */
.act-dot { font-size: 7px; padding-top: 7px; }
.activity-row { min-height: 0; padding-top: 10px; padding-bottom: 10px; }
.add-row { gap: 12px; }
.add-row .text-btn, .add-idea .text-btn { flex: none; }
.idea-row .label .sf { color: var(--tint); }
.vote-btn .label { gap: 4px; }
.idea-field { padding: 6px 0; border-bottom: 0.5px solid var(--sep); }
.add-idea .hstack .idea-field { border-bottom: 0; }
.packing-row .pack-check { font-size: 21px; color: var(--text2); display: grid; place-items: center; flex: none; }
.packing-row.packed .pack-check { color: var(--green); }
.packing-row.packed .pack-title { text-decoration: line-through; color: var(--text2); }
.doc-row .label .sf { color: var(--tint); }
.doc-detail .screen-body { background: color-mix(in srgb, var(--text) 4%, var(--grouped)); padding-bottom: 0; }
.zoom-wrap { overflow: auto; padding: 16px; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.doc-full { display: block; width: 100%; max-width: 900px; margin: 0 auto; border-radius: 4px; cursor: zoom-in; }
.doc-full.zoomed { width: 220%; max-width: none; cursor: zoom-out; }
.doc-pdf { width: 100%; flex: 1; min-height: 60vh; border: 0; border-radius: 8px; background: #fff; }

/* material cards (CompletedTripView, share and welcome sheets) */
.material-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 16px; background: var(--row); }
.material-card.tight { padding: 14px 16px; gap: 6px; }
.material-card .labeled { padding: 0; min-height: 0; }
.completed-col { display: flex; flex-direction: column; gap: 24px; padding: 8px 16px 24px; max-width: 640px; margin: 0 auto; }
.completed-head { padding: 8px 0; }
.memory-strip { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.memory { width: 100px; height: 100px; object-fit: cover; border-radius: 10px; flex: none; background: var(--fill2); }
.import-head { display: flex; flex-direction: column; gap: 10px; padding: 8px 4px 4px; }
.share-col, .welcome-col { align-items: center; }
.share-col .material-card { width: 100%; }
.safety { font-size: 17px; }
.safety .label { align-items: flex-start; gap: 10px; }
.safety .label .sf { color: var(--tint); margin-top: 2px; }
.welcome-col .material-card .sf { color: var(--tint); }

/* ---------- swipe actions ---------- */
.swipeable { padding: 0 !important; overflow: hidden; touch-action: pan-y pinch-zoom; }
.swipe-inner { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; padding: inherit; padding: 12px 20px; background: var(--row); position: relative; z-index: 1; min-height: 52px; }
.trip-row.swipeable .swipe-inner, .expense-row.swipeable .swipe-inner { padding-top: 12px; padding-bottom: 12px; }
.swipe-side { position: absolute; top: 0; bottom: 0; width: 0; display: flex; overflow: hidden; z-index: 0; }
.swipe-side.left { left: 0; } .swipe-side.right { right: 0; flex-direction: row; }
.swipe-act { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #fff; font-size: 13px; font-weight: 500; overflow: hidden; white-space: nowrap; transition: flex-grow 0.25s var(--ease); }
.swipe-act .sf { font-size: 19px; }
.swipe-side.left.full .swipe-act:first-child, .swipe-side.right.full .swipe-act:last-child { flex-grow: 12; }
.swipe-act-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }

/* ---------- paywall ---------- */
.paywall-col { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 24px 16px 24px; max-width: 520px; margin: 0 auto; text-align: center; }
.pw-icon { font-size: 50px; line-height: 1; }
.pw-lede { padding: 0 16px; }
.pw-features { display: flex; flex-direction: column; gap: 14px; text-align: left; padding: 0 8px; }
.pw-feature { display: flex; align-items: flex-start; gap: 12px; }
.pw-sym { width: 28px; display: grid; place-items: center; font-size: 19px; flex: none; padding-top: 1px; }
.pw-owned { display: inline-flex; align-items: center; gap: 8px; color: var(--green); font-weight: 600; }
.pw-buy { width: 100%; align-items: center; }
.pw-buy .btn-bordered { min-height: 58px; }
.pw-fine { padding: 0 8px; }

/* ---------- sheets ---------- */
.sheet-wrap { position: absolute; inset: 0; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.25); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; top: calc(var(--sat) + 10px); display: flex; flex-direction: column; background: var(--grouped); border-radius: 38px 38px 0 0; overflow: hidden; box-shadow: 0 -2px 30px rgba(0, 0, 0, 0.12); transition: top 0.4s var(--ease); }
.sheet[data-detent="medium"] { top: 50%; }
.sheet-grabber { position: absolute; top: 6px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: var(--text3); z-index: 5; opacity: 0.6; }
.sheet-stack { position: relative; flex: 1; }
.sheet .navbar { padding-top: 14px; }
.cover { position: absolute; inset: 0; background: var(--grouped); }
.cover-stack { position: absolute; inset: 0; }
@media (min-width: 700px) {
  .sheet { top: 50% !important; left: 50%; right: auto; bottom: auto; width: min(580px, calc(100% - 48px)); height: min(820px, calc(100% - 64px)); translate: -50% -50%; border-radius: 32px; }
  .sheet[data-detent="medium"] { height: min(520px, calc(100% - 64px)); }
  .sheet-grabber { display: none; }
  .sheet .navbar { padding-top: 10px; }
}

/* ---------- FeedbackBanner, reminder banner, alert, menu, action sheet ---------- */
.toast { display: flex; align-items: center; gap: 10px; max-width: min(560px, 100%); padding: 11px 16px; border-radius: 999px; color: var(--text); background: var(--glass); -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8);
  box-shadow: 0 0 0 0.5px var(--glass-edge), 0 8px 28px rgba(0, 0, 0, 0.14); font-size: 15px; font-weight: 500; pointer-events: auto; opacity: 0; transform: translateY(20px); transition: opacity 0.25s, transform 0.35s var(--ease); }
.toast:has(.toast-undo) { width: 100%; }
.toast.on { opacity: 1; transform: none; }
.toast.error { color: var(--red); }
.toast > .sf { font-size: 17px; }
.toast-msg { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast-undo { font-weight: 600; color: var(--tint); }
.banner { pointer-events: auto; position: relative; width: calc(100% - 16px); max-width: 520px; margin-top: calc(var(--sat) + 8px); padding: 12px 14px; border-radius: 24px; background: var(--glass); -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8); box-shadow: 0 0 0 0.5px var(--glass-edge), 0 12px 36px rgba(0, 0, 0, 0.18); transform: translateY(-140%); transition: transform 0.4s var(--ease); }
.banner.on { transform: none; }
.banner-main { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; padding-right: 26px; }
.banner-icon { width: 38px; height: 38px; border-radius: 9px; overflow: hidden; background: var(--accent); flex: none; }
.banner-icon img { width: 100%; height: 100%; display: block; }
.banner-x { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; display: grid; place-items: center; color: var(--text2); font-size: 13px; }
.alert-wrap { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.3); padding: 24px; }
.alert { width: 300px; max-width: 100%; border-radius: 30px; overflow: hidden; background: var(--glass); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25); padding: 22px 18px 16px; text-align: left; }
.alert-title { font-weight: 600; font-size: 17px; }
.alert-message { font-size: 15px; line-height: 20px; margin-top: 6px; color: var(--text); }
.alert-field { display: block; width: 100%; margin-top: 14px; padding: 10px 14px; border-radius: 14px; border: 0; outline: none; background: var(--fill2); font-size: 17px; color: var(--text); }
.alert-buttons { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.alert-buttons.two { flex-direction: row; }
.alert-btn { flex: 1; min-height: 48px; border-radius: 24px; background: var(--fill2); font-size: 17px; font-weight: 500; text-align: center; color: var(--text); }
.alert-btn:not(.cancel):not(.destructive) { background: var(--tint); color: #fff; font-weight: 600; }
.alert-btn.destructive { color: var(--red); }
.alert-btn:active { opacity: 0.7; }
.menu-scrim { position: absolute; inset: 0; }
.menu { position: fixed; min-width: 240px; max-width: 300px; border-radius: 22px; overflow: hidden; padding: 6px 0; background: var(--glass); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); box-shadow: 0 0 0 0.5px var(--glass-edge), 0 16px 48px rgba(0, 0, 0, 0.22); transform-origin: top center; }
.menu-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 44px; padding: 10px 18px; font-size: 17px; }
.menu-item:active, .menu-item:focus-visible { background: var(--fill2); outline: none; }
.menu-item.destructive { color: var(--red); }
.as-wrap { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding: 0 8px calc(var(--sab) + 8px); background: rgba(0, 0, 0, 0.3); }
.action-sheet { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 8px; }
.as-group { border-radius: 26px; overflow: hidden; background: var(--glass); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); }
.as-head { padding: 14px 16px; text-align: center; border-bottom: 0.5px solid var(--sep); }
.as-title { font-size: 13px; font-weight: 600; color: var(--text2); }
.as-message { font-size: 13px; color: var(--text2); margin-top: 2px; }
.as-btn { display: block; width: 100%; min-height: 56px; font-size: 19px; text-align: center; color: var(--tint); }
.as-action + .as-action { border-top: 0.5px solid var(--sep); }
.as-btn.destructive { color: var(--red); }
.as-cancel { font-weight: 600; }
.as-btn:active { background: var(--fill2); }
.spinner { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2.2px solid var(--fill); border-top-color: var(--text2); animation: spin 0.8s linear infinite; }
.spinner.big { width: 28px; height: 28px; margin-top: 40px; }
@keyframes spin { to { transform: rotate(360deg); } }
html.touch #app .seg, html.touch #app .icon-btn, html.touch #app .banner-x, html.touch #app .move-btn, html.touch #app .edit-del, html.touch #app .text-btn { min-height: 0; }

/* ---------- motion, print ---------- */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; } }
#print-root { display: none; }
@media print {
  @page { size: letter; margin: 0; }
  html, body { height: auto; overflow: visible; background: #fff; }
  #app { display: none !important; }
  #print-root { display: block !important; color: #000; padding: 42px; font: 11pt/1.4 var(--sys); }
  #print-root h1 { font-size: 24pt; font-weight: 700; margin: 0 0 6px; }
  #print-root h3 { font-size: 15pt; font-weight: 700; margin: 18px 0 6px; }
  #print-root .muted { color: #555; }
  #print-root ul { list-style: none; padding: 0; }
  #print-root li { margin-bottom: 5px; }
  #print-root li::before { content: "• "; }
  #print-root ul.plain li::before { content: ""; }
  #print-root .note { font-size: 9pt; color: #777; padding-left: 10px; }
  #print-root img { display: block; max-width: 80%; max-height: 300px; margin: 6px 0 10px; }
}
