/* ==========================================================================
   飛牡蠣 FAMILY — pearl & seashell travel journal design system
   ========================================================================== */

:root {
  --bg: #f7f0f5;
  --bg-soft: #f3e8f0;
  --bg-deep: #e9dbe6;
  --paper: #fffafd;
  --paper-2: #fffdfe;
  --ink: #3b2b44;
  --ink-soft: #6b5a75;
  --ink-faint: #75647e;
  --line: rgba(59, 43, 68, 0.13);
  --line-strong: rgba(59, 43, 68, 0.24);
  --accent: #b14a73;
  --accent-deep: #8f2f55;
  --accent-soft: #fbe2ec;
  --teal: #2b746e;
  --teal-deep: #1d5f57;
  --teal-soft: #def2ee;
  --gold: #c79a45;
  --gold-soft: #fbf0d5;
  --lilac: #a47fb5;
  --lilac-soft: #ede4f3;
  --shell-pink: #fce7f0;
  --blush: #e2aacf;
  --danger: #b83a3a;
  --danger-soft: #fbe3e3;
  --ok: #2e8262;
  --shadow-xs: 0 1px 2px rgba(59, 43, 68, 0.07);
  --shadow-sm: 0 2px 8px rgba(59, 43, 68, 0.08);
  --shadow-md: 0 10px 28px -12px rgba(59, 43, 68, 0.26), 0 2px 6px rgba(59, 43, 68, 0.06);
  --shadow-lg: 0 26px 60px -24px rgba(59, 43, 68, 0.38), 0 6px 18px -8px rgba(59, 43, 68, 0.16);
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --font-sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-serif: "Noto Serif TC", "Songti TC", "PingFang TC", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
  --header-h: 62px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 620px at 88% -8%, rgba(226, 167, 194, 0.34), transparent 62%),
    radial-gradient(900px 520px at -10% 12%, rgba(127, 191, 183, 0.2), transparent 60%),
    radial-gradient(760px 500px at 50% 110%, rgba(201, 166, 216, 0.24), transparent 64%),
    var(--bg);
  background-attachment: fixed;
  overflow-x: clip;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

#app {
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}

a {
  color: var(--teal);
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

::selection {
  background: var(--accent);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.icon {
  flex: none;
  vertical-align: -0.18em;
}

/* --------------------------------- buttons -------------------------------- */

.btn {
  --btn-bg: transparent;
  --btn-ink: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease), background 0.16s, color 0.16s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.55;
  pointer-events: none;
  transform: none;
}

.btn--primary {
  --btn-bg: var(--accent-deep);
  --btn-ink: #fff;
  box-shadow: 0 8px 18px -10px rgba(194, 65, 28, 0.9);
}

.btn--primary:hover {
  --btn-bg: #8f2f55;
  box-shadow: 0 12px 22px -10px rgba(168, 52, 18, 0.85);
}

.btn--soft {
  --btn-bg: var(--teal-soft);
  --btn-ink: var(--teal-deep);
}

.btn--soft:hover {
  --btn-bg: #cfe7e2;
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-ink: var(--ink-soft);
  border-color: var(--line-strong);
}

.btn--ghost:hover {
  --btn-bg: rgba(255, 255, 255, 0.6);
  --btn-ink: var(--ink);
}

.btn--danger {
  --btn-bg: var(--danger);
  --btn-ink: #fff;
}

.btn--danger:hover {
  --btn-bg: #a92f24;
}

.btn--danger-ghost {
  --btn-bg: transparent;
  --btn-ink: var(--danger);
  border-color: rgba(194, 59, 46, 0.28);
}

.btn--danger-ghost:hover {
  --btn-bg: var(--danger-soft);
}

.btn--lg {
  min-height: 50px;
  padding: 12px 24px;
  font-size: 15px;
}

.btn--sm {
  min-height: 34px;
  padding: 6px 13px;
  font-size: 12.5px;
}

.btn--block {
  width: 100%;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.icon-btn:hover {
  background: rgba(59, 43, 68, 0.07);
  color: var(--ink);
}

.icon-btn:disabled {
  opacity: 0.28;
  pointer-events: none;
}

.icon-btn--tiny {
  width: 27px;
  height: 27px;
  border-radius: 7px;
}

.icon-btn.is-on {
  background: var(--teal-soft);
  color: var(--teal-deep);
}

/* ------------------------------- typography ------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.eyebrow i {
  width: 18px;
  height: 1px;
  background: var(--accent);
  opacity: 0.8;
}

.spinner {
  width: 26px;
  height: 26px;
  display: inline-block;
  flex: none;
  border-radius: 50%;
  border: 2.5px solid rgba(59, 43, 68, 0.16);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

.spinner--sm {
  width: 15px;
  height: 15px;
  border-width: 2px;
  border-top-color: currentColor;
}

.spinner.is-hidden {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* --------------------------------- avatars -------------------------------- */

.avatar {
  --av: var(--teal);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  background: color-mix(in srgb, var(--av) 16%, #fff);
  color: color-mix(in srgb, var(--av) 70%, #3b2b44);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.02em;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 4px rgba(59, 43, 68, 0.12);
  user-select: none;
}

.avatar--xs {
  width: 25px;
  height: 25px;
  font-size: 9.5px;
  border-width: 1.5px;
}

.avatar--sm {
  width: 31px;
  height: 31px;
  font-size: 11px;
}

.avatar--lg {
  width: 54px;
  height: 54px;
  font-size: 18px;
  border-width: 2px;
}

.avatar--more {
  background: var(--bg-deep);
  color: var(--ink-soft);
  font-size: 10px;
}

/* oyster mascot avatars */

.avatar--face {
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--ink);
  font-size: 0;
}

.avatar--face .animal-face {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  filter: drop-shadow(0 2px 4px rgba(143, 47, 85, 0.22));
}

.animal-face .animal-ink {
  fill: #3f2b45;
}

.animal-face .animal-line {
  fill: none;
  stroke: #3f2b45;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.animal-face .animal-line--light {
  fill: none;
  stroke: #f5f1ea;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.animal-face .animal-white {
  fill: #fff;
}

.animal-face .animal-nose {
  fill: #3f2b45;
}

.animal-face .animal-blush {
  fill: #f39ab6;
  opacity: 0.7;
}

.avatar--face .oyster-face {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(143, 47, 85, 0.22));
}

.oyster-face .oyster-shell {
  fill: color-mix(in srgb, var(--av, #a47fb5) 30%, #fff);
  stroke: color-mix(in srgb, var(--av, #a47fb5) 66%, #5b3d63);
  stroke-width: 1.7;
  stroke-linejoin: round;
}

.oyster-face .oyster-shell-inner {
  fill: color-mix(in srgb, var(--av, #a47fb5) 14%, #fff);
}

.oyster-face .oyster-pearl {
  fill: #fff4fa;
  stroke: color-mix(in srgb, var(--av, #a47fb5) 30%, #ffe8f2);
  stroke-width: 1.2;
}

.oyster-face .oyster-shine {
  fill: #fff;
  opacity: 0.72;
}

.oyster-face .oyster-ink {
  fill: #46324f;
}

.oyster-face .oyster-ink-line {
  fill: none;
  stroke: #46324f;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.avatar .online-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ok);
  border: 1.5px solid #fff;
}

.avatar-stack {
  display: inline-flex;
  align-items: center;
}

.avatar-stack .avatar + .avatar {
  margin-left: -8px;
}

.avatar-stack-empty {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--ink-faint);
  white-space: nowrap;
}

/* --------------------------------- pills ---------------------------------- */

.mode-pill,
.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  background: rgba(59, 43, 68, 0.055);
  color: var(--ink-soft);
  border: 1px solid transparent;
}

.mode-pill--ok {
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.sync-pill--ok {
  color: var(--teal-deep);
  background: var(--teal-soft);
}

.sync-pill--busy {
  color: #7c5a14;
  background: var(--gold-soft);
}

.sync-pill--busy .icon {
  animation: spin 1.4s linear infinite;
}

.sync-pill--local {
  color: var(--ink-faint);
  background: rgba(59, 43, 68, 0.06);
}

/* --------------------------------- toasts --------------------------------- */

.toasts {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 8px;
  width: min(92vw, 420px);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fdf8fb;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}

.toast.is-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast .icon {
  color: var(--gold);
}

.toast--success .icon {
  color: #9ff0cb;
}

.toast--error {
  background: #54263a;
}

.toast--error .icon {
  color: #ffc2cf;
}

.toast span {
  min-width: 0;
}

/* --------------------------------- brand ---------------------------------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  flex: none;
}

.brand-logo {
  width: 38px;
  height: 38px;
  flex: none;
  filter: drop-shadow(0 5px 12px rgba(143, 47, 85, 0.28));
  transition: transform 0.4s var(--ease);
}

.brand:hover .brand-logo {
  transform: rotate(-6deg) scale(1.05);
}

.brand-text {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
}

.brand-text em {
  display: block;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.36em;
  color: var(--accent);
  margin-top: 4px;
  text-transform: uppercase;
}

/* --------------------------------- topbar --------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 241, 231, 0.82);
  backdrop-filter: blur(14px) saturate(1.35);
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
  border-bottom: 1px solid transparent;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 0 20px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
}

.profile-btn:hover {
  background: #fff;
  border-color: var(--line-strong);
}

.profile-name {
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-btn > .icon {
  color: var(--ink-faint);
}

/* ---------------------------------- home ---------------------------------- */

.page--home {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.home-main {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 20px 0;
  flex: 1;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 20px;
  padding: 46px 0 34px;
  overflow: clip;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 4% -12% auto auto;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 106, 146, 0.2), transparent 65%);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 560px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.5vw, 54px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.015em;
  margin: 16px 0 18px;
}

.hero h1 em {
  position: relative;
  font-style: normal;
  color: var(--accent);
  white-space: nowrap;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 7px;
  background: var(--gold);
  opacity: 0.28;
  border-radius: 4px;
  z-index: -1;
}

.hero-sub {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.85;
  max-width: 490px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 26px;
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 28px;
  font-size: 11.5px;
  color: var(--ink-faint);
}

.hero-features span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hero-features .icon {
  color: var(--teal);
}

.hero-art {
  position: relative;
  width: 100%;
  min-width: 0;
}

.hero-scene {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  aspect-ratio: 1 / 0.92;
}

.hero-halo {
  position: absolute;
  inset: 4% 2% 8%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 250, 253, 0.95), rgba(251, 226, 236, 0.7) 46%, rgba(201, 166, 216, 0.16) 68%, transparent 72%);
  filter: blur(2px);
}

.hero-halo::after {
  content: "";
  position: absolute;
  inset: 9%;
  border-radius: 50%;
  border: 1.5px dashed rgba(177, 74, 115, 0.26);
}

.hero-waves {
  position: absolute;
  left: -4%;
  right: -4%;
  bottom: 3%;
  width: 108%;
  height: auto;
}

.hero-oyster {
  position: absolute;
  left: 50%;
  top: 45%;
  width: 50%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  animation: oyster-float 6s ease-in-out infinite;
}

.hero-face {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 18px 26px rgba(143, 47, 85, 0.22));
}

.hero-face .oyster-face {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-wing {
  position: absolute;
  z-index: 1;
  width: 58%;
  top: 20%;
  filter: drop-shadow(0 8px 14px rgba(143, 47, 85, 0.14));
}

.hero-wing svg {
  width: 100%;
  height: auto;
  display: block;
}

.hero-wing--l {
  left: -34%;
  transform-origin: 100% 60%;
  animation: wing-flap-l 3.6s ease-in-out infinite;
}

.hero-wing--r {
  right: -34%;
  transform: scaleX(-1);
  transform-origin: 0% 60%;
  animation: wing-flap-r 3.6s ease-in-out infinite;
}

.hero-bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff, rgba(251, 226, 236, 0.5) 60%, rgba(201, 166, 216, 0.2));
  border: 1px solid rgba(177, 74, 115, 0.18);
}

.hero-bubble.hb1 { width: 18px; height: 18px; top: 12%; left: 14%; }
.hero-bubble.hb2 { width: 11px; height: 11px; top: 26%; left: 6%; }
.hero-bubble.hb3 { width: 22px; height: 22px; top: 10%; right: 12%; }
.hero-bubble.hb4 { width: 13px; height: 13px; top: 30%; right: 6%; }

.hero-pearl {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff, #f6dce8 62%, #d9a8c0);
  box-shadow: 0 4px 10px -4px rgba(143, 47, 85, 0.4);
}

.hero-pearl.hp1 { width: 13px; height: 13px; bottom: 16%; left: 10%; }
.hero-pearl.hp2 { width: 8px; height: 8px; bottom: 26%; left: 17%; }
.hero-pearl.hp3 { width: 10px; height: 10px; bottom: 20%; right: 12%; }

.hero-spark {
  position: absolute;
  color: var(--gold);
  font-size: 16px;
  line-height: 1;
  opacity: 0.85;
}

.hero-spark.hs1 { top: 18%; right: 22%; font-size: 20px; }
.hero-spark.hs2 { top: 34%; left: 20%; font-size: 13px; }
.hero-spark.hs3 { bottom: 24%; right: 22%; font-size: 14px; color: var(--accent); }

.hero-note {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.32em;
  color: var(--ink-faint);
  white-space: nowrap;
}

.hero-note i {
  display: block;
  width: 14px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

@keyframes oyster-float {
  0%, 100% { transform: translate(-50%, -50%) translateY(-4px); }
  50% { transform: translate(-50%, -50%) translateY(7px); }
}

@keyframes wing-flap-l {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-9deg); }
}

@keyframes wing-flap-r {
  0%, 100% { transform: scaleX(-1) rotate(0deg); }
  50% { transform: scaleX(-1) rotate(-9deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-oyster,
  .hero-wing--l,
  .hero-wing--r {
    animation: none;
  }
}

/* -------------------------------- trip grid -------------------------------- */

.trips-section {
  padding: 22px 0 10px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head h2 {
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 750;
  letter-spacing: 0.03em;
  margin-top: 4px;
}

.section-head--inside {
  margin-bottom: 20px;
}

.section-count {
  font-size: 11.5px;
  color: var(--ink-faint);
  white-space: nowrap;
  padding-bottom: 5px;
}

.trip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 18px;
}

.trip-card-wrap {
  position: relative;
  min-width: 0;
}

.trip-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid rgba(59, 43, 68, 0.08);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  color: var(--ink);
  transition: transform 0.24s var(--ease), box-shadow 0.24s var(--ease);
}

.trip-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.trip-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  color: var(--ink);
  background: linear-gradient(140deg, var(--bg-deep), var(--paper));
}

.trip-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.trip-card:hover .trip-cover img {
  transform: scale(1.045);
}

.trip-cover .topo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--ink);
  opacity: 0.5;
}

.trip-cover .cover-letter {
  position: absolute;
  right: 14px;
  bottom: -26px;
  font-family: var(--font-serif);
  font-size: 132px;
  font-weight: 800;
  line-height: 1;
  opacity: 0.12;
  color: var(--ink);
  user-select: none;
}

.trip-cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 26, 29, 0.78) 0%, rgba(20, 26, 29, 0.16) 48%, rgba(20, 26, 29, 0) 78%);
}

.trip-cover-badge,
.trip-cover-stamp {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  background: rgba(255, 250, 242, 0.9);
  color: var(--ink);
  backdrop-filter: blur(4px);
}

.trip-cover-badge {
  top: 12px;
  left: 12px;
}

.trip-cover-stamp {
  top: 12px;
  right: 12px;
  width: 26px;
  padding: 0;
  color: var(--accent);
}

.trip-cover-text {
  position: absolute;
  z-index: 2;
  left: 16px;
  right: 52px;
  bottom: 14px;
  color: #fff;
}

.trip-dest {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  opacity: 0.82;
  margin-bottom: 3px;
}

.trip-cover-text h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: 0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.2);
}

.trip-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 15px 13px;
}

.trip-card-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.trip-dates {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}

.trip-dates .icon {
  color: var(--accent);
}

.trip-item-count {
  font-size: 10.5px;
  color: var(--ink-faint);
  padding-left: 19px;
}

.card-menu {
  position: absolute;
  right: 8px;
  bottom: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--ink-faint);
  transition: background 0.15s, color 0.15s;
}

.card-menu:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.trip-new-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 230px;
  padding: 24px;
  border-radius: var(--radius);
  border: 1.5px dashed var(--line-strong);
  background: rgba(255, 255, 255, 0.32);
  color: var(--ink-soft);
  text-align: center;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.trip-new-card:hover {
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.trip-new-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 5px;
}

.trip-new-card strong {
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--ink);
}

.trip-new-card > span:last-child {
  font-size: 11.5px;
  color: var(--ink-faint);
}

/* --------------------------------- empty ---------------------------------- */

.home-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 54px 24px 60px;
  border-radius: var(--radius-lg);
  background: rgba(255, 250, 242, 0.62);
  border: 1px solid var(--line);
}

.empty-art {
  position: relative;
  width: 150px;
  height: 150px;
  margin-bottom: 20px;
}

.empty-orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px dashed rgba(59, 43, 68, 0.2);
}

.empty-orbit::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 1px solid rgba(59, 43, 68, 0.1);
}

.empty-badge {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 14px 26px -14px rgba(177, 74, 115, 0.85);
}

.empty-badge--face {
  width: 96px;
  height: 96px;
  background: transparent;
  box-shadow: none;
  --av: #a47fb5;
}

.empty-badge--face .oyster-face {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 12px 20px rgba(143, 47, 85, 0.22));
}

.empty-pin {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--teal);
  box-shadow: var(--shadow-sm);
}

.empty-pin.p1 {
  top: 6px;
  right: 8px;
  color: var(--accent);
}

.empty-pin.p2 {
  left: 0;
  bottom: 26px;
  color: var(--gold);
}

.empty-pin.p3 {
  right: 4px;
  bottom: 4px;
  color: var(--teal);
}

.home-empty h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 750;
  margin-bottom: 8px;
}

.home-empty p {
  max-width: 380px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.8;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

/* --------------------------------- footer --------------------------------- */

.home-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 52px;
  padding: 24px 0 30px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 11.5px;
}

.footer-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-deep);
  color: var(--ink-soft);
}

.home-footer p {
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

.home-footer strong {
  font-family: var(--font-serif);
  font-size: 12.5px;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
}

.footer-status {
  margin-left: auto;
  text-align: right;
}

/* ================================ trip page ================================ */

.page--trip {
  padding-top: var(--header-h);
}

.trip-topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(246, 241, 231, 0.86);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}

.trip-topbar .topbar-inner {
  min-height: var(--header-h);
  padding: 0 14px;
  gap: 8px;
}

.back-btn {
  background: rgba(255, 255, 255, 0.6);
  border-color: var(--line);
}

.trip-topbar-center {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  justify-content: center;
}

.trip-topbar-title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trip-topbar-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}

.topbar-presence {
  display: flex;
  align-items: center;
  padding-right: 4px;
}

.share-top span {
  display: inline;
}

/* --------------------------------- hero ---------------------------------- */

.trip-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-deep), #dcc6d8);
  color: var(--ink);
}

.trip-hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.trip-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.trip-hero-bg--art {
  color: var(--ink);
  background: linear-gradient(140deg, #f6e3ee 0%, #ecd2e3 52%, #dcbdd6 100%);
}

.trip-hero-bg--art svg {
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

.trip-hero-bg--art .cover-letter {
  position: absolute;
  right: 6%;
  bottom: -8%;
  font-family: var(--font-serif);
  font-size: 300px;
  line-height: 1;
  font-weight: 800;
  opacity: 0.13;
}

.trip-hero-grain {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: radial-gradient(rgba(255, 255, 255, 0.5) 0.6px, transparent 0.6px);
  background-size: 3px 3px;
}

.trip-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 26, 29, 0.86) 0%, rgba(20, 26, 29, 0.36) 46%, rgba(20, 26, 29, 0.06) 100%);
}

.trip-hero:not(.has-cover) .trip-hero-shade {
  background: linear-gradient(to top, rgba(20, 26, 29, 0.62) 0%, rgba(20, 26, 29, 0.06) 80%);
}

.trip-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 24px 24px;
  color: #fff;
}

.trip-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.trip-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 25px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
}

.trip-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.22);
  margin-bottom: 8px;
}

.trip-hero-notes {
  max-width: 620px;
  font-size: 13px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.trip-hero-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.hero-member-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
}

.hero-member-row .avatar {
  border-color: rgba(255, 255, 255, 0.72);
}

.hero-member-row .avatar-stack-empty,
.hero-member-text {
  color: rgba(255, 255, 255, 0.74);
  font-size: 11.5px;
}

.invite-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  border: 1px dashed rgba(255, 255, 255, 0.46);
  transition: background 0.15s, border-color 0.15s;
}

.invite-mini:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.8);
}

.trip-code-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.92);
  color: var(--ink);
  font-size: 11px;
  box-shadow: 0 6px 16px -10px rgba(0, 0, 0, 0.5);
  transition: background 0.15s, transform 0.15s;
}

.trip-code-chip:hover {
  background: #fff;
  transform: translateY(-1px);
}

.trip-code-chip span {
  color: var(--ink-faint);
}

.trip-code-chip strong {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--accent-deep);
}

.trip-code-chip > .icon:last-child {
  color: var(--ink-faint);
}

/* --------------------------------- tabs ---------------------------------- */

.trip-tabs {
  position: sticky;
  top: var(--header-h);
  z-index: 35;
  background: rgba(246, 241, 231, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.tabs-inner {
  display: flex;
  align-items: stretch;
  gap: 2px;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs-inner::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  min-width: 74px;
  padding: 13px 10px 12px;
  color: var(--ink-faint);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s;
}

.tab-btn:hover {
  color: var(--ink-soft);
}

.tab-btn.is-active {
  color: var(--accent-deep);
  border-bottom-color: var(--accent);
}

.tab-btn.is-active .icon {
  color: var(--accent);
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(59, 43, 68, 0.08);
  color: var(--ink-soft);
  font-size: 9.5px;
  font-weight: 700;
  font-style: normal;
  line-height: 1;
}

.tab-btn.is-active .tab-badge {
  background: var(--accent-soft);
  color: #8f2f55;
}

/* --------------------------------- main ---------------------------------- */

.trip-main {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 22px 20px 64px;
}

.trip-main-inner {
  width: 100%;
}

.trip-main-inner--narrow {
  max-width: 720px;
  margin: 0 auto;
}

.trip-main-inner--plan {
  max-width: 820px;
  margin: 0 auto;
}

/* ------------------------------- day strip ------------------------------- */

.day-strip-wrap {
  position: relative;
  margin: 0 -20px 22px;
}

.day-strip-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 28px;
  background: linear-gradient(to right, transparent, var(--bg));
  pointer-events: none;
}

.day-strip {
  display: flex;
  gap: 8px;
  padding: 2px 20px 6px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.day-strip::-webkit-scrollbar {
  display: none;
}

.day-pill {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  flex: none;
  min-width: 108px;
  padding: 9px 14px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.7);
  color: var(--ink-soft);
  text-align: left;
  scroll-snap-align: start;
  transition: background 0.18s, border-color 0.18s, transform 0.18s, color 0.18s;
}

.day-pill:hover {
  background: var(--paper);
  border-color: var(--line-strong);
}

.day-pill.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  box-shadow: 0 8px 18px -12px rgba(59, 43, 68, 0.8);
  transform: translateY(-1px);
}

.day-pill-main {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.day-pill.is-active .day-pill-main {
  color: var(--gold);
}

.day-pill-date {
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
}

.day-pill-count {
  position: absolute;
  top: 8px;
  right: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(59, 43, 68, 0.07);
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 700;
}

.day-pill.is-active .day-pill-count {
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.8);
}

.day-pill--add {
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 78px;
  border-style: dashed;
  color: var(--ink-faint);
  font-size: 10.5px;
  text-align: center;
}

.day-pill--add:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* --------------------------------- day head ------------------------------- */

.day-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 0 2px;
}

.day-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.day-head h2 {
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.day-head-copy p {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 12px;
}

.day-cost {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.3;
  white-space: nowrap;
}

.day-cost strong {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 750;
  color: var(--ink);
}

.day-cost span {
  font-size: 10.5px;
  color: var(--ink-faint);
}

/* -------------------------------- timeline -------------------------------- */

.timeline {
  position: relative;
  padding-left: 0;
}

.timeline-line {
  position: absolute;
  top: 18px;
  bottom: 66px;
  left: 67px;
  width: 1.5px;
  background: repeating-linear-gradient(to bottom, var(--line-strong) 0 5px, transparent 5px 11px);
}

.stop {
  position: relative;
  display: grid;
  grid-template-columns: 56px 22px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 0 0 12px;
  cursor: pointer;
  animation: rise 0.34s var(--ease) both;
}

.stop:last-of-type {
  padding-bottom: 4px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.stop-time {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  padding-top: 15px;
  font-family: var(--font-mono);
  line-height: 1.2;
  white-space: nowrap;
}

.stop-time strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.stop-time span {
  font-size: 9.5px;
  color: var(--ink-faint);
}

.stop-time strong:only-child {
  color: var(--ink-soft);
}

.stop-rail {
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 11px;
}

.stop-dot {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--cat-soft, var(--bg-soft));
  color: var(--cat, var(--teal));
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1.5px var(--cat-soft, var(--line));
  transition: transform 0.2s var(--ease);
}

.stop:hover .stop-dot {
  transform: scale(1.12);
}

.stop-card {
  min-width: 0;
  padding: 13px 15px 12px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  border: 1px solid rgba(59, 43, 68, 0.09);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.stop:hover .stop-card {
  border-color: rgba(59, 43, 68, 0.18);
  box-shadow: var(--shadow-sm);
  transform: translateX(1px);
}

.stop.is-done .stop-card {
  background: rgba(255, 250, 242, 0.66);
}

.stop.is-done .stop-title-wrap h3 {
  color: var(--ink-soft);
  text-decoration: line-through;
  text-decoration-color: rgba(59, 43, 68, 0.28);
  text-decoration-thickness: 1.5px;
}

.stop-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.stop-title-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.stop-title-wrap h3 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: 0.015em;
  word-break: break-word;
}

.cat-label {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border-radius: 5px;
  background: var(--cat-soft, var(--bg-soft));
  color: var(--cat, var(--teal));
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.visited-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 18px;
  padding: 0 6px;
  border-radius: 5px;
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
}

.stop-edit-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  color: var(--ink-faint);
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
}

.stop:hover .stop-edit-hint {
  opacity: 1;
}

.stop-edit-hint:hover {
  background: var(--bg-soft);
}

.stop-place {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--ink-faint);
  line-height: 1.5;
}

.stop-place .icon {
  margin-top: 2px;
  color: var(--teal);
}

.stop-place span {
  min-width: 0;
}

.stop-place em {
  font-style: normal;
  display: block;
  font-size: 10.5px;
  color: var(--ink-faint);
}

.stop-photos {
  position: relative;
  display: flex;
  gap: 5px;
  margin-top: 9px;
}

.stop-photo {
  position: relative;
  width: 68px;
  height: 54px;
  border-radius: 7px;
  overflow: hidden;
  flex: none;
  border: 1px solid rgba(59, 43, 68, 0.08);
}

.stop-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}

.stop-photo:hover img {
  transform: scale(1.08);
}

.stop-photo-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 54px;
  border-radius: 7px;
  background: var(--bg-soft);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.stop-notes {
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stop-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.stop-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  background: rgba(59, 43, 68, 0.05);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.meta-chip--cost {
  background: var(--gold-soft);
  color: #7c5a14;
}

.meta-chip--done {
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.meta-chip--muted {
  color: var(--ink-faint);
}

.meta-chip--split {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.meta-chip--warn {
  background: var(--gold-soft);
  color: #7c5a14;
}

.stop-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.map-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 27px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-size: 10.5px;
  font-weight: 700;
  transition: background 0.15s, transform 0.15s;
}

.map-btn:hover {
  background: #c9e6e0;
  transform: translateY(-1px);
}

.map-btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.stop-actions .icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.move-btns {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  margin-left: 2px;
}

.timeline > .add-stop {
  margin-left: 86px;
}

.add-stop {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 86px);
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px dashed var(--line-strong);
  background: rgba(255, 255, 255, 0.28);
  color: var(--ink-soft);
  text-align: left;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.add-stop:hover {
  background: var(--paper);
  border-color: var(--accent);
  color: var(--ink);
}

.add-stop-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.add-stop > span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.4;
}

.add-stop strong {
  font-size: 12.5px;
  font-weight: 700;
}

.add-stop em {
  font-style: normal;
  font-size: 10.5px;
  color: var(--ink-faint);
}

.day-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 6px 0 2px 86px;
  padding: 26px 20px;
  border-radius: var(--radius-sm);
  background: rgba(255, 250, 242, 0.5);
  border: 1px dashed var(--line);
  color: var(--ink-faint);
  text-align: center;
}

.day-empty .icon {
  color: var(--gold);
}

.day-empty p {
  font-size: 12px;
}

/* ================================== todo ================================== */

.progress-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 24px 26px;
  margin-bottom: 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #3b2b44, #5b3d63 58%, #7d3a5f);
  color: #fdf8fb;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.progress-card::after {
  content: "";
  position: absolute;
  inset: auto -50px -90px auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  pointer-events: none;
}

.progress-card .eyebrow {
  color: rgba(255, 255, 255, 0.5);
}

.progress-card .eyebrow i {
  background: var(--gold);
}

.progress-copy {
  min-width: 0;
}

.progress-copy h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 750;
  letter-spacing: 0.03em;
  margin: 6px 0 5px;
}

.progress-copy p {
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  line-height: 1.7;
}

.progress-copy strong {
  color: var(--gold);
}

.progress-sub {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.46);
}

.progress-ring {
  --pct: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(var(--gold) calc(var(--pct) * 1%), rgba(255, 255, 255, 0.12) 0);
}

.progress-ring::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #5b3d63;
}

.progress-ring-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
}

.progress-ring-inner strong {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 750;
}

.progress-ring-inner span {
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.add-todo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px 7px 14px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s, box-shadow 0.18s;
}

.add-todo:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(42, 127, 116, 0.1);
}

.add-todo-icon {
  display: inline-flex;
  color: var(--accent);
}

.add-todo input {
  flex: 1;
  min-width: 0;
  height: 36px;
  border: 0;
  background: transparent;
  font-size: 13px;
  outline: none;
}

.add-todo input::placeholder {
  color: var(--ink-faint);
}

.add-todo .btn {
  min-height: 36px;
  padding: 6px 18px;
  font-size: 12.5px;
}

.todo-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px 10px 13px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  border: 1px solid rgba(59, 43, 68, 0.075);
  box-shadow: var(--shadow-xs);
  transition: background 0.18s, border-color 0.18s;
}

.todo-item:hover {
  border-color: var(--line-strong);
}

.todo-item.is-done {
  background: rgba(255, 250, 242, 0.55);
}

.todo-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 6px;
  border: 1.6px solid var(--line-strong);
  background: transparent;
  color: #fff;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.todo-check:hover {
  border-color: var(--teal);
  transform: scale(1.06);
}

.todo-check--sm {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.todo-item.is-done .todo-check,
.is-done > .todo-check {
  background: var(--teal);
  border-color: var(--teal);
}

.todo-text {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.55;
  word-break: break-word;
}

.todo-item.is-done .todo-text {
  color: var(--ink-faint);
  text-decoration: line-through;
  text-decoration-color: rgba(59, 43, 68, 0.24);
}

.todo-del {
  width: 30px;
  height: 30px;
  opacity: 0;
  color: var(--ink-faint);
}

.todo-item:hover .todo-del {
  opacity: 1;
}

.todo-del:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.item-todo-section {
  margin-top: 28px;
}

.mini-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.mini-head h3 {
  font-family: var(--font-serif);
  font-size: 16.5px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.mini-head span {
  font-size: 10.5px;
  color: var(--ink-faint);
}

.item-todo-group {
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 250, 242, 0.62);
  border: 1px solid var(--line);
}

.item-todo-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  font-size: 12.5px;
}

.item-todo-title strong {
  font-weight: 650;
}

.day-tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: #8f2f55;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
}

.item-todo-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.item-todo-group li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-soft);
}

.item-todo-group li.is-done > span {
  color: var(--ink-faint);
  text-decoration: line-through;
}

/* ================================= photos ================================= */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.photo-tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-deep);
  border: 1px solid rgba(59, 43, 68, 0.08);
}

.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.photo-tile:hover img {
  transform: scale(1.06);
}

.photo-overlay {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 26px 11px 10px;
  text-align: left;
  color: #fff;
  background: linear-gradient(to top, rgba(16, 22, 25, 0.82), transparent);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s;
}

.photo-tile:hover .photo-overlay,
.photo-tile:focus-visible .photo-overlay {
  opacity: 1;
  transform: translateY(0);
}

.photo-overlay strong {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.photo-overlay span {
  font-size: 9.5px;
  opacity: 0.72;
}

/* ================================== costs ================================= */

.cost-hero {
  position: relative;
  padding: 24px 26px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: linear-gradient(140deg, #fdeef5, #f8dcea 52%, #f0cfe1);
  border: 1px solid rgba(177, 74, 115, 0.28);
  overflow: hidden;
}

.cost-hero::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -60px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  border: 1px dashed rgba(143, 47, 85, 0.22);
}

.cost-hero .eyebrow {
  color: #9f335e;
}

.cost-hero .eyebrow i {
  background: #9f335e;
}

.cost-hero h2 {
  position: relative;
  font-family: var(--font-serif);
  font-size: clamp(30px, 6vw, 42px);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: #4a2440;
  margin: 8px 0 2px;
}

.cost-hero > p {
  font-size: 11.5px;
  color: #7a4663;
}

.cost-split {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(143, 47, 85, 0.16);
}

.cost-split > div {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.cost-split strong {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 750;
  color: #4a2440;
}

.cost-split span {
  font-size: 9.5px;
  color: #7a4663;
  letter-spacing: 0.04em;
}

.cost-card {
  margin-bottom: 14px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid rgba(59, 43, 68, 0.08);
  box-shadow: var(--shadow-xs);
}

.cost-card--settle {
  background:
    radial-gradient(280px 160px at 100% 0%, rgba(222, 242, 238, 0.7), transparent 70%),
    var(--paper);
}

.settle-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 2px 0 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--gold-soft);
  color: #7c5a14;
  font-size: 11px;
  line-height: 1.6;
}

.settle-notice .icon {
  margin-top: 1px;
  flex: none;
}

.settle-notice p {
  margin: 0;
}

.settle-notice strong {
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.settle-people {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.settle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  background: var(--bg-soft);
}

.settle-person {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  line-height: 1.35;
}

.settle-person strong {
  font-size: 12.5px;
  font-weight: 650;
}

.settle-person span {
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settle-balance {
  flex: none;
  padding: 4px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.settle-balance.is-credit {
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.settle-balance.is-debt {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.settle-balance.is-even {
  background: rgba(59, 43, 68, 0.06);
  color: var(--ink-faint);
}

.settle-transfers {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.settle-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-faint);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.transfer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper-2);
}

.transfer-people {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  font-size: 11px;
}

.transfer-people strong {
  overflow: hidden;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transfer-arrow {
  display: inline-flex;
  margin: 0 2px;
  color: var(--accent);
}

.transfer-amount {
  flex: none;
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: 13px;
  white-space: nowrap;
}

.settle-done {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 11px;
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-size: 11.5px;
  font-weight: 600;
}

.split-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.split-row {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--bg-soft);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s;
}

.split-row:hover {
  border-color: var(--line-strong);
  background: var(--paper-2);
}

.split-row.is-pending {
  background: var(--gold-soft);
}

.split-row-main,
.split-row-amount {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.35;
}

.split-row-main {
  flex: 1;
}

.split-row-main strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.split-row-main em {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.split-row-amount {
  flex: none;
  align-items: flex-end;
}

.split-row-amount strong {
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.split-row-amount em {
  color: var(--ink-faint);
  font-size: 9.5px;
  font-style: normal;
  white-space: nowrap;
}

.cat-bars {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.cat-bar-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.cat-bar-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}

.cat-bar-name i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--cat) 15%, #fff);
  color: var(--cat);
}

.cat-bar-track {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  overflow: hidden;
}

.cat-bar-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  opacity: 0.86;
  animation: grow 0.5s var(--ease) both;
}

@keyframes grow {
  from {
    width: 0;
  }
}

.cat-bar-row > strong {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 650;
  color: var(--ink);
  white-space: nowrap;
}

.cost-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 20px 10px 14px;
  text-align: center;
  color: var(--ink-faint);
}

.cost-empty .icon {
  color: var(--gold);
}

.cost-empty p {
  font-size: 11.5px;
}

.day-costs {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.day-cost-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.day-cost-label {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.day-cost-label span {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-deep);
}

.day-cost-label strong {
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-faint);
}

.day-cost-track {
  height: 6px;
  border-radius: 999px;
  background: var(--bg-soft);
  overflow: hidden;
}

.day-cost-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), #6fb8ae);
  animation: grow 0.5s var(--ease) both;
}

.day-cost-value {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* =============================== empty / state ============================= */

.empty-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 46px 24px;
  border-radius: var(--radius);
  background: rgba(255, 250, 242, 0.6);
  border: 1px dashed var(--line-strong);
}

.empty-block--soft {
  background: rgba(255, 250, 242, 0.42);
  border-color: var(--line);
}

.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--teal);
}

.empty-block h3 {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 750;
  margin-bottom: 6px;
}

.empty-block p {
  max-width: 340px;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.75;
  margin-bottom: 16px;
}

.empty-block p:last-child {
  margin-bottom: 0;
}

.page--state {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 30px 20px;
}

.page--state > .brand {
  align-self: flex-start;
}

.state-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 400px;
  margin: auto;
  padding: 38px 26px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.state-box h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 750;
}

.state-box p {
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.7;
}

.state-box .btn {
  margin-top: 6px;
}

/* ================================= modals ================================= */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(18, 25, 28, 0.46);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}

.modal-backdrop.is-in,
.modal-backdrop.is-open {
  opacity: 1;
}

.modal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: 92vh;
  max-height: 92dvh;
  background: var(--paper);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -18px 50px -20px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  transform: translateY(18px) scale(0.99);
  transition: transform 0.26s var(--ease);
}

.modal-backdrop.is-in .modal,
.modal-backdrop.is-open .modal {
  transform: translateY(0) scale(1);
}

.modal--small {
  max-width: 460px;
  border-radius: 22px;
  margin: auto 16px;
  align-self: center;
  box-shadow: var(--shadow-lg);
}

.modal--form {
  max-width: 620px;
}

.modal--share {
  max-width: 520px;
}

.modal--sheet {
  max-width: 460px;
  border-radius: 22px;
  margin: auto 14px;
  align-self: center;
  box-shadow: var(--shadow-lg);
}

.modal > form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: inherit;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 750;
  letter-spacing: 0.02em;
  line-height: 1.35;
  margin-top: 3px;
}

.modal-head .icon-btn {
  margin: -4px -6px 0 0;
}

.modal-body {
  flex: 1;
  min-height: 0;
  padding: 18px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.modal-sub {
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.72;
  margin-top: 4px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 13px 22px calc(13px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.8);
}

.modal-footer--split {
  justify-content: space-between;
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

/* --------------------------------- forms ---------------------------------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 13px;
}

.field > span {
  font-size: 11.5px;
  font-weight: 650;
  color: var(--ink-soft);
  padding-left: 2px;
}

.field input,
.field select,
.field textarea,
.code-input {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  font-size: 13.5px;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}

.field textarea {
  resize: vertical;
  min-height: 66px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-faint);
  opacity: 0.8;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.code-input:focus {
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(42, 127, 116, 0.1);
}

.field--title input {
  min-height: 48px;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field-hint {
  margin: 1px 0 0;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--ink-faint);
  padding-left: 2px;
}

.field-hint strong {
  color: var(--teal-deep);
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.field-hint.is-ok {
  color: var(--teal-deep);
}

.field-error {
  margin: -3px 0 10px;
  padding: 8px 11px;
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 11.5px;
  line-height: 1.55;
}

.field-error[hidden] {
  display: none;
}

.form-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 12px;
  padding: 9px 11px;
  border-radius: 9px;
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-size: 10.8px;
  line-height: 1.65;
}

.form-note .icon {
  margin-top: 1px;
}

.form-note--warn {
  background: var(--gold-soft);
  color: #7c5a14;
}

.code-input {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-align: center;
  text-transform: uppercase;
  min-height: 52px;
}

/* ------------------------------ cover picker ------------------------------ */

.cover-picker-wrap {
  margin-bottom: 15px;
}

.cover-picker {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 128px;
  border-radius: var(--radius-sm);
  border: 1.5px dashed var(--line-strong);
  background: var(--bg-soft);
  overflow: hidden;
  color: var(--ink-soft);
  transition: border-color 0.18s, background 0.18s;
}

.cover-picker:hover {
  border-color: var(--accent);
  background: var(--bg);
}

.cover-picker img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-picker-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  color: var(--ink-faint);
}

.cover-picker-empty .icon {
  color: var(--accent);
  margin-bottom: 3px;
}

.cover-picker-empty strong {
  font-size: 12px;
  font-weight: 650;
  color: var(--ink-soft);
}

.cover-picker-empty > span {
  font-size: 10px;
}

.cover-change {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(20, 25, 28, 0.62);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.cover-picker.is-loading {
  pointer-events: none;
}

/* -------------------------------- category -------------------------------- */

.cat-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 1px;
}

.cat-option {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.cat-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cat-option span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 31px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.cat-option:hover span {
  border-color: var(--line-strong);
}

.cat-option input:checked + span {
  background: var(--cat-soft);
  border-color: var(--cat);
  color: color-mix(in srgb, var(--cat) 80%, #2a1e30);
}

.cat-option input:focus-visible + span {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* --------------------------------- coords --------------------------------- */

.coord-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.coord-row input {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 12px;
}

.coord-row .icon-btn {
  flex: none;
  background: var(--bg-soft);
  border-radius: 8px;
}

.map-preview {
  margin: -2px 0 13px;
}

.map-preview:empty {
  display: none;
}

.map-frame {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: 190px;
  border: 0;
  filter: saturate(0.92);
}

.map-frame-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  font-size: 10.5px;
  color: var(--ink-faint);
}

.map-frame-foot > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-frame-foot a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  color: var(--teal-deep);
  font-weight: 600;
}

.map-search-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 9px;
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-size: 11.5px;
  font-weight: 600;
}

.map-search-link .icon:last-child {
  margin-left: auto;
  opacity: 0.6;
}

/* --------------------------------- money ---------------------------------- */

.money-input {
  display: flex;
  align-items: stretch;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  overflow: hidden;
  transition: border-color 0.16s, box-shadow 0.16s;
}

.money-input:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(42, 127, 116, 0.1);
}

.money-currency {
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  background: var(--bg-soft);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-right: 1px solid var(--line);
}

.money-input input {
  border: 0;
  background: transparent;
  box-shadow: none;
  min-height: 42px;
  font-family: var(--font-mono);
  font-size: 14px;
}

.money-input input:focus {
  box-shadow: none;
  background: transparent;
}

/* -------------------------------- split cost ------------------------------ */

.split-editor {
  margin: 2px 0 14px;
  padding: 13px 14px 12px;
  border-radius: 14px;
  border: 1px solid rgba(177, 74, 115, 0.18);
  background:
    radial-gradient(220px 120px at 100% 0%, rgba(251, 226, 236, 0.72), transparent 72%),
    var(--paper-2);
}

.split-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.split-editor-head .field-label {
  margin-bottom: 0;
  color: var(--accent-deep);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.split-total {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.split-editor.is-off .split-total {
  background: rgba(59, 43, 68, 0.06);
  color: var(--ink-faint);
}

.split-editor .split-payer {
  margin-bottom: 11px;
}

.split-people-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.split-people-head > span {
  padding-left: 2px;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 650;
}

.split-quick {
  display: flex;
  gap: 4px;
}

.split-quick button {
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.split-quick button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.split-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.split-chip {
  position: relative;
  cursor: pointer;
}

.split-chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.split-chip > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 9px 0 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  user-select: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}

.split-chip:hover > span {
  border-color: var(--accent);
}

.split-chip em {
  overflow: hidden;
  max-width: 78px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.split-chip > span > i {
  display: inline-flex;
  width: 15px;
  height: 15px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.15s, transform 0.15s;
}

.split-chip .avatar {
  box-shadow: none;
}

.split-chip input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-deep);
  box-shadow: 0 0 0 2px rgba(177, 74, 115, 0.09);
}

.split-chip input:checked + span > i {
  opacity: 1;
  transform: scale(1);
}

.split-chip input:focus-visible + span {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.split-no-members {
  color: var(--ink-faint);
  font-size: 10.5px;
}

.split-people .field-hint {
  margin-top: 8px;
  padding-left: 1px;
}

.split-editor.is-off .split-people {
  opacity: 0.72;
}

/* ------------------------------- editor photos ---------------------------- */

.editor-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 7px;
}

.editor-photo {
  position: relative;
  aspect-ratio: 1;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.editor-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editor-photo-del {
  position: absolute;
  top: 4px;
  right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(20, 25, 28, 0.66);
  color: #fff;
  backdrop-filter: blur(3px);
}

.editor-photo-del:hover {
  background: var(--danger);
}

.editor-photo-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  aspect-ratio: 1;
  border-radius: 9px;
  border: 1.5px dashed var(--line-strong);
  background: var(--bg-soft);
  color: var(--ink-faint);
  font-size: 10px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.editor-photo-add:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.editor-photo-add:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.editor-photo-add .spinner {
  width: 18px;
  height: 18px;
  border-width: 2px;
}

/* -------------------------------- checklist ------------------------------- */

.checklist {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.checklist-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 7px;
  border-radius: 8px;
  background: var(--paper-2);
  border: 1px solid var(--line);
}

.checklist-row input {
  flex: 1;
  min-width: 0;
  min-height: 0;
  border: 0;
  background: transparent;
  font-size: 12.5px;
  outline: none;
  padding: 3px 0;
}

.checklist-row.is-done input {
  color: var(--ink-faint);
  text-decoration: line-through;
}

.checklist-add {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 5px 3px 9px;
  border-radius: 8px;
  border: 1.5px dashed var(--line);
}

.checklist-add input {
  flex: 1;
  min-width: 0;
  min-height: 0;
  border: 0;
  background: transparent;
  height: 30px;
  font-size: 12px;
  outline: none;
}

.checklist-add input::placeholder {
  color: var(--ink-faint);
}

/* --------------------------------- switch --------------------------------- */

.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  margin-top: 2px;
  border-radius: 10px;
  background: var(--bg-soft);
  cursor: pointer;
}

.switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  width: 40px;
  height: 23px;
  flex: none;
  border-radius: 999px;
  background: rgba(59, 43, 68, 0.18);
  transition: background 0.18s;
}

.switch-track i {
  position: absolute;
  top: 2.5px;
  left: 2.5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.18s var(--ease);
}

.switch-row input:checked + .switch-track {
  background: var(--teal);
}

.switch-row input:checked + .switch-track i {
  transform: translateX(17px);
}

.switch-row input:focus-visible + .switch-track {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.switch-text {
  display: flex;
  flex-direction: column;
  line-height: 1.4;
}

.switch-text strong {
  font-size: 12px;
  font-weight: 650;
}

.switch-text em {
  font-style: normal;
  font-size: 10px;
  color: var(--ink-faint);
}

/* -------------------------------- name modal ------------------------------ */

.modal--name {
  max-width: 440px;
}

.name-hero {
  position: relative;
  height: 112px;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.36), transparent 46%),
    linear-gradient(135deg, #7d5a8f, #a47fb5 52%, #c98fba);
  overflow: hidden;
}

.name-mascot {
  position: absolute;
  left: 50%;
  bottom: -26px;
  z-index: 2;
  width: 84px;
  height: 84px;
  transform: translateX(-50%);
  --av: #a47fb5;
  filter: drop-shadow(0 12px 20px rgba(72, 24, 44, 0.35));
}

.name-mascot .animal-face {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.name-wave {
  position: absolute;
  left: -6%;
  right: -6%;
  bottom: -1px;
  height: 34px;
  background: var(--paper);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.name-bubble {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.36);
}

.name-bubble.nb1 {
  width: 16px;
  height: 16px;
  top: 20px;
  left: 20%;
}

.name-bubble.nb2 {
  width: 8px;
  height: 8px;
  top: 46px;
  right: 24%;
}

.name-bubble.nb3 {
  width: 11px;
  height: 11px;
  bottom: 26px;
  left: 27%;
  opacity: 0.7;
}

.modal--name .modal-body {
  padding-top: 40px;
}

.modal--name .modal-body h2 {
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 750;
  margin: 3px 0 0;
}

.field-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.face-picker {
  margin-top: 16px;
}

.face-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.face-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 2px 4px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  background: var(--bg-soft);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), transform 0.18s var(--ease);
}

.face-option .animal-face {
  width: 42px;
  height: 42px;
  overflow: visible;
  filter: drop-shadow(0 2px 4px rgba(143, 47, 85, 0.18));
  transition: transform 0.18s var(--ease);
}

.face-option span {
  font-size: 9.5px;
  line-height: 1.2;
  color: var(--ink-soft);
  white-space: nowrap;
}

.face-option:hover {
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.face-option:hover .animal-face {
  transform: scale(1.06);
}

.face-option[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 3px 10px -6px rgba(143, 47, 85, 0.6);
}

.face-option[aria-pressed="true"] span {
  color: var(--accent-deep);
  font-weight: 700;
}

.face-option:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
}

.name-preview {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(120deg, var(--accent-soft), var(--paper) 62%);
  border: 1px solid var(--line);
}

.name-preview > div {
  display: flex;
  flex-direction: column;
  line-height: 1.4;
  min-width: 0;
}

.name-preview strong {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.name-preview span {
  font-size: 10px;
  color: var(--ink-faint);
}

/* --------------------------------- share ---------------------------------- */

.share-code-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 17px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px dashed var(--line-strong);
  margin-bottom: 12px;
}

.share-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.share-code {
  display: flex;
  gap: 5px;
}

.share-code span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 42px;
  border-radius: 7px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 700;
  color: var(--accent-deep);
}

.share-link-box {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 11px 10px 13px;
  border-radius: 10px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  margin-bottom: 11px;
}

.share-link-box > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.share-link-box strong {
  font-size: 11px;
  font-weight: 650;
}

.share-link-box span {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--ink-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.share-members {
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.share-members ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.share-members li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 2px;
}

.member-name {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex: 1;
  font-size: 12.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-name em {
  font-style: normal;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 8.5px;
  font-weight: 700;
}

.member-status {
  font-size: 9.5px;
  color: var(--ink-faint);
  white-space: nowrap;
}

.member-status.is-online {
  color: var(--ok);
}

.member-status.is-online::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--ok);
  vertical-align: 1px;
}

/* --------------------------------- sheets --------------------------------- */

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 19px 20px 13px;
  border-bottom: 1px solid var(--line);
}

.sheet-head h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.4;
  margin-top: 2px;
}

.sheet-head p {
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--ink-faint);
}

.sheet-list {
  display: flex;
  flex-direction: column;
  padding: 6px;
}

.sheet-list + .sheet-list {
  border-top: 1px solid var(--line);
}

.sheet-list button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 12px;
  border-radius: 9px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 550;
  text-align: left;
  transition: background 0.13s;
}

.sheet-list button:hover {
  background: var(--bg-soft);
}

.sheet-list button > .icon:first-child {
  color: var(--ink-faint);
}

.sheet-list button > span {
  flex: 1;
  min-width: 0;
}

.sheet-list button > .icon:last-child:not(:first-child) {
  color: var(--ink-faint);
  opacity: 0.7;
}

.sheet-list .is-danger,
.sheet-list--danger button {
  color: var(--danger);
}

.sheet-list .is-danger > .icon:first-child,
.sheet-list--danger button > .icon:first-child {
  color: var(--danger);
}

.sheet-list .is-danger:hover,
.sheet-list--danger button:hover {
  background: var(--danger-soft);
}

.sheet-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 11px 20px calc(15px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.6;
}

/* -------------------------------- confirm --------------------------------- */

.confirm-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 26px 26px 14px;
}

.confirm-body h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 750;
  margin-bottom: 6px;
}

.confirm-body p {
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.7;
}

.confirm-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
}

.confirm-icon.is-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

/* ================================ lightbox ================================ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 20px 72px;
  background: rgba(13, 18, 20, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s var(--ease), visibility 0.22s;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lb-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 0;
  max-width: min(1100px, 100%);
  max-height: 100%;
  transform: scale(0.97);
  transition: transform 0.24s var(--ease);
}

.lightbox.is-open .lb-figure {
  transform: scale(1);
}

.lb-figure img {
  max-width: 100%;
  max-height: calc(100vh - 190px);
  max-height: calc(100dvh - 190px);
  width: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
}

.lb-figure figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 760px;
  color: #fdf6fa;
}

.lb-figure figcaption > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.lb-figure figcaption strong {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-figure figcaption span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

.lb-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  color: #fdf6fa;
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: background 0.15s;
}

.lb-open:hover {
  background: rgba(255, 255, 255, 0.14);
}

.lb-btn {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fdf6fa;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(4px);
  transition: background 0.15s, transform 0.15s;
}

.lb-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.05);
}

.lb-close {
  top: 18px;
  right: 18px;
}

.lb-prev {
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-next {
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-prev:hover,
.lb-next:hover {
  transform: translateY(-50%) scale(1.05);
}

.lb-counter {
  position: absolute;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.6);
}

.lb-hint {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.34);
  white-space: nowrap;
}

/* ================================ responsive =============================== */

@media (min-width: 720px) {
  .modal-backdrop {
    align-items: center;
    padding: 26px;
  }

  .modal {
    border-radius: 20px;
    max-height: 88vh;
    max-height: 88dvh;
    box-shadow: var(--shadow-lg);
    margin: auto;
  }

  .modal--form {
    max-height: 88vh;
  }

  .modal-backdrop.is-in .modal,
  .modal-backdrop.is-open .modal {
    transform: translateY(0) scale(1);
  }

  .modal--form .modal-body {
    padding: 20px 26px;
  }
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 30px;
    gap: 8px;
  }

  .hero-copy {
    max-width: none;
  }

  .hero-art {
    max-width: 440px;
    margin: 6px auto -10px;
    order: 2;
  }

  .hero h1 {
    font-size: clamp(30px, 7vw, 44px);
  }

  .br-wide {
    display: none;
  }
}

@media (max-width: 720px) {
  :root {
    --header-h: 56px;
  }

  body {
    font-size: 14.5px;
  }

  .topbar-inner {
    padding: 0 14px;
  }

  .home-main {
    padding: 6px 14px 0;
  }

  .mode-pill {
    display: none;
  }

  .profile-name {
    display: none;
  }

  .profile-btn {
    padding-right: 4px;
  }

  .hero {
    padding: 22px 0 24px;
  }

  .hero h1 {
    margin: 12px 0 14px;
  }

  .hero-sub {
    font-size: 13.5px;
    line-height: 1.8;
  }

  .hero-actions .btn {
    flex: 1;
    min-width: 0;
  }

  .hero-features {
    gap: 6px 14px;
    margin-top: 22px;
    font-size: 10.5px;
  }

  .hero-art {
    max-width: 360px;
    opacity: 0.96;
  }

  .trip-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .trip-new-card {
    min-height: 120px;
    flex-direction: row;
    gap: 13px;
    text-align: left;
    padding: 18px;
  }

  .trip-new-icon {
    margin-bottom: 0;
  }

  .trip-new-card > span:last-child {
    display: none;
  }

  .section-head h2 {
    font-size: 22px;
  }

  .home-footer {
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 38px;
  }

  .footer-status {
    width: 100%;
    margin-left: 44px;
    text-align: left;
  }

  .page--trip {
    padding-top: var(--header-h);
  }

  .trip-topbar .topbar-inner {
    padding: 0 10px;
  }

  .trip-topbar-title {
    font-size: 13.5px;
    max-width: 46vw;
  }

  .sync-pill {
    height: 22px;
    padding: 0 7px;
    font-size: 9.5px;
  }

  .sync-pill .icon {
    width: 11px;
    height: 11px;
  }

  .share-top {
    display: none;
  }

  .topbar-presence {
    display: none;
  }

  .trip-hero-inner {
    padding: 26px 16px 18px;
  }

  .trip-hero h1 {
    font-size: clamp(25px, 7.4vw, 36px);
  }

  .trip-hero-notes {
    font-size: 12px;
    -webkit-line-clamp: 2;
  }

  .trip-hero-bottom {
    margin-top: 16px;
    gap: 9px;
  }

  .hero-member-text {
    display: none;
  }

  .trip-code-chip {
    height: 29px;
    padding: 0 10px;
    font-size: 10px;
  }

  .trip-code-chip span {
    display: none;
  }

  .tabs-inner {
    padding: 0 6px;
  }

  .tab-btn {
    padding: 11px 7px 10px;
    font-size: 12.5px;
    min-width: 64px;
  }

  .trip-main {
    padding: 16px 14px 58px;
  }

  .day-strip-wrap {
    margin: 0 -14px 18px;
  }

  .day-strip {
    padding: 2px 14px 6px;
  }

  .day-pill {
    min-width: 96px;
    padding: 8px 12px 9px;
  }

  .day-pill-date {
    font-size: 11.5px;
  }

  .day-head {
    align-items: flex-start;
    margin-bottom: 16px;
  }

  .day-head h2 {
    font-size: 23px;
  }

  .day-head-copy p {
    font-size: 11px;
  }

  .day-cost strong {
    font-size: 15px;
  }

  .timeline-line {
    left: 46px;
  }

  .stop {
    grid-template-columns: 38px 20px minmax(0, 1fr);
    gap: 6px;
    padding-bottom: 10px;
  }

  .stop-time {
    padding-top: 14px;
  }

  .stop-time strong {
    font-size: 11.5px;
  }

  .stop-time span {
    font-size: 8.5px;
  }

  .stop-dot {
    width: 26px;
    height: 26px;
  }

  .stop-dot .icon {
    width: 12px;
    height: 12px;
  }

  .stop-card {
    padding: 11px 12px 10px;
  }

  .stop-title-wrap h3 {
    font-size: 15.5px;
  }

  .stop-edit-hint {
    display: none;
  }

  .stop-photo {
    width: 56px;
    height: 46px;
  }

  .stop-photo-more {
    width: 34px;
    height: 46px;
  }

  .stop-notes {
    -webkit-line-clamp: 2;
  }

  .stop-meta {
    gap: 6px;
  }

  .map-btn {
    height: 25px;
    padding: 0 8px;
    font-size: 10px;
  }

  .stop-actions .icon-btn {
    width: 26px;
    height: 26px;
  }

  .move-btns {
    display: none;
  }

  .timeline > .add-stop {
    margin-left: 0;
  }

  .timeline .day-empty {
    margin-left: 64px;
  }

  .add-stop {
    width: 100%;
    padding: 10px 12px;
  }

  .progress-card {
    padding: 20px 18px;
    gap: 14px;
  }

  .progress-copy h2 {
    font-size: 20px;
  }

  .progress-ring {
    width: 70px;
    height: 70px;
  }

  .progress-ring::before {
    inset: 6px;
  }

  .progress-ring-inner strong {
    font-size: 16px;
  }

  .progress-ring-inner span {
    font-size: 7.5px;
  }

  .add-todo {
    padding: 6px 6px 6px 12px;
  }

  .add-todo .btn {
    padding: 6px 14px;
  }

  .photo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
  }

  .photo-tile {
    border-radius: 8px;
  }

  .photo-overlay {
    display: none;
  }

  .cost-hero {
    padding: 20px 18px;
  }

  .cost-split {
    gap: 18px;
  }

  .cost-card {
    padding: 15px 14px;
  }

  .split-editor {
    padding: 12px 12px 11px;
  }

  .split-people-head {
    flex-wrap: wrap;
    gap: 6px;
  }

  .split-chip > span {
    height: 31px;
    padding-right: 8px;
  }

  .split-chip em {
    max-width: 64px;
  }

  .settle-row {
    gap: 8px;
    padding: 8px 9px;
  }

  .settle-person span {
    font-size: 9.5px;
  }

  .transfer-row {
    gap: 8px;
    padding: 8px 9px;
  }

  .cat-bar-row {
    grid-template-columns: 76px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .cat-bar-row > strong {
    font-size: 10.5px;
  }

  .day-cost-row {
    grid-template-columns: 62px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .modal--small,
  .modal--sheet {
    margin: 0;
    align-self: flex-end;
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
    max-height: 92dvh;
  }

  .modal--small {
    margin: 0 auto;
    align-self: flex-end;
    width: 100%;
    max-width: 100%;
  }

  .modal-head,
  .sheet-head {
    padding: 17px 17px 12px;
  }

  .modal-body {
    padding: 15px 17px;
  }

  .modal-footer {
    padding: 11px 17px calc(11px + env(safe-area-inset-bottom, 0px));
  }

  .modal-footer--split {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .modal-footer--split > div:first-child:empty {
    display: none;
  }

  .footer-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .footer-actions .btn {
    width: 100%;
  }

  .modal-footer--split > div:first-child .btn {
    width: 100%;
  }

  .field-row {
    gap: 8px;
  }

  .cat-option span {
    height: 29px;
    padding: 0 9px;
    font-size: 11px;
  }

  .map-frame iframe {
    height: 160px;
  }

  .share-code span {
    width: 30px;
    height: 38px;
    font-size: 17px;
  }

  .lightbox {
    padding: 52px 10px 64px;
  }

  .lb-prev {
    left: 8px;
  }

  .lb-next {
    right: 8px;
  }

  .lb-btn {
    width: 38px;
    height: 38px;
  }

  .lb-close {
    top: 12px;
    right: 12px;
  }

  .lb-figure img {
    max-height: calc(100vh - 170px);
    max-height: calc(100dvh - 170px);
  }

  .lb-hint {
    display: none;
  }

  .toasts {
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .toast {
    font-size: 12px;
    padding: 9px 14px;
  }
}

@media (max-width: 380px) {
  .hero-actions {
    flex-direction: column;
  }

  .hero-features span:nth-child(3),
  .hero-features span:nth-child(4) {
    display: none;
  }

  .tab-btn {
    min-width: 58px;
    gap: 4px;
    font-size: 12px;
  }

  .tab-btn .icon {
    width: 15px;
    height: 15px;
  }

  .stop {
    grid-template-columns: 34px 18px minmax(0, 1fr);
    gap: 5px;
  }

  .timeline-line {
    left: 42px;
  }

  .timeline .day-empty {
    margin-left: 57px;
  }

  .stop-chips .meta-chip--muted {
    display: none;
  }
}

/* ------------------------------- transport -------------------------------- */

.transport-editor {
  margin: 2px 0 14px;
  padding: 13px 14px 12px;
  border-radius: 14px;
  border: 1px solid rgba(35, 101, 95, 0.16);
  background:
    radial-gradient(220px 120px at 100% 0%, rgba(222, 242, 238, 0.7), transparent 72%),
    var(--paper-2);
}

.transport-editor[hidden] {
  display: none;
}

.field-inline-hint {
  margin-left: 4px;
  font-style: normal;
  font-weight: 500;
  font-size: 10px;
  color: var(--teal-deep);
}

.transport-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 2px;
}

.transport-option {
  position: relative;
  cursor: pointer;
}

.transport-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.transport-option span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  user-select: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}

.transport-option:hover span {
  border-color: var(--teal);
}

.transport-option input:checked + span {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal-deep);
  box-shadow: 0 0 0 2px rgba(43, 116, 110, 0.09);
}

.transport-option input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.transport-option .icon {
  color: inherit;
}

.flight-box {
  display: none;
  margin-top: 12px;
  padding: 12px 12px 11px;
  border-radius: 12px;
  border: 1px dashed rgba(35, 101, 95, 0.24);
  background: rgba(222, 242, 238, 0.42);
}

.flight-box.is-on {
  display: block;
}

.flight-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.flight-head .field-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 0;
  color: var(--teal-deep);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.flight-status {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-faint);
  font-size: 9.5px;
  font-weight: 650;
  white-space: nowrap;
}

.flight-status:empty {
  display: none;
}

.flight-lookup-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.flight-lookup-row .btn {
  margin-bottom: 12px;
  height: 38px;
}

.flight-box .field-hint {
  margin: 6px 0 10px;
}

.flight-box .field-row {
  gap: 8px;
}

/* ----------------------------- split amounts ------------------------------ */

.split-amount-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.split-amount-head span {
  padding-left: 2px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
}

.split-amount-head button {
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.split-amount-head button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.split-amounts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.split-amount-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px 5px 5px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.split-amount-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.split-amount-input {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}

.split-amount-input em {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-style: normal;
}

.split-amount-input input {
  width: 76px;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 650;
  text-align: right;
}

.split-amount-empty {
  margin: 0;
  padding: 6px 2px;
  color: var(--ink-faint);
  font-size: 10.5px;
}

.split-diff {
  margin: 7px 0 0;
  padding-left: 2px;
  color: var(--ink-faint);
  font-size: 10.5px;
  line-height: 1.5;
}

.split-diff.is-ok {
  color: var(--ok);
  font-weight: 650;
}

.split-diff.is-over {
  color: var(--danger);
  font-weight: 650;
}

.split-diff:empty {
  display: none;
}

.meta-chip--transport {
  background: var(--teal-soft);
  color: var(--teal-deep);
}

/* --------------------------------- board ---------------------------------- */

.board-intro {
  padding: 4px 2px 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.board-intro h2 {
  margin: 6px 0 6px;
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.board-intro > p {
  max-width: 540px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.75;
}

.board-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 11px;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 600;
}

.board-stats span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.board-form {
  padding: 14px;
  margin-bottom: 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  box-shadow: var(--shadow-sm);
}

.compose-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
}

.compose-head strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.compose-head > span {
  color: var(--ink-faint);
  font-size: 10.5px;
}

.board-form textarea {
  display: block;
  width: 100%;
  min-height: 76px;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  line-height: 1.7;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.board-form textarea:focus {
  border-color: var(--accent);
  background: var(--paper);
  box-shadow: 0 0 0 3px rgba(177, 74, 115, 0.1);
}

.compose-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
}

.compose-foot > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-faint);
  font-size: 10px;
}

.board-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.board-post {
  padding: 13px 15px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  box-shadow: var(--shadow-xs);
}

.board-post-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.board-post-head > div {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.board-post-head strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.board-post-head span {
  color: var(--ink-faint);
  font-size: 10px;
}

.board-post-text {
  margin: 0;
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.75;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.board-empty {
  margin-top: 4px;
}

/* ---------------------------------- chat ---------------------------------- */

.chat-shell {
  display: flex;
  flex-direction: column;
  height: min(66vh, 620px);
  min-height: 420px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  box-shadow: var(--shadow-md);
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(240px 100px at 0% 0%, rgba(251, 226, 236, 0.75), transparent 70%),
    var(--paper);
}

.chat-head-main {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 10px;
}

.chat-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.chat-head h2 {
  margin: 0 0 2px;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-head p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 10.5px;
}

.chat-live {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
}

.chat-log {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 16px;
  background:
    radial-gradient(340px 200px at 100% 0%, rgba(222, 242, 238, 0.4), transparent 70%),
    radial-gradient(300px 220px at 0% 100%, rgba(251, 226, 236, 0.45), transparent 72%),
    var(--paper-2);
  overscroll-behavior: contain;
}

.chat-row {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  max-width: 86%;
}

.chat-row.is-me {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-bubble-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.chat-row.is-me .chat-bubble-wrap {
  align-items: flex-end;
}

.chat-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 3px;
  color: var(--ink-faint);
  font-size: 9.5px;
}

.chat-row.is-me .chat-meta {
  flex-direction: row-reverse;
}

.chat-meta strong {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 650;
}

.chat-bubble {
  position: relative;
  padding: 8px 11px;
  border-radius: 14px 14px 14px 4px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-xs);
}

.chat-row.is-me .chat-bubble {
  border-radius: 14px 14px 4px 14px;
  border-color: rgba(177, 74, 115, 0.22);
  background: linear-gradient(180deg, #fdeef4, #fbe2ec);
}

.chat-bubble p {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.chat-del {
  position: absolute;
  top: -7px;
  right: -7px;
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-faint);
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.15s, color 0.15s, background 0.15s;
}

.chat-bubble:hover .chat-del,
.chat-del:focus-visible {
  opacity: 1;
}

.chat-del:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: auto;
  padding: 20px;
  text-align: center;
}

.chat-empty .empty-icon {
  width: 54px;
  height: 54px;
  margin-bottom: 4px;
  background: rgba(255, 255, 255, 0.8);
}

.chat-empty h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 750;
}

.chat-empty p {
  max-width: 300px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.65;
}

.chat-composer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.chat-composer input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.chat-composer input:focus {
  border-color: var(--accent);
  background: var(--paper);
  box-shadow: 0 0 0 3px rgba(177, 74, 115, 0.1);
}

.chat-composer .btn {
  flex: none;
  height: 36px;
  border-radius: 999px;
}

/* --------------------------- responsive additions -------------------------- */

@media (max-width: 720px) {
  .flight-lookup-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .flight-lookup-row .btn {
    margin-bottom: 12px;
    justify-self: start;
  }

  .compose-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
  }

  .compose-foot .btn {
    justify-content: center;
  }

  .chat-shell {
    height: calc(100vh - 250px);
    min-height: 360px;
    border-radius: 16px;
  }

  .chat-log {
    padding: 13px;
  }

  .chat-row {
    max-width: 92%;
  }

  .chat-live {
    display: none;
  }

  .chat-composer .btn span {
    display: none;
  }
}

@media (max-width: 460px) {
  .transport-editor,
  .board-form {
    padding: 12px;
  }

  .split-amount-input input {
    width: 62px;
  }

  .board-intro h2 {
    font-size: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .topbar,
  .trip-topbar,
  .trip-tabs,
  .day-strip-wrap,
  .add-stop,
  .stop-actions,
  .btn,
  .card-menu {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .trip-main,
  .trip-hero-inner {
    max-width: none;
    padding: 0;
  }

  .stop-card,
  .cost-card,
  .progress-card {
    break-inside: avoid;
    box-shadow: none;
  }
}


/* ---------------------------- Google 帳戶與 Drive --------------------------- */

.google-card {
  margin-top: 14px;
  padding: 14px 15px;
  border-radius: 16px;
  border: 1px solid rgba(42, 127, 116, 0.16);
  background: linear-gradient(180deg, rgba(222, 242, 238, 0.55), rgba(255, 255, 255, 0.75));
  display: grid;
  gap: 9px;
}

.google-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--teal-deep);
  font-size: 12.5px;
  letter-spacing: 0.02em;
}

.google-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.55;
}

.google-card code {
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(42, 127, 116, 0.1);
  font-size: 11.5px;
}

.google-card .btn {
  justify-self: start;
}

.google-who {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.google-who img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: #fff;
}

.google-who div {
  display: grid;
  min-width: 0;
}

.google-who strong {
  font-size: 13px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.google-who span {
  font-size: 11.5px;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.google-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--teal);
  color: #fff;
  flex: none;
}

.google-card.is-linked {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.drive-modal .sheet-head {
  border-bottom: 0;
}

.drive-body {
  display: grid;
  gap: 14px;
  padding: 4px 20px 22px;
}

.drive-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 4px;
  color: var(--ink-soft);
  font-size: 13px;
}

.drive-account {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--paper-2);
  border: 1px solid var(--line);
}

.drive-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.drive-hint {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.5;
}

.drive-list-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 4px;
  border-top: 1px dashed var(--line);
  color: var(--ink-soft);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.drive-list {
  display: grid;
  gap: 8px;
}

.drive-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 13px;
  background: #fff;
  border: 1px solid var(--line);
}

.drive-file-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.drive-file-main strong {
  font-size: 13px;
  color: var(--ink);
  font-family: var(--font-mono, ui-monospace, monospace);
}

.drive-file-main span {
  font-size: 11.5px;
  color: var(--ink-soft);
}

.drive-none,
.drive-note,
.drive-error {
  padding: 14px;
  border-radius: 13px;
  font-size: 12.5px;
  line-height: 1.55;
}

.drive-none {
  background: var(--paper-2);
  color: var(--ink-soft);
  text-align: center;
}

.drive-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(42, 127, 116, 0.08);
  color: var(--teal-deep);
}

.drive-error {
  background: rgba(190, 70, 90, 0.09);
  color: #a63a52;
}

.drive-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  padding: 26px 10px;
}

.drive-empty-icon {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.drive-empty h4 {
  margin: 0;
  font-size: 15px;
}

.drive-empty p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.6;
  max-width: 34ch;
}

@media (max-width: 560px) {
  .drive-body {
    padding: 4px 16px 18px;
  }
  .google-card.is-linked {
    flex-direction: column;
    align-items: stretch;
  }
  .drive-file {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .drive-file .btn {
    justify-self: stretch;
  }
}
