:root {
  --paper: #efe6d6;
  --paper-2: #e4d8c2;
  --ink: #1a1410;
  --ink-soft: #4a3f36;
  --brick: #b44a2a;
  --gold: #b0893a;
  --gold-pale: #e8d5a3;
  --forest: #1e3a2f;
  --forest-deep: #13251e;
  /* Dock chrome follows the trip's chosen theme colour — applyTripTheme() rewrites
     --forest to the picked swatch and --forest-deep to a darker shade of it. */
  --fab-bg: var(--forest);
  --fab-shadow: color-mix(in srgb, var(--forest-deep) 42%, transparent);
  --lotus: #c97b7b;
  --dusk: #5c4a62;
  --cream: #f7f1e6;
  --line: rgba(26, 20, 16, 0.14);
  --serif: "Fraunces", "Iowan Old Style", Palatino, serif;
  --sans: "Outfit", "Avenir Next", system-ui, sans-serif;
  --hour: 2.75rem;
  --gutter: 2.7rem;
  --space: clamp(0.85rem, 4.2vw, 1.8rem);
  --tap: 2.75rem;
  /* Shared button system — same radius/motion on every button on every page,
     and mirrored 1:1 in mobile/www/css/app.css so the web and mobile apps
     read as one product despite being separate stylesheets. */
  --btn-radius: 0.6rem;
  --btn-ease: 0.15s ease;
  --bp-xs: 22.5rem;
  --bp-sm: 30rem;
  --bp-md: 48rem;
  --bp-lg: 64rem;
  --bp-xl: 80rem;
  /* Fluid spacing scale, shared with the Capacitor stylesheet. */
  --sp-1: clamp(0.2rem, 0.9vw, 0.3rem);
  --sp-2: clamp(0.3rem, 1.2vw, 0.45rem);
  --sp-3: clamp(0.45rem, 1.8vw, 0.65rem);
  --sp-4: clamp(0.65rem, 2.6vw, 0.95rem);
  --sp-5: clamp(0.95rem, 3.6vw, 1.35rem);
  --sp-6: clamp(1.35rem, 5vw, 1.9rem);
}

/* Control rows never wrap: every child holds its size and exactly one
   designated child shrinks. Use .u-row-grow on the child that may ellipsize. */
.u-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
}

.u-row > * {
  flex: 0 0 auto;
}

.u-row > .u-row-grow {
  flex: 1 1 auto;
  min-width: 0;
}

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

/* iOS Safari date/time controls have a huge intrinsic min-width. */
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"] {
  display: block;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
}

input[type="date"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit,
input[type="datetime-local"]::-webkit-datetime-edit,
input[type="month"]::-webkit-datetime-edit,
input[type="week"]::-webkit-datetime-edit,
input[type="date"]::-webkit-datetime-edit-fields-wrapper,
input[type="time"]::-webkit-datetime-edit-fields-wrapper,
input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 0;
}

input[type="date"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value,
input[type="datetime-local"]::-webkit-date-and-time-value {
  text-align: left;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="week"]::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  color: transparent;
  background: transparent;
  cursor: pointer;
}

/* Soft page boot — LakBi keeps you company while the page paints */
.page-boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 50% 38%, color-mix(in srgb, var(--forest) 55%, #2a4a3c) 0%, transparent 70%),
    radial-gradient(circle at 18% 78%, color-mix(in srgb, var(--gold) 18%, transparent), transparent 42%),
    radial-gradient(circle at 82% 22%, color-mix(in srgb, var(--gold-pale) 10%, transparent), transparent 36%),
    var(--forest-deep, #13251e);
  color: var(--gold-pale, #e8d5a3);
  transition: opacity 0.34s ease, visibility 0.34s ease;
}

.page-boot-glow {
  position: absolute;
  width: min(22rem, 70vw);
  height: min(22rem, 70vw);
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--gold) 22%, transparent) 0%, transparent 68%);
  filter: blur(8px);
  opacity: 0.7;
  pointer-events: none;
  animation: page-boot-breathe 3.6s ease-in-out infinite;
}

.page-boot-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1.5px 1.5px at 18% 28%, color-mix(in srgb, var(--gold-pale) 80%, white), transparent),
    radial-gradient(1.5px 1.5px at 78% 22%, color-mix(in srgb, var(--gold) 70%, white), transparent),
    radial-gradient(1px 1px at 62% 68%, color-mix(in srgb, var(--gold-pale) 65%, white), transparent),
    radial-gradient(1.5px 1.5px at 28% 72%, color-mix(in srgb, var(--gold) 55%, white), transparent),
    radial-gradient(1px 1px at 88% 58%, color-mix(in srgb, var(--gold-pale) 70%, white), transparent);
  opacity: 0.55;
  animation: page-boot-twinkle 4.2s ease-in-out infinite;
}

.page-boot-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  text-align: center;
}

.page-boot-face {
  width: min(11.5rem, 62vw);
  height: auto;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
  filter: drop-shadow(0 16px 28px rgba(8, 18, 14, 0.38));
  animation: page-boot-bob 2.4s ease-in-out infinite;
}

.lakbi-state {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.55rem;
  margin: 2rem auto;
  max-width: 28rem;
  padding: 1.6rem 1.2rem;
}

.lakbi-state img {
  width: min(9.5rem, 46vw);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(19, 37, 30, 0.12));
}

.lakbi-state h3 {
  margin: 0;
  font-family: var(--serif, "Fraunces", Georgia, serif);
  font-weight: 500;
  font-size: 1.35rem;
}

.lakbi-state p {
  margin: 0;
  color: var(--ink-soft, #5c6b63);
}

.page-boot-name {
  margin: 0.15rem 0 0;
  font-family: var(--serif, "Fraunces", Georgia, serif);
  font-weight: 500;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  color: var(--cream, #f7f1e6);
  text-shadow: 0 2px 18px rgba(8, 18, 14, 0.35);
}

.page-boot-name em {
  font-style: italic;
  font-weight: 300;
  color: var(--gold-pale, #e8d5a3);
}

.page-boot-wait {
  position: relative;
  margin: 0.35rem 0 0;
  min-height: 1.35em;
  width: min(18rem, 86vw);
  font-family: var(--serif, "Fraunces", Georgia, serif);
  font-weight: 300;
  font-style: italic;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  color: color-mix(in srgb, var(--gold-pale) 82%, white);
}

.page-boot .page-boot-wait span {
  position: absolute;
  left: 0;
  right: 0;
  display: block;
  opacity: 0;
  transform: translateY(0.35rem);
  animation: page-boot-line 10s ease-in-out infinite;
}

.page-boot-wait span:nth-child(1) {
  animation-delay: 0s;
}
.page-boot-wait span:nth-child(2) {
  animation-delay: 2.5s;
}
.page-boot-wait span:nth-child(3) {
  animation-delay: 5s;
}
.page-boot-wait span:nth-child(4) {
  animation-delay: 7.5s;
}

@keyframes page-boot-bob {
  0%,
  100% {
    transform: translateY(0) rotate(-1.5deg);
  }
  50% {
    transform: translateY(-0.55rem) rotate(1.5deg);
  }
}

@keyframes page-boot-breathe {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.06);
    opacity: 0.85;
  }
}

@keyframes page-boot-twinkle {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes page-boot-line {
  0%,
  6% {
    opacity: 0;
    transform: translateY(0.4rem);
  }
  10%,
  22% {
    opacity: 1;
    transform: translateY(0);
  }
  28%,
  100% {
    opacity: 0;
    transform: translateY(-0.25rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-boot-face,
  .page-boot-glow,
  .page-boot-sparkles,
  .page-boot-wait span {
    animation: none;
  }
  .page-boot-wait span:first-child {
    opacity: 1;
    transform: none;
    position: static;
  }
  .page-boot-wait span:not(:first-child) {
    display: none;
  }
}

html.is-booting:not(.is-ready) body > *:not(.page-boot) {
  visibility: hidden !important;
}

html.is-ready .page-boot {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

html {
  min-height: 100%;
  overflow-x: clip;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

[hidden] {
  display: none !important;
}

dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  max-height: min(90dvh, calc(100% - 2rem));
}

html.skip-welcome .welcome {
  display: none !important;
}

body {
  min-height: 100%;
  min-width: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.45;
  overflow-wrap: break-word;
}

img,
video,
svg {
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  font-size: 1rem;
  max-width: 100%;
}

button {
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: var(--brick);
}

.grain,
.batik {
  pointer-events: none;
  position: fixed;
  inset: 0;
}

.grain {
  z-index: 8;
  opacity: 0.1;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.batik {
  z-index: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cpath fill='none' stroke='%231a1410' stroke-width='1.1' d='M36 4l8 14 16 2-12 11 3 16-15-8-15 8 3-16-12-11 16-2z'/%3E%3C/svg%3E");
}

.welcome {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.35rem;
  padding: max(1.5rem, env(safe-area-inset-top)) 1.5rem max(1.5rem, env(safe-area-inset-bottom));
  color: var(--cream);
  background: linear-gradient(180deg, #1a3329 0%, var(--forest) 42%, var(--forest-deep) 100%);
  text-align: center;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.welcome.is-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.welcome-sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% 108%, color-mix(in srgb, var(--gold) 22%, transparent), transparent 70%),
    radial-gradient(circle at 18% 22%, color-mix(in srgb, var(--gold-pale) 18%, transparent), transparent 28%),
    radial-gradient(circle at 82% 18%, color-mix(in srgb, var(--lotus) 16%, transparent), transparent 24%);
}

.welcome-sky::before,
.welcome-sky::after {
  content: "";
  position: absolute;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--gold-pale);
  box-shadow:
    12vw 18vh 0 0 color-mix(in srgb, var(--gold-pale) 80%, transparent),
    28vw 42vh 0 1px color-mix(in srgb, var(--gold) 70%, transparent),
    72vw 24vh 0 0 color-mix(in srgb, var(--gold-pale) 75%, transparent),
    84vw 58vh 0 1px color-mix(in srgb, var(--gold) 55%, transparent),
    46vw 70vh 0 0 color-mix(in srgb, var(--gold-pale) 65%, transparent),
    62vw 12vh 0 0 color-mix(in srgb, var(--gold-pale) 50%, transparent);
  animation: welcome-firefly 3.4s ease-in-out infinite;
}

.welcome-sky::after {
  animation-delay: -1.6s;
  opacity: 0.7;
}

.welcome-brand {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
  animation: welcome-rise 1.1s ease both;
}

.welcome-mark {
  box-sizing: content-box;
  width: min(5.1rem, 24vw);
  height: auto;
  padding: 0.38rem;
  object-fit: contain;
  object-position: center;
  border-radius: 1.1rem;
  background: var(--cream, #f7f1e6);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--ink) 6%, transparent),
    0 12px 32px color-mix(in srgb, var(--ink) 24%, transparent);
}

.welcome-brand-name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.55rem, 5vw, 2rem);
  letter-spacing: -0.025em;
  color: var(--cream);
}

.welcome-brand-name em {
  font-style: inherit;
  font-weight: inherit;
  color: inherit;
}

.welcome-kicker {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.welcome-title {
  position: relative;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.4rem, 10vw, 3.6rem);
  line-height: 1;
  animation: welcome-rise 1.1s ease 0.2s both;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.welcome-title em {
  font-style: italic;
  color: var(--gold-pale);
}

.welcome-line,
.welcome-wait {
  position: relative;
  color: color-mix(in srgb, var(--cream) 78%, var(--gold-pale));
  font-size: 0.92rem;
  animation: welcome-rise 1.1s ease 0.28s both;
}

.welcome-line {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.welcome-play {
  position: relative;
  margin-top: 1.15rem;
  min-height: var(--tap);
  padding: 0.7rem 1.2rem;
  border: 1px solid var(--gold-pale);
  background: color-mix(in srgb, var(--gold) 82%, var(--forest));
  color: var(--cream);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: welcome-rise 1.1s ease 0.28s both;
}

.welcome-skip {
  position: relative;
  margin-top: 0.85rem;
  min-height: var(--tap);
  padding: 0 0.8rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--cream) 55%, transparent);
  animation: welcome-rise 1.1s ease 0.4s both;
}

@keyframes welcome-rise {
  from {
    opacity: 0;
    transform: translateY(0.7rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes welcome-firefly {
  0%,
  100% {
    opacity: 0.35;
    transform: translate(0, 0);
  }
  50% {
    opacity: 1;
    transform: translate(0.4rem, -0.6rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-sky::before,
  .welcome-sky::after,
  .welcome-brand,
  .welcome-mark,
  .welcome-kicker,
  .welcome-title,
  .welcome-line,
  .welcome-wait {
    animation: none;
  }
}

/* —— Workbook loading screen —— */
/* Shown while a trip you can edit (own draft / collab) loads. Public itineraries
   get the welcome gate above instead. Shares the mobile splash animation. */
.wb-boot {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.15rem;
  padding: max(1.5rem, env(safe-area-inset-top)) 1.5rem max(1.5rem, env(safe-area-inset-bottom));
  text-align: center;
  color: var(--cream);
  background: linear-gradient(180deg, #1a3329 0%, var(--forest) 42%, var(--forest-deep) 100%);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.wb-boot.is-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.welcome-iso-static {
  display: block;
  width: min(5.5rem, 28vw);
  height: auto;
  object-fit: contain;
}

.boot-stage {
  position: relative;
  width: 11.5rem;
  height: 9.75rem;
  display: grid;
  place-items: center;
}

/*
  One book, one size, all the way through:
  lying down (the brand mark's own pose) -> stands up -> faces front ->
  opens page by page. Perspective lives in the transform, not on the stage,
  so nothing above this element can flatten the 3D context.
*/
.boot-hero {
  --bw: 7.6rem;
  --bd: 3.2rem;
  position: relative;
  width: var(--bw);
  height: var(--bw);
  transform-style: preserve-3d;
  animation: boot-stand 7.2s cubic-bezier(0.6, 0.02, 0.24, 1) infinite;
}

.boot-book {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.boot-face {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 0.5rem;
}

/* Back board, spine and head/tail edges — the dark green body of the mark. */
.boot-face-back,
.boot-face-spine,
.boot-face-top,
.boot-face-bottom {
  background: linear-gradient(160deg, #1b5b33 0%, #16532a 55%, #0e3a1f 100%);
}

.boot-face-back {
  width: var(--bw);
  height: var(--bw);
  box-shadow: 0 20px 34px color-mix(in srgb, var(--ink) 38%, transparent);
  transform: translate(-50%, -50%) translateZ(calc(var(--bd) / -2)) rotateY(180deg);
}

.boot-face-spine {
  width: var(--bd);
  height: var(--bw);
  transform: translate(-50%, -50%) rotateY(-90deg) translateZ(calc(var(--bw) / 2));
}

/* Fore edge — the white page block on the mark. */
.boot-face-edge {
  width: var(--bd);
  height: var(--bw);
  background: repeating-linear-gradient(180deg, #fffdf8 0 0.075rem, #ded4c2 0.075rem 0.1rem);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #0e3a1f 22%, transparent);
  transform: translate(-50%, -50%) rotateY(90deg) translateZ(calc(var(--bw) / 2));
}

.boot-face-top,
.boot-face-bottom {
  width: var(--bw);
  height: var(--bd);
}

.boot-face-top {
  transform: translate(-50%, -50%) rotateX(90deg) translateZ(calc(var(--bw) / 2));
}

.boot-face-bottom {
  transform: translate(-50%, -50%) rotateX(-90deg) translateZ(calc(var(--bw) / 2));
}

.boot-cover,
.boot-base,
.boot-page {
  position: absolute;
  inset: 0;
  border-radius: 0.85rem;
  transform-origin: left center;
}

.boot-base {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.28rem;
  padding: 0.85rem 0.8rem 0.75rem 1rem;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--forest) 16%, transparent) 0 0.22rem, transparent 0.22rem),
    linear-gradient(180deg, #fffdf8 0%, var(--cream, #f7f1e6) 100%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
  color: var(--forest-deep, #1e3a2f);
  text-align: left;
  opacity: 0;
  transform: translateZ(calc(var(--bd) / -2 + 0.06rem));
  animation: boot-inside-show 7.2s linear infinite;
}

.boot-base-kicker,
.boot-sheet-kicker {
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--forest) 55%, #8a7350);
}

.boot-base-title,
.boot-sheet-title {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--forest-deep, #1e3a2f);
}

.boot-base-line,
.boot-sheet-line {
  display: block;
  width: 100%;
  height: 0.28rem;
  border-radius: 99px;
  background: color-mix(in srgb, var(--ink) 10%, transparent);
}

.boot-base-line.short,
.boot-sheet-line.short {
  width: 48%;
}

.boot-sheet-line.mid {
  width: 72%;
}

.boot-base-chip {
  margin-top: auto;
  padding: 0.18rem 0.4rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--forest) 12%, transparent);
  color: var(--forest);
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Leaves stay flat planes (no preserve-3d) so their opacity fade cannot
   collapse the book's 3D context. */
.boot-page {
  background: linear-gradient(180deg, #fffef9 0%, #f3ebe0 100%);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent),
    6px 10px 18px color-mix(in srgb, var(--ink) 16%, transparent);
  opacity: 0;
}

.boot-page::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--ink) 8%, transparent) 42%,
    color-mix(in srgb, #fff 55%, transparent) 58%,
    transparent 100%
  );
  opacity: 0;
  pointer-events: none;
}

.boot-sheet {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.28rem;
  height: 100%;
  padding: 0.85rem 0.8rem 0.75rem 1rem;
  text-align: left;
  color: var(--forest-deep, #1e3a2f);
}

.boot-sheet-list {
  list-style: none;
  margin: 0.15rem 0 0;
  padding: 0;
  width: 100%;
  display: grid;
  gap: 0.35rem;
}

.boot-sheet-list li {
  position: relative;
  height: 0.34rem;
  border-radius: 99px;
  background: color-mix(in srgb, var(--ink) 10%, transparent);
  padding-left: 0.75rem;
}

.boot-sheet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 0.12rem;
  border: 1.5px solid color-mix(in srgb, var(--forest) 45%, transparent);
  transform: translateY(-50%);
  background: transparent;
}

.boot-sheet-list li.is-checked::before {
  background: var(--forest);
  box-shadow: inset 0 0 0 1.5px var(--cream, #f7f1e6);
}

.boot-sheet-map {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 2.4rem;
  margin-top: 0.15rem;
  border-radius: 0.65rem;
  background:
    radial-gradient(circle at 28% 42%, color-mix(in srgb, var(--forest) 28%, transparent) 0 0.22rem, transparent 0.24rem),
    radial-gradient(circle at 58% 30%, color-mix(in srgb, var(--forest) 34%, transparent) 0 0.18rem, transparent 0.2rem),
    radial-gradient(circle at 72% 62%, color-mix(in srgb, var(--forest) 30%, transparent) 0 0.2rem, transparent 0.22rem),
    linear-gradient(135deg, color-mix(in srgb, var(--forest) 8%, #efe6d6), #f7f1e6);
  overflow: hidden;
}

.boot-sheet-map::before {
  content: "";
  position: absolute;
  inset: 28% 18% 32% 16%;
  border: 1.5px dashed color-mix(in srgb, var(--forest) 35%, transparent);
  border-radius: 40% 60% 45% 55%;
  opacity: 0.8;
}

.boot-sheet-map i {
  position: absolute;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50% 50% 50% 0;
  background: var(--forest);
  transform: rotate(-45deg);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--cream) 80%, transparent);
}

.boot-sheet-map i:nth-child(1) {
  left: 24%;
  top: 36%;
}

.boot-sheet-map i:nth-child(2) {
  left: 54%;
  top: 24%;
}

.boot-sheet-map i:nth-child(3) {
  left: 68%;
  top: 56%;
}

.boot-sheet-caption {
  margin-top: auto;
  font-size: 0.52rem;
  letter-spacing: 0.02em;
  color: color-mix(in srgb, var(--ink) 45%, transparent);
}

.boot-page-1 {
  --leaf-z: calc(var(--bd) / 2 - 0.18rem);
  animation: boot-page-flip 7.2s cubic-bezier(0.4, 0.05, 0.2, 1) infinite;
}

.boot-page-2 {
  --leaf-z: calc(var(--bd) / 2 - 0.34rem);
  animation: boot-page-flip 7.2s cubic-bezier(0.4, 0.05, 0.2, 1) infinite;
  animation-delay: 0.25s;
}

.boot-page-3 {
  --leaf-z: calc(var(--bd) / 2 - 0.5rem);
  animation: boot-page-flip 7.2s cubic-bezier(0.4, 0.05, 0.2, 1) infinite;
  animation-delay: 0.5s;
}

.boot-cover {
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 90% at 50% 18%, color-mix(in srgb, #12994b 55%, transparent), transparent 58%),
    linear-gradient(160deg, #12994b 0%, #0d8943 52%, #106c37 100%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #0a2a16 45%, transparent);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  animation: boot-cover-open 7.2s cubic-bezier(0.45, 0.05, 0.2, 1) infinite;
}

/* Endpaper on the inside of the cover, revealed once the book swings open. */
.boot-cover-inner {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, #fffdf8 0%, #eadfcb 100%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent);
  transform: rotateY(180deg) translateZ(0.4px);
  backface-visibility: hidden;
}

.boot-cover-mark {
  display: block;
  width: 50%;
  height: auto;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 2px 6px color-mix(in srgb, #04140b 35%, transparent));
  backface-visibility: hidden;
  animation: boot-mark-settle 7.2s cubic-bezier(0.6, 0.02, 0.24, 1) infinite;
}

.boot-brand {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  animation: boot-fade 0.9s ease both;
}

.boot-wait {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: none;
  color: color-mix(in srgb, var(--gold-pale) 88%, var(--cream));
  animation: boot-fade 0.9s ease 0.35s both;
}

.boot-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  margin-left: 0.28rem;
  vertical-align: middle;
}

.boot-dots i {
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.25;
  animation: boot-dot 1.05s ease-in-out infinite;
}

.boot-dots i:nth-child(2) {
  animation-delay: 0.15s;
}

.boot-dots i:nth-child(3) {
  animation-delay: 0.25s;
}

/*
  Timeline (7.2s loop):
  0–13%    the mark rests lying down
  13–18%   hands off to the 3D book, still lying in the same pose
  18–34%   the book stands up and turns to face you
  34–44%   the front cover holds
  44–80%   the cover swings open, leaves turn right → left
  80–95%   it closes and lies back down, ready to loop
*/
/* Interior stays dark until the cover actually swings open. */
@keyframes boot-inside-show {
  0%,
  42% {
    opacity: 0;
  }
  46%,
  78% {
    opacity: 1;
  }
  84%,
  100% {
    opacity: 0;
  }
}

@keyframes boot-stand {
  0%,
  18% {
    transform: perspective(1050px) translateX(0) rotateX(60deg) rotateY(0deg) rotateZ(40deg);
  }
  34%,
  42% {
    transform: perspective(1050px) translateX(0) rotateX(0deg) rotateY(-13deg) rotateZ(0deg);
  }
  /* Slide right as the cover swings left, so the open spread stays centred. */
  55%,
  76% {
    transform: perspective(1050px) translateX(1.5rem) rotateX(0deg) rotateY(-13deg) rotateZ(0deg);
  }
  88% {
    transform: perspective(1050px) translateX(0) rotateX(0deg) rotateY(-13deg) rotateZ(0deg);
  }
  95%,
  100% {
    transform: perspective(1050px) translateX(0) rotateX(60deg) rotateY(0deg) rotateZ(40deg);
  }
}

/* Keeps the pin upright while the book still lies at the mark's angle. */
@keyframes boot-mark-settle {
  0%,
  18% {
    transform: rotate(-40deg);
  }
  34%,
  88% {
    transform: rotate(0deg);
  }
  95%,
  100% {
    transform: rotate(-40deg);
  }
}

@keyframes boot-cover-open {
  0%,
  44% {
    transform: translateZ(calc(var(--bd) / 2)) rotateY(0deg);
  }
  55%,
  76% {
    transform: translateZ(calc(var(--bd) / 2)) rotateY(-142deg);
  }
  86%,
  100% {
    transform: translateZ(calc(var(--bd) / 2)) rotateY(0deg);
  }
}

@keyframes boot-page-flip {
  0%,
  46% {
    opacity: 0;
    transform: translateZ(var(--leaf-z)) rotateY(0deg);
  }
  49% {
    opacity: 1;
    transform: translateZ(var(--leaf-z)) rotateY(0deg);
  }
  58% {
    opacity: 1;
    transform: translateZ(var(--leaf-z)) rotateY(-96deg);
  }
  66%,
  70% {
    opacity: 1;
    transform: translateZ(var(--leaf-z)) rotateY(-168deg);
  }
  76%,
  100% {
    opacity: 0;
    transform: translateZ(var(--leaf-z)) rotateY(-168deg);
  }
}

.boot-page-1::after {
  animation: boot-page-sheen 7.2s cubic-bezier(0.4, 0.05, 0.2, 1) infinite;
}

.boot-page-2::after {
  animation: boot-page-sheen 7.2s cubic-bezier(0.4, 0.05, 0.2, 1) infinite;
  animation-delay: 0.25s;
}

.boot-page-3::after {
  animation: boot-page-sheen 7.2s cubic-bezier(0.4, 0.05, 0.2, 1) infinite;
  animation-delay: 0.5s;
}

@keyframes boot-page-sheen {
  0%,
  48% {
    opacity: 0;
  }
  54%,
  60% {
    opacity: 0.5;
  }
  68%,
  100% {
    opacity: 0;
  }
}

@keyframes boot-fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes boot-dot {
  0%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .boot-hero,
  .boot-base,
  .boot-cover,
  .boot-cover-mark,
  .boot-page,
  .boot-page::after,
  .boot-brand,
  .boot-wait,
  .boot-dots i {
    animation: none;
  }

  /* Hold the closed book facing front instead of animating. */
  .boot-hero {
    transform: perspective(1050px) rotateX(0deg) rotateY(-13deg) rotateZ(0deg);
  }

  .boot-cover {
    transform: translateZ(calc(var(--bd) / 2));
  }

  .boot-page {
    display: none;
  }

  .boot-dots i {
    opacity: 0.7;
  }
}

.workbook {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}

@keyframes site-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  16% {
    transform: translateX(-8px);
  }
  32% {
    transform: translateX(7px);
  }
  48% {
    transform: translateX(-5px);
  }
  64% {
    transform: translateX(4px);
  }
  80% {
    transform: translateX(-2px);
  }
}

html.is-shake {
  animation: site-shake 0.52s ease;
}

html.is-shake,
html.is-shake body {
  overflow-x: hidden;
}

.mast {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: stretch;
  padding: 1rem var(--space) 0.85rem;
  padding-top: max(1rem, env(safe-area-inset-top));
  background: linear-gradient(180deg, color-mix(in srgb, var(--forest) 88%, black), var(--forest-deep));
  color: var(--cream);
}

.mast-top {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
}

.mast-back {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  border-radius: 999px;
  background: color-mix(in srgb, var(--cream) 12%, transparent);
  color: var(--cream);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.mast-back svg {
  display: block;
  width: 1.1rem;
  height: 1.1rem;
}

.mast-back[hidden] {
  display: none !important;
}

.mast-top .mast-compact {
  flex: 1 1 auto;
  min-width: 0;
}

.mast-top .mast-actions {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0;
  max-width: 100%;
  min-width: 0;
}

.mast-btn-icon {
  gap: 0;
  width: 2.15rem;
  min-width: 2.15rem;
  min-height: 2.15rem;
  padding: 0;
  border-radius: 999px;
}

.mast-btn-ico {
  display: inline-flex;
  width: 1.1rem;
  height: 1.1rem;
  color: #fffaf2;
}

.mast-btn-ico svg {
  width: 100%;
  height: 100%;
  display: block;
  stroke: currentColor;
}

.mast-actions-tools .mast-btn-icon .mast-btn-label {
  display: none;
}

.mast-actions-tools .mast-btn-quiet,
.mast-actions-tools .mast-btn-accent {
  background: color-mix(in srgb, var(--cream) 16%, transparent);
  color: #fffaf2;
  border: 1px solid color-mix(in srgb, var(--gold-pale) 55%, transparent);
  box-shadow: none;
}

@media (hover: hover) and (pointer: fine) {
  .mast-actions-tools .mast-btn-quiet:hover,
  .mast-actions-tools .mast-btn-accent:hover {
    background: color-mix(in srgb, var(--cream) 24%, transparent);
    border-color: color-mix(in srgb, var(--gold-pale) 75%, transparent);
    color: #fffaf2;
  }
}

.mast-actions-tools #mast-publish.is-published {
  color: #ffe4da;
  border-color: color-mix(in srgb, var(--brick) 55%, var(--gold-pale));
  background: color-mix(in srgb, var(--brick) 28%, transparent);
}

.mast-btn.is-syncing .mast-btn-ico {
  animation: mast-sync-spin 0.85s linear infinite;
}

.mast-btn-icon.is-syncing::after {
  display: none !important;
}

.mast-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-pale);
  margin: 0;
}

.mast h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.7rem, 8vw, 2.6rem);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-top: 0.4rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.mast h1 em {
  font-style: italic;
  color: var(--gold-pale);
}

.mast-meta {
  display: grid;
  gap: 0.18rem;
  margin: 0.55rem 0 0;
  max-width: 46rem;
  font-size: 0.82rem;
  text-align: left;
  color: color-mix(in srgb, var(--cream) 80%, transparent);
}

.mast-route {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  line-height: 1.4;
  color: color-mix(in srgb, var(--cream) 88%, transparent);
}

.mast-who {
  /* Prefer avatar stack over the comma-separated name list (web + phone). */
  display: none;
  font-size: 0.78rem;
  color: color-mix(in srgb, var(--cream) 62%, transparent);
}

.mast-people {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem 0.75rem;
  min-width: 0;
  width: fit-content;
  max-width: 100%;
  margin-top: 0.35rem;
}

.mast-avatars {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.mast-countdown-ico {
  display: none;
}

.mast-countdown-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  padding: 0.2rem 0.55rem 0.22rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold-pale) 16%, transparent);
  color: var(--gold-pale);
  font-size: 0.74rem;
  white-space: nowrap;
}

.mast-stamp {
  --stamp-ink: #9a3b2f;
  position: relative;
  flex: 0 0 auto;
  width: 3.55rem;
  height: 3.55rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0.28rem;
  background: #f4ead6;
  color: var(--stamp-ink);
  text-decoration: none;
  transform: rotate(-3deg);
  cursor: pointer;
  appearance: none;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.16);
}

.mast-stamp.is-compact {
  width: 2.35rem;
  height: 2.35rem;
  transform: rotate(-4deg);
}

.mast-stamp-ring {
  position: absolute;
  inset: 0.12rem;
  border: 1.5px solid currentColor;
  border-radius: 0.18rem;
  box-shadow:
    inset 0 0 0 2px #f4ead6,
    inset 0 0 0 3px currentColor;
}

.mast-stamp-ring::after {
  content: "";
  position: absolute;
  inset: 0.2rem;
  border: 1px dashed currentColor;
  border-radius: 0.1rem;
  opacity: 0.7;
}

.mast-stamp-face {
  position: relative;
  z-index: 1;
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.02rem;
  padding: 0.28rem 0.18rem 0.2rem;
  text-align: center;
}

.mast-stamp-brand {
  font-size: 0.42rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}

.mast-stamp .pp-lakbi {
  width: 0.72rem;
  height: 0.72rem;
}

.mast-stamp.is-compact .pp-lakbi {
  width: 0.55rem;
  height: 0.55rem;
}

.mast-stamp-face strong {
  font-family: var(--serif);
  font-size: 0.48rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  max-width: 92%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mast-stamp.is-compact .mast-stamp-face strong {
  font-size: 0.38rem;
}

/* The small header stamp broke a city mid-word ("DENPASA / R") and "LakBi" touched the
   ring: one line each, sized to the face. */
.mast-stamp.is-compact .mast-stamp-face {
  padding: 0.24rem 0.16rem 0.18rem;
}

.mast-stamp.is-compact .mast-stamp-brand {
  font-size: 0.34rem;
  letter-spacing: 0;
}

.mast-stamp.is-compact .mast-stamp-face strong {
  display: block;
  max-width: 100%;
  font-size: 0.32rem;
  letter-spacing: 0;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mast-stamp-country {
  font-size: 0.38rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  max-width: 92%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mast-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  margin-left: -0.42rem;
  border-radius: 50%;
  border: 1.5px solid var(--forest-deep);
  background: color-mix(in srgb, var(--gold-pale) 82%, var(--forest-deep));
  color: var(--forest-deep);
  font-size: 0.68rem;
  font-weight: 700;
  overflow: hidden;
  flex: 0 0 auto;
}

.mast-avatar.has-photo {
  background: color-mix(in srgb, var(--cream) 35%, var(--forest-deep));
  padding: 0;
}

.mast-avatar.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.mast-avatar:first-child {
  margin-left: 0;
}

.mast-avatar.is-more {
  background: color-mix(in srgb, var(--cream) 22%, transparent);
  color: var(--cream);
}

.mast-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  flex: 0 1 auto;
  max-width: 100%;
  min-width: 0;
  padding: 0.4rem 0 0.55rem;
}

.mast-actions .mast-account {
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(11rem, 42vw);
}

.mast-actions .mast-account .auth-menu-trigger {
  min-height: 2.15rem;
  padding: 0.15rem 0.45rem 0.15rem 0.15rem;
  gap: 0.35rem;
  background: color-mix(in srgb, var(--cream) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold-pale) 55%, transparent);
  border-radius: 999px;
}

@media (max-width: 520px) {
  .mast-actions .mast-account .auth-menu-label {
    display: none;
  }
  .mast-actions .mast-account .auth-menu-trigger {
    padding: 0.15rem 0.35rem 0.15rem 0.15rem;
  }
}

.mast-actions .mast-account .auth-menu-caret {
  margin-right: 0.1rem;
}

.mast-actions-tools {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  margin: 0;
  border: 0;
  flex: 0 0 auto;
}

.mast-btn {
  appearance: none;
  box-sizing: border-box;
  min-height: var(--tap);
  padding: 0.4rem 0.95rem;
  border-radius: var(--btn-radius);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
  transition: background var(--btn-ease), border-color var(--btn-ease), color var(--btn-ease), transform var(--btn-ease);
}

@media (hover: hover) and (pointer: fine) {
  .mast-btn:hover {
    transform: translateY(-1px);
  }
}

.mast-btn:focus-visible {
  outline: 2px solid var(--gold-pale);
  outline-offset: 2px;
}

.mast-btn-quiet {
  background: color-mix(in srgb, var(--cream) 10%, transparent);
  color: var(--cream);
  border: 1px solid color-mix(in srgb, var(--cream) 42%, transparent);
}

a.mast-btn,
a.mast-btn:visited,
a.mast-btn:active {
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  a.mast-btn:hover {
    text-decoration: none;
  }
}

a.mast-btn-quiet,
a.mast-btn-quiet:visited {
  color: var(--cream);
}

@media (hover: hover) and (pointer: fine) {
  .mast-btn-quiet:hover {
    background: color-mix(in srgb, var(--cream) 18%, transparent);
    border-color: color-mix(in srgb, var(--cream) 58%, transparent);
  }
}

.mast-btn.is-syncing {
  position: relative;
  pointer-events: none;
  opacity: 0.92;
}

.mast-btn.is-syncing::after {
  content: "";
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  margin-left: 0.35rem;
  border: 2px solid color-mix(in srgb, var(--cream) 35%, transparent);
  border-top-color: var(--cream);
  border-radius: 50%;
  vertical-align: -0.1rem;
  animation: mast-sync-spin 0.75s linear infinite;
}

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

.mast-compact {
  display: none;
}

.mast-btn-primary {
  background: var(--gold-pale);
  color: var(--forest-deep);
  border: 1px solid color-mix(in srgb, var(--gold) 70%, white);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--forest-deep) 12%, transparent);
}

@media (hover: hover) and (pointer: fine) {
  .mast-btn-primary:hover {
    background: var(--cream);
    border-color: var(--cream);
  }
}

.mast-btn-accent {
  background: color-mix(in srgb, var(--cream) 14%, transparent);
  color: var(--gold-pale);
  border: 1px solid color-mix(in srgb, var(--gold-pale) 55%, transparent);
}

@media (hover: hover) and (pointer: fine) {
  .mast-btn-accent:hover {
    background: color-mix(in srgb, var(--gold-pale) 22%, transparent);
    color: var(--cream);
    border-color: var(--gold-pale);
  }
}

.mast-btn-danger {
  background: transparent;
  color: color-mix(in srgb, #ffc9bf 85%, var(--cream));
  border: 1px solid color-mix(in srgb, var(--brick) 50%, var(--cream));
}

@media (hover: hover) and (pointer: fine) {
  .mast-btn-danger:hover {
    background: color-mix(in srgb, var(--brick) 28%, transparent);
    color: var(--cream);
    border-color: color-mix(in srgb, var(--brick) 70%, var(--cream));
  }
}

/* Back-compat if old class names linger */
.mast-btn-home,
.mast-btn-profile {
  background: color-mix(in srgb, var(--cream) 10%, transparent);
  color: var(--cream);
  border: 1px solid color-mix(in srgb, var(--cream) 42%, transparent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mast-btn-opt {
  background: var(--gold-pale);
  color: var(--forest-deep);
  border: 1px solid color-mix(in srgb, var(--gold) 70%, white);
}

.mast-btn-pub {
  background: color-mix(in srgb, var(--cream) 14%, transparent);
  color: var(--gold-pale);
  border: 1px solid color-mix(in srgb, var(--gold-pale) 55%, transparent);
}

.mast-btn-del {
  background: transparent;
  color: color-mix(in srgb, #ffc9bf 85%, var(--cream));
  border: 1px solid color-mix(in srgb, var(--brick) 50%, var(--cream));
}

.mast-meta strong {
  display: block;
  margin-top: 0.25rem;
  color: var(--gold-pale);
  font-weight: 500;
}

.sheet-nav {
  background: var(--forest-deep);
  border-bottom: 1px solid color-mix(in srgb, var(--gold-pale) 28%, transparent);
  padding: 0 var(--space);
}

.sheet-nav-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  min-width: 0;
}

.sheet-tabs-scroller {
  min-width: 0;
  flex: 1 1 auto;
}

.sheet-tabs-fade,
.sheet-tabs-more {
  display: none;
}

.public-nav[hidden] {
  display: none !important;
}

.public-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  padding: 0.2rem 0 0.45rem;
}

/* nowrap at every width — the phone override stopped at 47.99rem, so the
   sticky nav tray could still wrap (and grow the forest chrome) on tablets. */
.sheet-nav-tray {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  margin-left: auto;
  min-width: 0;
}

.sheet-nav-tray .account-slot:empty {
  display: none;
}

.sheet-nav-tray .public-nav {
  margin-left: 0;
}

.sheet-nav-tray #owner-nav #mast-publish.public-nav-label {
  min-width: auto;
  width: auto;
  padding: 0.35rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.sheet-nav-tray #owner-nav #mast-publish.is-published {
  border-color: color-mix(in srgb, var(--brick) 65%, var(--gold-pale));
  background: color-mix(in srgb, var(--brick) 36%, transparent);
  color: #ffe4da;
}

.sheet-nav-tray #owner-nav #mast-sync.is-syncing .public-nav-svg {
  animation: mast-sync-spin 0.85s linear infinite;
}

.public-nav .btn-quiet,
.public-nav .btn-solid {
  min-height: 2.15rem;
  min-width: 2.15rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  border-radius: 999px;
  text-shadow: 0 1px 1px color-mix(in srgb, var(--forest-deep, #0f241c) 45%, transparent);
}

.public-nav-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  box-sizing: border-box;
  line-height: 1;
}

.public-nav-upvote.public-nav-ico {
  min-width: 2.65rem;
  padding-inline: 0.65rem;
}

.public-nav-svg {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
  flex: 0 0 auto;
}

.public-nav .btn-quiet,
.public-nav a.btn-quiet,
.public-nav a.btn-quiet:visited,
.public-nav a.btn-quiet:active {
  background: color-mix(in srgb, var(--cream) 16%, transparent);
  color: #fffaf2;
  border: 1px solid color-mix(in srgb, var(--gold-pale) 55%, transparent);
}

.public-nav .btn-quiet .public-nav-svg,
.public-nav a.btn-quiet .public-nav-svg {
  color: #fffaf2;
  stroke: currentColor;
}

@media (hover: hover) and (pointer: fine) {
  .public-nav .btn-quiet:hover,
  .public-nav a.btn-quiet:hover {
    background: color-mix(in srgb, var(--cream) 24%, transparent);
    border-color: color-mix(in srgb, var(--gold-pale) 75%, transparent);
    color: #fffaf2;
  }
}

.public-nav .btn-solid {
  background: color-mix(in srgb, var(--gold-pale) 28%, transparent);
  color: #fffaf2;
  border: 1px solid color-mix(in srgb, var(--gold-pale) 70%, transparent);
}

@media (hover: hover) and (pointer: fine) {
  .public-nav .btn-solid:hover {
    background: color-mix(in srgb, var(--gold-pale) 40%, transparent);
  }
}

/* Home is an <a>; match button box so underline/baseline don’t lift it */
.public-nav a.btn-quiet,
.public-nav a.btn-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
  line-height: 1;
}

.public-nav-upvote em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.9;
  min-width: 0.7em;
}

.public-nav-upvote.is-on {
  border-color: color-mix(in srgb, var(--brick) 65%, var(--gold-pale));
  background: color-mix(in srgb, var(--brick) 36%, transparent);
  color: #ffe4da;
}

.public-nav-upvote.is-on .public-nav-heart {
  fill: currentColor;
}

.check-row.is-readonly {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.45rem 0;
  min-height: var(--tap);
  font-size: 0.92rem;
}

.check-row.is-readonly .prep-bullet {
  flex: 0 0 auto;
  width: 0.45rem;
  height: 0.45rem;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ink) 35%, transparent);
}

.check-row.is-readonly .prep-text {
  flex: 1 1 auto;
  min-width: 0;
}

.sheet-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: var(--tap);
  padding: 0.35rem 0;
}

.sheet-nav-label {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-pale);
}

.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: var(--cream);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--btn-radius);
  padding: 0.35rem 0.7rem;
  min-height: var(--tap);
  font-weight: 500;
  text-decoration: none;
  box-sizing: border-box;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color var(--btn-ease);
}

@media (hover: hover) and (pointer: fine) {
  .btn-google:hover {
    border-color: var(--gold);
  }
}

.google-mark {
  width: 1.1rem;
  height: 1.1rem;
}

.auth-menu {
  position: relative;
  min-width: 0;
}

.auth-menu-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  min-height: var(--tap);
  padding: 0.2rem 0.35rem 0.2rem 0.2rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

/* Workbook mast is dark — keep account name readable (was inheriting ink on forest). */
.sheet-nav-tray .account-slot .auth-menu-trigger,
.mast-actions .account-slot .auth-menu-trigger {
  color: var(--cream, #f7f1e6);
}

.sheet-nav-tray .account-slot .auth-menu-label,
.sheet-nav-tray .account-slot .auth-menu-label strong,
.mast-actions .account-slot .auth-menu-label,
.mast-actions .account-slot .auth-menu-label strong {
  color: var(--cream, #f7f1e6);
}

.sheet-nav-tray .account-slot .auth-menu-caret,
.mast-actions .account-slot .auth-menu-caret {
  border-top-color: color-mix(in srgb, var(--cream, #f7f1e6) 85%, transparent);
}

.auth-menu.is-open .auth-menu-trigger {
  border-color: color-mix(in srgb, currentColor 28%, transparent);
  background: color-mix(in srgb, currentColor 8%, transparent);
}

@media (hover: hover) and (pointer: fine) {
  .auth-menu-trigger:hover {
    border-color: color-mix(in srgb, currentColor 28%, transparent);
    background: color-mix(in srgb, currentColor 8%, transparent);
  }
}

.auth-menu-label {
  display: grid;
  min-width: 0;
  text-align: left;
  line-height: 1.15;
}

.auth-menu-label strong {
  font-size: 0.88rem;
  font-weight: 500;
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-menu-caret {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  opacity: 0.7;
  flex: 0 0 auto;
}

.auth-menu-panel {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  z-index: 40;
  width: min(17.5rem, calc(100vw - 1.5rem));
  padding: 0.4rem;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 1.1rem;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 22px 48px -12px rgba(19, 37, 30, 0.28), 0 4px 12px rgba(19, 37, 30, 0.08);
  display: grid;
  gap: 0.1rem;
  transform-origin: top right;
  animation: authMenuIn 0.18s cubic-bezier(0.2, 0.8, 0.3, 1.2);
}

/* Little notch pointing at the trigger. */
.auth-menu-panel::before {
  content: "";
  position: absolute;
  top: -0.36rem;
  right: 1.35rem;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--forest-deep, #13251e);
  border-top-left-radius: 0.15rem;
  transform: rotate(45deg);
}

@keyframes authMenuIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.97);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-menu-panel {
    animation: none;
  }
}

.auth-menu-panel[hidden] {
  display: none !important;
}

.auth-menu-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 0.8rem 0.85rem;
  margin: -0.4rem -0.4rem 0.3rem;
  border-radius: 1.1rem 1.1rem 0.9rem 0.9rem;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(230, 201, 142, 0.22), transparent 55%),
    linear-gradient(160deg, var(--forest, #1f3d30), var(--forest-deep, #13251e));
  color: var(--cream, #fbf6ec);
  overflow: hidden;
}

/* Dashed "boarding pass" tear line under the header. */
.auth-menu-head::after {
  content: "";
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.3rem;
  border-bottom: 1px dashed rgba(251, 246, 236, 0.22);
}

.auth-menu-who {
  min-width: 0;
}

.auth-menu-kicker {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-pale, #e8d5a3);
  opacity: 0.9;
}

.auth-menu-head strong {
  display: block;
  font-family: var(--serif, "Playfair Display", Georgia, serif);
  font-size: 1.05rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-menu-head small {
  display: block;
  color: rgba(251, 246, 236, 0.72);
  font-size: 0.76rem;
  margin-top: 0.1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 12.5rem;
}

.auth-menu-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  min-height: 2.6rem;
  padding: 0.4rem 0.55rem;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.auth-menu-text {
  flex: 1 1 auto;
  min-width: 0;
}

.auth-menu-ico {
  display: inline-grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  flex: 0 0 auto;
  border-radius: 0.6rem;
  background: color-mix(in srgb, var(--forest) 8%, var(--cream));
  color: var(--forest);
  transition: transform 0.18s ease, background-color 0.15s ease;
}

.auth-menu-ico svg {
  width: 1.05rem;
  height: 1.05rem;
}

@media (hover: hover) and (pointer: fine) {
  .auth-menu-item:hover {
    background: color-mix(in srgb, var(--forest) 7%, var(--cream));
  }

  .auth-menu-item:hover .auth-menu-ico {
    background: var(--forest);
    color: var(--cream);
    transform: rotate(-6deg) scale(1.05);
  }
}

.auth-menu-item:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: -2px;
}

.auth-menu-sep {
  height: 0;
  margin: 0.25rem 0.6rem;
  background: none;
  border: 0;
  border-top: 1px dashed var(--line);
}

.auth-menu-badge {
  margin-left: auto;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--forest);
  color: var(--cream);
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1;
  flex: 0 0 auto;
}

.auth-menu-badge[hidden] {
  display: none !important;
}

.auth-menu-trigger-dot {
  position: absolute;
  top: 0.2rem;
  left: 1.55rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--brick);
  border: 2px solid var(--forest-deep);
  pointer-events: none;
}

.auth-menu-trigger-dot[hidden] {
  display: none !important;
}

.auth-menu-danger {
  color: var(--brick);
  margin-top: 0.1rem;
}

.auth-menu-danger .auth-menu-ico {
  background: color-mix(in srgb, var(--brick) 10%, var(--cream));
  color: var(--brick);
}

@media (hover: hover) and (pointer: fine) {
  .auth-menu-danger:hover {
    background: color-mix(in srgb, var(--brick) 8%, var(--cream));
  }

  .auth-menu-danger:hover .auth-menu-ico {
    background: var(--brick);
    color: var(--cream);
  }
}

.auth-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  object-fit: cover;
  background: var(--forest);
  flex: 0 0 auto;
}

.auth-menu-head .auth-avatar {
  width: 2.6rem;
  height: 2.6rem;
  box-shadow: 0 0 0 2px var(--forest-deep, #13251e), 0 0 0 3.5px var(--gold-pale, #e8d5a3);
}

.auth-avatar-fallback {
  display: grid;
  place-items: center;
  color: var(--cream);
  font-size: 0.85rem;
}

@media (max-width: 40rem) {
  .auth-menu-label {
    display: none;
  }
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: var(--tap);
  min-width: var(--tap);
  padding: 0 0.85rem;
  color: var(--cream);
  border: 1px solid color-mix(in srgb, var(--cream) 22%, transparent);
  background: color-mix(in srgb, var(--paper-2) 18%, var(--forest));
}

.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 1.15rem;
  height: 0.82rem;
}

.nav-toggle-bars span {
  display: block;
  height: 2px;
  background: currentColor;
  transform-origin: center;
  transition: transform 0.16s ease, opacity 0.16s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) {
  transform: translateY(0.32rem) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) {
  transform: translateY(-0.32rem) rotate(-45deg);
}

.nav-toggle-text {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sheet-tabs {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0 0 0.7rem;
}

.sheet-tabs.is-open {
  display: flex;
}

.sheet-tabs [role="tab"] {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  width: 100%;
  padding: 0.55rem 0.9rem;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-align: left;
  background: color-mix(in srgb, var(--paper-2) 55%, var(--forest));
  color: var(--cream);
  border: 1px solid color-mix(in srgb, var(--cream) 12%, transparent);
}

.sheet-tabs [role="tab"][aria-selected="true"] {
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
}

.sheet-tabs [role="tab"] .tab-soon {
  margin-left: 0.45rem;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  opacity: 0.68;
}

.soon-card {
  max-width: 32rem;
}

.soon-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brick);
  margin-bottom: 0.35rem;
}

/* Trip detail shows read-only on public and private links too (player.js canSeeTripDetailSheet). */

/* Keep print markup in the DOM for window.print, but never flash the unstyled
   board on screen. Board layout lives only in @media print. */
@media screen {
  html.is-printing .print-root {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -1 !important;
  }
}

.sheet {
  flex: 1;
  min-width: 0;
  padding: 1rem var(--space) 2.4rem;
  padding-bottom: max(2.4rem, env(safe-area-inset-bottom));
}

.panel {
  min-width: 0;
  max-width: 100%;
}

.panel-head {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: stretch;
  margin-bottom: 1rem;
}

.panel-head.ledger-head {
  margin-top: 1.2rem;
}

.panel-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.3rem, 5vw, 1.7rem);
}

.panel-head p {
  color: var(--ink-soft);
  font-size: 0.9rem;
  max-width: 42rem;
}

.itin-edit-until {
  margin: 0 0 0.85rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.85rem;
  margin-bottom: 0.85rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  line-height: 1;
}

.legend i {
  display: block;
  flex: 0 0 auto;
  width: 0.7rem;
  height: 0.7rem;
  margin: 0;
  background: currentColor;
  box-shadow: none;
}

@media (max-width: 47.99rem) {
  .legend.legend-collapse {
    display: block;
    margin-bottom: 0.65rem;
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    background: color-mix(in srgb, var(--cream) 92%, #fff);
    letter-spacing: 0;
    text-transform: none;
  }

  .legend-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    min-height: 2.15rem;
    padding: 0.35rem 0.7rem;
    list-style: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
  }

  .legend-summary::-webkit-details-marker {
    display: none;
  }

  .legend-summary > span:first-child {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-soft);
  }

  .legend-preview {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
  }

  .legend-preview i {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
  }

  .legend-collapse[open] .legend-preview {
    display: none;
  }

  .legend-body {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.7rem;
    padding: 0 0.7rem 0.55rem;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .legend-summary::after {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    opacity: 0.65;
  }

  .legend-collapse[open] .legend-summary::after {
    transform: rotate(-135deg);
    margin-top: 0.2rem;
  }

  /* The legend is an ⓘ at the top right of the Itinerary head, its list a popover. */
  #panel-itinerary .panel-head {
    position: relative;
  }

  #panel-itinerary .panel-head > div:first-child {
    padding-right: 3rem;
  }

  .legend.legend--info {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 30;
    margin: 0;
    border: 0;
    background: none;
  }

  .legend--info .legend-summary {
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    min-height: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: color-mix(in srgb, var(--cream) 92%, #fff);
    color: var(--ink-soft);
  }

  .legend--info .legend-summary svg {
    width: 1.15rem;
    height: 1.15rem;
  }

  .legend--info .legend-summary::after {
    display: none;
  }

  .legend--info[open] .legend-summary {
    color: var(--ink);
  }

  .legend--info .legend-body {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    width: min(19rem, calc(100vw - 2rem));
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 0.85rem;
    background: color-mix(in srgb, var(--cream) 96%, #fff);
    box-shadow: 0 12px 28px rgba(28, 24, 18, 0.16);
  }
}

.day-switch {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
  margin-bottom: 0.8rem;
  padding-bottom: 0.15rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

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

.day-switch button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  box-sizing: border-box;
  height: var(--tap);
  min-height: var(--tap);
  padding: 0 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--btn-radius);
  background: var(--cream);
  font: inherit;
  font-size: 0.82rem;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  vertical-align: middle;
  transition: background-color var(--btn-ease), border-color var(--btn-ease), color var(--btn-ease);
}

.day-switch button.is-on {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

.day-flight-mark {
  display: inline-block;
  width: 0.68rem;
  height: 0.68rem;
  margin-left: 0.28rem;
  vertical-align: middle;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M21 16v-2l-8-5V3.5A1.5 1.5 0 0 0 11.5 2 1.5 1.5 0 0 0 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5z'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M21 16v-2l-8-5V3.5A1.5 1.5 0 0 0 11.5 2 1.5 1.5 0 0 0 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5z'/></svg>") center / contain no-repeat;
}

.itin-flight-note {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  margin: 0 0 0.65rem;
  padding: 0.4rem 0.65rem;
  border-radius: 0.45rem;
  background: color-mix(in srgb, var(--gold-pale, #e8d5a3) 28%, var(--cream));
  color: var(--forest-deep);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.35;
}

.itin-flight-note svg {
  width: 0.85rem;
  height: 0.85rem;
  flex: none;
  margin-top: 0.12rem;
}

.agenda-flight-note {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem 0.5rem;
  border-bottom: 1px solid var(--line, rgba(26, 20, 16, 0.12));
  background: color-mix(in srgb, var(--gold-pale, #e8d5a3) 22%, var(--cream));
  color: var(--forest-deep);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  pointer-events: none;
}

.agenda-flight-note > span {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.35rem;
}

.agenda-flight-note svg {
  width: 0.85rem;
  height: 0.85rem;
  flex: none;
  margin-top: 0.1rem;
}

.tt-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.tt-board {
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  border: 1px solid var(--line);
  max-height: min(70dvh, calc(100dvh - 12rem));
  -webkit-overflow-scrolling: touch;
}

.tt {
  width: 100%;
  min-width: calc(var(--gutter) + (var(--cols) * 7rem));
  --cols: 7;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.tt-head,
.tt-body {
  display: grid;
  grid-template-columns: var(--gutter) repeat(var(--cols), minmax(7rem, 1fr));
}

.tt-head {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  background: var(--forest);
  color: var(--cream);
}

.tt-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.tt-corner,
.tt-day {
  padding: 0.55rem 0.5rem;
  border-right: 1px solid color-mix(in srgb, var(--cream) 16%, transparent);
  font-size: 0.72rem;
  min-width: 0;
}

.tt-day strong {
  display: block;
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 500;
}

.tt-day small {
  display: block;
  opacity: 0.72;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tt-hours {
  position: relative;
  height: calc(24 * var(--hour));
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper-2) 60%, var(--cream));
}

.tt-hour {
  height: var(--hour);
  padding: 0.15rem 0.3rem 0;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}

.tt-col {
  position: relative;
  height: calc(24 * var(--hour));
  border-right: 1px solid var(--line);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(var(--hour) - 1px),
    var(--line) calc(var(--hour) - 1px),
    var(--line) var(--hour)
  );
}

.bali-board {
  background-image:
    radial-gradient(circle at 12% 18%, color-mix(in srgb, var(--gold-pale) 28%, transparent), transparent 28%),
    radial-gradient(circle at 88% 72%, color-mix(in srgb, var(--lotus) 14%, transparent), transparent 32%);
}

.tt-col.is-live {
  z-index: 1;
  background-color: color-mix(in srgb, var(--gold-pale) 32%, var(--cream));
  box-shadow:
    inset 0 0 0 2px color-mix(in srgb, var(--gold) 75%, white),
    inset 0 0 2.8rem color-mix(in srgb, var(--gold) 28%, transparent);
}

.tt-day.is-live {
  background: linear-gradient(180deg, #c9a24a, var(--forest-deep));
  color: var(--cream);
}

.tt-day.is-live small {
  color: var(--gold-pale);
  opacity: 1;
}

.tt-fireflies {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 4;
}

.tt-fireflies span {
  position: absolute;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: radial-gradient(circle, #fff8de 0%, #e8d5a3 38%, #f4c2c2 62%, transparent 74%);
  box-shadow: 0 0 8px #e8d5a3, 0 0 14px color-mix(in srgb, var(--gold) 70%, transparent);
  left: calc(8% + var(--i) * 6.2%);
  top: calc(4% + var(--i) * 6.6%);
  animation: firefly 3.4s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.28s);
}

.tt-now {
  pointer-events: none;
  position: absolute;
  left: 0;
  right: 0;
  z-index: 5;
}

.tt-now::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  margin-top: -1px;
  background: linear-gradient(90deg, transparent, #f4c2c2, #ffe9a3, #b0893a, #ffe9a3, #f4c2c2, transparent);
  box-shadow: 0 0 10px #e8d5a3, 0 0 18px color-mix(in srgb, var(--gold) 80%, transparent);
  animation: now-pulse 1.8s ease-in-out infinite;
}

.tt-now span {
  position: absolute;
  left: 0.3rem;
  top: -1rem;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--forest-deep);
  padding: 0.12rem 0.4rem;
  white-space: nowrap;
}

.chip-now {
  border-color: var(--gold);
  background: var(--gold-pale);
  color: var(--forest-deep);
}

@keyframes firefly {
  0%,
  100% {
    opacity: 0.15;
    transform: translate(0, 0) scale(0.55);
  }
  50% {
    opacity: 1;
    transform: translate(0.45rem, -0.85rem) scale(1.25);
  }
}

@keyframes now-pulse {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

@keyframes temple-glow {
  0%,
  100% {
    filter: brightness(1);
    box-shadow: 0 0 0 2px #e8d5a3, 0 0 14px color-mix(in srgb, var(--gold) 55%, transparent);
  }
  50% {
    filter: brightness(1.12);
    box-shadow: 0 0 0 2px #fff4cc, 0 0 22px color-mix(in srgb, var(--gold) 80%, transparent);
  }
}

.tt-block {
  position: absolute;
  left: 0.15rem;
  right: 0.15rem;
  z-index: 2;
  overflow: hidden;
  padding: 0.28rem 0.35rem 0.32rem;
  border-left: 3px solid currentColor;
  font-size: 0.75rem;
  line-height: 1.25;
  text-align: left;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 18%, transparent);
}

#panel-itinerary:has(.exp-fab-undo) .tt-col {
  cursor: cell;
}

#panel-itinerary:has(.exp-fab-undo) .tt-block {
  cursor: grab;
  touch-action: none;
}

/* Content starts at the top (a <button> centres it by default — a 12-hour stop read mid-block). */
.tt-block {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
}

/* Short stops (< 40 min, blockShortClass): one line — title · time — clipped inside the block
   (owner 2026-10-04: a 5-minute stop’s text spilled over the next stop). */
.tt-block.is-short,
.tt-block.is-short.is-edit {
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 0.68rem;
  line-height: 1.1;
}
.tt-block.is-short b {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.tt-block.is-short .tt-when {
  display: inline;
  flex: none;
  overflow-wrap: normal;
}
.tt-block.is-short .tt-when ~ *:not(.tt-resize) {
  display: none;
}

.tt-block.is-edit {
  overflow: visible;
  padding-top: 0.5rem;
  padding-bottom: 0.55rem;
}

.tt-resize {
  position: absolute;
  left: 0;
  right: 0;
  height: 0.72rem;
  z-index: 3;
  cursor: ns-resize;
  touch-action: none;
}

.tt-resize-start {
  top: 0;
}

.tt-resize-end {
  bottom: 0;
}

.tt-resize::after {
  content: "";
  display: block;
  width: 1.55rem;
  height: 0.22rem;
  margin: 0.22rem auto 0;
  border-radius: 99px;
  background: currentColor;
  opacity: 0.38;
}

.tt-resize-end::after {
  margin: 0.18rem auto 0;
}

.tt-block.is-on .tt-resize::after,
.tt-block.is-resize .tt-resize::after {
  opacity: 0.9;
}

.tt-block.is-resize,
.tt-block.is-move {
  z-index: 4;
  outline: 2px solid var(--ink);
}

.tt-block.is-move {
  cursor: grabbing;
}

html.is-tt-resize {
  cursor: ns-resize;
  user-select: none;
}

html.is-tt-move {
  cursor: grabbing;
  user-select: none;
}

html.is-tt-resize .tt-scroll,
html.is-tt-move .tt-scroll {
  overflow-anchor: none;
}

.event-fit {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.45rem;
}

.event-fit span {
  flex: 1;
  text-align: center;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.event-fit .btn-quiet {
  min-height: var(--tap);
  padding: 0 0.75rem;
}

.tt-block b {
  display: inline;
  font-weight: 600;
}

.tt-block .tt-when {
  display: block;
  opacity: 0.78;
  font-size: 0.68rem;
  overflow-wrap: anywhere;
}

.itin-flight-faces {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.18rem 0.42rem;
  margin-top: 0.22rem;
}

.itin-flight-person {
  display: inline-flex;
  align-items: center;
  gap: 0.16rem;
  min-width: 0;
}

.itin-flight-time {
  font-size: 0.58rem;
  font-weight: 650;
  line-height: 1.1;
  white-space: nowrap;
  opacity: 0.86;
}

.itin-flight-face {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  margin-left: 0;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--cream) 88%, var(--ink));
  background: color-mix(in srgb, var(--gold-pale) 82%, var(--forest-deep));
  color: var(--forest-deep);
  font-size: 0.52rem;
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
  flex: 0 0 auto;
}

.itin-flight-face:first-child {
  margin-left: 0;
}

.itin-flight-face.has-photo {
  background: color-mix(in srgb, var(--cream) 35%, var(--forest-deep));
  padding: 0;
}

.itin-flight-face.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.itin-flight-face.is-more {
  background: color-mix(in srgb, var(--ink) 12%, var(--cream));
  color: var(--ink);
}

.detail .itin-flight-faces {
  margin: 0.55rem 0 0.15rem;
}

.detail .itin-flight-face {
  width: 1.45rem;
  height: 1.45rem;
  font-size: 0.6rem;
}

.itin-flight-crew {
  list-style: none;
  margin: 0.55rem 0 0.2rem;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.itin-flight-crew-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.itin-flight-crew-row .itin-flight-face {
  margin: 0;
  width: 1.45rem;
  height: 1.45rem;
  font-size: 0.6rem;
}

.itin-flight-crew-row span {
  display: grid;
  gap: 0.05rem;
  min-width: 0;
}

.itin-flight-crew-row b {
  font-size: 0.88rem;
  font-weight: 650;
}

.itin-flight-crew-row small {
  font-size: 0.75rem;
  opacity: 0.78;
}

.tt-mark {
  display: inline-block;
  margin: 0 0.28rem 0.08rem 0;
  padding: 0.04rem 0.32rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.25;
  text-transform: none;
  vertical-align: 0.08em;
}

.tt-mark.is-new {
  background: var(--forest);
  color: var(--cream);
}

.tt-mark.is-modified {
  background: color-mix(in srgb, var(--gold) 78%, #fff);
  color: var(--ink);
}

.tt-block.is-marked-new {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--forest) 35%, transparent);
}

.tt-block.is-marked-mod {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 55%, transparent);
}

.tt-mark.is-locked {
  background: color-mix(in srgb, var(--ink) 70%, transparent);
  color: var(--cream);
}

.tt-mark.is-blocked {
  background: var(--brick);
  color: var(--cream);
}

.tt-block.is-locked,
.agenda-item.is-locked {
  opacity: 0.68;
}

.tt-block.is-blocked,
.agenda-item.is-blocked {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brick) 55%, transparent);
}

.agenda-copy .tt-mark,
.agenda-copy .tt-rating {
  display: inline-block;
  margin: 0 0.28rem 0 0;
  vertical-align: 0.08em;
}

.tt-block.is-on {
  outline: 2px solid var(--ink);
  z-index: 2;
}

/* Blocks that run past midnight are clipped by the column, so flag the real end. */
.tt-block.is-overnight {
  border-bottom: 2px dashed color-mix(in srgb, currentColor 55%, transparent);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.tt-block .tt-overnight {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
}

.wb-nextday {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold, #b0893a) 22%, transparent);
  color: var(--forest-deep, #13251e);
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.wb-nextday[hidden] {
  display: none;
}

/* Ghost band showing how far last night's event reaches into this column. */
.tt-carry {
  position: absolute;
  top: 0;
  left: 0.15rem;
  right: 0.15rem;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0.2rem;
  border-bottom: 2px dashed color-mix(in srgb, var(--gold, #b0893a) 55%, transparent);
  background: repeating-linear-gradient(
    135deg,
    color-mix(in srgb, var(--gold-pale, #e8d5a3) 30%, transparent) 0 6px,
    transparent 6px 12px
  );
  pointer-events: none;
}

.tt-carry span {
  font-size: 0.6rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--forest-deep, #13251e) 70%, transparent);
}

/* Crew arrivals, derived from their flights at render time. Read-only by
   construction: no data-key, and pointer events off so a click lands on the day. */
.tt-arrivals {
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  right: 0.15rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.15rem 0.3rem;
  border-radius: 0.35rem;
  background: color-mix(in srgb, var(--forest, #1d3b30) 12%, transparent);
  color: color-mix(in srgb, var(--forest-deep, #13251e) 82%, transparent);
  pointer-events: none;
}

.tt-arrivals svg {
  width: 0.7rem;
  height: 0.7rem;
  flex: none;
}

.tt-arrivals span {
  overflow: hidden;
  font-size: 0.58rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.agenda-carry {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--line, rgba(26, 20, 16, 0.12));
  background: color-mix(in srgb, var(--gold-pale, #e8d5a3) 26%, var(--cream, #f7f1e6));
  color: var(--forest-deep, #13251e);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.agenda-crew-note {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--line, rgba(26, 20, 16, 0.12));
  background: color-mix(in srgb, var(--forest, #1d3b30) 8%, var(--cream, #f7f1e6));
  color: var(--forest-deep, #13251e);
  font-size: 0.78rem;
  line-height: 1.4;
}

.tt-crew-note {
  display: block;
  margin-top: 0.2rem;
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.3;
  color: color-mix(in srgb, var(--forest-deep, #13251e) 78%, transparent);
}

.tt-block.is-now {
  z-index: 3;
  animation: temple-glow 2.4s ease-in-out infinite;
}

/* Transpo = cyan-blue, Rest = fuchsia — keep hue distance high on cream. */
.type-transpo {
  color: #0369a1;
  background: color-mix(in srgb, #0369a1 16%, var(--cream));
  box-shadow: inset 3px 0 0 #0369a1;
}
.type-food {
  color: var(--brick);
  background: color-mix(in srgb, var(--brick) 16%, var(--cream));
  box-shadow: inset 3px 0 0 var(--brick);
}
.type-attraction,
.type-see {
  color: var(--forest);
  background: color-mix(in srgb, var(--forest) 14%, var(--cream));
  box-shadow: inset 3px 0 0 var(--forest);
}
.type-rest {
  color: #a21caf;
  background: color-mix(in srgb, #a21caf 16%, var(--cream));
  box-shadow: inset 3px 0 0 #a21caf;
}
.type-activity {
  color: #9f1239;
  background: color-mix(in srgb, #9f1239 14%, var(--cream));
  box-shadow: inset 3px 0 0 #9f1239;
}
.type-tour {
  color: #a16207;
  background: color-mix(in srgb, #a16207 20%, var(--cream));
  box-shadow: inset 3px 0 0 #a16207;
}
.type-shop {
  color: #4338ca;
  background: color-mix(in srgb, #4338ca 20%, var(--cream));
  box-shadow: inset 3px 0 0 #4338ca;
}
.type-rr,
.type-freetime {
  color: #15803d;
  background: color-mix(in srgb, #15803d 14%, var(--cream));
  box-shadow: inset 3px 0 0 #15803d;
}

.legend i,
.legend-preview i,
.legend-body i {
  box-shadow: none !important;
  background: currentColor !important;
}

.detail {
  position: static;
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 1rem 1.05rem 1.15rem;
  min-height: 8rem;
}

.detail h3 {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 3vw, 1.25rem);
  margin: 0.2rem 0 0.4rem;
}

.detail .when {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brick);
}

.detail p {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-top: 0.35rem;
}

.wb-field {
  display: grid;
  gap: 0.28rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.wb-field > span {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28rem 0.35rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wb-label-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  letter-spacing: 0;
  text-transform: none;
}

.detail-tip {
  width: 1rem;
  height: 1rem;
  margin: 0;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font: 700 0.62rem/1rem system-ui, sans-serif;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  flex: 0 0 auto;
}

.detail-tip-pop {
  position: fixed;
  z-index: 80;
  max-width: 240px;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: #2b241e;
  color: #f6f1ea;
  font: 500 0.78rem/1.35 system-ui, sans-serif;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.wb-req {
  font-style: normal;
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--brick);
}

.wb-opt {
  font-style: normal;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
}

.traveller-req {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  margin-left: 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.wb-field .hint {
  display: block;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
  line-height: 1.3;
}

.wb-row-2 > .wb-field {
  align-content: start;
}

.wb-field .combo {
  position: relative;
  display: block;
}

.wb-field .combo-list {
  position: absolute;
  z-index: 12;
  left: 0;
  right: 0;
  top: calc(100% + 0.25rem);
  max-height: 14rem;
  overflow: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(19, 37, 30, 0.14);
}

.wb-field .combo-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.8rem;
  min-height: var(--tap);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
}

.wb-field .combo-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.wb-field .combo-copy small {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.wb-field .combo-kind {
  flex: 0 0 auto;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 650;
}

.wb-field .combo-empty {
  padding: 0.85rem 1rem;
}

.wb-field .combo-empty p {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin: 0;
}

.wb-field .combo-empty small {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.wb-field .combo-list button:focus-visible {
  background: var(--cream);
}

@media (hover: hover) and (pointer: fine) {
  .wb-field .combo-list button:hover {
    background: var(--cream);
  }
}

.wb-field.is-empty,
.detail-people li.is-empty {
  position: relative;
}

.wb-field.is-city-unknown input {
  border-color: color-mix(in srgb, var(--gold) 70%, var(--line));
  background: color-mix(in srgb, var(--gold-pale) 32%, var(--paper));
}

.wb-field .city-unknown-hint,
.city-unknown-hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  color: color-mix(in srgb, var(--gold) 55%, var(--ink));
}

.wb-field.is-empty input,
.wb-field.is-empty select,
.detail-people li.is-empty input {
  outline: 2px solid var(--brick);
  outline-offset: 2px;
  background: color-mix(in srgb, var(--lotus) 40%, var(--cream));
}

.wb-field.is-empty::before,
.detail-people li.is-empty::before {
  content: "Required";
  position: absolute;
  top: 1.55rem;
  right: 0.5rem;
  z-index: 4;
  background: var(--brick);
  color: var(--cream);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.18rem 0.42rem;
  pointer-events: none;
}

.detail-people li.is-empty::before {
  top: 0.55rem;
  right: 5.4rem;
}

.wb-field input[readonly],
.settle-field input[readonly],
.settle-field .cost-entry input[readonly] {
  opacity: 0.85;
  cursor: default;
}

.settle-field.is-sum .cost-entry {
  background: color-mix(in srgb, var(--forest) 6%, var(--cream));
}

.wb-field input,
.wb-field textarea,
.wb-field select,
.wb-head input,
.list-card textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 0.4rem 0.65rem;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: none;
}

.wb-field textarea,
.list-card textarea {
  min-height: 6.5rem;
  resize: vertical;
}

.wb-row-2 {
  display: grid;
  gap: 0.55rem;
}

/* Single-destination stay is derived from the origin window, so it reads instead of edits. */
.wb-derived-stay {
  display: grid;
  gap: 0.2rem;
  margin: 0.55rem 0;
  padding: 0.5rem 0.65rem;
  background: color-mix(in srgb, var(--cream) 55%, var(--paper));
  border: 1px dashed var(--line);
}

.wb-derived-stay .detail-fact {
  margin: 0;
}

.wb-derived-stay .hint {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.3;
  color: var(--ink-soft);
}

.dest-transit {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.45rem;
}

.dest-transit-label {
  margin: 0 0 0.2rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.dest-transit-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.dest-transit-pick {
  min-height: 2rem;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 600;
}

.dest-transit-pick.is-on {
  border-color: var(--forest);
  background: color-mix(in srgb, var(--forest) 12%, var(--paper));
  color: var(--forest);
}

.dest-transit-pick:disabled {
  opacity: 0.45;
}

.dest-transit-hint {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--ink-soft);
}

.wb-actions,
.wb-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.45rem;
}

.detail.wb-detail {
  display: grid;
  gap: 0.85rem;
  align-content: start;
  max-height: calc(100dvh - 7rem);
  overflow: auto;
}

.wb-detail-head {
  display: grid;
  gap: 0.2rem;
}

.wb-detail-head h3 {
  margin: 0;
}

.wb-detail-lede,
.detail.wb-detail.is-draft > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.wb-detail-fields {
  display: grid;
  gap: 0.7rem;
}

.wb-time-block {
  display: grid;
  gap: 0.35rem;
}

.wb-duration {
  margin: 0;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.wb-draft-actions {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.btn-quiet.wb-draft-ask {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.4rem 1.05rem 0.4rem 0.75rem;
  background: var(--forest);
  color: var(--gold-pale);
  border-color: color-mix(in srgb, var(--gold-pale) 62%, var(--forest));
  box-shadow: 0 8px 18px rgba(19, 37, 30, 0.16);
  text-transform: none;
  letter-spacing: 0.04em;
}

@media (hover: hover) and (pointer: fine) {
  .btn-quiet.wb-draft-ask:hover:not([aria-disabled="true"]):not(:disabled) {
    background: var(--forest-deep);
  }
}

.wb-draft-ask-label {
  text-transform: none;
  letter-spacing: 0.04em;
}

.wb-draft-ask-face-wrap {
  display: grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  flex: 0 0 1.4rem;
  border-radius: 50%;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}

.wb-draft-ask-face {
  width: 100%;
  height: 100%;
  max-width: none;
  border-radius: 0;
  object-fit: contain;
}

.btn-quiet.wb-draft-ask[aria-disabled="true"] {
  opacity: 0.42;
  cursor: not-allowed;
}

.wb-draft-actions-row {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 0.45rem;
}

.wb-draft-actions-row .btn-quiet,
.wb-draft-actions-row .btn-solid,
.wb-edit-actions .btn-quiet,
.wb-edit-actions .btn-solid {
  width: 100%;
  justify-content: center;
}

.wb-edit-actions {
  margin-top: 0.35rem;
}

.ask-lakbi-draft-form {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.85rem;
}

.ask-lakbi-draft-form .pass-actions {
  margin-top: 0.35rem;
}

#ask-lakbi-area-field .hint {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.detail.wb-detail.has-lakbi {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 32%, transparent);
}

.wb-field.is-lakbi > span::after {
  content: " · LakBi";
  color: var(--gold);
  letter-spacing: 0.04em;
  text-transform: none;
}

.wb-field.is-lakbi input,
.wb-field.is-lakbi select {
  border-color: color-mix(in srgb, var(--gold) 48%, var(--line));
  background: color-mix(in srgb, var(--gold-pale) 32%, var(--paper));
}

.lakbi-draft-talk {
  position: relative;
  display: grid;
  gap: 0.65rem;
  margin: 0.05rem 0 0.1rem;
  padding: 0.85rem 0.8rem 0.95rem;
  background:
    radial-gradient(circle at 14% 12%, color-mix(in srgb, var(--gold-pale) 26%, transparent), transparent 46%),
    linear-gradient(165deg, color-mix(in srgb, var(--forest) 88%, #2a5646) 0%, var(--forest-deep) 78%);
  color: var(--cream);
  border: 1px solid color-mix(in srgb, var(--gold-pale) 42%, transparent);
  border-radius: 1.2rem;
  box-shadow: 0 14px 28px rgba(19, 37, 30, 0.2);
  overflow: hidden;
  animation: lakbi-draft-in 0.4s ease both;
  scroll-margin-top: 0.75rem;
}

.lakbi-draft-talk:focus {
  outline: none;
}

.lakbi-draft-talk:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--gold-pale) 70%, transparent);
  outline-offset: 2px;
}

.lakbi-draft-talk::after {
  content: "✦";
  position: absolute;
  top: 0.45rem;
  right: 0.7rem;
  font-size: 0.85rem;
  color: var(--gold-pale);
  opacity: 0.55;
  pointer-events: none;
}

.lakbi-draft-talk-rail {
  display: grid;
  grid-template-columns: 3.15rem 1fr;
  gap: 0.65rem;
  align-items: start;
  min-width: 0;
}

.lakbi-draft-talk-face {
  width: 3.15rem;
  height: 3.15rem;
  max-width: none;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
  box-shadow: none;
  animation: lakbi-draft-bob 2.8s ease-in-out infinite;
}

.lakbi-draft-talk.is-pending .lakbi-draft-talk-face {
  animation-duration: 1.15s;
}

.lakbi-draft-talk-thread {
  display: grid;
  gap: 0.38rem;
  min-width: 0;
}

.lakbi-draft-talk-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0 0 0.1rem;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--gold-pale) 78%, var(--cream));
}

.detail .lakbi-draft-talk-name {
  margin: 0 0 0.1rem;
  font-size: 0.62rem;
  color: color-mix(in srgb, var(--gold-pale) 78%, var(--cream));
}

.lakbi-draft-talk-name em {
  font-family: var(--serif);
  font-style: normal;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--cream);
}

.lakbi-draft-talk-bubble {
  position: relative;
  display: grid;
  gap: 0.35rem;
  padding: 0.62rem 0.75rem 0.68rem;
  background: var(--cream);
  color: var(--ink);
  border-radius: 0.95rem 0.95rem 0.95rem 0.28rem;
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.14);
  animation: lakbi-draft-pop 0.42s ease calc(var(--i, 0) * 0.12s) both;
}

.lakbi-draft-talk-bubble:first-of-type::before {
  content: "";
  position: absolute;
  left: -0.32rem;
  top: 0.72rem;
  width: 0.62rem;
  height: 0.62rem;
  background: var(--cream);
  transform: rotate(45deg);
  border-radius: 0.08rem;
}

.detail .lakbi-draft-talk p {
  margin: 0;
}

.detail .lakbi-draft-talk-say,
.lakbi-draft-talk-say {
  margin: 0;
  font-family: var(--serif);
  font-size: 0.98rem;
  font-weight: 400;
  line-height: 1.38;
  color: var(--ink);
}

.lakbi-draft-talk-pick {
  display: grid;
  gap: 0.1rem;
  margin-top: 0.12rem;
  padding: 0.55rem 0.65rem 0.6rem;
  background: color-mix(in srgb, var(--gold-pale) 16%, var(--forest-deep));
  border: 1px dashed color-mix(in srgb, var(--gold-pale) 58%, transparent);
  border-radius: 0.75rem;
  animation: lakbi-draft-pop 0.42s ease calc(var(--i, 1) * 0.12s) both;
}

.lakbi-draft-talk-pick.is-hero {
  padding: 0.7rem 0.75rem;
  border-style: solid;
  background: color-mix(in srgb, var(--gold-pale) 22%, var(--forest-deep));
}

.lakbi-draft-talk.is-food-offer .lakbi-draft-talk-pick.is-hero strong {
  font-size: 1.2rem;
  line-height: 1.25;
}

.lakbi-draft-talk-ask {
  margin: 0.35rem 0 0;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 550;
  color: var(--gold-pale);
  animation: lakbi-draft-pop 0.42s ease calc(var(--i, 0) * 0.12s) both;
}

.lakbi-draft-talk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.15rem;
  animation: lakbi-draft-pop 0.42s ease calc(var(--i, 0) * 0.12s) both;
}

.lakbi-draft-talk-add,
.lakbi-draft-talk-skip {
  appearance: none;
  margin: 0;
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
  min-height: 2.45rem;
  padding: 0.4rem 0.95rem;
}

.lakbi-draft-talk-add {
  border: 0;
  background: color-mix(in srgb, var(--gold-pale) 88%, white);
  color: var(--forest-deep);
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}

.lakbi-draft-talk-skip {
  border: 1px solid color-mix(in srgb, var(--cream) 28%, transparent);
  background: transparent;
  color: color-mix(in srgb, var(--cream) 82%, transparent);
  font-weight: 550;
}

.lakbi-draft-talk-pick-label {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-pale);
}

.lakbi-draft-talk-pick strong {
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--cream);
}

.lakbi-draft-talk-meta {
  font-size: 0.78rem;
  color: color-mix(in srgb, var(--cream) 72%, var(--gold-pale));
}

.detail .lakbi-draft-talk-foot,
.lakbi-draft-talk-foot {
  margin: 0.15rem 0 0;
  font-size: 0.76rem;
  line-height: 1.35;
  color: color-mix(in srgb, var(--cream) 70%, var(--gold-pale));
}

.lakbi-draft-talk-dots {
  display: inline-flex;
  gap: 0.28rem;
  padding-top: 0.05rem;
}

.lakbi-draft-talk-dots i {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 999px;
  background: var(--gold);
  opacity: 0.35;
  animation: lakbi-draft-dot 1.2s ease-in-out infinite;
}

.lakbi-draft-talk-dots i:nth-child(2) {
  animation-delay: 0.15s;
}

.lakbi-draft-talk-dots i:nth-child(3) {
  animation-delay: 0.25s;
}

.detail .lakbi-draft-talk.is-pending .lakbi-draft-talk-say,
.lakbi-draft-talk.is-pending .lakbi-draft-talk-say {
  font-style: italic;
  color: var(--ink-soft);
}

.btn-quiet.wb-draft-ask.is-again {
  border-color: color-mix(in srgb, var(--gold-pale) 78%, var(--forest));
}

@keyframes lakbi-draft-in {
  from {
    opacity: 0;
    transform: translateY(0.45rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes lakbi-draft-pop {
  from {
    opacity: 0;
    transform: translateY(0.35rem) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes lakbi-draft-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.18rem);
  }
}

@keyframes lakbi-draft-dot {
  0%,
  80%,
  100% {
    opacity: 0.28;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-0.15rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lakbi-draft-talk,
  .lakbi-draft-talk-bubble,
  .lakbi-draft-talk-pick,
  .lakbi-draft-talk-face,
  .lakbi-draft-talk-dots i {
    animation: none;
  }
}

.detail-tools {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.15rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.detail-tools .btn-quiet,
.detail-tools .btn-solid {
  width: 100%;
  justify-content: center;
}

.detail-tools .btn-quiet[aria-disabled="true"] {
  opacity: 0.42;
  cursor: not-allowed;
}

/* Two columns only once there is room. This used to be unconditional, and its
   extra specificity beat the single-column base rule, so the Detail tab stayed
   2-up down to 320px while every other tab collapsed at 40rem. */
@media (min-width: 30rem) {
  .detail .wb-row-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.wb-head {
  margin-top: 0;
  margin-bottom: 0.55rem;
}

.wb-head input {
  flex: 1;
  min-width: 8rem;
}

.wb-card,
.wb-stack {
  display: grid;
  gap: 0.65rem;
}

.wb-card {
  padding: 0.85rem;
  background: var(--cream);
  border: 1px solid var(--line);
}

.wb-nights,
.wb-sos {
  margin-top: 1rem;
}

.wb-nights-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.hotel-nights-hint {
  margin: 0.35rem 0 0.65rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.wb-sos h4 {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.45rem;
}

.wb-stay {
  width: 100%;
  min-height: 1.9rem;
  margin-top: 0.28rem;
  padding: 0.15rem 0.4rem;
  border: 1px solid color-mix(in srgb, var(--cream) 28%, transparent);
  background: color-mix(in srgb, var(--cream) 12%, transparent);
  color: var(--cream);
  font: inherit;
  font-size: 0.78rem;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.wb-stay::placeholder {
  color: color-mix(in srgb, var(--cream) 55%, transparent);
}

.agenda-head .wb-stay {
  flex: 1;
  min-width: 8rem;
  margin-top: 0;
}

.detail.wb-detail .wb-field {
  margin-top: 0.55rem;
}

@media (min-width: 40rem) {
  .wb-row-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.7rem;
}

.chip {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  padding: 0.28rem 0.5rem;
}

.grid-3,
.prep-grid,
.atlas,
.hotel-grid,
.totals,
.people,
.place-cols,
.ledger-filters,
.settle-convert,
.settle-people {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.8rem;
}

.card,
.list-card,
.region {
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 1rem 1.05rem 1.15rem;
  min-width: 0;
}

.card h3,
.list-card h3,
.region h3 {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 3vw, 1.2rem);
  margin-bottom: 0.55rem;
}

.card p,
.region small {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.trip-detail {
  display: grid;
  gap: 0.9rem;
}

.detail-subtabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  margin: 0 0 0.45rem;
  padding: 0.28rem;
  border-radius: 0.85rem;
  background: color-mix(in srgb, var(--forest) 8%, var(--cream));
  border: 1px solid color-mix(in srgb, var(--forest) 14%, transparent);
}

.detail-subtabs button {
  appearance: none;
  position: relative;
  margin: 0;
  min-height: var(--tap);
  padding: 0.45rem 0.45rem;
  border: 0;
  border-radius: 0.65rem;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 550;
  cursor: pointer;
}

.detail-subtabs button.is-on {
  background: var(--forest);
  color: var(--cream);
}

.detail-subtabs button.is-missing:not(.is-on) {
  color: color-mix(in srgb, var(--brick) 80%, var(--ink));
}

.detail-tab-flag {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-left: 0.28rem;
  border-radius: 999px;
  background: var(--brick);
  vertical-align: middle;
}

.detail-subtabs button.is-on .detail-tab-flag {
  background: var(--gold-pale);
}

.detail-tab-panel {
  display: grid;
  gap: 0.85rem;
}

.detail-copy-note {
  position: relative;
  margin: 0 0 0.9rem;
  padding: 0.85rem 2.1rem 0.85rem 1rem;
  border: 1px solid color-mix(in srgb, var(--forest) 28%, var(--line));
  background: color-mix(in srgb, var(--forest) 10%, var(--cream));
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.45;
}

.detail-copy-note-x {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: 500 1.15rem/1 var(--sans);
  cursor: pointer;
}

.detail-copy-note strong {
  font-weight: 600;
}

/* Dismiss control, when the note is one the reader can put away. */
.detail-copy-note .btn-quiet {
  margin-left: 0.4rem;
  padding: 0.1rem 0.5rem;
  font-size: 0.85rem;
  vertical-align: baseline;
}

/* Owner/planner reminder — one-time window after create/copy. */
.detail-guide-modal .detail-guide {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.detail-guide {
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--cream);
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}

.detail-guide p {
  margin: 0 0 0.7rem;
}

.detail-guide p:last-child {
  margin-bottom: 0;
}

.detail-guide strong {
  color: var(--ink);
  font-weight: 600;
}

.detail-guide-strong {
  color: var(--ink);
  font-weight: 600;
}

.detail-guide-row {
  padding: 0.75rem 0.9rem;
  border-radius: 0.55rem;
  color: var(--ink);
}

.detail-guide-row.is-info {
  border: 1px solid color-mix(in srgb, var(--dusk) 30%, var(--line));
  background: color-mix(in srgb, var(--dusk) 9%, var(--cream));
}

.detail-guide-row.is-warn {
  border: 1px solid color-mix(in srgb, var(--brick) 30%, var(--line));
  background: color-mix(in srgb, var(--brick) 9%, var(--cream));
  color: color-mix(in srgb, var(--brick) 72%, var(--ink));
}

.detail-guide-row.is-warn strong {
  color: inherit;
}

.detail-guide-foot {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.detail-guide-note-icon {
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  margin-top: 0.05rem;
  object-fit: contain;
}

.detail-guide-actions {
  display: flex;
  justify-content: center;
  margin-top: 0.15rem;
}

.detail-warn {
  margin: 0 0 0.9rem;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--brick);
  background: color-mix(in srgb, var(--brick) 16%, var(--cream));
  color: color-mix(in srgb, var(--brick) 72%, var(--ink));
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  scroll-margin-top: 0.75rem;
}

.detail-warn:focus,
.detail-warn:focus-visible,
.exp-toast.is-warn:focus,
.exp-toast.is-warn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brick) 55%, transparent);
  outline-offset: 2px;
}

.exp-toast.is-warn {
  color: var(--brick);
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 0.82rem;
  font-weight: 600;
}

.detail-card {
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 1rem 1.05rem 1.15rem;
  min-width: 0;
}

.detail-card.is-fold {
  padding: 0;
  overflow: visible;
}

.detail-fold-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1.05rem;
  border: 0;
  background: color-mix(in srgb, var(--forest) 7%, var(--cream));
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.detail-fold-copy {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
  flex: 1;
}

.detail-fold-copy strong {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
}

.detail-fold-copy small {
  color: var(--ink-soft);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-fold-flag {
  flex: 0 0 auto;
  background: var(--brick);
  color: var(--cream);
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.18rem 0.42rem;
  border-radius: 999px;
}

.detail-fold-toggle em {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.55;
  flex: 0 0 auto;
  transition: transform 0.15s ease;
}

.detail-card.is-open .detail-fold-toggle em {
  transform: rotate(-135deg);
  margin-top: 0.2rem;
}

.detail-fold-body {
  padding: 0.85rem 1.05rem 1.15rem;
  display: grid;
  gap: 0.75rem;
}

.detail-card.is-missing {
  border-color: var(--brick);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brick) 35%, transparent);
}

.detail-card.is-missing .detail-fold-toggle {
  background: color-mix(in srgb, var(--brick) 14%, var(--cream));
  color: color-mix(in srgb, var(--brick) 72%, var(--ink));
}

.dest-overview {
  --dest-ov-bg: color-mix(in srgb, var(--paper) 72%, #fff);
  display: grid;
  gap: 0.85rem;
  padding: 1rem 1.05rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: var(--dest-ov-bg);
}

.dest-ov-head,
.dest-ov-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}

.dest-overview > .dest-ov-count {
  justify-self: end;
}

.dest-ov-role {
  margin: 0;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.dest-ov-count,
.dest-ov-meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.dest-ov-route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.45rem 0.55rem;
  align-items: start;
}

.dest-ov-end {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.dest-ov-end.is-end {
  text-align: right;
  justify-items: end;
}

.dest-ov-end strong {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--forest-deep);
}

.dest-ov-end small {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.dest-ov-span {
  position: relative;
  align-self: center;
  min-width: 4.8rem;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold);
}

.dest-ov-span::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px dotted color-mix(in srgb, var(--gold) 50%, var(--line));
}

.dest-ov-span span {
  position: relative;
  z-index: 1;
  padding: 0 0.35rem;
  background: var(--dest-ov-bg);
}

.dest-ov-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--gold-pale);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 20%, transparent);
}

.dest-ov-dot.is-dest {
  background: var(--forest);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--forest) 16%, transparent);
}

.dest-ov-dot.is-home {
  background: transparent;
  border: 2px solid var(--gold);
  box-shadow: none;
  box-sizing: border-box;
}

.dest-ov-card {
  display: grid;
  gap: 0.65rem;
  padding: 0.8rem 0.85rem 0.85rem;
  border-radius: 0.9rem;
  border: 1px solid var(--line);
  background: var(--cream);
}

.dest-ov-card-head {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  min-width: 0;
}

.dest-ov-card-head span:nth-child(2) {
  flex: 0 0 auto;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}

.dest-ov-card-head strong {
  margin-left: auto;
  min-width: 0;
  font-size: 0.88rem;
  color: var(--forest-deep);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

.dest-ov-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem 1rem;
}

.dest-ov-grid span,
.dest-ov-stay span {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.15rem;
}

.dest-ov-grid strong,
.dest-ov-stay strong {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

.dest-ov-stay {
  margin: 0;
}

.dest-ov-hint {
  margin: 0;
  padding-top: 0.15rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.dest-ov-hint::before {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.4rem;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  vertical-align: 0.05rem;
}

.dest-ov-itin ol {
  list-style: none;
  margin: 0.45rem 0 0;
  padding: 0 0 0 0.15rem;
  display: grid;
  gap: 0.7rem;
}

.dest-ov-itin li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.55rem 0.65rem;
  align-items: start;
}

.dest-ov-itin-copy strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--forest-deep);
}

.dest-ov-itin-copy small {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.dest-ov-itin em {
  font-style: normal;
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-align: right;
}

.dest-ov-empty {
  margin: 0;
  color: var(--ink-soft);
}

.dest-ov-journey {
  display: grid;
  gap: 0.18rem;
}

.dest-ov-journey strong {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.15;
  color: var(--forest-deep);
}

.dest-ov-journey small {
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.dest-ov-spine {
  list-style: none;
  margin: 0.15rem 0 0;
  padding: 0;
  display: grid;
  position: relative;
}

.dest-ov-spine::before {
  content: "";
  position: absolute;
  left: 0.26rem;
  top: 1.05rem;
  bottom: 1.05rem;
  width: 1px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--gold) 75%, transparent),
    color-mix(in srgb, var(--forest) 35%, var(--gold)),
    color-mix(in srgb, var(--gold) 75%, transparent)
  );
}

.dest-ov-spine li {
  display: grid;
  grid-template-columns: 0.55rem minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
  padding: 0.7rem 0;
}

.dest-ov-spine .dest-ov-dot {
  position: relative;
  z-index: 1;
  margin-top: 0.28rem;
  background-color: var(--dest-ov-bg);
}

.dest-ov-spine .dest-ov-dot.is-dest {
  background-color: var(--forest);
}

.dest-ov-step {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.dest-ov-step strong {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--forest-deep);
}

.dest-ov-step small {
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.detail-stop {
  padding: 0.75rem 0 0;
  border-top: 1px solid var(--line);
}

.detail-stop:first-child {
  border-top: 0;
  padding-top: 0;
}

.detail-stop h3 {
  font-family: var(--serif);
  font-size: 1.02rem;
  margin: 0 0 0.55rem;
}

.detail-cover-photo {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.detail-cover-card {
  flex: none;
  width: min(28rem, 100%);
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 1.15rem;
  box-shadow: 0 10px 24px rgba(19, 37, 30, 0.12);
}

.detail-cover-card.lb-dest-card {
  color: var(--cream);
}

/* The long upload CTA always orphaned "Remove photo" at phone width. */
.detail-cover-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--sp-2);
  align-items: center;
  min-width: 0;
}

.detail-cover-actions > * {
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-cover-photo > .hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
}

/* Default cover (shared look with Explore) */
.lb-dest-default {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.4rem 1.1rem 4.5rem;
  background:
    radial-gradient(ellipse at 30% 20%, color-mix(in srgb, var(--gold-pale) 22%, transparent), transparent 55%),
    linear-gradient(165deg, var(--cover-forest, var(--forest)) 0%, var(--cover-deep, var(--forest-deep)) 100%);
}

.lb-dest-route {
  margin: 0;
  max-width: 100%;
  color: var(--cream);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.05rem, 3.6vw, 1.35rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-align: center;
  text-wrap: balance;
}

.lb-dest-card {
  position: relative;
  overflow: hidden;
}

.lb-dest-hit > img.lb-dest-cover,
.lb-dest-card > img.lb-dest-cover,
.lb-dest-hit > img:not(.lb-dest-avatar),
.lb-dest-card > img:not(.lb-dest-avatar) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 50%;
}

.lb-dest-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(19, 37, 30, 0.88) 100%);
  pointer-events: none;
}

.lb-dest-days {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 1;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(26, 20, 16, 0.55);
  color: var(--cream);
  font-size: 0.72rem;
}

.lb-dest-copy {
  position: absolute;
  left: 1.05rem;
  right: 1rem;
  bottom: 1.05rem;
  z-index: 1;
}

.lb-dest-copy strong {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.lb-dest-copy span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: color-mix(in srgb, var(--cream) 82%, var(--gold-pale));
}

.detail-card h3 {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 3vw, 1.2rem);
  margin-bottom: 0.65rem;
}

.detail-fact {
  display: grid;
  gap: 0.15rem;
  margin: 0.45rem 0;
}

.detail-fact span {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.detail-fact strong {
  font-weight: 500;
}

.traveller-chips {
  display: grid;
  gap: 0.7rem;
}

.traveller-chips-meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.traveller-chips-meta strong {
  color: var(--ink);
  font-weight: 700;
}

.traveller-head {
  display: grid;
  gap: 0.55rem;
}

.traveller-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.5rem 0.65rem;
  width: 100%;
}

.traveller-tool {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.traveller-tool-label {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.traveller-tool input,
.traveller-tool select {
  width: 100%;
  min-height: var(--tap);
  padding: 0.4rem 0.65rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.traveller-empty {
  margin: 0.2rem 0 0;
}


.traveller-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  min-height: 2.15rem;
  padding: 0.28rem 0.75rem 0.28rem 0.32rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--forest) 9%, var(--cream));
  border: 1px solid color-mix(in srgb, var(--forest) 16%, transparent);
  color: var(--ink);
}

.traveller-chip-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  background: var(--forest);
  color: var(--cream);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex: 0 0 auto;
  overflow: hidden;
}

.traveller-chip-initial.has-photo {
  padding: 0;
  background: color-mix(in srgb, var(--forest) 20%, #fff);
}

.traveller-chip-initial.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 999px;
}

.traveller-chip-name {
  font-size: 0.92rem;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plan-who-invite {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.65rem;
}

.plan-who-invite-title {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 650;
}

.who-row.is-admin .is-admin-chip,
.plan-traveler .is-admin-chip {
  opacity: 0.85;
  cursor: not-allowed;
  pointer-events: none;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plan-who-unified input {
  width: 100%;
  min-height: 2.45rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--cream);
  font: inherit;
}

.plan-who-invite .wb-contrib-results {
  margin-top: 0.15rem;
}

.plan-who-queue {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.plan-who-queue li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.65rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--cream);
}

.plan-who-queue small {
  color: var(--ink-soft);
}

.detail-contrib {
  margin-top: 0.75rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.35rem;
}

.detail-contrib-title {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.detail-contrib .hint {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.detail-people-wrap {  display: grid;
  gap: 0.55rem;
}

.detail-people {
  list-style: none;
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
}

.detail-people li {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.detail-people li.detail-person {
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  padding: 0.75rem 0.8rem;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 0.85rem;
  background: color-mix(in srgb, var(--paper) 88%, #fff);
}

.detail-person-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: start;
  min-width: 0;
}

.detail-person-id {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.detail-person-static {
  display: block;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.detail-person-static .traveller-email {
  display: inline;
  font-weight: 500;
}

.detail-person-id input {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.detail-person-note,
.detail-person-unlock {
  margin: 0;
  color: color-mix(in srgb, var(--ink) 52%, transparent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.detail-person-unlock {
  margin: 0 0 0 3.05rem;
  font-weight: 500;
  letter-spacing: 0;
}

.detail-person-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.detail-person-remove {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brick, #8a2a1b);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
}

.detail-person-name {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.detail-person-name input {
  flex: 1;
  min-width: 0;
}

.traveller-email {
  display: block;
  min-width: 0;
  color: color-mix(in srgb, var(--ink) 58%, transparent);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-people .traveller-chip-initial {
  width: 2rem;
  height: 2rem;
  font-size: 0.78rem;
}

.detail-people input {
  flex: 1;
  min-height: var(--tap);
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--line);
  background: var(--paper);
  font: inherit;
}

.detail-people input[readonly] {
  opacity: 0.85;
  cursor: default;
  background: color-mix(in srgb, var(--cream) 70%, var(--paper));
}

.detail-person .wb-role-picks {
  margin: 0 0 0 3.05rem;
  gap: 0.4rem;
}

.wb-role-toggle {
  appearance: none;
  margin: 0;
  padding: 0.38rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 80%, #fff);
  color: color-mix(in srgb, var(--ink) 62%, transparent);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 550;
  line-height: 1.2;
  cursor: pointer;
}

.wb-role-toggle.is-on {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--cream);
  font-weight: 700;
}

.theme-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1rem;
  margin-top: 0.55rem;
}

.theme-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.theme-swatch {
  width: var(--tap);
  height: var(--tap);
  border-radius: 999px;
  border: 2px solid rgba(247, 241, 230, 0.4);
  box-shadow: inset 0 0 0 1px rgba(26, 20, 16, 0.18);
}

.theme-swatch.is-on {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
}

.theme-pick {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 400;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.theme-pick input[type="color"] {
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--paper);
}

@media (min-width: 40rem) {
  .detail-subtabs button {
    font-size: 0.9rem;
  }
}

/* Prep row: checkbox, text, optional link, optional remove. One row, with the
   text as the only flexible child — it used to scatter over 2-3 lines.
   Handles both shapes: edit mode (checkbox + input) and view (label + span). */
.check-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
  min-width: 0;
}

.check-row > * {
  flex: 0 0 auto;
}

.check-row > .wb-check-text,
.check-row > label:has(span) {
  flex: 1 1 auto;
  min-width: 0;
}

.prep-crew-mark {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.68rem;
  color: color-mix(in srgb, var(--ink) 55%, transparent);
}

.offline-workbook-note {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.8rem;
  border-radius: 0.6rem;
  background: color-mix(in srgb, var(--brick) 12%, var(--paper, #fff));
  color: var(--ink);
  font-size: 0.85rem;
}

.check-link {
  flex: 0 0 auto;
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brick);
}

.list-card label {
  display: flex;
  gap: 0.6rem;
  padding: 0.45rem 0;
  min-height: var(--tap);
  cursor: pointer;
  font-size: 0.92rem;
  min-width: 0;
  align-items: flex-start;
}

.list-card input[type="checkbox"] {
  appearance: none;
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.18rem;
  border: 1px solid var(--ink);
}

.list-card input[type="checkbox"]:checked {
  background: var(--forest);
  box-shadow: inset 0 0 0 2px var(--cream);
}

.list-card label:has(input:checked) span,
.check-row:has(input[type="checkbox"]:checked) .wb-check-text {
  text-decoration: line-through;
  opacity: 0.5;
}

.list-card .wb-head input {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 3vw, 1.2rem);
  font-weight: 500;
  background: transparent;
  border-color: transparent;
  min-height: 2.2rem;
  padding: 0.15rem 0.25rem;
}

.list-card .wb-head input:focus {
  border-color: var(--line);
  background: var(--paper);
}

.wb-check-text {
  flex: 1;
  min-width: 8rem;
  min-height: 2.2rem;
  padding: 0.2rem 0.4rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  letter-spacing: 0;
  text-transform: none;
}

.wb-check-text:focus {
  border-color: var(--line);
  background: var(--paper);
}

.wb-add-item {
  margin-top: 0.35rem;
}

/* Quiet prep delete — no bordered “REMOVE” chips */
.prep-remove {
  appearance: none;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: color-mix(in srgb, var(--ink) 38%, transparent);
  font: inherit;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

.prep-remove:focus-visible {
  color: var(--brick);
  background: color-mix(in srgb, var(--brick) 10%, transparent);
  outline: none;
}

@media (hover: hover) and (pointer: fine) {
  .prep-remove:hover {
    color: var(--brick);
    background: color-mix(in srgb, var(--brick) 10%, transparent);
    outline: none;
  }
}

.list-card .wb-head .prep-remove-list {
  align-self: center;
}

.check-row .prep-remove {
  margin-left: auto;
}

.prep-add-item {
  appearance: none;
  display: inline-flex;
  align-items: center;
  margin-top: 0.45rem;
  padding: 0.2rem 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 550;
  letter-spacing: 0.01em;
  text-transform: none;
  cursor: pointer;
}

.prep-add-item:focus-visible {
  color: var(--forest);
  outline: none;
}

@media (hover: hover) and (pointer: fine) {
  .prep-add-item:hover {
    color: var(--forest);
    outline: none;
  }
}

.hotel-grid {
  margin-bottom: 1rem;
}

.hotel {
  background: var(--cream);
  border: 1px solid var(--line);
  overflow: hidden;
  min-width: 0;
}

.hotel-media {
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 9rem;
  position: relative;
  overflow: hidden;
  background: color-mix(in srgb, #dcc7a8 70%, #f4ebe0) center / cover no-repeat;
  color: color-mix(in srgb, var(--brick, #8a4545) 55%, #8a7350);
}

.hotel-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hotel-media.is-empty {
  display: grid;
  place-items: center;
}

.hotel-media.is-empty svg {
  width: 4.2rem;
  height: 2.6rem;
  opacity: 0.85;
}

.hotel-card.is-view {
  display: grid;
  gap: 0;
  overflow: clip;
  border-radius: 1.25rem;
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  background: color-mix(in srgb, var(--cream) 70%, #fff);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 4%, transparent);
}

.hotel-media-frame {
  position: relative;
  margin: 0;
  min-width: 0;
}

.hotel-chip {
  position: absolute;
  z-index: 1;
  top: 0.7rem;
  left: 0.7rem;
  margin: 0;
  display: inline-flex;
  align-items: center;
  max-width: calc(100% - 1.4rem);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--cream) 88%, #fff);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  box-shadow: 0 1px 4px color-mix(in srgb, var(--ink) 12%, transparent);
  color: color-mix(in srgb, var(--ink) 72%, #5c4030);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.hotel-card.is-view .hotel-media {
  margin: 0;
  border-radius: 0;
  min-height: 10.5rem;
}

.hotel-card.is-view .hotel-body {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 1.05rem 1.15rem;
}

.hotel-card.is-view h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.15;
}

.hotel-address {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 0;
  color: color-mix(in srgb, var(--ink) 58%, #8a7350);
  font-size: 0.9rem;
  line-height: 1.35;
}

.hotel-address svg {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.12rem;
  color: color-mix(in srgb, var(--brick, #8a4545) 70%, #5c4030);
}

.hotel-address span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.hotel-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
}

.hotel-fact {
  min-width: 0;
  display: grid;
  gap: 0.15rem;
}

.hotel-fact small {
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 48%, #8a7350);
}

.hotel-fact strong {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.hotel-fact span {
  font-size: 0.88rem;
  color: color-mix(in srgb, var(--ink) 55%, #8a7350);
  font-variant-numeric: tabular-nums;
}

.hotel-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
}

.hotel-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex: 1 1 8.5rem;
  min-height: 2.65rem;
  margin: 0;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brick, #8a4545) 45%, transparent);
  background: transparent;
  color: color-mix(in srgb, var(--brick, #8a4545) 90%, #3d2418);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}

.hotel-action-btn svg {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}

@media (hover: hover) and (pointer: fine) {
  .hotel-action-btn:hover {
    background: color-mix(in srgb, var(--brick, #8a4545) 8%, #fff);
  }
}

.wb-hotel .hotel-body {
  display: grid;
  gap: 1rem;
}

.wb-hotel .hotel-body > .hotel-action-btn {
  justify-self: start;
  width: auto;
  flex: 0 0 auto;
  min-height: 2.75rem;
  margin: 0.15rem 0;
  padding: 0.7rem 1.2rem;
}

.hotel-booking-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0.15rem 0 0;
}

.hotel-file {
  margin: 0;
  max-width: 36rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.crew-file-grid {
  margin-bottom: 1rem;
}

.files-filter {
  display: grid;
  gap: 0.28rem;
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.files-filter-label {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.files-filter input {
  width: 100%;
  min-height: var(--tap);
  padding: 0.4rem 0.65rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.crew-file {
  background: var(--cream);
  border: 1px solid var(--line);
  min-width: 0;
}

.crew-file-body {
  padding: 1rem 1.05rem 1.2rem;
}

.crew-file h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 550;
}

.crew-file-desc {
  margin: 0.35rem 0 0;
  color: var(--ink);
  font-size: 0.92rem;
}

.crew-file-meta {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.files-limit,
.files-sensitive-hint,
.files-optional {
  color: var(--ink-soft);
  font-weight: 450;
}

.files-limit {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
}

.files-sensitive-hint {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.files-optional {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.78rem;
}

.files-type-set {
  margin: 0.75rem 0 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 0.4rem;
}

.files-type-set legend {
  padding: 0;
  font-size: 0.78rem;
  font-weight: 600;
}

.files-type-chips {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  margin: 0 0 0.85rem;
  -webkit-overflow-scrolling: touch;
}

.files-type-chip {
  appearance: none;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.files-type-chip.is-on {
  background: var(--forest-deep, #1e3a2f);
  border-color: var(--forest-deep, #1e3a2f);
  color: var(--cream, #f6f1e7);
}

.crew-file {
  display: grid;
  gap: 0.65rem;
  padding: 0.9rem 1rem 0.85rem;
}

.crew-file-open {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

.crew-file-icon {
  flex: 0 0 auto;
  display: inline-flex;
  width: 2.4rem;
  height: 2.4rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  color: var(--forest-deep, #1e3a2f);
  background: color-mix(in srgb, var(--forest, #2f5d45) 12%, #fff);
}

.crew-file-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.crew-file-copy {
  min-width: 0;
  flex: 1;
}

.crew-file-copy h3 {
  margin: 0;
}

.crew-file-type,
.crew-file-related,
.crew-file-desc {
  margin: 0.15rem 0 0;
  font-size: 0.84rem;
  line-height: 1.35;
}

.crew-file-type {
  color: var(--ink-soft);
}

.crew-file-related {
  color: var(--ink);
}

.crew-file-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.crew-file-menu-wrap {
  position: relative;
}

.crew-file-more {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  min-width: 2.25rem;
  min-height: 2.25rem;
  cursor: pointer;
}

.crew-file-menu[hidden] {
  display: none;
}

.crew-file-menu {
  position: absolute;
  right: 0;
  bottom: 2.2rem;
  z-index: 3;
  display: grid;
  min-width: 9.5rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--paper, #fff);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--ink) 12%, transparent);
}

.crew-file-menu button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  text-align: left;
  padding: 0.45rem 0.6rem;
  border-radius: 0.45rem;
  cursor: pointer;
}

.files-empty strong {
  display: block;
  margin-bottom: 0.35rem;
}

.files-related {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.files-related-value {
  appearance: none;
  width: 100%;
  min-height: var(--tap, 2.75rem);
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--paper, #fff);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
}

.files-related-picker {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.55rem;
}

.files-related-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
}

.files-related-search {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--paper, #fff);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.files-related-list {
  display: grid;
  max-height: 16.5rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--paper, #fff);
  overflow-anchor: none;
}

.files-related-row,
.files-related-back {
  appearance: none;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.35;
  text-align: left;
  padding: 0.95rem 1rem;
  cursor: pointer;
}

.files-related-row.is-on {
  background: color-mix(in srgb, var(--forest, #2f5d45) 12%, #fff);
}

.files-related-back {
  font-weight: 650;
  background: color-mix(in srgb, var(--ink) 4%, #fff);
}

.files-related-empty {
  margin: 0;
  padding: 0.65rem 0.75rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

#crew-file-desc {
  width: 100%;
  min-height: 4.5rem;
  resize: vertical;
}

.hotel-body {
  padding: 1rem 1.05rem 1.2rem;
}

.hotel-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brick);
}

.hotel-body h3 {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 4vw, 1.55rem);
  font-weight: 500;
  margin: 0.15rem 0 0.35rem;
}

.hotel-when {
  color: var(--forest);
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.hotel-body p {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-top: 0.35rem;
  overflow-wrap: anywhere;
}

.dress-list {
  display: grid;
  gap: 1.1rem;
}

.dress {
  background: var(--cream);
  border: 1px solid var(--line);
  overflow: hidden;
  min-width: 0;
}

.dress-body {
  padding: 1rem 1.05rem 1.05rem;
}

.dress-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brick);
}

.dress-body h3 {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 4vw, 1.55rem);
  font-weight: 500;
  margin: 0.15rem 0 0.35rem;
}

.dress-body p {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.dress-body .dress-when {
  color: var(--forest);
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.dress-body .dress-palette {
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  margin: 0 0 0.35rem;
}

.dress-models {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.dress-model {
  min-width: 0;
  margin: 0;
}

.dress-model + .dress-model {
  border-left: 1px solid var(--line);
}

.dress-model img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  display: block;
  background: var(--forest-deep);
}

.dress-model figcaption {
  padding: 0.55rem 0.75rem 0.8rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--ink-soft);
}

.dress-model figcaption b {
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--forest);
  font-size: 0.65rem;
}

.facts {
  margin: 0.8rem 0 0.4rem;
  display: grid;
  gap: 0.45rem;
}

.facts div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.2rem 0.5rem;
  font-size: 0.86rem;
}

.facts dt {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.hotel-nights {
  margin-top: 0.2rem;
}

.table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  background: var(--cream);
}

.sheet-table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  background: var(--cream);
  font-size: 0.88rem;
}

.sheet-table.hotel-nights {
  min-width: 28rem;
}

.sheet-table.food-table {
  min-width: 52rem;
}

.sheet-table th,
.sheet-table td {
  border: 1px solid var(--line);
  padding: 0.55rem 0.6rem;
  text-align: left;
  vertical-align: top;
}

.sheet-table th {
  background: var(--forest);
  color: var(--cream);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.exp-table-wrap {
  border: 1px solid var(--line);
  background: var(--cream);
  margin-bottom: 0.9rem;
}

.exp-table-head {
  padding: 0.85rem 0.9rem 0.15rem;
}

.exp-table-head p {
  margin-top: 0.25rem;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.exp-table-tools input.exp-filter {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Ccircle cx='7' cy='7' r='4.25' stroke='%231a1410' stroke-width='1.4'/%3E%3Cpath d='M10.2 10.2L13.25 13.25' stroke='%231a1410' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 0.7rem center;
  background-size: 0.95rem;
  padding-left: 2.15rem;
  padding-right: 0.7rem;
}

.settle-wrap {
  margin-top: 1.2rem;
}

.settle-wrap .owe-summary {
  border: 0;
  margin: 0;
  background: color-mix(in srgb, var(--gold-pale) 18%, var(--cream));
}

.settle-wrap .ledger-block {
  border: 1px solid var(--line);
  border-left: 3px solid var(--forest);
  margin: 0;
  overflow: hidden;
  background: var(--cream);
}

.settle-wrap .settle-empty {
  padding: 0.4rem 0.2rem 0.2rem;
}

.settle-wrap .settle-list .exp-table-empty {
  border: 0;
  padding: 0.4rem 0.2rem 0.2rem;
}

.settle-list {
  display: grid;
  gap: 0.8rem;
  padding: 0.8rem 0.8rem 0.95rem;
  background: color-mix(in srgb, var(--ink) 4.5%, var(--cream));
}

.settle-wrap .ledger-block .ledger-head {
  background: color-mix(in srgb, var(--forest) 9%, var(--cream));
}

.exp-table-empty {
  padding: 0.85rem 0.9rem 1.05rem;
  color: var(--ink-soft);
}

.exp-table-wrap .table-scroll {
  border: 0;
}

.exp-table-wrap.is-stack .stack-cards {
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.exp-table-wrap.is-stack .cost-card {
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  padding: 1rem 1rem 1.05rem;
  background: var(--paper);
}

.exp-table-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.55rem;
  padding: 0.7rem 0.8rem 0.75rem;
  background: color-mix(in srgb, var(--forest) 7%, var(--cream));
  border-bottom: 1px solid var(--line);
}

.exp-table-tools label {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.exp-table-tools .exp-filter {
  appearance: none;
  width: 100%;
  min-height: 2.35rem;
  padding: 0.35rem 1.85rem 0.35rem 0.7rem;
  border: 1px solid var(--line);
  background-color: var(--cream);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%231a1410' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round' d='M1.5 1.6L6 6.1l4.5-4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 0.72rem;
  color: var(--ink);
  font-size: 0.9rem;
  letter-spacing: 0;
  text-transform: none;
}

.exp-table-tools .exp-filter:focus {
  outline: 2px solid var(--forest);
  outline-offset: 2px;
}

.exp-traveler-pick {
  position: relative;
}

.exp-traveler-pick-btn {
  display: flex;
  align-items: center;
  text-align: left;
  cursor: pointer;
}

.exp-traveler-pick-menu {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 0.3rem);
  max-height: min(12.5rem, 36vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: #fff;
  box-shadow: 0 10px 28px rgba(26, 20, 16, 0.12);
}

.exp-traveler-pick-opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.7rem;
  border: 0;
  border-radius: 0.6rem;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.exp-traveler-pick-opt.is-on,
.exp-traveler-pick-opt:hover {
  background: color-mix(in srgb, var(--cream) 80%, #fff);
}

.exp-payto-pick {
  position: relative;
  z-index: 5;
}

.exp-payto-pick.is-open {
  z-index: 40;
}

.exp-payto-btn {
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: var(--tap);
  padding: 0.65rem 2rem 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%231a1410' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round' d='M1.5 1.6L6 6.1l4.5-4.5'/%3E%3C/svg%3E") no-repeat right 0.75rem center / 0.72rem;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}

.exp-payto-btn.is-placeholder {
  color: color-mix(in srgb, var(--ink) 45%, #fff);
}

.exp-payto-menu {
  position: static;
  left: auto;
  right: auto;
  top: auto;
  width: 100%;
  margin-top: 0.4rem;
  max-height: min(10.5rem, 28vh);
  background: #fff;
  background-color: #fff;
}

.exp-payto-pick .exp-payto-menu[hidden] {
  display: none !important;
}

.exp-payto-pick.is-open .exp-payto-menu {
  display: block !important;
}

.exp-payto-empty {
  margin: 0;
  padding: 0.55rem 0.7rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
  text-transform: none;
  letter-spacing: 0;
}

.settle-field.is-empty .exp-payto-btn {
  outline: 2px solid var(--brick);
  outline-offset: 2px;
  background-color: color-mix(in srgb, var(--lotus) 40%, var(--cream));
}

.exp-table-tools.is-group {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
  align-items: end;
  gap: 0.55rem 0.65rem;
}

.exp-table-tools.is-group input.exp-filter {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Ccircle cx='7' cy='7' r='4.25' stroke='%231a1410' stroke-width='1.4'/%3E%3Cpath d='M10.2 10.2L13.25 13.25' stroke='%231a1410' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 0.7rem center;
  background-size: 0.95rem;
  padding-left: 2.15rem;
  padding-right: 0.7rem;
}

.group-empty {
  color: var(--ink-soft);
  font-size: 0.92rem;
  padding: 0.8rem 0.2rem 1.2rem;
}

.sheet-table.exp-table {
  min-width: 42rem;
}

.sheet-table.exp-table th,
.sheet-table.exp-table td {
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 0.8rem;
  vertical-align: middle;
}

.sheet-table.exp-table thead th {
  padding: 0.62rem 0.8rem;
  letter-spacing: 0.1em;
}

.sheet-table.exp-table tbody tr:last-child td {
  border-bottom: 0;
}

@media (hover: hover) and (pointer: fine) {
  .sheet-table.exp-table tbody tr:hover td {
    background: color-mix(in srgb, var(--gold-pale) 28%, var(--cream));
  }
}

.sheet-table.exp-table .col-activity {
  font-weight: 500;
  min-width: 9rem;
}

.sheet-table.exp-table .col-notes {
  min-width: 8rem;
  max-width: 16rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
  white-space: normal;
  line-height: 1.35;
}

.sheet-table.exp-table .col-day {
  white-space: nowrap;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.sheet-table.exp-table .col-money {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sheet-table.exp-table .cost-code {
  display: inline;
  margin-left: 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.sheet-table.exp-table .col-actions {
  width: 1%;
  padding-left: 0.35rem;
  padding-right: 0.45rem;
}

.sheet-table tr.day-row td {
  background: var(--gold-pale);
  font-family: var(--serif);
  font-weight: 500;
}

.sheet-table .cash {
  color: var(--brick);
}

.sheet-table .prepaid {
  color: var(--forest);
}

.ledger-scope {
  margin: 0 0 0.75rem;
}

.ledger-scope .exp-table-tools {
  border: 1px solid var(--line);
}

.ledger-scope-note {
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.exp-hero {
  display: grid;
  gap: 0.85rem;
  margin: 0 0 0.9rem;
  padding: 1rem 1.05rem 0.95rem;
  border-radius: 1.15rem;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(26, 20, 16, 0.06);
  position: relative;
  z-index: 4;
  overflow: visible;
}

.exp-hero-kicker {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.exp-hero-kicker .stat-help {
  position: static;
}

.exp-hero-amount {
  margin: 0.2rem 0 0;
  font-family: var(--serif);
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  font-weight: 600;
  line-height: 1.1;
  color: #0ea5e9;
  font-variant-numeric: tabular-nums;
}

.exp-hero.is-budget .exp-hero-amount { color: #16a34a; }
.exp-hero.is-moderate .exp-hero-amount { color: #0ea5e9; }
.exp-hero.is-comfortable .exp-hero-amount { color: #8b5cf6; }
.exp-hero.is-luxury .exp-hero-amount { color: #ca8a04; }

.exp-hero-sub {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

/* Group total counts every cost; this line says how much of it is not booked yet. */
.exp-hero-notbooked {
  margin: 0.15rem 0 0;
  color: #9a5b12;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Country change reinterpreted a typed amount (¥10,000 → ₩10,000): say so next to it. */
.exp-currency-note {
  margin: 0.35rem 0 0;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  background: #fff4e0;
  color: #7a4a0c;
  font-size: 0.8rem;
  font-weight: 600;
}
.exp-currency-note[hidden] { display: none; }

.exp-hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding-top: 0.15rem;
  border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}

.exp-hero-metric {
  position: relative;
  min-width: 0;
}

.exp-hero-metric small {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.exp-hero-metric small i {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--brick);
}

.exp-hero-metric.is-additional small i {
  background: #0ea5e9;
}

.exp-hero-metric .stat-help {
  position: absolute;
  top: 0;
  right: 0;
}

.exp-hero-metric strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.exp-spend {
  display: grid;
  gap: 0.45rem;
}

.exp-spend-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.exp-spend-head span {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.exp-spend-head strong {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
}

.exp-spend-track {
  position: relative;
  height: 0.45rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e 0%, #0ea5e9 34%, #8b5cf6 68%, #d4af37 100%);
}

.exp-spend-track i {
  position: absolute;
  top: 50%;
  left: var(--p, 37%);
  width: 0.85rem;
  height: 0.85rem;
  margin: -0.42rem 0 0 -0.42rem;
  border-radius: 50%;
  background: #fff;
  border: 2px solid color-mix(in srgb, var(--ink) 55%, transparent);
  box-shadow: 0 2px 8px rgba(26, 20, 16, 0.18);
}

.exp-spend-scale {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.exp-spend-scale li {
  margin: 0;
  font-size: 0.62rem;
  color: var(--ink-soft);
  text-align: center;
}

.exp-spend-scale li.is-on {
  color: var(--ink);
  font-weight: 700;
}

.exp-spend-note {
  margin: 0;
  font-size: 0.72rem;
  color: var(--ink-soft);
  text-align: center;
}

.exp-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 0 0 0.85rem;
  padding: 0.85rem;
  border-radius: 1rem;
  background: color-mix(in srgb, var(--cream) 70%, #fff);
  border: 1px solid var(--line);
}

.exp-filters.is-group-only {
  grid-template-columns: 1fr 1fr;
}

.exp-filters label > span {
  display: block;
  margin-bottom: 0.28rem;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 700;
}

.exp-day-head {
  margin: 0 0 0.55rem;
}

.exp-day-head h3 {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.exp-cost-card {
  display: grid;
  gap: 0.65rem;
}

.exp-cost-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
}

.exp-cost-head .stack-kicker {
  margin: 0;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--brick) 75%, var(--ink));
}

.exp-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex: 0 0 auto;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.exp-status-badge.is-booked,
.exp-status-badge.is-paid {
  background: color-mix(in srgb, #22c55e 16%, #fff);
  color: #15803d;
}

.exp-status-badge.is-due {
  background: color-mix(in srgb, #ef4444 14%, #fff);
  color: #b91c1c;
}

.exp-status-badge.is-pending {
  background: color-mix(in srgb, #f59e0b 16%, #fff);
  color: #b45309;
}

.exp-status-badge.is-note {
  background: color-mix(in srgb, var(--ink) 8%, #fff);
  color: var(--ink-soft);
}

.exp-cost-main {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
}

.exp-cost-ico {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--cream) 85%, #fff);
  color: var(--forest-deep);
  border: 1px solid var(--line);
}

.exp-cost-ico svg {
  width: 1.2rem;
  height: 1.2rem;
}

.exp-cost-copy {
  min-width: 0;
  overflow: hidden;
}

.exp-cost-copy h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.exp-cost-sub {
  display: grid;
  gap: 0.15rem;
  margin: 0.2rem 0 0;
  min-width: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.35;
}

.exp-cost-sub .stack-notes-body,
.exp-cost-sub .cell-text {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.exp-cost-sub .stack-notes-body.is-clamped .cell-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.exp-cost-sub .stack-note-link {
  color: #0ea5e9;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.exp-see-more {
  appearance: none;
  display: block;
  width: 100%;
  margin: 0.35rem 0 0;
  padding: 0.7rem 0.85rem;
  border: 0;
  background: transparent;
  color: color-mix(in srgb, var(--forest) 80%, #0ea5e9);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  text-align: center;
  cursor: pointer;
}

.totals {
  margin-bottom: 0.9rem;
  overflow: visible;
  position: relative;
  z-index: 4;
}

.stat {
  position: relative;
  background: var(--forest);
  color: var(--cream);
  padding: 0.75rem 0.85rem;
  min-width: 0;
  overflow: visible;
}

.stat.is-expenses {
  background: var(--brick);
}

.stat.is-additional {
  background: var(--forest);
  padding-right: 1.7rem; /* room for help ? */
  overflow: visible;
}

.stat.is-additional.is-help-open {
  z-index: 14;
}

.stat.stat-grand {
  background: var(--ink);
}

.stat.stat-grand.is-budget {
  background: #22c55e;
  color: #0b1f12;
}

.stat.stat-grand.is-moderate {
  background: #0ea5e9;
  color: #062033;
}

.stat.stat-grand.is-comfortable {
  background: #8b5cf6;
  color: #f7f1e6;
}

.stat.stat-grand.is-luxury {
  background: #d4af37;
  color: #1a1410;
}

.stat-grand {
  position: relative;
  z-index: 1;
  overflow: visible;
}

.stat.is-help-open,
.stat-grand:has(.stat-help.is-open) {
  z-index: 12;
}

.stat-help {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 2;
}

.stat-help.is-open {
  z-index: 20;
}

.stat-help-btn {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, currentColor 50%, transparent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  color: inherit;
  background: color-mix(in srgb, currentColor 12%, transparent);
}

.stat-help-tip {
  display: none;
  position: absolute;
  z-index: 40;
  top: calc(100% + 0.45rem);
  right: 0;
  width: min(18rem, calc(100vw - 1.5rem));
  max-width: calc(100vw - 1.5rem);
  padding: 0.75rem 0.85rem 0.85rem;
  border-radius: 0.7rem;
  background: #1a1410;
  color: #fffaf4;
  border: 1px solid color-mix(in srgb, #fffaf4 22%, transparent);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 450;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.stat-help-tip p {
  margin: 0;
}

.stat-help-tip p + p {
  margin-top: 0.55rem;
}

.stat.is-additional .stat-help-tip {
  right: auto;
  left: 50%;
  transform: translateX(-50%);
  width: min(19rem, calc(100vw - 1.25rem));
}

.stat-help.is-open .stat-help-tip {
  display: block;
}

@media (hover: hover) and (pointer: fine) {
  .stat-help:hover .stat-help-tip {
    display: block;
  }
}

.budget-legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  list-style: none;
  margin: 0 0 0.25rem;
}

.budget-legend li {
  min-width: 0;
  text-align: center;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0.55;
}

.budget-legend li.is-on {
  opacity: 1;
  color: var(--ink);
  font-weight: 600;
}

.budget-legend i {
  display: block;
  height: 0.42rem;
  margin-bottom: 0.28rem;
  border-radius: 99px;
}

.budget-legend small {
  display: block;
  margin-top: 0.08rem;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
  opacity: 0.8;
  line-height: 1.25;
  font-size: 0.95em;
}

.budget-legend .is-budget i {
  background: #22c55e;
}

.budget-legend .is-moderate i {
  background: #0ea5e9;
}

.budget-legend .is-comfortable i {
  background: #8b5cf6;
}

.budget-legend .is-luxury i {
  background: #d4af37;
}

.budget-legend li.is-on i {
  box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 35%, transparent);
}

.budget-now {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.7rem;
}

.stat small {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}

.stat strong {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 4vw, 1.25rem);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.stat em {
  display: block;
  margin-top: 0.15rem;
  font-style: normal;
  font-size: 0.78rem;
  opacity: 0.78;
}

.fx-rate {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.45rem;
}

html:not(.has-fx) .fx-face {
  display: none !important;
}

html:not(.has-fx) .settle-convert:not(#group-cost-pair) {
  grid-template-columns: 1fr;
}

/* Segmented control — equal halves on one row. */
.pills {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--sp-1);
  min-width: 0;
  margin: 0.4rem 0 0;
}

.pills > * {
  flex: 1 1 0;
  min-width: 0;
}

.ledger-filters {
  margin-bottom: 0.9rem;
  align-items: end;
}

.settle-search {
  display: grid;
  gap: 0.35rem;
  grid-column: 1 / -1;
  min-width: 0;
}

.settle-search input {
  width: 100%;
  min-height: var(--tap);
  border: 1px solid var(--line);
  background: var(--cream);
  padding: 0.45rem 0.75rem;
  font-size: 1rem;
}

.settle-empty {
  color: var(--ink-soft);
  font-size: 0.92rem;
  padding: 0.8rem 0.2rem 1.2rem;
}

.filter-label {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}

.owe-summary {
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 1rem 1.05rem 1.15rem;
  margin-bottom: 0.9rem;
}

.owe-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brick);
}

.owe-summary > h3 {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 6vw, 2.1rem);
  font-weight: 500;
  margin: 0.15rem 0 0.25rem;
}

.owe-summary > p {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}

.owe-who {
  border-top: 1px solid var(--line);
  padding-top: 0.7rem;
  margin-top: 0.7rem;
}

.owe-who header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 0.5rem 0.8rem;
  margin-bottom: 0.45rem;
}

.owe-who small {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.owe-who h4 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
}

.owe-who header > span {
  font-size: 0.82rem;
  color: var(--brick);
}

.owe-who ul {
  list-style: none;
}

.owe-who li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.8rem;
  align-items: baseline;
  padding: 0.45rem 0.45rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}

.owe-who li.is-due {
  background: color-mix(in srgb, #dc2626 8%, transparent);
}

.owe-who li.is-paid {
  background: color-mix(in srgb, #16a34a 10%, transparent);
}

.owe-what {
  flex: 1 1 10rem;
  min-width: 0;
  font-weight: 500;
}

.owe-who em {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.owe-who li b {
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}

.owe-who li small {
  flex: 0 0 auto;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.62rem;
  font-weight: 700;
}

.owe-who li.is-due small {
  color: #dc2626;
}

.owe-who li.is-paid small {
  color: #16a34a;
}

.pills button {
  min-height: var(--tap);
  border: 1px solid var(--line);
  background: var(--cream);
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
}

.pills button.is-on {
  background: var(--ink);
  color: var(--cream);
}

.ledger-block {
  background: var(--cream);
  border: 1px solid var(--line);
  margin-bottom: 0.55rem;
  min-width: 0;
}

.cell-text {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.stack-cards {
  list-style: none;
  display: grid;
  gap: 0.55rem;
  margin: 0 0 0.75rem;
}

.cost-card {
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 0.75rem 0.85rem 0.85rem;
  min-width: 0;
}

@keyframes new-flash {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 80%, transparent);
    background: color-mix(in srgb, var(--gold) 28%, var(--cream));
  }
  45% {
    box-shadow: 0 0 0 12px color-mix(in srgb, var(--gold) 0%, transparent);
    background: color-mix(in srgb, var(--gold-pale) 80%, var(--cream));
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
    background: var(--cream);
  }
}

.cost-card.is-new,
.ledger-block.is-new,
.list-card.is-new,
.check-row.is-new,
.list-card.is-edited,
.check-row.is-edited,
.know.is-edited {
  position: relative;
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  background: color-mix(in srgb, var(--gold-pale) 48%, var(--cream));
  z-index: 1;
}

.cost-card.is-fresh,
.ledger-block.is-fresh,
.list-card.is-fresh,
.check-row.is-fresh,
.know.is-fresh {
  z-index: 2;
  animation: new-flash 1.05s ease-out 2;
}

.cost-card.is-new::before,
.ledger-block.is-new::before,
.list-card.is-new::before,
.check-row.is-new::before {
  content: "New";
  position: absolute;
  top: 0.45rem;
  right: 0.5rem;
  z-index: 3;
  background: var(--gold);
  color: var(--forest-deep);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.18rem 0.42rem;
  pointer-events: none;
}

.list-card.is-edited:not(.is-new)::before,
.check-row.is-edited:not(.is-new)::before,
.know.is-edited::before {
  content: "Edited";
  position: absolute;
  top: 0.45rem;
  right: 0.5rem;
  z-index: 3;
  background: var(--gold);
  color: var(--forest-deep);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.18rem 0.42rem;
  pointer-events: none;
}

.ledger-block.is-new .ledger-toggle {
  background: color-mix(in srgb, var(--gold) 22%, var(--cream));
  padding-right: 3.4rem;
}

.cost-card.is-new,
.list-card.is-new,
.list-card.is-edited,
.check-row.is-new,
.check-row.is-edited {
  padding-right: 3.6rem;
}

.check-row.is-empty {
  position: relative;
  outline: 2px solid var(--brick);
  outline-offset: 2px;
  background: color-mix(in srgb, var(--lotus) 40%, var(--cream));
  padding-right: 5.2rem;
  z-index: 2;
}

.check-row.is-empty::before {
  content: "Required";
  position: absolute;
  top: 0.45rem;
  right: 0.5rem;
  z-index: 4;
  background: var(--brick);
  color: var(--cream);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.18rem 0.42rem;
  pointer-events: none;
}

.sheet-table tr.is-new td,
.sheet-table tr.is-edited td {
  background: color-mix(in srgb, var(--gold-pale) 62%, var(--cream));
}

.sheet-table tr.is-new td:first-child,
.sheet-table tr.is-edited td:first-child {
  box-shadow: inset 4px 0 0 var(--gold);
}

.sheet-table tr.is-empty td {
  background: color-mix(in srgb, var(--lotus) 40%, var(--cream));
}

.sheet-table tr.is-empty td:first-child {
  box-shadow: inset 4px 0 0 var(--brick);
}

.sheet-table tr.is-fresh td {
  animation: new-flash 1.05s ease-out 2;
}

@media (prefers-reduced-motion: reduce) {
  .cost-card.is-fresh,
  .ledger-block.is-fresh,
  .list-card.is-fresh,
  .check-row.is-fresh,
  .know.is-fresh,
  .sheet-table tr.is-fresh td {
    animation: none;
  }
}

.cost-card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.12rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
  margin: 0 0 0.75rem;
}

.stack-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brick);
  margin: 0 0 0.35rem;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.stack-line.stack-notes .cell-text {
  white-space: pre-wrap;
  color: var(--ink);
}

.stack-notes-body.is-clamped .cell-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.stack-notes-more {
  appearance: none;
  margin: 0.2rem 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--forest);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.stack-note-link {
  color: var(--forest);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.12em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sheet-table.exp-table .col-notes-wrap {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.stack-line {
  display: grid;
  gap: 0.22rem;
  margin: 0;
  min-width: 0;
  font-size: 0.95rem;
  line-height: 1.35;
}

.stack-line small {
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.cost-meta {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}

.cost-money {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.55rem;
  margin: 0;
  padding: 0.7rem 0.65rem;
  background: color-mix(in srgb, var(--forest) 6%, var(--cream));
  border: 1px solid color-mix(in srgb, var(--forest) 10%, transparent);
}

.cost-money.is-stack {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.7fr) minmax(0, 1.2fr);
  gap: 0;
}

.cost-money.is-stack label {
  padding: 0 0.55rem;
  border-left: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}

.cost-money.is-stack label:first-child {
  padding-left: 0.15rem;
  border-left: 0;
}

.cost-money.is-stack label:last-child {
  padding-right: 0.15rem;
}

.cost-money label {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.cost-money .cell-text {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.cost-money label.is-total .cell-text {
  font-weight: 600;
  color: var(--forest);
  font-size: 1.1rem;
}

.sheet-table.exp-table .col-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cost-card input,
.stack-kicker input,
.stack-line input,
.cost-card h3 input {
  width: 100%;
  min-height: var(--tap);
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0.4rem 0.5rem;
  font-size: 1rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
}

.cost-card h3 input {
  font-family: var(--serif);
  font-size: 1.05rem;
}

.exp-row-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.1rem;
  align-items: center;
  /* was width: max-content, which forces the intrinsic width onto the parent
     and pushed the whole card wider than the viewport */
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.exp-row-actions::-webkit-scrollbar {
  display: none;
}

.exp-row-actions > * {
  flex: 0 0 auto;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--btn-radius);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}

.icon-btn svg {
  width: 1.15rem;
  height: 1.15rem;
  max-width: none;
  flex-shrink: 0;
  display: block;
}

.icon-btn:focus-visible {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
}

.icon-btn.is-settle:focus-visible {
  color: var(--forest);
}

.icon-btn.is-settle.is-on {
  color: var(--forest);
  background: color-mix(in srgb, var(--forest) 12%, var(--cream));
  border-color: var(--line);
}

.icon-btn.is-danger:focus-visible {
  color: var(--brick);
}

@media (hover: hover) and (pointer: fine) {
  .icon-btn:hover {
    background: var(--paper);
    color: var(--ink);
    border-color: var(--line);
  }

  .icon-btn.is-settle:hover {
    color: var(--forest);
  }

  .icon-btn.is-danger:hover {
    color: var(--brick);
  }
}

.sheet-table .col-actions {
  width: 1%;
  white-space: nowrap;
  padding-left: 0.45rem;
  padding-right: 0.45rem;
}

.cost-card .exp-row-actions {
  width: 100%;
  margin-top: 0.65rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--line);
}

.ledger-toggle {
  display: none;
}

.ledger-block .ledger-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--forest) 9%, var(--cream));
}

.ledger-head-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem 1rem;
}

.ledger-head-copy {
  min-width: 0;
  flex: 1;
}

.ledger-block .ledger-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.ledger-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}

.ledger-block.is-past-due {
  box-shadow: inset 3px 0 0 #e11d48;
}

.ledger-block.is-current-due {
  box-shadow: inset 3px 0 0 #d97706;
}

.settle-due-flag {
  display: block;
  margin-top: 0.2rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.settle-due-flag.is-past,
.ledger-toggle small.settle-due-flag.is-past,
.ledger-facts li.settle-due-flag.is-past span {
  color: #be123c;
}

.settle-due-flag.is-current,
.ledger-toggle small.settle-due-flag.is-current,
.ledger-facts li.settle-due-flag.is-current span {
  color: #b45309;
}

.ledger-facts li {
  min-width: 0;
  font-size: 0.88rem;
  line-height: 1.3;
}

.ledger-facts span {
  display: block;
  margin-bottom: 0.08rem;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.ledger-block .ledger-head .exp-row-actions {
  flex-shrink: 0;
}

.ledger-head .settle-later-row {
  display: grid;
  gap: 0.3rem;
  padding: 0.55rem 0 0;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
}

.ledger-head .settle-later-row .ledger-facts {
  margin: 0;
}

.ledger-fact-receipt button {
  margin-top: 0.15rem;
}

.ledger-head .settle-later-row .fx-disclaimer {
  flex: none;
  margin: 0;
  font-size: 0.72rem;
}

/* Tinted bar — wrapping visibly grew the gold surface. */
.apply-all {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--sp-2);
  align-items: center;
  min-width: 0;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--gold-pale) 22%, var(--cream));
}

.apply-all > button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.apply-all .cost-entry {
  width: min(100%, 14rem);
  flex: 1 1 auto;
  min-width: 0;
}

.apply-all .cost-entry input,
.ledger-block .cost-entry input,
.ledger-block .cost-entry input:not([readonly]) {
  width: 100%;
  border: 0;
  background: transparent;
  min-height: calc(var(--tap) - 2px);
}

.person .cost-entry {
  margin: 0.25rem 0 0.3rem;
}

.person .cost-entry .input-amt {
  margin: 0;
}

.person .cost-entry.is-balance {
  margin-top: 0.15rem;
}

.person .cell-text.is-balance {
  display: block;
  margin-top: 0.15rem;
  color: #dc2626;
  font-weight: 700;
}

.person {
  padding: 0.7rem 0.75rem 0.85rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  min-width: 0;
}

.person.paid {
  background: color-mix(in srgb, #16a34a 10%, var(--cream));
}
.person.due {
  background: color-mix(in srgb, #dc2626 8%, var(--cream));
}

.pay-switch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: var(--tap);
  margin-top: 0.2rem;
  cursor: pointer;
  user-select: none;
}

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

.pay-track {
  width: 2.45rem;
  height: 1.28rem;
  border-radius: 99px;
  background: #dc2626; /* Due = red */
  position: relative;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #991b1b 25%, transparent);
}

.pay-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--cream);
  transition: transform 0.16s ease;
}

.pay-switch input:checked + .pay-track {
  background: #16a34a; /* Paid = green */
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #166534 25%, transparent);
}

.pay-switch input:checked + .pay-track::after {
  transform: translateX(1.15rem);
}

.due-lbl,
.paid-lbl {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.person.due .due-lbl {
  color: #dc2626;
  font-weight: 700;
}

.due-lbl.has-bal,
.pay-status.has-bal {
  text-transform: none;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.person.paid .paid-lbl {
  color: #16a34a;
  font-weight: 700;
}

.pay-status {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.person.paid .pay-status {
  color: #16a34a;
  font-weight: 700;
}

.person.due .pay-status {
  color: #dc2626;
  font-weight: 700;
}

.person.is-collect .pay-status,
.pay-status.is-collect {
  color: #0f766e;
  font-weight: 700;
}

/* Panel-head toolbar. The Hotel sheet's three controls total ~340px, so this
   wrapped on every phone visit. Scrolls instead of stacking. */
.exp-toolbar {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--sp-2);
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.exp-toolbar::-webkit-scrollbar {
  display: none;
}

.exp-toolbar > * {
  flex: 0 0 auto;
}

#panel-expenses[hidden] .exp-fab-wrap,
#panel-prep[hidden] .exp-fab-wrap,
#panel-food[hidden] .exp-fab-wrap,
#panel-detail[hidden] .exp-fab-wrap,
#panel-itinerary[hidden] .exp-fab-wrap,
#panel-emergency[hidden] .exp-fab-wrap,
#panel-hotel[hidden] .exp-fab-wrap,
#panel-files[hidden] .exp-fab-wrap {
  display: none;
}

#panel-expenses:has(.exp-fab-wrap),
#panel-prep:has(.exp-fab-wrap),
#panel-food:has(.exp-fab-wrap),
#panel-detail:has(.exp-fab-wrap),
#panel-itinerary:has(.exp-fab-wrap),
#panel-emergency:has(.exp-fab-wrap),
#panel-hotel:has(.exp-fab-wrap),
#panel-files:has(.exp-fab-wrap) {
  padding-bottom: 5.75rem;
}

#panel-expenses:has(.exp-fab-save:not([hidden])),
#panel-prep:has(.exp-fab-save:not([hidden])),
#panel-prep:has(.exp-fab-undo),
#panel-food:has(.exp-fab-save:not([hidden])),
#panel-food:has(.exp-fab-undo),
#panel-detail:has(.exp-fab-save:not([hidden])),
#panel-detail:has(.exp-fab-undo),
#panel-itinerary:has(.exp-fab-save:not([hidden])),
#panel-itinerary:has(.exp-fab-undo),
#panel-emergency:has(.exp-fab-save:not([hidden])),
#panel-emergency:has(.exp-fab-undo),
#panel-emergency:has(.exp-fab-add) {
  padding-bottom: 9.75rem;
}

#panel-itinerary:has(.exp-fab-export) {
  padding-bottom: 9.75rem;
}

#panel-itinerary:has(.exp-fab-export):has(.exp-fab-undo),
#panel-itinerary:has(.exp-fab-export):has(.exp-fab-save:not([hidden])) {
  padding-bottom: 13.5rem;
}

#panel-emergency:has(.exp-fab-add) {
  padding-bottom: 12.5rem;
}

#panel-prep:has(.exp-fab-add-action),
#panel-hotel:has(.exp-fab-add-action) {
  padding-bottom: 13.5rem;
}

#panel-food:has(.exp-fab-lakbi) {
  padding-bottom: 16.75rem;
}

.exp-fab-wrap {
  position: fixed;
  left: auto;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 18;
  max-width: calc(100vw - 6.5rem);
}

.exp-fab-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.exp-fab-add {
  position: relative;
}

.exp-fab-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background: rgba(19, 37, 30, 0.42);
  border: 0;
  cursor: pointer;
}

.exp-fab-wrap.is-open .exp-fab-scrim {
  display: block;
}

.exp-fab-menu {
  display: none;
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.5rem);
  z-index: 1;
  /* Bounded so the panel cannot leave a narrow viewport, and scrollable in
     short landscape rather than overflowing off-screen. */
  min-width: min(14rem, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  max-height: min(60dvh, 22rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.35rem;
  background: var(--cream);
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(19, 37, 30, 0.24);
}

.exp-fab-wrap.is-open .exp-fab-menu {
  display: grid;
  gap: 0.2rem;
}

.exp-fab-menu button {
  min-height: var(--tap);
  padding: 0.55rem 0.85rem;
  text-align: left;
  font-size: 0.95rem;
  background: transparent;
}

.exp-fab-menu button:active {
  background: color-mix(in srgb, var(--gold-pale) 50%, var(--cream));
}

@media (hover: hover) and (pointer: fine) {
  .exp-fab-menu button:hover {
    background: color-mix(in srgb, var(--gold-pale) 50%, var(--cream));
  }
}

.exp-fab {
  position: relative;
  z-index: 1;
  width: 3.45rem;
  height: 3.45rem;
  border-radius: 50%;
  background: var(--forest);
  color: var(--gold-pale);
  font-size: 2.05rem;
  line-height: 1;
  box-shadow: 0 8px 22px rgba(19, 37, 30, 0.38);
}

@media (hover: hover) and (pointer: fine) {
  .exp-fab:hover {
    background: var(--forest-deep);
  }
}

.exp-fab span {
  display: block;
  transition: transform 0.16s ease;
}

.exp-fab-wrap.is-open .exp-fab span {
  transform: rotate(45deg);
}

.exp-fab-ico {
  display: inline-flex;
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 auto;
}

.exp-fab-ico svg {
  width: 100%;
  height: 100%;
  display: block;
}

.exp-fab-export {
  width: 3.45rem;
  min-width: 3.45rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.exp-fab-export:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.exp-fab-stack .exp-fab-export .exp-fab-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.exp-fab-edit,
.exp-fab-save,
.exp-fab-undo,
.exp-fab-add-file {
  width: auto;
  min-width: 3.45rem;
  padding: 0 0.95rem;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.exp-fab-add-file {
  background: var(--fab-bg);
  color: var(--cream);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: none;
}

.exp-fab-add-file:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.exp-fab-lakbi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: auto;
  min-width: 3.45rem;
  height: 3.45rem;
  padding: 0 0.9rem 0 0.55rem;
  border-radius: 999px;
  background: var(--cream);
  color: var(--forest);
  border: 1px solid var(--forest);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: none;
}

.exp-fab-lakbi > span {
  display: inline-flex;
  align-items: center;
  transform: none;
}

.exp-fab-lakbi .wb-draft-ask-face-wrap,
.exp-fab-lakbi .wb-draft-ask-face {
  width: 1.45rem;
  height: 1.45rem;
  flex: 0 0 1.45rem;
  border-radius: 999px;
}

.exp-fab-lakbi .exp-fab-label {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: none;
}

.exp-fab-upload {
  background: var(--cream);
  color: var(--forest);
  border: 1px solid var(--forest);
}

.exp-fab-upload .exp-fab-ico,
.exp-fab-upload .exp-fab-ico svg {
  display: block;
  width: 1.45rem;
  height: 1.45rem;
  margin: 0 auto;
}

.exp-fab-save {
  background: var(--brick);
  color: var(--cream);
}

@media (hover: hover) and (pointer: fine) {
  .exp-fab-save:hover {
    background: color-mix(in srgb, var(--brick) 82%, #1a1410);
  }
}

.exp-fab-undo {
  background: var(--cream);
  color: var(--forest);
  border: 1px solid var(--forest);
}

@media (hover: hover) and (pointer: fine) {
  .exp-fab-undo:hover {
    background: color-mix(in srgb, var(--gold-pale) 45%, var(--cream));
  }
}

.exp-fab-undo:disabled {
  opacity: 0.42;
}

.exp-fab[hidden] {
  display: none;
}

.exp-dirty,
.exp-toast {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.exp-dirty {
  color: var(--brick);
}

.exp-toast {
  color: var(--forest);
  display: inline-block;
  box-sizing: border-box;
  max-width: min(100%, 16rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

/* Warnings wrap in full instead of ellipsing mid-sentence. */
.exp-toast.is-warn {
  max-width: min(100%, 26rem);
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
}

.exp-toast.is-warn {
  max-width: min(100%, 26rem);
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
}

.btn-solid,
.btn-quiet {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: var(--tap);
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.15;
  border: 1px solid var(--line);
  border-radius: var(--btn-radius);
  cursor: pointer;
  vertical-align: middle;
  transition: background-color var(--btn-ease), border-color var(--btn-ease), color var(--btn-ease), transform var(--btn-ease);
}

.btn-solid {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

.btn-danger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: var(--tap);
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.15;
  border: 1px solid var(--brick);
  border-radius: var(--btn-radius);
  cursor: pointer;
  vertical-align: middle;
  background: var(--brick);
  color: var(--cream);
  transition: background-color var(--btn-ease), border-color var(--btn-ease), color var(--btn-ease), transform var(--btn-ease);
}

@media (hover: hover) and (pointer: fine) {
  .btn-danger:hover {
    background: color-mix(in srgb, var(--brick) 82%, #1a1410);
    border-color: color-mix(in srgb, var(--brick) 82%, #1a1410);
    color: var(--cream);
  }
}

.btn-quiet {
  background: var(--cream);
  color: var(--ink);
}

/* Anchors use the same classes as <button> — keep color/underline reset */
a.btn-solid,
a.btn-quiet,
a.btn-solid:visited,
a.btn-quiet:visited,
a.btn-solid:active,
a.btn-quiet:active {
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  a.btn-solid:hover,
  a.btn-quiet:hover {
    text-decoration: none;
  }
}

a.btn-solid,
a.btn-solid:visited {
  color: var(--cream);
}

a.btn-quiet,
a.btn-quiet:visited {
  color: var(--ink);
}

.add-row {
  margin: 0.55rem 0 1rem;
}

.food-edit-actions,
.food-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-start;
  margin: 0 0 0.85rem;
}

.food-edit-actions .add-row,
.food-add-btn {
  margin: 0;
  width: auto;
  min-height: var(--tap);
  padding: 0.35rem 0.9rem;
}

.food-edit-actions .wb-draft-ask,
#panel-food .btn-quiet.wb-draft-ask.food-ask-lakbi {
  margin: 0;
  width: auto;
  max-width: none;
  min-height: var(--tap);
  padding: 0.3rem 0.85rem 0.3rem 0.65rem;
  gap: 0.45rem;
  flex: 0 0 auto;
  box-shadow: 0 4px 12px rgba(19, 37, 30, 0.14);
}

#panel-food .food-ask-lakbi .wb-draft-ask-face-wrap,
#panel-food .food-ask-lakbi .wb-draft-ask-face {
  width: 1.4rem;
  height: 1.4rem;
  flex-basis: 1.4rem;
}

.food-panel-head {
  margin-bottom: 0.65rem;
}

.food-lakbi-slot {
  margin: 0 0 0.75rem;
  max-width: min(28rem, 100%);
}

.food-lakbi-slot .lakbi-draft-talk {
  margin: 0;
  max-width: 100%;
}

.food-empty-hint {
  margin: 0 0 0.85rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.4;
}

.food-empty-card {
  margin: 0 0 0.75rem;
}

.food-table-wrap {
  margin-bottom: 0.35rem;
}

.food-cards {
  margin-bottom: 0.35rem;
  gap: 0.85rem;
}

.food-card {
  display: grid;
  gap: 0.7rem;
}

.food-card.is-view {
  padding: 1rem 1.05rem 1.05rem;
  border-radius: 1.2rem;
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  background: color-mix(in srgb, var(--cream) 72%, #fff);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 4%, transparent);
}

.food-card .food-kicker,
.food-card .stack-kicker {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--brick, #8a4545) 82%, #5c4030);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.food-card.is-view h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.15;
}

.food-meta-view {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 0.65rem 1rem;
}

.food-meta-cell {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.food-meta-cell small {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 48%, #8a7350);
}

.food-meta-cell strong {
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.3;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.food-meta-cell:last-child strong {
  color: color-mix(in srgb, var(--brick, #8a4545) 78%, #5c4030);
  font-weight: 600;
}

.food-card-field {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.food-card-field > span {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.28rem 0.35rem;
}

.sheet-table th .wb-req {
  color: var(--gold-pale);
}

.food-card-field input,
.food-card-field select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: 2.35rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  letter-spacing: 0;
  text-transform: none;
}

.food-card-field.is-name input {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
}

.food-card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.food-card-meta-view {
  display: grid;
  gap: 0.35rem;
}

.food-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.food-schedule-label {
  margin: 0;
  padding: 0.7rem 0.8rem;
  border-radius: 0.9rem;
  background: color-mix(in srgb, var(--gold, #c9a96a) 14%, #fff);
  border: 1px solid color-mix(in srgb, var(--gold, #c9a96a) 28%, transparent);
}

.food-schedule-label-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--brick, #8a4545) 70%, #5c4030);
}

.food-schedule-label ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.food-schedule-label li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.3rem 0.75rem;
  align-items: baseline;
  font-size: 0.92rem;
  color: var(--ink);
}

.food-schedule-label li strong {
  font-weight: 700;
}

.food-schedule-label li span {
  color: color-mix(in srgb, var(--ink) 58%, #8a7350);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.food-row-actions .food-schedule-label {
  width: 100%;
  margin: 0 0 0.35rem;
}

.food-map-btn,
.food-edit-btn,
.food-card .food-schedule-btn,
.food-card-actions .food-schedule-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex: 1 1 8.5rem;
  min-height: 2.65rem;
  margin: 0;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brick, #8a4545) 45%, transparent);
  background: transparent;
  color: color-mix(in srgb, var(--brick, #8a4545) 90%, #3d2418);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}

.food-map-btn svg {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}

.food-card .food-schedule-btn,
.food-card-actions .food-schedule-btn {
  background: color-mix(in srgb, var(--brick, #8a4545) 92%, #3d2418);
  border-color: transparent;
  color: #fffaf4;
}

.ask-lakbi-food-geo {
  margin: 0 0 0.75rem;
}

.ask-lakbi-food-geo .wb-field,
.ask-lakbi-food-geo .geo-field {
  margin: 0;
}

@media (hover: hover) and (pointer: fine) {
  .food-map-btn:hover,
  .food-edit-btn:hover {
    background: color-mix(in srgb, var(--brick, #8a4545) 8%, #fff);
  }

  .food-card .food-schedule-btn:hover,
  .food-card-actions .food-schedule-btn:hover {
    filter: brightness(1.05);
  }
}

.food-geo .wb-field {
  margin: 0;
}

.food-table .wb-field > span,
.food-table .food-card-field > span {
  display: none;
}

.food-table .wb-field.is-unlabeled {
  gap: 0;
}

.food-geo-cell {
  min-width: 12rem;
  vertical-align: top;
}

.food-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  justify-content: flex-end;
}

#panel-food [data-geo-root].is-invalid [data-geo-input] {
  border-color: color-mix(in srgb, var(--brick) 55%, var(--line));
}

#panel-food [data-geo-root].is-invalid [data-geo-status] {
  color: var(--brick);
}

.food-card.is-empty {
  border-color: color-mix(in srgb, var(--brick) 45%, var(--line));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brick) 18%, transparent);
}

@media (max-width: 47.99rem) {
  .food-edit-actions,
  .food-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .food-edit-actions .wb-draft-ask,
  .food-edit-actions .add-row,
  .food-toolbar .food-ask-lakbi,
  .food-toolbar .food-add-btn {
    width: auto;
    flex: 0 0 auto;
    justify-content: center;
  }

  .food-card-meta {
    grid-template-columns: 1fr;
  }

  #panel-food {
    padding-bottom: 5.5rem;
  }
}

.hint-inline {
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.cash-edit {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.55rem;
  align-items: center;
  min-width: 0;
  margin: 0 0 0.8rem;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.cash-edit input {
  width: min(100%, 12rem);
  min-height: var(--tap);
  text-transform: none;
  letter-spacing: 0;
}

.sheet-table input,
.sheet-table select,
.ledger-block input,
.cash-edit input {
  width: 100%;
  min-height: var(--tap);
  border: 1px solid transparent;
  background: transparent;
  padding: 0.4rem 0.45rem;
  font-size: 1rem;
  color: inherit;
}

.sheet-table input:not([readonly]),
.sheet-table select,
.ledger-block input:not([readonly]),
.cash-edit input:not([readonly]) {
  border-color: var(--line);
  background: var(--paper);
}

.ledger-block h3 input {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
}

.input-narrow {
  width: 100%;
  max-width: 12rem;
  display: inline-block;
}

.input-amt {
  margin: 0.25rem 0 0.3rem;
}

.tag {
  display: inline-block;
  margin-top: 0.15rem;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tag-paid {
  color: var(--forest);
}

.tag-due {
  color: var(--brick);
}

.tag:disabled {
  cursor: default;
}

.pass-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  z-index: 80;
  height: fit-content;
  max-height: min(90dvh, calc(100vh - 1.5rem));
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--cream);
  color: var(--ink);
  padding: 1.1rem 1.1rem 1.2rem;
  width: min(22rem, calc(100vw - 1.5rem));
}

#settle-modal,
#group-modal {
  width: min(34rem, calc(100vw - 1.5rem));
}

#receipt-modal {
  width: min(40rem, calc(100vw - 1.5rem));
}

#conflict-modal,
#detail-guide-modal,
#wb-options-modal,
#wb-audit-modal {
  width: min(28rem, calc(100vw - 1.5rem));
}

#wb-options-modal,
#wb-audit-modal,
#wb-consent-modal {
  width: min(34rem, calc(100vw - 1.5rem));
}

#wb-consent-modal {
  z-index: 90;
}

#wb-consent-modal:not([open]) {
  display: none;
}

#wb-consent-modal[open] {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

html.consent-open #wb-options-modal {
  visibility: hidden;
  pointer-events: none;
}

html.consent-open .grain,
html.consent-open .tt-fireflies,
html.consent-open .tt-now {
  visibility: hidden;
}

html.consent-open .tt-block.is-now {
  animation: none;
  filter: none;
}

.wb-consent-copy {
  max-height: min(46dvh, 24rem);
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 0.35rem;
  margin-bottom: 0.75rem;
  min-width: 0;
}

.wb-consent-copy h3 {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0.85rem 0 0.4rem;
}

.wb-consent-copy p,
.wb-consent-copy li {
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.45;
  margin-bottom: 0.55rem;
}

.wb-consent-copy ul {
  margin: 0 0 0.7rem 1.15rem;
}

.wb-consent-check {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 0 0 0.95rem;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--ink);
  min-width: 0;
}

.wb-consent-check span {
  flex: 1 1 auto;
  min-width: 0;
}

#wb-consent-check,
.wb-consent-check input[type="checkbox"] {
  appearance: auto;
  flex: 0 0 1.05rem;
  width: 1.05rem;
  height: 1.05rem;
  min-width: 1.05rem;
  min-height: 1.05rem;
  max-width: 1.05rem;
  max-height: 1.05rem;
  margin: 0.2rem 0 0;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--cream);
  accent-color: var(--forest);
}

#wb-consent-modal .pass-actions .btn-solid,
#wb-consent-modal .pass-actions .btn-quiet {
  flex: 1 1 auto;
  white-space: nowrap;
}

.btn-solid:disabled,
.btn-quiet:disabled,
.btn-danger:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
}

.wb-opt-block {
  border-top: 1px solid var(--line);
  padding: 0.95rem 0 0.35rem;
  margin-top: 0.7rem;
}

.wb-opt-block h3 {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.wb-opt-block p {
  color: var(--ink-soft);
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 0.7rem;
}

.wb-opt-danger h3 {
  color: var(--brick);
}

.wb-opt-actions {
  display: grid;
  gap: 0.55rem;
}

.wb-opt-actions .btn-quiet,
.wb-opt-actions .btn-danger {
  width: 100%;
  justify-content: center;
}

#wb-options-modal .pass-actions,
#wb-audit-modal .pass-actions {
  display: grid;
  gap: 0.55rem;
  justify-content: stretch;
}

#wb-options-modal .pass-actions .btn-quiet,
#wb-audit-modal .pass-actions .btn-quiet {
  width: 100%;
  flex: none;
  justify-content: center;
}

.wb-opt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.wb-switch {
  width: 2.9rem;
  height: 1.7rem;
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 18%, var(--cream));
  position: relative;
  cursor: pointer;
}

.wb-switch::after {
  content: "";
  position: absolute;
  top: 0.18rem;
  left: 0.18rem;
  width: 1.32rem;
  height: 1.32rem;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 1px 4px rgba(26, 20, 16, 0.2);
}

.wb-switch[aria-checked="true"] {
  background: var(--forest);
}

.wb-switch[aria-checked="true"]::after {
  transform: translateX(1.2rem);
}

.wb-switch:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.itin-flight-activity {
  margin: 0.85rem 0 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

.itin-flight-activity strong {
  display: block;
  margin: 0;
  font-size: 0.92rem;
  letter-spacing: 0;
  word-spacing: normal;
  text-transform: none;
  font-weight: 650;
}

.itin-flight-activity p {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  letter-spacing: 0;
  word-spacing: normal;
  text-transform: none;
  color: var(--ink-soft);
}

.agenda-item.is-hidden-activity,
.tt-block.is-hidden-activity {
  opacity: 0.55;
}

.wb-share-row {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--sp-2);
  min-width: 0;
  margin-bottom: 0.45rem;
}

.wb-share-row > button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.wb-share-row input {
  /* was flex: 1 1 12rem — the 192px floor pushed Copy/Generate onto row 2
     inside the ~300px options modal */
  flex: 1 1 auto;
  min-width: 0;
  min-height: var(--tap);
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--line);
  background: var(--paper);
  font: inherit;
}

.wb-contrib-tabs {
  display: flex;
  gap: 0.35rem;
  margin: 0.55rem 0 0.65rem;
}

.wb-contrib-tab {
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  background: color-mix(in srgb, var(--cream) 55%, #fff);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.wb-contrib-tab.is-on {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--cream);
}

.wb-contrib-results {
  list-style: none;
  margin: 0.45rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.wb-contrib-results .wb-contrib-pick {
  width: 100%;
  text-align: left;
  display: grid;
  gap: 0.1rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.7rem;
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  background: #fff;
  cursor: pointer;
}

.wb-contrib-results .wb-contrib-pick strong {
  font-size: 0.9rem;
}

.wb-contrib-results .wb-contrib-pick small {
  opacity: 0.7;
}

.wb-pending-chip {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--gold-pale) 55%, #fff);
  color: var(--forest-deep, #0f241c);
}

.wb-role-picks.is-pending {
  opacity: 0.55;
  pointer-events: none;
}

.wb-contrib-add {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--sp-2);
  align-items: end;
  min-width: 0;
}

.wb-contrib-add > button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.wb-contrib-add .wb-field {
  flex: 1 1 12rem;
  min-width: 0;
}

.wb-contrib-add input {
  margin-bottom: 0;
}

.wb-contrib-add .btn-solid {
  flex: 0 0 auto;
}

.wb-contrib-add .btn-solid:disabled {
  opacity: 0.72;
  cursor: wait;
}

.wb-role-picks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.75rem;
  margin: 0.4rem 0 0.55rem;
}

.wb-role-picks label {
  display: flex;
  gap: 0.3rem;
  align-items: center;
  font-size: 0.84rem;
}

.wb-role-pick {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}

.wb-role-help {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
}

.wb-role-help[aria-expanded="true"] {
  border-color: var(--ink);
  color: var(--ink);
}

.wb-role-tip {
  flex: 1 1 100%;
  margin: 0.05rem 0 0;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.35;
}

.wb-role-tip b {
  color: var(--ink);
  font-weight: 600;
}

.wb-role-picks.is-invalid {
  outline: 2px solid var(--brick);
  outline-offset: 4px;
  border-radius: 0.35rem;
}

.wb-field.is-invalid input {
  outline: 2px solid #c62828;
  outline-offset: 2px;
  background: color-mix(in srgb, #c62828 8%, var(--cream));
}

.wb-people {
  list-style: none;
  display: grid;
  gap: 0;
  margin: 0.35rem 0 0;
  max-height: min(36dvh, 18rem);
  overflow: auto;
  border-top: 1px solid var(--line);
}

.wb-people li {
  display: grid;
  gap: 0.28rem;
  padding: 0.5rem 0.1rem 0.5rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.wb-people li.is-vacant {
  border-bottom: 0;
  padding: 0.45rem 0 0.1rem;
}

.wb-person-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.7rem;
  min-width: 0;
}

.wb-person-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
  font-weight: 500;
}

.detail-contrib .wb-invite-list {
  gap: 0.3rem;
}

.detail-contrib .wb-invite-row {
  padding: 0.35rem 0.5rem;
  border-radius: 0.55rem;
}

.detail-contrib .wb-person-head {
  justify-content: flex-start;
  gap: 0.4rem;
}

.detail-contrib .wb-invite-copy {
  flex: 1;
}

.detail-contrib .wb-pending-chip {
  margin-left: auto;
}

.wb-invite-copy {
  display: grid;
  gap: 0.05rem;
  min-width: 0;
}

.wb-invite-copy strong {
  font-size: 0.9rem;
  font-weight: 600;
}

.wb-invite-copy small {
  font-size: 0.74rem;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-contrib .wb-send-queued {
  width: auto;
}

.wb-revoke {
  flex: 0 0 auto;
  min-height: 0;
  padding: 0.2rem 0 0.2rem 0.45rem;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.wb-revoke:focus-visible {
  color: var(--brick);
}

@media (hover: hover) and (pointer: fine) {
  .wb-revoke:hover {
    color: var(--brick);
  }
}

.wb-people .wb-role-picks {
  margin: 0;
}

.wb-warn {
  color: var(--brick);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
  margin: 0.3rem 0 0.4rem;
}

.wb-warn.is-error {
  color: #c62828;
  font-weight: 650;
}

.wb-people .wb-warn {
  margin: 0;
}

.wb-people li.is-invalid .wb-role-picks {
  outline: 2px solid var(--brick);
  outline-offset: 3px;
  border-radius: 0.35rem;
}

.wb-people small {
  color: var(--ink-soft);
}

.wb-audit-list {
  list-style: none;
  display: grid;
  gap: 0.55rem;
  max-height: min(50dvh, 22rem);
  overflow: auto;
}

.wb-audit-list li {
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--line);
  background: var(--paper);
}

.wb-audit-list b {
  display: block;
  font-weight: 500;
}

.wb-audit-list small {
  color: var(--ink-soft);
}

.modal-note {
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin: 0 0 0.9rem;
  line-height: 1.4;
}

.modal-note.is-warn {
  color: var(--brick);
  font-weight: 600;
}

.pass-modal::backdrop {
  background: rgba(19, 37, 30, 0.72);
}

.pass-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brick);
}

.ask-lakbi-draft-kicker {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0.06em;
  text-transform: none;
}

.ask-lakbi-draft-kicker img {
  width: 1.2rem;
  height: 1.2rem;
  max-width: none;
  border-radius: 50%;
  object-fit: contain;
  background: transparent;
}

.pass-modal h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.2rem, 4vw, 1.4rem);
  margin: 0.2rem 0 0.8rem;
}

.pass-modal input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
.pass-modal select {
  width: 100%;
  min-height: var(--tap);
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0.55rem 0.65rem;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.pass-modal .settle-field input,
.pass-modal .settle-field select,
.pass-modal .settle-field textarea {
  margin-bottom: 0;
}

.pass-modal .cost-entry input {
  margin-bottom: 0;
  border: 0;
  background: transparent;
  min-height: calc(var(--tap) - 2px);
}

.pass-error {
  color: var(--brick);
  font-size: 0.82rem;
  margin-bottom: 0.6rem;
}

.pass-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.pass-actions .btn-solid,
.pass-actions .btn-quiet {
  flex: 1 1 8rem;
}

.settle-field {
  display: grid;
  gap: 0.25rem;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.55rem;
  min-width: 0;
}

.settle-field .wb-req {
  letter-spacing: 0.04em;
}

.settle-field input,
.settle-field select,
.settle-field textarea {
  text-transform: none;
  letter-spacing: 0;
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 0;
  min-height: var(--tap);
}

.settle-field textarea {
  resize: vertical;
  min-height: 4.25rem;
  line-height: 1.35;
  padding: 0.65rem 0.75rem;
  font-family: inherit;
}

.settle-field.is-empty input,
.settle-field.is-empty select {
  outline: 2px solid var(--brick);
  outline-offset: 2px;
  background: color-mix(in srgb, var(--lotus) 40%, var(--cream));
}

.settle-field.is-empty .cost-entry {
  outline: 2px solid var(--brick);
  outline-offset: 2px;
}

.settle-field.is-empty .cost-entry input {
  outline: none;
}

.cost-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--paper);
  min-height: var(--tap);
}

.cost-entry input {
  border: 0;
  background: transparent;
  min-height: calc(var(--tap) - 2px);
}

.cost-entry em {
  padding: 0 0.8rem 0 0.35rem;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.cost-convert[hidden],
#group-fx-rate[hidden],
#group-local-wrap[hidden],
#group-fx-eq[hidden],
#group-fx-tools[hidden] {
  display: none;
}

.fx-switch {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.1rem 0 0.65rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.switch {
  width: 2.9rem;
  height: 1.7rem;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 18%, var(--cream));
  position: relative;
  transition: background 0.16s ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 0.18rem;
  left: 0.18rem;
  width: 1.32rem;
  height: 1.32rem;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 1px 4px rgba(26, 20, 16, 0.2);
  transition: transform 0.16s ease;
}

.switch[aria-checked="true"] {
  background: var(--forest);
}

.switch[aria-checked="true"]::after {
  transform: translateX(1.2rem);
}

.cost-code {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.settle-hint {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin: 0 0 0.85rem;
}

.settle-mode {
  margin: 0 0 0.85rem;
}

.settle-convert {
  align-items: stretch;
  margin-bottom: 0.35rem;
}

.settle-convert .settle-field {
  margin-bottom: 0;
}

.settle-fx-eq {
  display: none;
  padding-bottom: 0.55rem;
  color: var(--ink-soft);
  font-size: 1.1rem;
  text-align: center;
}

#settle-fx-rate {
  margin-bottom: 0.45rem;
  letter-spacing: 0.04em;
}

.fx-disclaimer {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.settle-later-home {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 600;
}

#settle-later-home[hidden],
#settle-later-fx[hidden] {
  display: none;
}

.settle-later .fx-disclaimer {
  margin: 0 0 0.75rem;
}

.settle-people[hidden] {
  display: none;
}

.settle-people .settle-field {
  margin-bottom: 0;
}

.settle-people input:read-only {
  background: color-mix(in srgb, var(--gold-pale) 40%, var(--paper));
}

.settle-later {
  margin: 0.9rem 0 0;
  padding: 0.85rem 0.9rem 0.95rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--forest) 7%, var(--cream));
}

.settle-later h3 {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 600;
  margin: 0 0 0.2rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}

.settle-later .settle-hint {
  margin-bottom: 0.7rem;
}

.settle-later .settle-field {
  margin-bottom: 0.65rem;
}

.settle-receipt {
  display: grid;
  gap: 0.45rem;
  margin: 0.9rem 0 1.1rem; /* room before Cancel / Add */
}

.settle-receipt .filter-label {
  margin: 0;
}

.settle-receipt-empty {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* The attached receipt: one card — thumb · name · View · Remove (owner 2026-10-03: "ui is bad"). */
.settle-receipt-preview {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.settle-receipt-preview .btn-quiet {
  min-height: 2.25rem;
  padding: 0.3rem 0.75rem;
}

.settle-receipt-preview[hidden],
.settle-receipt-empty[hidden] {
  display: none;
}

.settle-receipt-preview img {
  width: 2.6rem;
  height: 2.6rem;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.settle-receipt-preview span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: none;
}

.settle-later-row {
  min-width: 0;
}

.settle-later-receipt {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: var(--tap);
  padding: 0.2rem 0.55rem;
  text-transform: none;
  letter-spacing: 0;
}

.settle-later-receipt img {
  width: 1.7rem;
  height: 1.7rem;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--paper);
}

.receipt-frame {
  min-height: 16rem;
  max-height: min(70vh, 36rem);
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--paper);
  margin: 0.6rem 0 0.9rem;
}

.receipt-frame img,
.receipt-frame iframe {
  display: block;
  width: 100%;
  min-height: 16rem;
  border: 0;
}

.receipt-frame img[hidden],
.receipt-frame iframe[hidden] {
  display: none;
}

.place {
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr) auto;
  gap: 0.35rem;
  width: 100%;
  min-height: var(--tap);
  padding: 0.55rem 0.2rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  text-align: left;
  align-items: start;
}

.place:focus-visible {
  background: color-mix(in srgb, var(--gold-pale) 45%, transparent);
}

@media (hover: hover) and (pointer: fine) {
  .place:hover {
    background: color-mix(in srgb, var(--gold-pale) 45%, transparent);
  }
}

.place b {
  display: block;
  font-weight: 500;
}

.place-go {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brick);
  padding-top: 0.2rem;
}

.place-page {
  background: var(--cream);
  border: 1px solid var(--line);
  overflow: hidden;
}

.place-hero {
  min-height: clamp(14rem, 52vw, 22rem);
  background-size: cover;
  background-position: center;
  position: relative;
  color: var(--cream);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3.4rem 1.1rem 1.2rem;
}

.place-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(19, 37, 30, 0.92) 0%, rgba(19, 37, 30, 0.25) 55%, rgba(19, 37, 30, 0.12) 100%);
}

.place-hero > * {
  position: relative;
  z-index: 1;
}

.place-back {
  position: absolute;
  top: max(0.75rem, env(safe-area-inset-top));
  left: 0.75rem;
  z-index: 2;
  min-height: var(--tap);
  border: 1px solid color-mix(in srgb, var(--cream) 35%, transparent);
  color: var(--cream);
  padding: 0.4rem 0.85rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(19, 37, 30, 0.35);
}

.place-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-pale);
}

.place-hero h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 8vw, 3.4rem);
  line-height: 1.05;
  margin: 0.25rem 0 0.3rem;
}

.place-deck {
  font-size: 1.05rem;
  max-width: 36rem;
  color: color-mix(in srgb, var(--cream) 82%, transparent);
}

.place-body {
  padding: 1.15rem 1.1rem 1.6rem;
}

.place-about {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 3.4vw, 1.2rem);
  line-height: 1.45;
  max-width: 46rem;
}

.place-trip {
  margin-top: 0.85rem;
  padding: 0.7rem 0.85rem;
  border-left: 3px solid var(--gold);
  background: color-mix(in srgb, var(--gold-pale) 35%, var(--cream));
  font-size: 0.92rem;
}

.place-map {
  margin: 0.9rem 0 1.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.place-map a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
}

.place-label {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brick);
  margin-bottom: 0.45rem;
}

.place-extra {
  margin-top: 1rem;
}

.place-cols ul,
.place-tables ul {
  list-style: none;
}

.place-cols li {
  padding: 0.4rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

.place-tables li {
  display: grid;
  gap: 0.15rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}

.place-tables b {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
}

.place-tables span {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.place i {
  font-style: normal;
  font-family: var(--serif);
  color: var(--brick);
}

.know {
  margin-top: 0.9rem;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--gold);
  background: color-mix(in srgb, var(--gold-pale) 30%, var(--cream));
}

.know li {
  list-style: none;
  padding: 0.22rem 0;
  font-size: 0.9rem;
}

.dest-notes-section {
  margin-top: 1.15rem;
}

.dest-notes-head {
  margin: 0 0 0.65rem;
}

.dest-notes-head h3 {
  margin: 0 0 0.25rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 550;
}

.dest-notes-head p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.dest-notes-list {
  display: grid;
  gap: 0.55rem;
}

.dest-notes-card {
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--cream);
  overflow: hidden;
}

.dest-notes-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0.95rem;
  border: 0;
  background: color-mix(in srgb, var(--forest) 7%, var(--cream));
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.dest-notes-toggle em {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.55;
  transition: transform 0.15s ease;
}

/* Stay dates + Next / You’re here / Done beside the place name. */
.dest-notes-toggle > span {
  flex: 1 1 auto;
  min-width: 0;
}

.dest-notes-when {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.75;
}

.dest-notes-when.is-now {
  color: #2f7d57;
  opacity: 1;
}

.dest-notes-ico {
  margin-right: 0.35rem;
}

.dest-notes-card.is-open .dest-notes-toggle em {
  transform: rotate(-135deg);
  margin-top: 0.25rem;
}

.dest-notes-body {
  padding: 0.75rem 0.95rem 0.95rem;
  display: grid;
  gap: 0.75rem;
}

.dest-notes-cat h4 {
  margin: 0 0 0.35rem;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.dest-notes-cat ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.dest-notes-cat li {
  padding: 0.45rem 0.55rem;
  border-radius: 0.55rem;
  background: color-mix(in srgb, var(--forest) 5%, var(--cream));
  border: 1px solid transparent;
}

.dest-notes-cat li strong {
  display: block;
  font-size: 0.88rem;
}

.dest-notes-cat li span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.35;
}

.dest-notes-cat li.is-caution {
  background: color-mix(in srgb, #f59e0b 12%, var(--cream));
  border-color: color-mix(in srgb, #d97706 28%, transparent);
}

.dest-notes-cat li.is-critical {
  background: color-mix(in srgb, #dc2626 10%, var(--cream));
  border-color: color-mix(in srgb, #dc2626 35%, transparent);
  border-left: 3px solid #dc2626;
}

.dest-notes-loading,
.dest-notes-empty {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.sos {
  margin: 0;
  padding: 1rem 0.95rem 1.15rem;
  border: 1px solid color-mix(in srgb, var(--brick) 45%, var(--line));
  border-left: 4px solid var(--brick);
  background: color-mix(in srgb, var(--lotus) 14%, var(--cream));
}

.sos h4 {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0.85rem 0 0.45rem;
}

.sos h4:first-child {
  margin-top: 0;
}

.sos-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.55rem;
}

.sos-card {
  min-width: 0;
  background: var(--cream);
  border: 1px solid var(--line);
}

.sos-main {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-height: var(--tap);
  padding: 0.7rem 0.8rem 0.65rem;
  color: inherit;
  text-decoration: none;
}

.sos-label {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.sos-num {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--brick);
  letter-spacing: 0.02em;
}

.sos-note {
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.35;
}

.sos-wa {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 0.8rem 0.2rem;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sos-mails {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.7rem 0 0.2rem;
}

.sos-mails a {
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.sos-play {
  list-style: none;
  counter-reset: sos;
  display: grid;
  gap: 0.55rem;
}

.sos-play li {
  counter-increment: sos;
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr);
  gap: 0.35rem 0.55rem;
  padding: 0.7rem 0.75rem;
  background: var(--cream);
  border: 1px solid var(--line);
  font-size: 0.9rem;
}

.sos-play li::before {
  content: counter(sos);
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--brick);
  line-height: 1.2;
  grid-row: 1 / span 2;
}

.sos-play strong {
  grid-column: 2;
  font-weight: 600;
}

.sos-play span {
  grid-column: 2;
  color: var(--ink-soft);
}

.souvenirs {
  margin-top: 0.9rem;
  background: var(--ink);
  color: var(--cream);
  padding: 1rem;
}

.souvenirs h3 {
  font-family: var(--serif);
  margin-bottom: 0.55rem;
}

.souvenirs ul {
  columns: 1;
  list-style: none;
}

.souvenirs li {
  padding: 0.28rem 0;
  border-top: 1px solid color-mix(in srgb, var(--cream) 14%, transparent);
  font-size: 0.88rem;
}

.tt.one-day {
  --cols: 1;
  min-width: 0;
}

.tt.one-day .tt-head,
.tt.one-day .tt-body {
  grid-template-columns: var(--gutter) minmax(0, 1fr);
}

.tt-stack {
  display: grid;
  gap: 1.1rem;
}

.agenda {
  background: var(--cream);
  border: 1px solid var(--line);
  overflow: hidden;
  min-width: 0;
}

.agenda-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.7rem 1rem 0.75rem;
  background: var(--forest);
  color: var(--cream);
}

.agenda-head strong {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
}

.agenda-head small {
  opacity: 0.78;
  font-size: 0.78rem;
}

/* Derived from crew flights, never an event — read-only, so no pointer target. */
.agenda-arrivals {
  flex: 1 0 100%;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--gold-pale, #e8d5a3);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  pointer-events: none;
}

.agenda-arrivals svg {
  width: 0.85rem;
  height: 0.85rem;
  flex: none;
}

.agenda.is-live .agenda-head {
  background: linear-gradient(180deg, #c9a24a, var(--forest-deep));
}

.agenda.is-live .agenda-head small {
  color: var(--gold-pale);
  opacity: 1;
}

.agenda-list {
  list-style: none;
  margin: 0;
  padding: 0.1rem 0 0.2rem;
}

.agenda-list > li {
  margin: 0;
}

.agenda-gap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 1.45rem;
  padding: 0.15rem 0.9rem;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.agenda-gap::before,
.agenda-gap::after {
  content: "";
  height: 1px;
  flex: 1 1 1.5rem;
  background: var(--line);
}

.agenda-gap.is-now {
  color: var(--forest-deep);
  background: color-mix(in srgb, var(--gold-pale) 55%, var(--cream));
}

.agenda-now {
  flex: 0 0 auto;
  background: var(--gold);
  color: var(--forest-deep);
  padding: 0.08rem 0.35rem;
  letter-spacing: 0.12em;
}

/* Rows read as a timeline on plain paper: the type hue lives on the rail node
   and the badge, not as a wash behind the copy (.tt-block keeps the full tint). */
.agenda-item {
  display: grid;
  grid-template-columns: 4.15rem 0.85rem 1.9rem minmax(0, 1fr);
  align-items: start;
  gap: 0.15rem 0.45rem;
  width: 100%;
  min-height: var(--tap);
  padding: 0.62rem 0.9rem 0.68rem 0.6rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  background: transparent;
  box-shadow: none;
}

.agenda-item.is-crew-flight {
  background: color-mix(in srgb, var(--gold-pale, #e8d5a3) 22%, var(--cream));
}

.itin-flight-overlap {
  display: grid;
  gap: 0.16rem;
  margin-top: 0.28rem;
}

.itin-flight-overlap-row,
.agenda-copy .itin-flight-overlap-row {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin-top: 0;
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1.2;
  opacity: 0.9;
  color: inherit;
}

.itin-flight-overlap-ico {
  display: inline-block;
  width: 0.72rem;
  height: 0.72rem;
  flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M21 16v-2l-8-5V3.5A1.5 1.5 0 0 0 11.5 2 1.5 1.5 0 0 0 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5z'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M21 16v-2l-8-5V3.5A1.5 1.5 0 0 0 11.5 2 1.5 1.5 0 0 0 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5z'/></svg>") center / contain no-repeat;
}

/* Sized to end at the next stop (crewFlightCardHtml) and drawn under real stops,
   so the check-in after a landing stays visible and clickable. */
.tt-block.is-crew-flight {
  overflow: hidden;
  z-index: 1;
}

.tt-crew-head {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  min-width: 0;
}

.tt-crew-head b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tt-crew-address {
  display: block;
  margin-top: 0.16rem;
  font-size: 0.62rem;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tt-crew-address.is-editable {
  pointer-events: auto;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  width: 100%;
  text-align: left;
  font: inherit;
  text-decoration: underline dotted;
}

.tt-crew-address-edit {
  display: block;
  pointer-events: auto;
}

.tt-crew-address-edit input {
  width: 100%;
  font: inherit;
  font-size: 0.62rem;
  padding: 0.1rem 0.2rem;
  border: 1px solid var(--line);
  background: var(--cream);
  box-sizing: border-box;
}

.itin-flight-overlap-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.14rem;
  margin-top: 0.16rem;
}

.itin-flight-overlap-mark .itin-flight-face {
  width: 1rem;
  height: 1rem;
  font-size: 0.46rem;
}

.itin-flight-overlap-detail {
  margin: 0.85rem 0 0.2rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--gold-pale, #e8d5a3) 30%, var(--cream));
}

.itin-flight-overlap-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.itin-flight-overlap-detail .itin-flight-crew {
  margin: 0;
}

.agenda-item time {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding-top: 0.18rem;
  color: var(--ink-soft, var(--ink));
  opacity: 0.8;
}

/* Continuous timeline rail with a type-coloured node per event. */
.agenda-rail {
  position: relative;
  align-self: stretch;
  justify-self: center;
  width: 0.85rem;
}

.agenda-rail::before {
  content: "";
  position: absolute;
  top: -0.7rem;
  bottom: -0.7rem;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: color-mix(in srgb, var(--ink) 18%, transparent);
}

.agenda-rail::after {
  content: "";
  position: absolute;
  top: 0.72rem;
  left: 50%;
  width: 0.45rem;
  height: 0.45rem;
  transform: translate(-50%, 0);
  border-radius: 50%;
  background: currentColor;
}

/* Solid type-coloured badge; the glyph flips to white on the fill. */
.agenda-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  justify-self: center;
  border-radius: 50%;
  background: currentColor;
}

.agenda-chip svg {
  display: block;
  width: 1rem;
  height: 1rem;
  color: #fff;
}

.agenda-copy {
  min-width: 0;
  padding-top: 0.12rem;
}

.agenda-place {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agenda-copy .tt-when {
  font-size: 0.74rem;
  opacity: 0.72;
}

.agenda-row {
  position: relative;
}

/* Ink copy on a tinted row — the type hue stays on the rail, chip and time. */
.agenda-copy b {
  display: inline;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
  color: var(--ink);
}

.agenda-copy span {
  display: block;
  margin-top: 0.12rem;
  opacity: 0.78;
  font-size: 0.78rem;
  color: var(--ink-soft, var(--ink));
}

.agenda-copy .itin-flight-faces {
  display: flex;
  flex-wrap: wrap;
  opacity: 1;
  margin-top: 0.28rem;
}

.agenda-copy .itin-flight-person {
  display: inline-flex;
  margin-top: 0;
}

.agenda-copy .itin-flight-faces .itin-flight-face {
  display: inline-flex;
  margin-top: 0;
  opacity: 1;
  color: var(--forest-deep);
  font-size: 0.52rem;
}

.agenda-copy .itin-flight-time {
  display: inline;
  margin-top: 0;
  opacity: 0.86;
  font-size: 0.62rem;
  color: inherit;
}

.agenda-item.is-on {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
  z-index: 1;
}

.agenda-item.is-now {
  z-index: 2;
  animation: temple-glow 2.4s ease-in-out infinite;
}

.agenda-list > li:last-child .agenda-item {
  border-bottom: 0;
}

@media (max-width: 47.99rem) {
  :root {
    --hour: 3.15rem;
    --gutter: 2.35rem;
  }

  .day-picker {
    position: sticky;
    top: var(--sheet-sticky-offset, 0px);
    z-index: 6;
    margin: 0 calc(-1 * var(--space)) 0.85rem;
    padding: 0.45rem var(--space) 0.5rem;
    background: var(--paper);
    box-shadow: 0 1px 0 color-mix(in srgb, var(--line) 55%, transparent);
    min-width: 0;
    width: auto;
    max-width: none;
  }

  .day-picker--scroll {
    display: flex;
    align-items: center;
    gap: 0.2rem;
  }

  .day-picker-scroller {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
  }

  .day-picker-scroller::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }

  .day-picker-fade,
  .day-picker-more {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease;
  }

  .day-picker--scroll.is-overflow:not(.is-at-end) .day-picker-fade,
  .day-picker--scroll.is-overflow:not(.is-at-end) .day-picker-more {
    opacity: 1;
    pointer-events: auto;
  }

  .day-picker-fade {
    position: absolute;
    top: 0.45rem;
    right: calc(var(--space) + 1.7rem);
    bottom: 0.5rem;
    width: 2.4rem;
    background: linear-gradient(to right, transparent, var(--paper) 78%);
    z-index: 1;
  }

  .day-picker-more {
    appearance: none;
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--cream) 70%, #fff);
    color: var(--ink-soft);
    box-shadow: 0 0 0 1px var(--line);
    cursor: pointer;
  }

  .day-picker-more svg {
    width: 0.95rem;
    height: 0.95rem;
  }

  .day-picker .day-switch {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    min-width: max-content;
    overflow: visible;
    position: static;
    box-shadow: none;
    background: transparent;
  }

  .day-picker .day-switch button,
  .day-switch button {
    appearance: none;
    position: relative;
    flex: 0 0 auto;
    height: 2.15rem;
    min-height: 2.15rem;
    min-width: 0;
    max-width: none;
    padding: 0 0.7rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--cream);
    color: var(--ink);
    font: inherit;
    font-size: 0.8rem;
    line-height: 1;
    white-space: nowrap;
    text-align: center;
    cursor: pointer;
  }

  .day-picker .day-switch button.is-on,
  .day-switch button.is-on {
    background: var(--ink);
    color: var(--cream);
    border-color: var(--ink);
  }

  .day-picker .day-switch button.is-today:not(.is-on) {
    border-color: color-mix(in srgb, var(--gold, #c9a227) 55%, var(--line));
    background: color-mix(in srgb, var(--gold-pale, #f3e6b3) 42%, #fff);
    font-weight: 700;
  }

  .day-picker-today-dot {
    display: inline-block;
    width: 0.35rem;
    height: 0.35rem;
    margin-left: 0.3rem;
    border-radius: 50%;
    background: #c45c3a;
    vertical-align: middle;
  }

  .day-picker .day-switch button.is-on .day-picker-today-dot {
    background: var(--cream);
  }

  .day-picker--menu {
    display: grid;
    gap: 0.4rem;
  }

  .day-picker-trigger {
    appearance: none;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    min-height: var(--tap);
    padding: 0.4rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: 0.85rem;
    background: color-mix(in srgb, var(--cream) 88%, #fff);
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
  }

  .day-picker-cal,
  .day-picker-chevron {
    display: inline-flex;
    flex: 0 0 auto;
    color: var(--ink-soft);
  }

  .day-picker-cal svg,
  .day-picker-chevron svg {
    width: 1.05rem;
    height: 1.05rem;
  }

  .day-picker-trigger-main {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    min-width: 0;
    overflow: hidden;
  }

  .day-picker-trigger-main strong {
    flex: 0 0 auto;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
  }

  .day-picker-trigger-main em {
    flex: 1 1 auto;
    min-width: 0;
    font-style: normal;
    font-size: 0.78rem;
    color: var(--ink-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .day-picker.is-open .day-picker-chevron {
    transform: rotate(180deg);
  }

  .day-picker-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 0.28rem;
    padding: 0 0.15rem;
  }

  .day-picker-dots i {
    width: 0.38rem;
    height: 0.38rem;
    border-radius: 50%;
    background: color-mix(in srgb, var(--ink-soft) 35%, transparent);
  }

  .day-picker-dots i.is-on {
    background: var(--ink);
    transform: scale(1.15);
  }

  .day-picker-dots i.is-today:not(.is-on) {
    background: #c45c3a;
  }

  .day-picker-menu {
    display: grid;
    gap: 0.25rem;
    max-height: min(50vh, 18rem);
    overflow: auto;
    padding: 0.35rem;
    border: 1px solid var(--line);
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 10px 28px rgba(19, 37, 30, 0.12);
    -webkit-overflow-scrolling: touch;
  }

  .day-picker-menu[hidden] {
    display: none !important;
  }

  .day-picker-option {
    appearance: none;
    display: grid;
    width: 100%;
    min-height: 2.6rem;
    padding: 0.45rem 0.6rem;
    border: 0;
    border-radius: 0.65rem;
    background: transparent;
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
  }

  .day-picker-option.is-on,
  .day-picker-option:active {
    background: color-mix(in srgb, var(--ink) 8%, #fff);
  }

  .day-picker-option.is-today:not(.is-on) {
    background: color-mix(in srgb, var(--gold-pale, #f3e6b3) 35%, #fff);
  }

  .day-picker-option-main {
    display: grid;
    gap: 0.08rem;
    min-width: 0;
  }

  .day-picker-option-main strong {
    font-size: 0.88rem;
    font-weight: 700;
  }

  .day-picker-option-main em {
    font-style: normal;
    font-size: 0.72rem;
    color: var(--ink-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .day-switch {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
    overflow-x: auto;
    overflow-y: hidden;
    position: sticky;
    top: var(--sheet-sticky-offset, 0px);
    z-index: 6;
    background: var(--paper);
    margin: 0 calc(-1 * var(--space)) 0.85rem;
    padding: 0.45rem var(--space) 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-bottom: 0;
    box-shadow: 0 1px 0 color-mix(in srgb, var(--line) 55%, transparent);
  }

  .day-switch::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }

  .day-switch button {
    flex: 0 0 auto;
    height: 2.15rem;
    min-height: 2.15rem;
    min-width: 0;
    padding: 0 0.7rem;
    text-align: center;
  }

  .budget-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tt-board {
    max-height: none;
    overflow: visible;
  }

  .tt-scroll {
    overflow: visible;
  }

  .tt-stack .tt-board {
    max-height: none;
  }

  .agenda-item {
    padding: 0.72rem 1rem 0.78rem 0.85rem;
  }

  .agenda-copy b {
    font-size: 1rem;
  }

  .tt.one-day .tt-day small {
    white-space: normal;
  }

  .tt-block {
    left: 0.2rem;
    right: 0.2rem;
    padding: 0.38rem 0.45rem 0.42rem;
    font-size: 0.86rem;
  }

  .tt-block .tt-when {
    font-size: 0.75rem;
  }

  .tt-hour {
    font-size: 0.68rem;
  }

  .detail {
    padding: 0.95rem 1rem 1.1rem;
  }

  .sheet-table {
    min-width: 0;
    font-size: 0.82rem;
  }

  .sheet-table.exp-table {
    min-width: 0;
  }

  .sheet-table th,
  .sheet-table td {
    padding: 0.5rem 0.45rem;
  }

  .ledger-toggle {
    display: flex;
    width: 100%;
    align-items: start;
    justify-content: space-between;
    gap: 0.7rem;
    padding: 0.75rem 0.85rem;
    text-align: left;
    background: color-mix(in srgb, var(--gold-pale) 28%, var(--cream));
  }

  .ledger-toggle span {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
  }

  .ledger-toggle strong {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 1.02rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  .ledger-toggle small {
    font-size: 0.72rem;
    color: var(--ink-soft);
    letter-spacing: 0.02em;
    overflow-wrap: anywhere;
  }

  .ledger-toggle em {
    flex: 0 0 auto;
    max-width: 42%;
    font-style: normal;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--brick);
    text-align: right;
  }

  .ledger-block.is-open .ledger-toggle {
    border-bottom: 1px solid var(--line);
  }

  .ledger-block:not(.is-open) .ledger-body {
    display: none;
  }

  .ledger-block header.is-view:not(.has-later) {
    display: none;
  }

  .ledger-block .ledger-head {
    justify-content: flex-end;
    align-items: stretch;
    padding: 0.45rem 0.75rem 0.55rem;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--forest) 9%, var(--cream));
  }

  .ledger-block .ledger-head-copy {
    display: none;
  }

  .ledger-head-top {
    justify-content: flex-end;
  }

  .ledger-block header.is-view.has-later .ledger-head-top {
    display: none;
  }

  .input-narrow {
    width: 100%;
    max-width: none;
  }

  .people {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .person {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "name switch"
      "amt bal";
    align-items: center;
    gap: 0.4rem 0.5rem;
    padding: 0.55rem 0.75rem;
    border-right: 0;
  }

  .person > b {
    grid-area: name;
    font-size: 0.82rem;
  }

  .person > .pay-switch,
  .person > .pay-status {
    grid-area: switch;
    justify-self: end;
    margin: 0;
    min-height: 2.4rem;
  }

  .person > .cost-entry:not(.is-balance),
  .person > .cell-text:not(.is-balance) {
    grid-area: amt;
    width: 100%;
    margin: 0;
    min-height: 2.4rem;
    font-size: 0.95rem;
  }

  .person > .cost-entry.is-balance,
  .person > .cell-text.is-balance {
    grid-area: bal;
    width: 100%;
    margin: 0;
    min-height: 2.4rem;
    font-size: 0.95rem;
  }

  .person .cost-entry .input-amt,
  .person .cost-entry input {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    margin: 0;
  }

  .person:not(:has(.is-balance)) > .cost-entry,
  .person:not(:has(.is-balance)) > .cell-text:not(.is-balance) {
    grid-column: 1 / -1;
  }

  .due-lbl.has-bal,
  .pay-status.has-bal {
    max-width: 7.5rem;
    overflow-wrap: anywhere;
    text-align: right;
  }

  .pay-status {
    margin: 0;
  }
}

@media (min-width: 30rem) {
  .totals,
  .settle-people {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .exp-table-tools {
    grid-template-columns: repeat(2, minmax(0, 14rem));
    align-items: end;
  }

  .exp-table-tools.is-scope {
    grid-template-columns: repeat(2, minmax(0, 14rem));
    align-items: end;
  }

  .exp-table-tools.is-settle {
    grid-template-columns: minmax(0, 14rem) minmax(0, 12rem) minmax(10rem, 1fr);
  }

  .exp-table-tools.is-group {
    grid-template-columns: minmax(0, 12rem) minmax(10rem, 1fr);
    align-items: end;
  }

  .facts div {
    grid-template-columns: 5.5rem minmax(0, 1fr);
  }

  .settle-fx-eq {
    display: block;
  }

  .settle-convert {
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
  }

  #group-cost-pair:not(.is-split) {
    grid-template-columns: 1fr;
  }

  #group-cost-pair.is-split .settle-fx-eq {
    display: block;
  }
}

@media (min-width: 48rem) {
  :root {
    --gutter: 3.1rem;
  }

  .exp-table-tools.is-settle {
    grid-template-columns: minmax(0, 11rem) minmax(0, 9rem) minmax(10rem, 1fr);
  }

  .sheet-nav-row {
    flex-wrap: nowrap;
    align-items: flex-end;
  }

  .mast {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    column-gap: 0.7rem;
    row-gap: 0;
    padding: max(0.75rem, env(safe-area-inset-top)) 1rem 0.7rem;
  }

  .mast-top {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    padding-top: 0.12rem;
  }

  .mast-full {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    padding-right: min(18rem, 42vw);
  }

  .mast-kicker {
    margin: 0;
  }

  .mast h1 {
    margin-top: 0.18rem;
  }

  .mast-meta {
    margin-top: 0.35rem;
  }

  .sheet-nav-tray {
    position: absolute;
    top: max(0.7rem, env(safe-area-inset-top));
    right: 1rem;
    z-index: 47;
    margin: 0;
    padding: 0;
  }

  .mast-btn-icon .mast-btn-label {
    display: inline;
  }

  .mast-btn-profile {
    display: inline-flex;
  }

  .sheet-nav-top {
    display: none;
  }

  .sheet-tabs-scroller {
    flex: 1 1 auto;
    min-width: 0;
  }

  .sheet-tabs,
  .sheet-tabs.is-open {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    flex: 1;
    min-width: 0;
    gap: 0.2rem;
    overflow-x: auto;
    padding: 0.55rem 0 0;
  }

  .sheet-tabs [role="tab"] {
    flex: 0 0 auto;
    width: auto;
    min-height: var(--tap);
    padding: 0.55rem 1rem 0.65rem;
    font-size: 0.78rem;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    white-space: nowrap;
  }

  .panel-head {
    flex-direction: row;
    align-items: end;
  }

  .exp-toolbar {
    justify-content: flex-end;
  }

  .prep-grid,
  .atlas,
  .hotel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sos-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .people {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .input-narrow {
    width: 7.5rem;
    margin-left: 0.25rem;
  }

  .pass-actions .btn-solid,
  .pass-actions .btn-quiet {
    flex: 0 0 auto;
  }

  .place-hero {
    padding: 2.2rem 1.7rem 1.5rem;
  }

  .place-body {
    padding: 1.4rem 1.6rem 2rem;
  }

  .souvenirs ul {
    columns: 2;
  }
}

@media (min-width: 64rem) {
  :root {
    --gutter: 3.4rem;
    --hour: 2.75rem;
  }

  .grid-3,
  .prep-grid,
  .atlas {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sos-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .totals {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .people {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ledger-filters {
    grid-template-columns: 1fr auto;
  }

  .tt-wrap {
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 20rem);
    gap: 1.25rem;
  }

  .detail {
    position: sticky;
    top: 0.4rem;
  }

  .place-cols {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .tt {
    min-width: calc(var(--gutter) + (var(--cols) * 11rem));
  }

  .tt-head,
  .tt-body {
    grid-template-columns: var(--gutter) repeat(var(--cols), minmax(11rem, 1fr));
  }

  .tt-board {
    max-height: calc(100dvh - 12rem);
  }

  .tt-block {
    font-size: 0.82rem;
    padding: 0.35rem 0.5rem;
  }

  .tt-block .tt-when {
    font-size: 0.72rem;
  }

  .tt-day small {
    white-space: normal;
  }
}

@media (min-width: 80rem) {
  :root {
    --space: clamp(1.6rem, 2.2vw, 3.2rem);
  }

  .tt {
    min-width: calc(var(--gutter) + (var(--cols) * 12.5rem));
  }

  .tt-head,
  .tt-body {
    grid-template-columns: var(--gutter) repeat(var(--cols), minmax(12.5rem, 1fr));
  }

  .sheet {
    padding-bottom: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto;
    transition: none !important;
  }

  .tt-fireflies span,
  .tt-now::before,
  .tt-block.is-now,
  html.is-shake {
    animation: none;
  }
}

.print-root {
  display: none;
}

@media print {
  @page {
    size: A4 landscape;
    margin: 6mm;
  }

  html,
  body {
    background: #f7f1e6 !important;
    color: #1a1410;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  .welcome,
  .grain,
  .batik,
  .workbook,
  .pass-modal,
  .exp-fab-wrap,
  .lakbi-chat-launch,
  .lakbi-chat {
    display: none !important;
  }

  html.is-printing .print-root,
  .print-root {
    display: block !important;
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: auto !important;
  }

  .print-poster {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
    min-height: calc(210mm - 12mm);
    height: calc(210mm - 12mm);
    max-height: calc(210mm - 12mm);
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    background: #f7f1e6;
    overflow: hidden;
    page-break-after: always;
    break-after: page;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .print-poster:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  .print-mast {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    padding: 0.35rem 0.65rem 0.38rem;
    background: linear-gradient(180deg, #1e3a2f, #13251e);
    color: #f7f1e6;
    flex: 0 0 auto;
  }

  .print-page-note {
    margin: 0.22rem 0 0;
    font-size: 6.5pt;
    letter-spacing: 0.04em;
    color: color-mix(in srgb, #f7f1e6 72%, #e8d5a3);
  }

  .print-kicker {
    font-size: 6.5pt;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #e8d5a3;
    margin: 0 0 0.06rem;
  }

  .print-mast h1 {
    font-family: "Fraunces", Georgia, serif;
    font-weight: 300;
    font-size: 14pt;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin: 0;
  }

  .print-mast em {
    font-style: italic;
    color: #e8d5a3;
  }

  .print-meta {
    margin: 0;
    text-align: right;
    font-size: 7pt;
    color: #f7f1e6;
    opacity: 0.82;
    line-height: 1.3;
  }

  .print-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.22rem 0.55rem;
    list-style: none;
    margin: 0;
    padding: 0 0.05rem;
    flex: 0 0 auto;
    font-size: 5.8pt;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .print-legend li {
    display: flex;
    align-items: center;
    gap: 0.22rem;
  }

  .print-legend li::before {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    background: currentColor;
  }

  .print-board {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(26, 20, 16, 0.16);
    background: #efe6d6;
    overflow: hidden;
  }

  .print-board-head {
    display: grid;
    grid-template-columns: 2.1rem repeat(var(--print-cols, 7), minmax(0, 1fr));
    flex: 0 0 auto;
    background: #1e3a2f;
    color: #f7f1e6;
  }

  .print-corner {
    display: grid;
    place-items: center;
    padding: 0.2rem 0.1rem;
    font-size: 5.2pt;
    letter-spacing: 0.02em;
    text-align: center;
    line-height: 1.15;
    color: #e8d5a3;
    border-right: 1px solid rgba(247, 241, 230, 0.14);
  }

  .print-day-label {
    min-width: 0;
    padding: 0.18rem 0.18rem 0.22rem;
    border-right: 1px solid rgba(247, 241, 230, 0.12);
  }

  .print-day-label:last-child {
    border-right: 0;
  }

  .print-day-label strong {
    display: block;
    font-family: "Fraunces", Georgia, serif;
    font-size: 7pt;
    font-weight: 500;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .print-day-label small {
    display: block;
    margin-top: 0.06rem;
    font-size: 5pt;
    color: #e8d5a3;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .print-board-body {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: 2.1rem repeat(var(--print-cols, 7), minmax(0, 1fr));
    background: #f7f1e6;
  }

  .print-hours {
    display: grid;
    grid-template-rows: repeat(24, minmax(0, 1fr));
    border-right: 1px solid rgba(26, 20, 16, 0.14);
    background: color-mix(in srgb, #efe6d6 70%, #f7f1e6);
  }

  .print-hour {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 0.05rem 0.18rem 0 0;
    font-size: 5.2pt;
    line-height: 1;
    color: #4a3f36;
    border-bottom: 1px solid rgba(26, 20, 16, 0.08);
  }

  .print-day-col {
    min-width: 0;
    min-height: 0;
    border-right: 1px solid rgba(26, 20, 16, 0.12);
  }

  .print-day-col:last-child {
    border-right: 0;
  }

  .print-day-rail {
    position: relative;
    height: 100%;
    background-image: repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(100% / 24 - 1px),
      rgba(26, 20, 16, 0.1) calc(100% / 24 - 1px),
      rgba(26, 20, 16, 0.1) calc(100% / 24)
    );
  }

  .print-block {
    position: absolute;
    left: 0.06rem;
    right: 0.06rem;
    z-index: 1;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.03rem;
    padding: 0.06rem 0.12rem 0.08rem;
    border-left: 2px solid currentColor;
    background: color-mix(in srgb, currentColor 16%, #f7f1e6);
    overflow: hidden;
    font-size: 5.4pt;
    line-height: 1.12;
  }

  .print-block time {
    display: block;
    font-variant-numeric: tabular-nums;
    font-size: 5.4pt;
    color: #4a3f36;
    white-space: nowrap;
  }

  .print-block span {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    font-weight: 600;
    min-width: 0;
  }

  .print-foot {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.14rem 0.1rem 0;
    border-top: 2px solid #b0893a;
    font-size: 6.2pt;
    letter-spacing: 0.04em;
    color: #4a3f36;
  }
}

.lakbi-chat-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lakbi-chat-launch[hidden] {
  display: none !important;
}

.lakbi-chat-launch {
  position: fixed;
  left: max(1rem, env(safe-area-inset-left));
  right: auto;
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: auto;
  max-width: min(11.5rem, calc(100vw - 6.5rem));
  min-height: 3.15rem;
  overflow: visible;
  padding: 0.35rem 0.9rem 0.35rem 0.55rem;
  border: 1px solid color-mix(in srgb, var(--gold-pale) 55%, var(--forest));
  border-radius: 999px;
  background: var(--forest);
  color: var(--gold-pale);
  box-shadow: 0 8px 22px rgba(19, 37, 30, 0.38);
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 0.78rem;
  font-weight: 600;
  box-sizing: border-box;
}

.lakbi-chat-launch img,
.lakbi-chat-launch .lakbi-mascot {
  width: 1.75rem;
  height: 1.75rem;
  flex: 0 0 1.75rem;
  object-fit: contain;
}

.lakbi-chat-launch .lakbi-mascot {
  display: block;
  overflow: visible;
  border-radius: 0;
}

.lakbi-chat-launch .lakbi-mascot img,
.lakbi-chat-launch .lakbi-mascot-svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: 70% 88%;
  animation: lakbi-wave 0.85s ease-in-out infinite;
}

@keyframes lakbi-wave {
  0%,
  100% {
    transform: rotate(-9deg);
  }
  50% {
    transform: rotate(11deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lakbi-chat-launch .lakbi-mascot img,
  .lakbi-chat-launch .lakbi-mascot-svg {
    animation: none;
  }
}

.lakbi-chat-launch span:not(.lakbi-mascot) {
  /* min-width: 0 is required for the ellipsis to engage — a flex item's
     default min-width: auto floors it at its content width, so the label was
     pushing the pill past its own max-width instead of truncating. */
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: none;
}

.lakbi-chat-launch[aria-expanded="true"] {
  background: var(--forest-deep);
}

@media (hover: hover) and (pointer: fine) {
  .lakbi-chat-launch:hover {
    background: var(--forest-deep);
  }
}

.lakbi-chat {
  position: fixed;
  left: max(0.85rem, env(safe-area-inset-left));
  right: auto;
  bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 4.15rem);
  z-index: 21;
  display: flex;
  flex-direction: column;
  width: min(22.5rem, calc(100vw - 1.7rem));
  height: min(34rem, calc(100dvh - 6.5rem));
  background: var(--cream);
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(19, 37, 30, 0.28);
  box-sizing: border-box;
}

.lakbi-chat-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.75rem;
  background: linear-gradient(180deg, var(--forest), var(--forest-deep));
  color: var(--cream);
}

.lakbi-chat-head img,
.lakbi-chat-avatar {
  width: 1.7rem;
  height: 1.7rem;
  object-fit: contain;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

.lakbi-chat-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-pale);
}

.lakbi-chat-head h2 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.1;
}

.lakbi-chat-close {
  width: var(--tap);
  height: var(--tap);
  border-radius: 50%;
  background: transparent;
  color: var(--cream);
  font-size: 1.6rem;
  line-height: 1;
}

@media (hover: hover) and (pointer: fine) {
  .lakbi-chat-close:hover {
    background: color-mix(in srgb, var(--cream) 14%, transparent);
  }
}

.lakbi-chat-log {
  flex: 1;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 0.65rem;
  padding: 0.85rem 0.8rem;
}

.lakbi-chat-row {
  max-width: 92%;
  padding: 0.55rem 0.7rem;
  font-size: 0.92rem;
  line-height: 1.4;
}

.lakbi-chat-row.is-lakbi {
  justify-self: start;
  background: color-mix(in srgb, var(--gold-pale) 38%, var(--cream));
  color: var(--ink);
}

.lakbi-chat-row.is-user {
  justify-self: end;
  background: var(--forest);
  color: var(--cream);
}

.lakbi-chat-row.is-pending {
  opacity: 0.72;
  font-style: italic;
}

.lakbi-chat-suggest {
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 70%, var(--cream));
}

.lakbi-chat-suggest-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem 0.2rem;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.lakbi-chat-chips-toggle {
  min-height: 1.6rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--cream);
  color: var(--ink-soft);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@media (hover: hover) and (pointer: fine) {
  .lakbi-chat-chips-toggle:hover {
    background: var(--gold-pale);
    color: var(--ink);
  }
}

.lakbi-chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.15rem 0.75rem 0.5rem;
}

.lakbi-chat-suggest.is-chips-hidden .lakbi-chat-chips {
  display: none;
}

.lakbi-chat-chip {
  min-height: 2rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.78rem;
}

@media (hover: hover) and (pointer: fine) {
  .lakbi-chat-chip:hover {
    background: var(--gold-pale);
    color: var(--ink);
  }
}

.lakbi-chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  padding: 0.55rem 0.7rem 0.4rem;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

/* Shown wherever LakBi output reaches the user. */
.lakbi-disclaimer {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--ink-soft);
}

.lakbi-disclaimer-chat {
  padding: 0 0.7rem calc(0.5rem + env(safe-area-inset-bottom));
  background: var(--paper);
  text-align: center;
}

.lakbi-disclaimer-sheet {
  margin-top: 0.55rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}

.lakbi-disclaimer-card {
  margin-top: 0.4rem;
  font-style: italic;
}

.lakbi-chat-form textarea {
  resize: none;
  min-height: 2.75rem;
  max-height: 6.5rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  background: var(--cream);
  color: var(--ink);
}

.lakbi-chat-send {
  align-self: end;
  min-height: 2.75rem;
  padding: 0 0.95rem;
  border-radius: 999px;
  background: var(--forest);
  color: var(--gold-pale);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 600;
}

.lakbi-chat-send:disabled {
  opacity: 0.55;
}

@media (max-width: 48rem) {
  .lakbi-chat {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: min(78dvh, 36rem);
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }
}

/* Public itinerary — floating creator card (bottom right); passport in modal */
.creator-float[hidden] {
  display: none !important;
}

.creator-float {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 19;
  width: min(17.5rem, calc(100vw - 2rem));
  padding: 0.85rem 0.9rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 1.05rem;
  background: color-mix(in srgb, var(--paper) 92%, white);
  box-shadow: 0 14px 36px rgba(19, 37, 30, 0.18);
  color: var(--ink);
}

.creator-float-head {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.creator-float-link {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
  color: inherit;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .creator-float-link:hover .creator-name {
    color: var(--forest);
  }
}

.creator-avatar {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--forest);
  color: var(--cream);
  font-family: var(--serif);
  font-size: 0.85rem;
  font-weight: 500;
}

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

.creator-copy {
  min-width: 0;
  flex: 1;
}

.creator-label {
  margin: 0;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.creator-name {
  margin: 0.12rem 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}

.creator-stats {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.creator-float-dismiss {
  flex-shrink: 0;
  width: var(--tap);
  height: var(--tap);
  margin: -0.15rem -0.2rem 0 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .creator-float-dismiss:hover {
    background: color-mix(in srgb, var(--ink) 8%, transparent);
    color: var(--ink);
  }
}

.creator-float-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.creator-passport-btn,
.creator-follow {
  flex: 1 1 auto;
  min-height: var(--tap);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.creator-passport-btn {
  background: transparent;
  color: var(--forest);
  border: 1px solid color-mix(in srgb, var(--forest) 40%, var(--line));
}

@media (hover: hover) and (pointer: fine) {
  .creator-passport-btn:hover {
    background: color-mix(in srgb, var(--forest) 8%, transparent);
  }
}

.creator-follow {
  background: var(--forest);
  color: var(--gold-pale);
  border: 1px solid var(--forest);
}

@media (hover: hover) and (pointer: fine) {
  .creator-follow:hover {
    background: var(--forest-deep);
    border-color: var(--forest-deep);
  }
}

.creator-follow.is-following {
  background: transparent;
  color: var(--forest);
  border-color: color-mix(in srgb, var(--forest) 40%, var(--line));
}

.creator-passport-modal {
  width: min(26rem, calc(100vw - 1.5rem));
}

.creator-passport-modal .creator-passport {
  --atlas-h: 18rem;
  margin: 0.35rem 0 0.5rem;
}

.creator-passport-modal .atlas-passport {
  width: 100%;
  height: var(--atlas-h);
  min-height: 0;
}

.creator-passport-modal .pp-book {
  padding: 0 0.5rem 0.45rem 0.95rem;
}

.creator-passport-modal .pp-cover-plate {
  margin: 0.3rem 0.05rem 0.35rem;
  padding: 0.35rem 0.55rem;
  gap: 0.5rem;
}

.creator-passport-modal .pp-crest {
  width: 2.1rem;
  height: auto;
}

.creator-passport-modal .pp-cover-nation {
  font-size: 0.55rem;
}

.creator-passport-modal .pp-cover-title {
  font-size: 1.05rem;
}

@media (max-width: 40rem) {
  .creator-float {
    width: min(14.5rem, calc(100vw - 5.5rem));
    right: max(0.65rem, env(safe-area-inset-right));
    left: auto;
    bottom: max(4.85rem, calc(env(safe-area-inset-bottom) + 4.35rem));
  }

  .budget-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lakbi-chat-launch {
    left: max(0.45rem, env(safe-area-inset-left));
    right: auto;
    bottom: max(0.7rem, env(safe-area-inset-bottom));
    width: 3.15rem;
    min-width: 3.15rem;
    max-width: 3.15rem;
    min-height: 3.15rem;
    height: 3.15rem;
    padding: 0;
    justify-content: center;
    gap: 0;
    font-size: 0;
    overflow: visible;
    background: transparent;
    color: inherit;
    border-color: transparent;
    box-shadow: none;
  }

  .lakbi-chat-launch img,
  .lakbi-chat-launch .lakbi-mascot {
    width: 100%;
    height: 100%;
  }

  .lakbi-chat-launch span:not(.lakbi-mascot) {
    display: none;
  }

  .exp-fab-wrap {
    right: max(0.75rem, env(safe-area-inset-right));
    left: max(4.25rem, calc(env(safe-area-inset-left) + 4.25rem));
    bottom: max(0.85rem, env(safe-area-inset-bottom));
    max-width: none;
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
  }

  .exp-fab-dock {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    pointer-events: auto;
    min-width: 0;
    max-width: 100%;
    padding: 0.18rem;
    border-radius: 999px;
    background: var(--fab-bg);
    box-shadow: 0 6px 18px var(--fab-shadow);
    overflow: hidden;
  }

  .exp-fab-dock > .exp-fab {
    appearance: none;
    flex: 0 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.32rem;
    width: auto;
    min-width: 0;
    height: 2.45rem;
    min-height: 2.45rem;
    padding: 0 0.7rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--cream);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
    box-shadow: none;
    cursor: pointer;
    white-space: nowrap;
  }

  .exp-fab-dock > .exp-fab + .exp-fab {
    box-shadow: inset 1px 0 0 color-mix(in srgb, var(--cream) 18%, transparent);
  }

  .exp-fab-dock > .exp-fab:first-child {
    border-radius: 999px 0 0 999px;
  }

  .exp-fab-dock > .exp-fab:last-child {
    border-radius: 0 999px 999px 0;
  }

  .exp-fab-dock > .exp-fab:only-child {
    border-radius: 999px;
  }

  .exp-fab-ico {
    display: inline-flex;
    width: 0.95rem;
    height: 0.95rem;
    flex: 0 0 auto;
  }

  .exp-fab-ico svg {
    width: 100%;
    height: 100%;
    display: block;
  }

  .exp-fab-stack {
    flex-direction: row;
    pointer-events: auto;
  }

  .exp-fab-stack .exp-fab {
    width: auto;
    height: 2.55rem;
    min-height: 2.55rem;
    border-radius: 999px;
    padding: 0 0.85rem;
    font-size: 0.8rem;
    font-weight: 650;
  }

  .exp-fab-stack .exp-fab-export {
    width: 2.55rem;
    min-width: 2.55rem;
    padding: 0;
  }

  .exp-fab-stack .exp-fab-export .exp-fab-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
}

@media (max-width: 22.5rem) {
  .lakbi-chat-launch {
    width: 2.85rem;
    min-width: 2.85rem;
    max-width: 2.85rem;
    min-height: 2.85rem;
    height: 2.85rem;
    padding: 0;
    justify-content: center;
    gap: 0;
    overflow: visible;
    background: transparent;
    box-shadow: none;
  }

  .lakbi-chat-launch span:not(.lakbi-mascot) {
    display: none;
  }

  /* Claw back gutter width so the duration line does not wrap. */
  .agenda-item {
    grid-template-columns: 3.6rem 0.7rem 1.7rem minmax(0, 1fr);
    padding-left: 0.45rem;
  }

  .agenda-rail {
    width: 0.7rem;
  }

  .agenda-chip {
    width: 1.7rem;
    height: 1.7rem;
  }

  .agenda-chip svg {
    width: 0.9rem;
    height: 0.9rem;
  }
}

@media print {
  .lakbi-chat-launch,
  .lakbi-chat,
  .creator-float {
    display: none !important;
  }
}

.pv-status {
  margin: 1.5rem var(--space) 3rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.pv-status.is-error {
  color: var(--brick);
}

.pv-unavailable {
  margin: 0.5rem 0 2rem;
}

.pv-unavailable-actions {
  margin: 0.85rem 0 0;
}

.profile-page .ac-profile-actions .btn-solid.is-following,
#pv-follow.is-following {
  background: color-mix(in srgb, var(--forest) 8%, var(--cream));
  color: var(--forest-deep);
  border-color: color-mix(in srgb, var(--forest) 35%, var(--line));
}

/* Dark-nav Home control (not cream btn-quiet) */
.lb-nav-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0.35rem 0.85rem;
  border-radius: var(--btn-radius);
  border: 1px solid color-mix(in srgb, var(--cream) 32%, transparent);
  background: color-mix(in srgb, var(--cream) 8%, transparent);
  color: var(--cream);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color var(--btn-ease), border-color var(--btn-ease);
}

@media (hover: hover) and (pointer: fine) {
  .lb-nav-home:hover {
    background: color-mix(in srgb, var(--cream) 16%, transparent);
    border-color: color-mix(in srgb, var(--cream) 48%, transparent);
    color: var(--cream);
  }
}

.profile-page .lb-nav .auth-menu-trigger {
  color: var(--cream);
}

.profile-page .lb-nav .auth-menu.is-open .auth-menu-trigger {
  border-color: color-mix(in srgb, var(--cream) 35%, transparent);
  background: color-mix(in srgb, var(--cream) 12%, transparent);
}

@media (hover: hover) and (pointer: fine) {
  .profile-page .lb-nav .auth-menu-trigger:hover {
    border-color: color-mix(in srgb, var(--cream) 35%, transparent);
    background: color-mix(in srgb, var(--cream) 12%, transparent);
  }
}

.pv-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.pv-action {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0.45rem 1rem;
  border-radius: var(--btn-radius);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--btn-ease), border-color var(--btn-ease), color var(--btn-ease);
}

.pv-action-follow {
  background: var(--forest-deep);
  color: var(--cream);
  border: 1px solid var(--forest-deep);
}

.pv-action-follow.is-following {
  background: color-mix(in srgb, var(--forest) 8%, white);
  color: var(--forest-deep);
  border-color: color-mix(in srgb, var(--forest) 32%, var(--line));
}

.pv-action-explore,
.pv-action-quiet {
  background: transparent;
  color: var(--forest-deep);
  border: 1px solid color-mix(in srgb, var(--forest) 28%, var(--line));
}

@media (hover: hover) and (pointer: fine) {
  .pv-action-follow:hover {
    background: var(--forest);
    border-color: var(--forest);
  }

  .pv-action-follow.is-following:hover {
    background: color-mix(in srgb, var(--forest) 14%, white);
  }

  .pv-action-explore:hover,
  .pv-action-quiet:hover {
    background: color-mix(in srgb, var(--forest) 8%, transparent);
    border-color: color-mix(in srgb, var(--forest) 45%, var(--line));
    color: var(--forest-deep);
  }
}

.creator-float-safety {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid color-mix(in srgb, var(--forest) 12%, var(--line));
}

.creator-safety-btn {
  flex: 1 1 auto;
  min-height: var(--tap);
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  background: transparent;
  color: color-mix(in srgb, var(--forest) 70%, #666);
  border: 1px solid color-mix(in srgb, var(--forest) 22%, var(--line));
}

@media (hover: hover) and (pointer: fine) {
  .creator-safety-btn:hover {
    background: color-mix(in srgb, var(--forest) 6%, transparent);
    color: var(--forest-deep);
  }
}

.ac-blocked-list {
  margin: 0.35rem 0 0.75rem;
}

.pv-collab-card {
  display: grid;
  gap: 0.45rem;
  align-content: start;
}

.pv-collab-meta {
  display: grid;
  gap: 0.25rem;
  padding: 0 0.15rem;
}

.pv-collab-owner {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

/* Mobile sticky chrome — match Capacitor workbook (mw-mast / mw-tabs / mw-panel) */
@media (max-width: 47.99rem) {
  :root {
    /* Icon tabs make the sticky nav ~0.75rem taller; the collapsed strip below
       drops the glyphs and goes back to the old offset. */
    --sheet-sticky-offset: 4.75rem;
    --paper-world: #fdf8f1;
    --mast-btn-h: var(--tap);
    --mast-btn-pad: 0.7rem;
    --mast-btn-fs: 0.72rem;
  }


  /* Forest chrome behind rounded paper sheet — same as mobile stack */
  body:has(.workbook) {
    background: var(--forest-deep);
  }

  .workbook {
    background: var(--forest-deep);
  }

  .mast {
    position: relative;
    z-index: 46;
    gap: 0.45rem;
    padding: calc(0.55rem + env(safe-area-inset-top, 0px)) 1rem 0.85rem;
    transition: padding 0.18s ease;
  }

  .mast-top {
    margin-bottom: 0.65rem;
    gap: var(--sp-2);
  }

  .mast.is-collapsed .mast-top {
    margin-bottom: 0;
    gap: 0.45rem;
  }

  .mast-back {
    width: var(--mast-btn-h);
    height: var(--mast-btn-h);
  }

  .mast-kicker {
    font-size: 0.66rem;
    letter-spacing: 0.18em;
  }

  .mast h1 {
    margin-top: 0.35rem;
    font-size: clamp(1.55rem, 7vw, 2.1rem);
    line-height: 1.05;
    overflow-wrap: anywhere;
  }

  .mast-meta {
    gap: 0.2rem;
    margin-top: 0.55rem;
    font-size: 0.84rem;
  }

  .mast-route {
    font-size: 0.84rem;
    line-height: 1.4;
    color: color-mix(in srgb, var(--cream) 88%, transparent);
  }

  .mast-who {
    font-size: 0.78rem;
    line-height: 1.35;
    color: color-mix(in srgb, var(--cream) 62%, transparent);
  }

  .mast-meta #countdown,
  .mast-meta strong#countdown {
    margin-top: 0.15rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gold-pale);
  }

  /* Phone mast: initials replace the comma-separated traveller line. */
  .mast-who {
    display: none;
  }

  .mast-people {
    margin-top: 0.35rem;
  }

  .mast-avatars {
    display: inline-flex;
    align-items: center;
  }

  .mast-countdown-ico {
    display: block;
    width: 0.85rem;
    height: 0.85rem;
    flex: 0 0 auto;
  }

  .mast-countdown-ico svg {
    display: block;
    width: 100%;
    height: 100%;
  }

  .mast-countdown-chip {
    padding: 0.24rem 0.6rem 0.26rem 0.5rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--gold-pale) 16%, transparent);
    color: var(--gold-pale);
  }

  .mast-meta .mast-countdown-chip #countdown {
    margin-top: 0;
    font-size: 0.74rem;
    white-space: nowrap;
  }

  .mast-full {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
  }

  .mast-full[hidden] {
    display: none !important;
  }

  .mast-compact {
    display: none;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
  }

  .mast-compact[hidden] {
    display: none !important;
  }

  .mast.is-collapsed {
    position: sticky;
    top: 0;
    padding-bottom: 0.4rem;
  }

  .mast.is-collapsed .mast-full {
    display: none !important;
  }

  .mast.is-collapsed .mast-compact {
    display: flex;
  }

  .mast-compact-hit {
    appearance: none;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0.15rem 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .mast-compact-title {
    flex: 0 1 auto;
    min-width: 0;
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(0.95rem, 4.2vw, 1.15rem);
    letter-spacing: -0.02em;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--cream);
  }

  .mast-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 1.35rem;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--gold-pale) 22%, transparent);
    border: 1px solid color-mix(in srgb, var(--gold-pale) 45%, transparent);
    color: var(--gold-pale);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
  }

  .mast-badge[hidden] {
    display: none !important;
  }

  html.is-viewable .mast {
    padding-block: 0.65rem 0.7rem;
    padding-top: calc(0.65rem + env(safe-area-inset-top, 0px));
  }

  html.is-viewable .mast h1 {
    font-size: clamp(1.25rem, 5.8vw, 1.7rem);
  }

  html.is-viewable .mast-meta {
    font-size: 0.72rem;
    margin-top: 0.35rem;
  }

  .sheet-nav {
    position: sticky;
    top: 0;
    z-index: 45;
    padding: 0.2rem 0.35rem 0 0.55rem;
    background: var(--forest-deep);
    border-bottom: 1px solid color-mix(in srgb, var(--cream) 10%, transparent);
    box-shadow: none;
  }

  .mast.is-collapsed ~ .sheet-nav {
    top: 3.15rem;
  }

  /* Paper sheet under forest chrome — Capacitor .mw-panel */
  .sheet {
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 0;
    padding: 1rem 1rem calc(6.25rem + env(safe-area-inset-bottom, 0px));
    background: var(--paper-world);
    color: var(--ink);
    border-radius: 1.15rem 1.15rem 0 0;
    box-shadow: none;
  }

  .sheet-nav-top,
  .sheet-nav-label,
  .nav-toggle {
    display: none !important;
  }

  .sheet-nav {
    overflow: visible;
    max-width: 100%;
  }

  .sheet-nav-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-width: 0;
    max-width: 100%;
  }

  .sheet-tabs-scroller {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-right: 0.15rem;
  }

  .sheet-tabs,
  .sheet-tabs.is-open {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 0.1rem !important;
    flex: 1 1 auto;
    width: auto;
    max-width: none;
    min-width: 0;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 0 0.35rem 0 0 !important;
    scroll-padding-inline: 0.5rem 1.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
  }

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

  .sheet-tabs [role="tab"] {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    width: auto !important;
    min-height: 2.15rem !important;
    height: auto !important;
    padding: 0.45rem 0.55rem 0.5rem !important;
    font-size: 0.78rem !important;
    font-weight: 550;
    letter-spacing: 0.01em;
    text-transform: none;
    text-align: center;
    background: transparent !important;
    color: color-mix(in srgb, var(--cream) 62%, transparent) !important;
    border: 0 !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    white-space: nowrap !important;
    -webkit-tap-highlight-color: transparent;
  }

  .sheet-tabs [role="tab"][aria-selected="true"] {
    background: transparent !important;
    color: var(--cream) !important;
    font-weight: 650;
    border-bottom-color: var(--gold-pale) !important;
  }

  .sheet-tabs [role="tab"] .tab-soon {
    display: none;
  }

  .sheet-tabs [role="tab"] {
    flex-direction: column;
    gap: 0.14rem;
    padding-top: 0.34rem !important;
  }

  .sheet-tabs .tab-ico {
    display: block;
    width: 1.05rem;
    height: 1.05rem;
    opacity: 0.85;
  }

  .sheet-tabs .tab-ico svg {
    display: block;
    width: 100%;
    height: 100%;
  }

  .sheet-tabs [role="tab"][aria-selected="true"] .tab-ico {
    opacity: 1;
  }

  /* Collapsed mast: glyphs fold away so the sticky strip stays one line tall. */
  .mast.is-collapsed ~ .sheet-nav .sheet-tabs [role="tab"] {
    flex-direction: row;
    gap: 0.25rem;
    padding-top: 0.45rem !important;
  }

  .mast.is-collapsed ~ .sheet-nav .sheet-tabs .tab-ico {
    display: none;
  }

  .mast.is-collapsed ~ .sheet {
    --sheet-sticky-offset: 4rem;
  }

  .sheet-tabs-fade {
    display: block;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease;
    position: absolute;
    top: 0;
    right: 1.6rem;
    bottom: 0;
    width: 2.2rem;
    z-index: 2;
    background: linear-gradient(to right, transparent, var(--forest-deep) 78%);
  }

  .sheet-tabs-more {
    display: inline-flex;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease;
    appearance: none;
    position: relative;
    z-index: 3;
    flex: 0 0 auto;
    align-self: center;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    margin: 0 0.15rem 0 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--cream) 14%, transparent);
    color: var(--cream);
    cursor: pointer;
  }

  .sheet-tabs-scroller.is-overflow:not(.is-at-end) .sheet-tabs-fade,
  .sheet-tabs-scroller.is-overflow:not(.is-at-end) .sheet-tabs-more {
    opacity: 1;
    pointer-events: auto;
  }

  .sheet-tabs-more svg {
    width: 0.9rem;
    height: 0.9rem;
    display: block;
  }

  .sheet-nav-tray {
    display: flex;
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.3rem;
    padding: 0.15rem 0.15rem 0.4rem 0;
    border-top: 0;
    box-sizing: border-box;
  }

  /* Public view: Home / Upvote / Copy / Sign in as one even row */
  .sheet-nav-tray:has(#public-nav:not([hidden]), #owner-nav:not([hidden])) {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    border-top: 1px solid color-mix(in srgb, var(--cream) 12%, transparent);
    padding-top: 0.3rem;
  }

  .sheet-nav-tray:has(#public-nav:not([hidden]), #owner-nav:not([hidden])) .public-nav {
    display: contents;
  }

  .sheet-nav-tray .account-slot {
    flex: 0 0 auto;
    order: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    position: relative;
    z-index: 50;
  }

  .sheet-nav-tray:has(#public-nav:not([hidden]), #owner-nav:not([hidden])) .account-slot {
    order: 0;
    flex: 0 0 auto;
    margin-left: 0;
  }

  .sheet-nav-tray:has(#owner-nav:not([hidden])) {
    justify-content: flex-end;
  }

  .sheet-nav-tray:has(#public-nav:not([hidden]), #owner-nav:not([hidden])) #public-nav > a:not([hidden]),
  .sheet-nav-tray:has(#public-nav:not([hidden]), #owner-nav:not([hidden])) #public-nav > button:not([hidden]) {
    flex: 1 1 0;
    min-width: 0;
    order: 1;
  }

  .sheet-nav-tray:has(#owner-nav:not([hidden])) #owner-nav > button:not([hidden]) {
    flex: 0 0 auto;
    width: 1.85rem;
    min-width: 1.85rem;
    order: 1;
  }

  .sheet-nav-tray:has(#owner-nav:not([hidden])) #owner-nav > #mast-publish:not([hidden]) {
    width: auto;
    min-width: auto;
    padding: 0 0.7rem !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.02em !important;
    text-transform: none !important;
  }

  .sheet-nav-tray .account-slot .btn-solid,
  .sheet-nav-tray .account-slot .btn-quiet,
  .sheet-nav-tray .account-slot > a,
  .sheet-nav-tray:has(#public-nav:not([hidden]), #owner-nav:not([hidden])) #public-nav > a,
  .sheet-nav-tray:has(#public-nav:not([hidden]), #owner-nav:not([hidden])) #public-nav > button,
  .sheet-nav-tray:has(#public-nav:not([hidden]), #owner-nav:not([hidden])) #owner-nav > button:not([hidden]) {
    /* :not([hidden]) — the demo's hidden Publish showed, disabled (UI hunt 2026-10-12) */
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    min-height: 1.85rem !important;
    height: 1.85rem !important;
    margin: 0;
    padding: 0 0.2rem !important;
    font-size: 0.62rem !important;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none !important;
    line-height: 1 !important;
    white-space: nowrap;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    vertical-align: middle;
  }

  .sheet-nav-tray .account-slot .btn-solid,
  .sheet-nav-tray .account-slot .btn-quiet,
  .sheet-nav-tray .account-slot > a {
    width: auto;
    min-width: 3.5rem;
    color: var(--gold-pale) !important;
  }

  .sheet-nav-tray:has(#public-nav:not([hidden]), #owner-nav:not([hidden])) #public-nav > a,
  .sheet-nav-tray:has(#public-nav:not([hidden]), #owner-nav:not([hidden])) #public-nav > button,
  .sheet-nav-tray:has(#public-nav:not([hidden]), #owner-nav:not([hidden])) #owner-nav > button {
    color: #fffaf2 !important;
    background: color-mix(in srgb, var(--cream) 16%, transparent) !important;
    border: 1px solid color-mix(in srgb, var(--gold-pale) 55%, transparent) !important;
    border-radius: 999px !important;
    padding: 0 0.55rem !important;
    gap: 0.22rem !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.28);
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-size: 0.72rem !important;
  }

  .sheet-nav-tray:has(#public-nav:not([hidden]), #owner-nav:not([hidden])) #public-nav .public-nav-svg,
  .sheet-nav-tray:has(#public-nav:not([hidden]), #owner-nav:not([hidden])) #owner-nav .public-nav-svg {
    width: 1rem;
    height: 1rem;
    color: #fffaf2;
    stroke: currentColor;
  }

  /* Copy this itinerary: the light pill in every layout (owner 2026-10-13: the see-through gold one on a coloured
     header was ugly) — the same look as the wide header's primary button */
  .sheet-nav-tray:has(#public-nav:not([hidden]), #owner-nav:not([hidden])) #nav-edit {
    color: #1f3d30 !important;
    background: #fbf6ec !important;
    border-color: transparent !important;
    text-shadow: none !important;
  }
  .sheet-nav-tray:has(#public-nav:not([hidden]), #owner-nav:not([hidden])) #nav-edit .public-nav-svg {
    color: #1f3d30 !important;
  }

  .sheet-nav-tray:has(#public-nav:not([hidden]), #owner-nav:not([hidden])) #nav-upvote.is-on,
  .sheet-nav-tray:has(#public-nav:not([hidden]), #owner-nav:not([hidden])) #mast-publish.is-published {
    color: #ffe4da !important;
    background: color-mix(in srgb, var(--brick) 36%, transparent) !important;
    border-color: color-mix(in srgb, var(--brick) 65%, var(--gold-pale)) !important;
  }

  .sheet-nav-tray .account-slot .auth-menu {
    position: relative;
    width: auto;
    display: block;
  }

  .sheet-nav-tray .account-slot .auth-menu-label {
    display: grid;
  }

  .sheet-nav-tray .account-slot .auth-menu-trigger {
    min-height: 1.85rem;
    height: 1.85rem;
    gap: 0.3rem;
    color: var(--cream);
    background: color-mix(in srgb, var(--cream) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--gold-pale) 55%, transparent);
    border-radius: 999px;
    padding: 0.1rem 0.45rem 0.1rem 0.15rem;
  }

  .sheet-nav-tray .account-slot .auth-avatar {
    width: 1.35rem;
    height: 1.35rem;
  }

  .sheet-nav-tray .account-slot .auth-menu-panel {
    position: absolute !important;
    top: calc(100% + 0.4rem) !important;
    right: 0 !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 80;
    width: min(17.5rem, calc(100vw - 1.25rem)) !important;
    max-width: calc(100vw - 1.25rem);
    max-height: min(70dvh, 22rem);
    overflow-x: hidden;
    overflow-y: auto;
  }

  .sheet-nav-tray .account-slot .auth-menu-panel[hidden] {
    display: none !important;
  }

  .public-nav {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    margin-left: 0;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 0;
    padding: 0;
    border-top: 0;
    order: 1;
  }

  /* :not([hidden]) — the demo's hidden Publish showed here, disabled (UI hunt 2026-10-12) */
  .public-nav .btn-quiet:not([hidden]),
  .public-nav .btn-solid:not([hidden]) {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-height: 1.85rem !important;
    height: 1.85rem;
    padding: 0 0.25rem !important;
    gap: 0.2rem;
    font-size: 0.72rem !important;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    text-align: center;
    text-decoration: none !important;
    line-height: 1;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: color-mix(in srgb, var(--cream) 88%, transparent) !important;
    box-shadow: none !important;
  }

  .public-nav .public-nav-svg {
    width: 1.05rem;
    height: 1.05rem;
  }

  .public-nav .btn-solid {
    color: var(--gold-pale) !important;
  }

  .public-nav-upvote.is-on {
    background: transparent !important;
    color: #ffd7cb !important;
  }

  /* Capacitor-style mast tools (Publish + icon Sync/Gear) */
  .mast-top .mast-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--sp-1);
    padding: 0;
  }

  .mast-top .mast-actions[hidden] {
    display: none !important;
  }

  .mast-actions-tools {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--sp-1);
    margin: 0;
    padding: 0;
    border: 0;
  }

  .mast-top .mast-btn {
    flex: 0 0 auto;
    box-sizing: border-box;
    min-height: var(--mast-btn-h);
    height: var(--mast-btn-h);
    padding: 0.3rem var(--mast-btn-pad);
    font-size: var(--mast-btn-fs);
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    line-height: 1;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--cream) 28%, transparent);
    background: color-mix(in srgb, var(--cream) 14%, transparent);
    color: var(--cream);
    box-shadow: none;
    transform: none;
    white-space: nowrap;
  }

  .mast-top .mast-btn-quiet {
    background: transparent;
  }

  .mast-top .mast-btn-accent {
    background: color-mix(in srgb, var(--cream) 14%, transparent);
    border-color: color-mix(in srgb, var(--cream) 28%, transparent);
    color: var(--cream);
    box-shadow: none;
  }

  .mast-top .mast-btn-icon {
    width: var(--mast-btn-h);
    min-width: var(--mast-btn-h);
    padding: 0;
    justify-content: center;
  }

  .mast-top .mast-btn-icon .mast-btn-label {
    display: none;
  }

  /* Collapsed: keep Publish / Workbook / Sync visible in the mast tools row. */

  .mast-btn {
    min-height: var(--mast-btn-h);
    padding: 0.3rem var(--mast-btn-pad);
    font-size: var(--mast-btn-fs);
    border-radius: 999px;
    letter-spacing: 0;
    text-transform: none;
  }

  .day-switch {
    border-bottom: 0;
    box-shadow: 0 1px 0 color-mix(in srgb, var(--line) 55%, transparent);
  }

  .creator-float {
    width: min(14.25rem, calc(100vw - 5.25rem));
    left: auto;
    right: max(0.65rem, env(safe-area-inset-right));
    bottom: max(4.85rem, calc(env(safe-area-inset-bottom) + 4.35rem));
  }
}

/* Address autocomplete + map picker (itinerary) */
.geo-field {
  position: relative;
}

.geo-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem;
  align-items: stretch;
}

.geo-input-row input {
  min-width: 0;
  width: 100%;
}

.geo-map-btn {
  white-space: nowrap;
  min-height: var(--tap);
  border-radius: var(--btn-radius);
  padding: 0 0.85rem;
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.wb-field.geo-field .geo-status {
  margin-top: 0.3rem;
}

.wb-field.geo-field .geo-input-row input {
  min-height: var(--tap);
}

.geo-suggest {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0.25rem;
  position: relative;
  z-index: 5;
  max-height: 11rem;
  overflow: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(19, 37, 30, 0.14);
}

.geo-map-search .geo-suggest,
.geo-map-suggest {
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  margin-top: 0.35rem;
}

.geo-suggest li {
  margin: 0;
}

.geo-suggest button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.55rem 0.7rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.35;
  white-space: normal;
  color: var(--ink);
  cursor: pointer;
}

.geo-suggest-title {
  display: block;
  font-weight: 600;
}

.geo-suggest-sub {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: color-mix(in srgb, var(--ink) 62%, transparent);
  line-height: 1.35;
}

.geo-suggest-kicker {
  display: block;
  margin-bottom: 0.12rem;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 52%, transparent);
}

.geo-suggest button:focus-visible {
  background: var(--cream);
}

@media (hover: hover) and (pointer: fine) {
  .geo-suggest button:hover {
    background: var(--cream);
  }
}

.geo-suggest-empty {
  padding: 0.55rem 0.7rem;
  font-size: 0.86rem;
  color: color-mix(in srgb, var(--ink) 62%, transparent);
}

.geo-status {
  margin: 0.35rem 0 0;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: color-mix(in srgb, var(--ink) 62%, transparent);
}

.geo-status.is-ok {
  color: color-mix(in srgb, var(--forest) 78%, #000);
}

.geo-status.is-warn {
  color: color-mix(in srgb, var(--brick) 75%, #000);
}

.itin-address {
  margin: 0.55rem 0 0;
  font-size: 0.95rem;
  line-height: 1.4;
}

.itin-address a {
  color: var(--forest);
  text-underline-offset: 0.12em;
}

.geo-map-overlay {
  position: fixed;
  inset: 0;
  /* Above itinerary sheets / drawers; below full-screen busy overlays */
  z-index: 13500;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 1rem;
}

.geo-map-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(18, 28, 24, 0.48);
  cursor: pointer;
}

.geo-map-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 34rem);
  max-height: min(92vh, 44rem);
  padding: 1.1rem 1.15rem 1.15rem;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 22px 48px rgba(19, 37, 30, 0.22);
  overflow: auto;
}

.geo-map-panel h2 {
  margin: 0;
  font-family: var(--display, Fraunces, Georgia, serif);
  font-size: 1.35rem;
}

.geo-map-note {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: color-mix(in srgb, var(--ink) 70%, transparent);
}

.geo-map-search {
  position: relative;
  margin: 0.75rem 0 0;
  z-index: 3;
}

.geo-map-search input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
}

.geo-map-suggest {
  top: calc(100% + 0.3rem);
}

.geo-map-canvas-wrap {
  position: relative;
  margin: 0.85rem 0 0.5rem;
}

.geo-map-canvas {
  height: min(48vh, 22rem);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--forest) 8%, var(--paper));
}

.geo-map-canvas.is-maplibre,
.geo-map-canvas.is-google {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.geo-map-canvas.is-maplibre .maplibregl-canvas {
  display: block;
}

.geo-map-canvas.is-maplibre .maplibregl-ctrl-attrib {
  font-size: 0.68rem;
  max-width: min(70%, 16rem);
}

.geo-map-canvas.is-google .gm-fullscreen-control,
.geo-map-canvas.is-google .gm-svpc,
.geo-map-canvas.is-google button.gm-control-active[aria-label="Toggle fullscreen view"] {
  display: none !important;
}

.geo-map-locate {
  appearance: none;
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  z-index: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  height: 2.45rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--forest);
  box-shadow: 0 2px 10px rgba(19, 37, 30, 0.18);
  cursor: pointer;
}

.geo-map-locate svg {
  width: 1.2rem;
  height: 1.2rem;
  display: block;
}

.geo-map-locate.is-on {
  background: var(--forest);
  color: var(--paper);
  border-color: transparent;
}

.geo-map-locate.is-busy {
  opacity: 0.65;
  pointer-events: none;
}

.geo-map-pin {
  background: transparent !important;
  border: 0 !important;
}

.geo-day-pin.live-map-pin,
.live-map-pin.leaflet-div-icon,
.live-map-pin {
  background: transparent !important;
  border: none !important;
  overflow: visible !important;
}

.geo-day-pin.live-map-pin {
  width: 36px;
  height: 44px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.geo-day-pin.live-map-pin.is-other {
  pointer-events: auto;
  cursor: pointer;
}

.live-map-pin-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
  background: var(--forest);
  color: var(--cream, var(--paper));
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(19, 37, 30, 0.35);
  border: 2px solid color-mix(in srgb, var(--gold, #c9a96a) 70%, white);
}

.live-map-pin-mark i {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  transform: rotate(45deg);
  line-height: 1;
  z-index: 1;
}

.live-map-pin.is-on .live-map-pin-mark {
  background: #8b3a2a;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold, #c9a96a) 55%, transparent), 0 6px 16px rgba(19, 37, 30, 0.4);
}

.geo-map-pin-mark {
  display: block;
  width: 22px;
  height: 22px;
  margin: 0 auto;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--forest);
  border: 2px solid var(--paper);
  box-shadow: 0 2px 8px rgba(19, 37, 30, 0.35);
  position: relative;
}

.geo-map-pin-mark::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--paper);
}

.geo-map-preview {
  margin: 0.25rem 0 0;
  font-size: 0.86rem;
  line-height: 1.35;
}

.geo-map-error {
  margin: 0.4rem 0 0;
  font-size: 0.86rem;
  color: var(--brick);
}

.geo-map-actions {
  display: flex;
  gap: 0.55rem;
  justify-content: flex-end;
  margin-top: 0.9rem;
}

.geo-map-cancel,
.geo-map-use {
  appearance: none;
  border-radius: 0;
  padding: 0.65rem 1.1rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.geo-map-cancel {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}

.geo-map-use {
  border: 0;
  background: var(--forest);
  color: var(--paper);
}

.geo-map-use:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* In-app browser gate — prompt to open Safari/Chrome (no UI mutation) */
html.lb-inapp-open,
html.lb-inapp-open body {
  overflow: hidden;
}

.lb-inapp-modal {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(19, 37, 30, 0.72);
}

.lb-inapp-card {
  width: min(22.5rem, 100%);
  padding: 1.35rem 1.25rem 1.2rem;
  border-radius: 1rem;
  background: var(--cream, #f7f1e6);
  color: var(--ink, #1a1410);
  box-shadow: 0 24px 60px rgba(19, 37, 30, 0.4);
  font-family: var(--sans);
}

.lb-inapp-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft, #4a3f36);
}

.lb-inapp-card h2 {
  margin: 0 0 0.55rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.45rem;
  line-height: 1.2;
}

.lb-inapp-lede,
.lb-inapp-how {
  margin: 0 0 0.7rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink-soft, #4a3f36);
}

.lb-inapp-actions {
  display: grid;
  gap: 0.45rem;
  margin-top: 1rem;
}

.lb-inapp-primary,
.lb-inapp-secondary,
.lb-inapp-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0.65rem 1rem;
  border-radius: var(--btn-radius);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color var(--btn-ease), border-color var(--btn-ease), color var(--btn-ease);
}

.lb-inapp-primary {
  background: var(--forest, #1e3a2f);
  color: var(--cream, #f7f1e6);
}

.lb-inapp-secondary {
  background: transparent;
  border-color: var(--line, rgba(26, 20, 16, 0.14));
  color: var(--ink, #1a1410);
}

.lb-inapp-ghost {
  background: transparent;
  color: var(--ink-soft, #4a3f36);
  font-weight: 500;
}

.lb-inapp-note {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  color: var(--forest, #1e3a2f);
}

/* ---------------------------------------------------------------------------
   Flights - one section per traveller. Everyone reads the crew's legs as
   boarding-pass cards; only your own section turns into fields on Edit.
   --------------------------------------------------------------------------- */
.flight-person {
  margin: 0 0 1.8rem;
}

.flight-section {
  margin: 0 0 1.5rem;
}

.flight-section-head h3 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
}

.flight-section-head p {
  margin: 0 0 0.75rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.flight-apply-box {
  margin: 0 0 1.2rem;
}

.flight-apply-box .btn-quiet,
.flight-apply-disclose .btn-quiet {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.flight-apply-disclose {
  margin: 0 0 1.2rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: color-mix(in srgb, var(--cream) 55%, #fff);
}

.flight-apply-disclose h3 {
  margin: 0 0 0.4rem;
  text-align: center;
}

.flight-apply-disclose p {
  margin: 0 0 0.75rem;
  color: var(--ink);
  font-size: 0.92rem;
  text-align: center;
}




.flight-avatar {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  flex: none;
}

.flight-avatar.is-initials {
  display: grid;
  place-items: center;
  background: var(--cream);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}


/* ---- segment tabs: one per leg, shown only when there's more than one ---- */
.flight-seg-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
}

.flight-seg-tab {
  flex: 1 1 0;
  appearance: none;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--cream) 55%, #fff);
  border-radius: 0.8rem;
  padding: 0.5rem 0.6rem;
  font: inherit;
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
}

.flight-seg-tab[aria-selected="true"] {
  border-color: color-mix(in srgb, var(--forest) 45%, transparent);
  background: color-mix(in srgb, var(--forest) 10%, #fff);
  font-weight: 600;
}

.flight-seg-tab small {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-soft);
}

/* ---- the pass card ---- */
.flight-pass {
  background: color-mix(in srgb, var(--cream) 74%, #fff);
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  overflow: hidden;
  margin-bottom: 0.85rem;
}

.flight-pass-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  background: var(--forest);
  color: var(--cream);
}

.flight-pass-air {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.flight-pass-logo {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 0.5rem;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--cream) 90%, transparent);
  color: var(--forest-deep);
  font-size: 0.68rem;
  font-weight: 700;
  flex: none;
}

.flight-pass-air b {
  font-size: 0.92rem;
  font-weight: 600;
}

.flight-pass-air small {
  display: block;
  font-size: 0.74rem;
  color: color-mix(in srgb, var(--cream) 70%, transparent);
}

.flight-pass-flag {
  flex: 0 0 auto;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.24rem 0.6rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--cream) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--cream) 34%, transparent);
}

.flight-pass-route {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
}

.flight-port {
  min-width: 0;
}

.flight-port.is-to {
  text-align: right;
}

.flight-port b {
  display: block;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
}

.flight-port span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.flight-port em {
  display: block;
  margin-top: 0.3rem;
  font-style: normal;
  font-size: 1.05rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.flight-pass-leg {
  display: grid;
  justify-items: center;
  gap: 0.2rem;
  color: color-mix(in srgb, var(--ink) 45%, transparent);
}

.flight-pass-line {
  width: 4.2rem;
  border-top: 1.5px dashed currentColor;
}

.flight-pass-leg small {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.flight-pass-leg svg {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--brick);
}

.flight-pass-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.1rem 0.9rem;
  padding: 0 1rem 0.6rem;
}

.flight-pass-meta div {
  padding: 0.45rem 0;
  border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}

.flight-pass-meta small {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 48%, transparent);
}

.flight-pass-meta strong {
  font-size: 0.95rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.flight-pass-notes {
  margin: 0;
  padding: 0 1rem 0.7rem;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.flight-pass-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.7rem 1rem 0.9rem;
  border-top: 1px dashed color-mix(in srgb, var(--ink) 18%, transparent);
}

.flight-pass-disrupt {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0 1rem 0.9rem;
}

.flight-incidents-banner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
}

.flight-incident-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0.8rem;
  border-radius: var(--card-radius, 12px);
  background: color-mix(in srgb, var(--brick) 12%, var(--cream));
  border: 1px solid color-mix(in srgb, var(--brick) 35%, transparent);
  font-size: 0.82rem;
}

.flight-pass-pnr small {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 48%, transparent);
}

.flight-pass-pnr strong {
  font-family: var(--serif);
  font-size: 1.3rem;
  letter-spacing: 0.14em;
}

/* Decorative only — the real reference is the text beside it. */
.flight-pass-barcode {
  height: 2.3rem;
  width: 7.5rem;
  background: repeating-linear-gradient(
    90deg,
    var(--ink) 0 2px,
    transparent 2px 4px,
    var(--ink) 4px 5px,
    transparent 5px 9px
  );
  opacity: 0.72;
  border-radius: 0.2rem;
}

/* ---- edit mode ---- */
.flight-edit-list {
  display: grid;
  gap: 1.15rem;
}

.flight-card {
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 0.9rem 1rem 1rem;
  min-width: 0;
  margin-bottom: 0;
}

.flight-card.is-editing {
  background: transparent;
}

.flight-card-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.flight-leg-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.flight-card-head .btn-quiet {
  margin-left: auto;
}

.flight-edit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.6rem 0.75rem;
  margin-bottom: 0.6rem;
}

.flight-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.4rem 0 0.9rem;
}

/* ---- scan feedback: a bar while it reads, a tinted panel for the verdict ---- */
.flight-scan {
  border: 1px solid var(--line);
  background: var(--cream);
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
}

.flight-scan p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.flight-scan ul {
  margin: 0.45rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.76rem;
  color: var(--ink-soft);
}

.flight-scan-bar {
  height: 4px;
  background: var(--line);
  margin-bottom: 0.55rem;
  overflow: hidden;
}

.flight-scan-bar span {
  display: block;
  height: 100%;
  width: 4%;
  background: var(--ink);
  transition: width 0.25s ease;
}

.flight-scan.is-warn {
  border-color: #c9a227;
  background: #fdf7e3;
}

.flight-scan.is-error {
  border-color: #b4443a;
  background: #fbecea;
}

.flight-scan.is-error p {
  color: #8f2f27;
}

/* Airport codes and the divider crowd each other on the narrowest phones. */
@media (max-width: 26rem) {
  .flight-port b {
    font-size: 1.6rem;
  }

  .flight-pass-line {
    width: 2.2rem;
  }
}

/* ---- FAB: Save / Cancel / scan / add while editing ---- */
.exp-fab-scan {
  background: var(--cream);
  color: var(--forest);
  border: 1px solid var(--forest);
}

.exp-fab-scan svg {
  width: 1.45rem;
  height: 1.45rem;
}

.exp-fab-scan:disabled,
.exp-fab:disabled {
  opacity: 0.42;
}

/* ---- scan modal ---- */
.flight-scan-modal {
  max-width: 38rem;
  width: min(38rem, calc(100vw - 2rem));
}

.flight-scan-lead {
  margin: 0.2rem 0 1rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

/* Step strip mirrors the parser's own stages so a rejection reads as a
   deliberate stop rather than a failure. */
.flight-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 1rem;
}

.flight-step {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  padding: 0.24rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  white-space: nowrap;
}

.flight-step[aria-current="step"] {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--cream);
  font-weight: 600;
}

.flight-dropzone {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  padding: 1.6rem 1rem;
  border: 1.5px dashed color-mix(in srgb, var(--ink) 26%, transparent);
  border-radius: 0.9rem;
  background: color-mix(in srgb, var(--cream) 55%, #fff);
  text-align: center;
  cursor: pointer;
}

.flight-dropzone svg {
  width: 2rem;
  height: 2rem;
  color: var(--brick);
}

.flight-dropzone strong {
  font-size: 0.95rem;
}

.flight-dropzone span {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.flight-dropzone .btn-solid {
  margin-top: 0.5rem;
}

.flight-rules {
  margin: 0.85rem 0;
  padding-left: 1.05rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.flight-rules li {
  margin: 0.28rem 0;
}

.flight-rules li::marker {
  color: var(--brick);
}

.flight-scan-card {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: color-mix(in srgb, var(--cream) 55%, #fff);
  padding: 0.9rem 1rem;
  margin-bottom: 0.9rem;
}

.flight-scan-card h3 {
  margin: 0 0 0.2rem;
  font-family: var(--serif);
  font-size: 1rem;
}

.flight-scan-card p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.flight-disclaimer {
  margin: 0 0 0.9rem;
  padding: 0.65rem 0.8rem;
  border-radius: 0.7rem;
  border: 1px solid #c9a227;
  background: #fdf7e3;
  font-size: 0.78rem;
  line-height: 1.45;
}

.flight-scan-file {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.flight-scan-note {
  margin: 0 0 0.9rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.flight-scan-error {
  margin: 0 0 0.9rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.6rem;
  border: 1px solid #b4443a;
  background: #fbecea;
  color: #8f2f27;
  font-size: 0.8rem;
}

.flight-checks {
  list-style: none;
  margin: 0 0 0.9rem;
  padding: 0;
  font-size: 0.8rem;
}

.flight-checks li {
  position: relative;
  padding: 0.3rem 0 0.3rem 1.5rem;
}

.flight-checks li::before {
  position: absolute;
  left: 0;
  font-weight: 700;
}

.flight-checks li.is-ok::before {
  content: "✓";
  color: var(--forest);
}

.flight-checks li.is-bad::before {
  content: "✕";
  color: #b4443a;
}

.flight-checks small {
  display: block;
  color: var(--ink-soft);
}

.flight-verdict {
  padding: 0.6rem 0.8rem;
  border-radius: 0.7rem;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 0.9rem;
}

.flight-verdict.is-bad {
  border: 1px solid #b4443a;
  background: #fbecea;
  color: #8f2f27;
}

/* ---- review step ---- */
.flight-review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.55rem 0.7rem;
  margin-bottom: 0.9rem;
}

.flight-review-field {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
}

.flight-review-field > span {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.28rem 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.flight-review-field input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.flight-review-field.is-missing input,
.wb-field.is-missing input {
  border-color: #b4443a;
  background: #fbecea;
}

@media (max-width: 30rem) {
  .flight-steps {
    font-size: 0.64rem;
  }
}

/* ---- Trip detail: Travellers roster ---- */
.traveller-list {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.traveller-row {
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: color-mix(in srgb, var(--cream) 55%, #fff);
  padding: 0.7rem 0.85rem;
}

.traveller-row-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.traveller-row-head > div {
  min-width: 0;
}

.traveller-row-head strong {
  display: block;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.traveller-row-head .traveller-email {
  display: inline;
}

.traveller-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.2rem;
}

.traveller-role {
  font-size: 0.63rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 650;
  padding: 0.14rem 0.42rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--forest) 12%, transparent);
  color: var(--forest);
  white-space: nowrap;
}

.traveller-role.is-none {
  background: transparent;
  border: 1px dashed var(--line);
  color: var(--ink-soft);
  font-weight: 500;
}

.traveller-flights {
  list-style: none;
  margin: 0.55rem 0 0;
  padding: 0.55rem 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.4rem;
}

.traveller-flight strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 650;
}

.traveller-flight strong span {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.76rem;
  font-weight: 550;
  color: var(--brick);
  margin-left: 0.35rem;
}

.traveller-flight small {
  display: block;
  font-size: 0.74rem;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.traveller-noflights {
  margin: 0.5rem 0 0;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.76rem;
  color: var(--ink-soft);
}

.traveller-strays {
  margin-top: 1rem;
}

.traveller-row .flight-avatar {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
}

/* ——— Activity reviews ——— */
.tt-rating {
  display: inline-block;
  margin: 0 0 0.16rem 0.2rem;
  padding: 0.04rem 0.34rem;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1.25;
  background: color-mix(in srgb, var(--gold) 22%, #fff);
  color: var(--ink);
  white-space: nowrap;
}

.rv {
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.rv-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

.rv-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.65rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--gold) 8%, var(--cream));
}

.rv-ask,
.rv-sub,
.rv-meaning,
.rv-later,
.rv-item-tags,
.rv-item-note {
  margin: 0;
}

.rv-ask {
  font-weight: 650;
  color: var(--forest-deep);
}

.rv-stars {
  display: flex;
  gap: 0.15rem;
}

.rv-star {
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  color: color-mix(in srgb, var(--ink) 22%, transparent);
  cursor: pointer;
}

.rv-star.is-on {
  color: var(--gold);
}

.rv-star:focus-visible,
.rv-tag:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 2px;
}

.rv-meaning {
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--ink-soft);
}

.rv-sub {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.4rem;
  row-gap: 0.15rem;
  margin-top: 0.3rem;
  font-size: 0.85rem;
  font-weight: 650;
}

.rv-muted {
  font-weight: 400;
  color: var(--ink-soft);
}

.rv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.rv-tag {
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
}

.rv-tag.is-on {
  border-color: var(--forest);
  background: color-mix(in srgb, var(--forest) 12%, #fff);
  color: var(--forest-deep);
  font-weight: 650;
}

.rv-note {
  min-width: 0;
  min-height: 5rem;
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  font: inherit;
  font-size: 0.95rem;
  resize: vertical;
}

.rv-photo,
.rv-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.rv-photo-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}

.rv-actions {
  justify-content: flex-end;
  flex-direction: column-reverse;
  align-items: stretch;
  margin-top: 0.25rem;
}

.rv-editor .rv-photo-pick,
.rv-editor [data-review-save] {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: none;
  letter-spacing: normal;
}

.rv-editor .rv-star {
  flex: 1 1 0;
  min-width: 0;
  height: 44px;
  padding: 0;
}

.rv-editor .rv-tag {
  min-height: 36px;
  max-width: 100%;
  white-space: normal;
}

.rv-delete {
  margin-right: auto;
  color: var(--brick);
}

.rv-list {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.rv-item {
  display: grid;
  gap: 0.3rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  background: #fff;
}

.rv-who {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.rv-who strong,
.rv-who-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.rv-who-name {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.rv-item-stars {
  color: var(--gold);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.rv-item-tags,
.rv-item-note,
.rv-later {
  font-size: 0.9rem;
}

/* Google place: full address loaded live under our label (never stored). */
.itin-address-live {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.85em;
  opacity: 0.8;
}

/* Food list: the crew's reviews of the scheduled visits */
.food-schedule-label li .tt-rating {
  margin: 0 0 0 0.35rem;
  color: var(--ink);
  text-align: left;
  vertical-align: 0.1em;
}

.food-review-line {
  margin: 0.55rem 0 0;
  padding-top: 0.5rem;
  border-top: 1px solid color-mix(in srgb, var(--gold, #c9a96a) 30%, transparent);
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--ink);
}

.food-review-line .tt-rating {
  margin: 0 0.3rem 0 0;
  font-size: 0.72rem;
}

.food-review-note {
  margin: 0.3rem 0 0;
  font-size: 0.86rem;
  font-style: italic;
  line-height: 1.4;
  color: color-mix(in srgb, var(--ink) 72%, #8a7350);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media print {

.print-block-short { justify-content: center; padding: 0 2px; }
.print-block-short time { font-size: 5pt; line-height: 1; }
.print-next { font-size: 5pt; font-weight: 600; }
.print-details { color: #1a1410; }
.print-detail-hint { margin: 6px 0; font-size: 9pt; }
.print-detail-list { margin: 0; padding: 0 0 0 28px; }
.print-detail-list li { padding: 7px 5px; border-bottom: 1px solid #d6cec0; break-inside: avoid; font-size: 10pt; }
.print-detail-list time { display: block; font-size: 8pt; margin-bottom: 3px; }
.print-detail-list strong { display: block; overflow-wrap: anywhere; line-height: 1.25; }

}

@media print {
.print-poster { box-sizing: border-box; break-inside: avoid; }
}

/* Reviews: read-only until you choose to rate (prompt stars) or edit (Your review) */
.rv-mine,
.rv-prompt {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.4rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--gold) 8%, transparent);
}

.rv-mine .rv-who,
.rv-prompt .rv-ask {
  margin: 0;
}

.rv-mine-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.hotel-card .rv-scroll {
  max-height: 24.5rem;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.detail .rv-scroll {
  max-height: none;
  overflow: visible;
}

.rv:has(.rv-editor) .rv-scroll {
  display: none;
}

.rv-editor {
  gap: 0.75rem;
  padding: 0.15rem 0 0;
  border: 0;
  background: transparent;
  font-family: var(--sans);
  letter-spacing: 0;
}

.rv-editor .rv-ask {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 560;
  line-height: 1.35;
  letter-spacing: 0;
  color: var(--ink);
}

.rv-editor .rv-stars {
  justify-content: space-between;
  gap: 0.25rem;
}

.rv-editor .rv-stars .rv-star {
  flex: 1 1 0;
  width: auto;
  height: 2.75rem;
  padding: 0;
  font-size: 1.85rem;
  line-height: 1;
  color: color-mix(in srgb, var(--ink) 28%, #d9d0c4);
}

.rv-editor .rv-stars .rv-star.is-on {
  color: var(--gold);
}

.rv-editor .rv-meaning {
  margin: -0.35rem 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
}

.rv-editor .rv-sub {
  align-items: baseline;
  margin: 0.2rem 0 0;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--ink);
}

.rv-editor .muted,
.rv-editor .rv-muted {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 450;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--ink-soft);
}

.rv-editor .rv-tags {
  gap: 0.45rem;
}

.rv-editor .rv-tag {
  display: inline-flex;
  align-items: center;
  min-height: 2.15rem;
  padding: 0.35rem 0.75rem;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
}

.rv-editor .rv-note {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.4;
  letter-spacing: 0;
}

.rv .rv-stars {
  justify-content: flex-start;
}

.rv .rv-star {
  flex: 0 0 auto;
}

.rv .rv-editor .rv-stars {
  justify-content: space-between;
}

.rv .rv-editor .rv-stars .rv-star {
  flex: 1 1 0;
  width: auto;
}

.rv-stars-quick .rv-star:hover,
.rv-stars-quick .rv-star:focus-visible {
  color: var(--gold);
}

/* Food card → every traveller's review of the place, in a scrollable modal */
.food-reviews-btn {
  width: 100%;
  margin-top: 0.55rem;
  min-height: 40px;
}

#food-review-modal,
#hotel-review-modal {
  width: min(36rem, calc(100vw - 1.5rem));
  height: min(86dvh, 52rem);
  overflow: hidden;
  padding: 0;
}

#food-review-modal[open],
#hotel-review-modal[open] {
  display: flex;
  flex-direction: column;
}

.food-review-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.1rem 1.1rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

.food-review-head .pass-kicker {
  color: var(--ink-soft);
  letter-spacing: 0.08em;
}

.food-review-head h2 {
  margin: 0.2rem 0 0;
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.3;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.food-review-modal .rv-head .tt-rating {
  margin: 0;
  padding: 0.14rem 0.5rem;
  font-size: 0.85rem;
  letter-spacing: 0;
  color: var(--ink);
}

#food-review-toast,
#hotel-review-toast {
  margin: 0.5rem 1.1rem 0;
}

/* Hotel card keeps a rating line; the list and photos open in the review sheet */
.hotel-review-tease {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.hotel-review-tease .food-review-line {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  font-size: 0.86rem;
}

.hotel-review-tease .food-review-note {
  margin: 0.25rem 0 0;
}

.hotel-review-tease .food-reviews-btn {
  margin-top: 0.45rem;
}

.hotel-card.is-view .rv-later {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.food-review-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid;
  align-content: start;
  gap: 0.85rem;
  padding: 0.9rem 1.1rem 1.2rem;
}

.food-review-visits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
  font-size: 0.9rem;
}

.food-review-visits li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.food-review-visits li span {
  color: color-mix(in srgb, var(--ink) 58%, #8a7350);
  text-align: right;
}

@media print {

.print-block-short span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 5pt; }
.print-details { font-family: Arial, sans-serif; gap: 0; }
.print-details .print-mast { padding: 12px 18px; }
.print-list-heading { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; margin: 16px 18px 0; padding: 0 0 8px; border-bottom: 2px solid #b0893a; font-size: 7pt; letter-spacing: 1px; color: #63594d; }
.print-detail-list { list-style: none; margin: 0 18px; padding: 0; }
.print-detail-list li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 9px 0; border-bottom: 1px solid #d6cec0; break-inside: avoid; }
.print-detail-list time { margin: 0; font-size: 9pt; line-height: 1.4; color: #4a3f36; font-variant-numeric: tabular-nums; }
.print-detail-list strong { font-size: 11pt; line-height: 1.3; color: #19382b; }
.print-detail-list small { display: block; margin-top: 3px; font-size: 7pt; color: #63594d; }
.print-list-footer { display: flex; justify-content: space-between; margin: auto 18px 0; padding: 10px 0; font-size: 8pt; color: #63594d; }
.print-empty-day { margin: 24px 18px; font-size: 11pt; }
}

@media print {

/* Daily PDF timeline: shared visual treatment for web print and native export. */
.print-details { background: #faf8f3; }
.print-details .print-mast { background: #19382b; padding: 14px 20px; border-bottom: 3px solid #b0893a; }
.print-details .print-mast h1 { font-size: 19pt; }
.print-day-intro { display: flex; align-items: baseline; justify-content: space-between; margin: 12px 22px 10px; color: #19382b; font-size: 11pt; font-weight: 600; }
.print-day-intro small { color: #6b655a; font-size: 8pt; font-weight: 400; }
.print-details .print-detail-list { margin: 0 22px; }
.print-details .print-detail-list li { --event-accent: #57775c; position: relative; grid-template-columns: 140px minmax(0, 1fr); gap: 20px; border: 0; padding: 0 0 5px; align-items: center; }
.print-details .print-detail-list li::before { content: ''; position: absolute; left: 149px; top: 0; bottom: 0; width: 1px; background: #d9d5c8; }
.print-details .print-detail-list li::after { content: ''; position: absolute; left: 146px; top: 17px; width: 7px; height: 7px; border-radius: 50%; background: var(--event-accent); }
.print-details .print-detail-list li.print-event-food { --event-accent: #ad653b; }
.print-details .print-detail-list li.print-event-travel { --event-accent: #45778b; }
.print-details .print-detail-list li.print-event-rest { --event-accent: #897295; }
.print-details .print-detail-list time { font-size: 8.5pt; font-weight: 600; color: #514c42; line-height: 1.35; }
.print-event-card { background: #fff; border: 1px solid #e6e2d8; border-left: 3px solid var(--event-accent); border-radius: 6px; padding: 6px 11px; }
.print-details .print-detail-list strong { font-size: 10pt; line-height: 1.25; font-weight: 600; }
.print-event-meta { display: flex; align-items: center; gap: 9px; margin-top: 3px; font-size: 7pt; color: #6b655a; }
.print-details .print-event-meta small { display: inline; margin: 0; font-size: 7pt; color: var(--event-accent); font-weight: 600; }
.print-details .print-list-footer { margin: auto 22px 0; padding: 8px 0; border-top: 1px solid #d9d5c8; font-size: 7pt; letter-spacing: 0.3px; }
}

/* Trip detail → Destinations: "Not returning home". */
.detail-oneway {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0 0 0.9rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line, rgba(0, 0, 0, 0.12));
  border-radius: 12px;
  cursor: pointer;
}

.detail-oneway input {
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0.15rem 0 0;
  accent-color: var(--forest, #244638);
}

.detail-oneway span {
  display: grid;
  gap: 0.15rem;
}

.detail-oneway small,
.detail-oneway-note {
  color: var(--ink-soft, #5d6a63);
  font-size: 0.82rem;
}

.detail-oneway-note {
  margin: 0 0 0.9rem;
}

/* Workbook simulator (js/wb-simulator.js) — owner's test trips only. */
.wb-sim {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.8rem;
  padding: 0.45rem 1rem;
  background: #1d2622;
  color: #eef0e8;
  font: 500 0.75rem var(--sans, system-ui);
}

.wb-sim strong {
  letter-spacing: 0.08em;
}

.wb-sim-seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 3px;
  border-radius: 16px;
  background: #2e3934;
}

.wb-sim-seg button {
  padding: 0.3rem 0.7rem;
  border: 0;
  border-radius: 999px;
  background: none;
  color: #c8d0c6;
  font: inherit;
  cursor: pointer;
}

.wb-sim-seg button[aria-pressed="true"] {
  background: #e6c98e;
  color: #1d2622;
  font-weight: 700;
}

.wb-sim em {
  font-style: normal;
  color: #9ba59c;
}

html.is-simulating .wb-sim em {
  color: #e6c98e;
}

/* Access levels: each its own colour + icon (web, both UIs). */
.traveller-role {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.traveller-role svg {
  width: 0.8rem;
  height: 0.8rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.traveller-role.is-owner { background: #f6ecd2; color: #8a6414; }
.traveller-role.is-planner { background: #e4eef5; color: #2d5f82; }
.traveller-role.is-foodie { background: #fae6dc; color: #a24a1f; }
.traveller-role.is-finance { background: #e3f1e7; color: #1f6a45; }
.traveller-role.is-freeloader { background: #eeeaf6; color: #5e4f8a; }
.traveller-role.is-pending { background: transparent; border: 1px dashed #c9c3b3; color: #6b665b; }

/* ——— Report dialog (reviews + public trips) ——— */
.lb-report {
  width: min(26rem, calc(100vw - 2rem));
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: #fffdf7;
  color: #1f2a24;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.lb-report::backdrop {
  background: rgba(20, 28, 24, 0.45);
}

.lb-report-form {
  display: grid;
  gap: 0.7rem;
  padding: 1.2rem 1.3rem 1.1rem;
}

.lb-report-kicker {
  margin: 0;
  color: #a3321c;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lb-report h3 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.3rem;
  font-weight: 400;
}

.lb-report fieldset {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.lb-report-reason {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid #e6e1d3;
  border-radius: 10px;
  cursor: pointer;
}

.lb-report-reason:has(input:checked) {
  border-color: #a3321c;
  background: #fbefe9;
}

.lb-report textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid #e6e1d3;
  border-radius: 10px;
  font: inherit;
  resize: vertical;
}

.lb-report-fine {
  margin: 0;
  color: #6b6b6b;
  font-size: 0.8rem;
}

.lb-report-msg {
  margin: 0;
  font-size: 0.85rem;
}

.lb-report-msg.is-bad {
  color: #a3321c;
}

.lb-report-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

.lb-report-actions button {
  min-height: 2.4rem;
  padding: 0 1rem;
  border: 1px solid #e6e1d3;
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.lb-report-actions .lb-report-send {
  border-color: #a3321c;
  background: #a3321c;
  color: #fff;
}

.rv-report {
  margin-left: auto;
  font-size: 0.75rem;
}

.nu-rv-report {
  margin-left: auto;
  padding: 0.2rem 0.45rem;
  border: 0;
  border-radius: 6px;
  background: none;
  color: #9a948a;
  font-size: 0.9rem;
  cursor: pointer;
}

.nu-rv-report:hover {
  background: #f3efe6;
  color: #a3321c;
}

/* ——— Photos: no drag / long-press save; full-screen review photo viewer ——— */
img {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.is-viewable {
  cursor: zoom-in;
}

.lb-pv {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #0b0d0c;
  color: #f3f1ea;
}

.lb-pv::backdrop {
  background: #0b0d0c;
}

.lb-pv[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.lb-pv-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
}

.lb-pv-info {
  display: grid;
  gap: 0.2rem;
}

.lb-pv-info strong {
  font-size: 1rem;
}

.lb-pv-who,
.lb-pv-when {
  color: #c9c5bb;
  font-size: 0.82rem;
}

.lb-pv-tools {
  display: flex;
  gap: 0.5rem;
}

.lb-pv-btn {
  min-height: 2.2rem;
  padding: 0 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #f3f1ea;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

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

.lb-pv-stage {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 0 1rem;
}

.lb-pv-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
}

.lb-pv-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.7rem 1.2rem 0.9rem;
  color: #9d998f;
  font-size: 0.75rem;
}

.lb-pv-foot span:first-child {
  color: #e6c98e;
  font-family: Georgia, serif;
  font-weight: 600;
}

.lb-pv-legal a {
  margin-left: 0.7rem;
  color: #c9c5bb;
  text-decoration: none;
}

.lb-pv-legal a:hover {
  color: #fff;
  text-decoration: underline;
}

/* Linked straight to a paragraph (e.g. #review-photos): show where it starts. */
.legal-doc p:target {
  margin-inline: -0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  background: #fbf3dc;
  scroll-margin-top: 5rem;
}

.wb-sim-reset {
  padding: 0.25rem 0.75rem;
  border: 0;
  border-radius: 999px;
  background: #e6c98e;
  color: #1f2a24;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.wb-sim-reset:hover {
  background: #f3d9a0;
}

/* Map picker opened over a modal dialog (Ask LakBi…): it is a <dialog> in the top layer. */
dialog.geo-map-overlay {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  overflow: hidden;
}

dialog.geo-map-overlay[open] {
  display: grid;
}

dialog.geo-map-overlay::backdrop {
  background: transparent;
}

/* ——— Map picker: wide two-pane layout (search + "Your trip" | big map) ——— */
.geo-map-panel.is-wide {
  display: grid;
  grid-template-columns: minmax(17rem, 22rem) minmax(0, 1fr);
  width: min(100%, 72rem);
  height: min(90vh, 50rem);
  max-height: none;
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
}

.geo-map-panel.is-wide .geo-map-side {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-height: 0;
  padding: 1.2rem 1.1rem 1.1rem;
  overflow: auto;
  border-right: 1px solid var(--line);
}

.geo-map-panel.is-wide .geo-map-canvas-wrap {
  margin: 0;
  min-height: 0;
}

.geo-map-panel.is-wide .geo-map-canvas {
  height: 100%;
  border: 0;
}

.geo-map-panel.is-wide .geo-map-actions {
  margin-top: auto;
  padding-top: 0.6rem;
}

.geo-map-panel.is-wide .geo-map-preview {
  margin: 0;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--forest, #1e3a2f) 6%, var(--paper, #fffdf7));
  font-size: 0.85rem;
}

.geo-map-quick-head {
  margin: 0.2rem 0 0.35rem;
  color: var(--muted, #6b6b6b);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.geo-map-quick ul {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.geo-map-quick button {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper, #fffdf7);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.geo-map-quick button:hover {
  border-color: color-mix(in srgb, var(--forest, #1e3a2f) 40%, var(--line));
  background: color-mix(in srgb, var(--forest, #1e3a2f) 5%, var(--paper, #fffdf7));
}

.geo-map-quick-ico {
  display: grid;
  flex: none;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: color-mix(in srgb, var(--forest, #1e3a2f) 8%, transparent);
}

.geo-map-quick strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.25;
}

.geo-map-quick small {
  display: block;
  color: var(--muted, #6b6b6b);
  font-size: 0.75rem;
}

/* Phones: full screen, map on top, list below. */
@media (max-width: 760px) {
  .geo-map-overlay:has(.geo-map-panel.is-wide) {
    padding: 0;
  }

  .geo-map-panel.is-wide {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(16rem, 46vh) minmax(0, 1fr);
    width: 100%;
    height: 100dvh;
    border-radius: 0;
  }

  .geo-map-panel.is-wide .geo-map-canvas-wrap {
    grid-row: 1;
  }

  .geo-map-panel.is-wide .geo-map-side {
    grid-row: 2;
    border-right: 0;
    border-top: 1px solid var(--line);
  }
}

/* ——— Ask LakBi: where should it look ——— */
.lb-area {
  display: grid;
  gap: 0.5rem;
}

.lb-area-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lb-area-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.lb-area-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line, #e6e1d3);
  border-radius: 999px;
  background: var(--paper, #fffdf7);
  color: inherit;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.lb-area-chip small {
  color: var(--muted, #6b6b6b);
}

.lb-area-chip[aria-checked="true"] {
  border-color: var(--forest, #1e3a2f);
  background: var(--forest, #1e3a2f);
  color: #fff;
}

.lb-area-chip[aria-checked="true"] small {
  color: rgba(255, 255, 255, 0.75);
}

/* The trip list scrolls; search, preview and the buttons stay in view. */
.geo-map-panel.is-wide .geo-map-side {
  overflow: hidden;
}

.geo-map-panel.is-wide .geo-map-quick {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  margin-right: -0.4rem;
  padding-right: 0.4rem;
}

/* Your hotels (above the day’s stops): short, never takes the stops’ room. */
.geo-map-panel.is-wide .geo-map-quick.geo-map-hotels {
  flex: none;
  max-height: 9.5rem;
}

.geo-map-panel.is-wide .geo-map-quick[hidden] + .geo-map-preview {
  margin-top: auto;
}

/* ——— Ask LakBi · Find a place to eat ——— */
.pass-modal.lbq {
  width: min(32rem, calc(100vw - 1.5rem));
  padding: 0;
  border-radius: 22px;
  overflow: hidden;
}

.lbq-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  padding: 1.2rem 1.3rem 0.4rem;
}

.lbq-avatar {
  width: 44px;
  height: 44px;
  padding: 4px;
  border-radius: 14px;
  background: #fbf1dc;
}

.lbq-kicker {
  margin: 0;
  color: #b0572f;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lbq h2 {
  margin: 0.1rem 0 0;
  font-size: 1.45rem;
  line-height: 1.15;
}

.lbq-x {
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted, #6b6b6b);
  font-size: 1rem;
  cursor: pointer;
}

.lbq-x:hover {
  background: rgba(0, 0, 0, 0.06);
}

.lbq-lead {
  margin: 0;
  padding: 0 1.3rem 0.9rem;
  color: var(--muted, #6b6b6b);
  font-size: 0.9rem;
  line-height: 1.45;
}

.lbq-form {
  display: grid;
  gap: 0;
  max-height: min(70vh, 38rem);
  overflow: auto;
  border-top: 1px solid var(--line, #e6e1d3);
}

.lbq-step {
  display: grid;
  gap: 0.55rem;
  padding: 1rem 1.3rem;
  border-bottom: 1px solid var(--line, #e6e1d3);
}

.lbq-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
}

.lbq-label small {
  margin-left: auto;
  color: var(--muted, #6b6b6b);
  font-size: 0.75rem;
  font-weight: 500;
}

.lbq-n {
  display: grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  background: var(--forest, #1e3a2f);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.lbq-select select,
.lbq-input,
.lbq .ask-lakbi-food-geo input[type="text"],
.lbq .ask-lakbi-food-geo input:not([type]) {
  width: 100%;
  min-height: 2.9rem;
  padding: 0 0.9rem;
  border: 1px solid var(--line, #e6e1d3);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 0.95rem;
}

.lbq-select select:focus,
.lbq-input:focus {
  border-color: var(--forest, #1e3a2f);
  outline: 2px solid color-mix(in srgb, var(--forest, #1e3a2f) 18%, transparent);
}

/* Where: two tidy radio cards. */
.lbq [data-lb-area-chips] {
  display: grid;
  gap: 0.45rem;
}

.lb-area-opt {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line, #e6e1d3);
  border-radius: 14px;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.lb-area-opt:hover {
  border-color: color-mix(in srgb, var(--forest, #1e3a2f) 35%, var(--line, #e6e1d3));
}

.lb-area-ico {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 10px;
  background: #f6efe2;
  font-size: 1.15rem;
}

.lb-area-txt strong {
  display: block;
  overflow: hidden;
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-area-txt small {
  display: block;
  color: var(--muted, #6b6b6b);
  font-size: 0.78rem;
}

.lb-area-dot {
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid var(--line, #d8d2c3);
  border-radius: 50%;
}

.lb-area-opt[aria-checked="true"] {
  border-color: var(--forest, #1e3a2f);
  background: color-mix(in srgb, var(--forest, #1e3a2f) 5%, #fff);
}

.lb-area-opt[aria-checked="true"] .lb-area-dot {
  border: 5px solid var(--forest, #1e3a2f);
}

.lbq .lb-area-spot {
  margin-top: 0.1rem;
}

/* Cravings */
.lbq-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.lbq-chip {
  padding: 0.42rem 0.75rem;
  border: 1px solid var(--line, #e6e1d3);
  border-radius: 999px;
  background: #fff;
  color: inherit;
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
}

.lbq-chip[aria-pressed="true"] {
  border-color: #b0572f;
  background: #fbefe9;
  color: #8b3f1f;
  font-weight: 600;
}

/* Budget segments */
.lbq-seg {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 12px;
  background: #f1ece1;
}

.lbq-seg button {
  min-height: 2.4rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
}

.lbq-seg button[aria-checked="true"] {
  background: #fff;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.lbq .auth-error {
  margin: 0.8rem 1.3rem 0;
}

.lbq-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 0.9rem 1.3rem 1.1rem;
  background: var(--paper, #fffdf7);
}

.lbq-cancel,
.lbq-go {
  min-height: 2.8rem;
  padding: 0 1.2rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.lbq-cancel {
  border: 1px solid var(--line, #e6e1d3);
  background: #fff;
}

.lbq-go {
  border: 0;
  background: var(--forest, #1e3a2f);
  color: #fff;
}

.lbq-go:disabled {
  opacity: 0.6;
  cursor: progress;
}

@media (max-width: 30rem) {
  .lbq-seg {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ——— LakBi food picks (top 5) ——— */
.lbp {
  display: grid;
  gap: 0.9rem;
  margin: 0 0 1.2rem;
  padding: 1.2rem 1.25rem 1rem;
  border-radius: 22px;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(230, 201, 142, 0.18), transparent 55%),
    linear-gradient(160deg, #1e3a2f, #16291f);
  color: #f3efe2;
  box-shadow: 0 14px 34px rgba(19, 37, 30, 0.22);
}

.lbp-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
}

.lbp-face {
  width: 48px;
  height: 48px;
  padding: 4px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.lbp.is-pending .lbp-face {
  animation: lbp-bob 1.4s ease-in-out infinite;
}

@keyframes lbp-bob {
  50% { transform: translateY(-4px) rotate(-4deg); }
}

@media (prefers-reduced-motion: reduce) {
  .lbp.is-pending .lbp-face { animation: none; }
}

.lbp-kicker {
  margin: 0;
  color: #e6c98e;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lbp h3 {
  margin: 0.1rem 0 0.2rem;
  color: #fff;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.4rem;
  font-weight: 400;
}

.lbp-where {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  color: rgba(243, 239, 226, 0.8);
  font-size: 0.82rem;
}

.lbp-pref {
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: rgba(230, 201, 142, 0.16);
  color: #f3d9a0;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: capitalize;
}

.lbp-close {
  align-self: start;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #f3efe2;
  cursor: pointer;
}

.lbp-say {
  margin: 0;
  padding: 0.75rem 0.95rem;
  border-radius: 4px 16px 16px 16px;
  background: #fffcf7;
  color: #293c33;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 0.98rem;
  font-style: italic;
  line-height: 1.45;
}

.lbp-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lbp-item {
  display: grid;
  grid-template-columns: 2.1rem minmax(0, 1fr);
  gap: 0.8rem;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  background: #fffcf7;
  color: #293c33;
  animation: lbp-in 0.35s ease both;
  animation-delay: calc(var(--i, 0) * 60ms);
}

@keyframes lbp-in {
  from { opacity: 0; transform: translateY(6px); }
}

.lbp-item.is-top {
  box-shadow: inset 0 0 0 2px #e6c98e;
}

.lbp-item.is-added {
  background: #eef6f0;
}

.lbp-rank {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: #f6ecd6;
  color: #7a5a14;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.05rem;
}

.lbp-item.is-top .lbp-rank {
  background: #b0572f;
  color: #fff;
}

.lbp-body {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.lbp-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.lbp-name strong {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.12rem;
  font-weight: 500;
}

.lbp-best {
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: #b0572f;
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.lbp-addr {
  margin: 0;
  overflow: hidden;
  color: #6b6b6b;
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lbp-why {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
}

.lbp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.lbp-fact,
.lbp-tag {
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.lbp-fact {
  background: #f1ece1;
  color: #4e5a52;
}

.lbp-tag {
  background: #fbefe9;
  color: #8b3f1f;
}

.lbp-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.lbp-map,
.lbp-add {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: 0 0.9rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.lbp-map {
  border: 1px solid #e3dccb;
  background: #fff;
  color: #293c33;
}

.lbp-add {
  border: 0;
  background: #1e3a2f;
  color: #fff;
}

.lbp-add:disabled {
  opacity: 0.6;
  cursor: progress;
}

.lbp-done {
  color: #1f5a3d;
  font-size: 0.82rem;
  font-weight: 700;
}

/* Waiting: three shimmering cards. */
.lbp-item.is-skeleton b,
.lbp-item.is-skeleton i {
  display: block;
  height: 0.8rem;
  margin: 0.2rem 0 0.4rem;
  border-radius: 6px;
  background: linear-gradient(90deg, #efe8da 25%, #f8f3ea 50%, #efe8da 75%);
  background-size: 200% 100%;
  animation: lbp-shimmer 1.2s linear infinite;
}

.lbp-item.is-skeleton b { width: 45%; height: 1rem; }
.lbp-item.is-skeleton i:last-child { width: 70%; }

@keyframes lbp-shimmer {
  to { background-position: -200% 0; }
}

.lbp-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

.lbp-more,
.lbp-finish {
  min-height: 2.4rem;
  padding: 0 1.1rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.lbp-more {
  border: 1px solid rgba(243, 239, 226, 0.35);
  background: transparent;
  color: #f3efe2;
}

.lbp-finish {
  border: 0;
  background: #e6c98e;
  color: #1f2a24;
}

.lbp .lakbi-disclaimer,
.lbp [class*="disclaimer"] {
  margin: 0;
  color: rgba(243, 239, 226, 0.55);
  font-size: 0.72rem;
}

.food-lakbi-slot:has(.lbp) {
  max-width: min(46rem, 100%);
}

/* Ask LakBi · dietary switch */
.lbq-diet {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
}

.lbq-diet-txt strong {
  display: block;
  font-size: 0.92rem;
}

.lbq-diet-txt small {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted, #6b6b6b);
  font-size: 0.78rem;
  line-height: 1.35;
}

.lbq-switch {
  appearance: none;
  position: relative;
  flex: none;
  width: 2.9rem;
  height: 1.65rem;
  margin: 0;
  border-radius: 999px;
  background: #d9d3c4;
  cursor: pointer;
  transition: background 0.18s ease;
}

.lbq-switch::after {
  content: "";
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s ease;
}

.lbq-switch:checked {
  background: var(--forest, #1e3a2f);
}

.lbq-switch:checked::after {
  transform: translateX(1.25rem);
}

.lbq-switch:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--forest, #1e3a2f) 45%, transparent);
  outline-offset: 2px;
}

.lbq-diet-note {
  margin: 0;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: #f6f1e4;
  color: var(--muted, #6b6b6b);
  font-size: 0.78rem;
  line-height: 1.45;
}

.lbq-diet-note b {
  color: var(--ink, #293c33);
}

.lbq-diet-note a {
  color: #8b3f1f;
  font-weight: 600;
}

/* Picks: how each place fits the crew's needs. */
.lbp-diet {
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: #e3f1e8;
  color: #1f5a3d;
  font-size: 0.72rem;
  font-weight: 700;
}

.lbp-dietnote {
  margin: 0;
  padding: 0.55rem 0.8rem;
  border-radius: 12px;
  background: rgba(227, 241, 232, 0.12);
  color: rgba(243, 239, 226, 0.9);
  font-size: 0.8rem;
}

.lbp-dietnote b {
  color: #fff;
  text-transform: capitalize;
}

.lbp-dietnote a {
  color: #e6c98e;
  font-weight: 600;
}

/* ——— LakBi food picks · banner + carousel ——— */
.food-lakbi-slot:has(.lbx) {
  max-width: none;
}

/* Phone widths: the floating Food edit bar stays (Save must be reachable after adding a
   pick); the picks just keep room to scroll their buttons above it (app: same rule). */
@media (max-width: 47.99rem) {
  .food-lakbi-slot .lbx {
    scroll-margin-bottom: 6.5rem;
    margin-bottom: 1rem;
  }
}

.lbx {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  grid-template-areas:
    "side stage"
    "side foot"
    "note note";
  gap: 0.9rem 1.6rem;
  align-items: center;
  margin: 0 0 1.4rem;
  padding: 1.6rem 1.8rem 1.1rem;
  overflow: hidden;
  border-radius: 26px;
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(230, 201, 142, 0.16), transparent 55%),
    radial-gradient(60% 90% at 100% 100%, rgba(111, 178, 141, 0.14), transparent 60%),
    linear-gradient(135deg, #24473a, #1a3329 60%, #15291f);
  color: #f3efe2;
  box-shadow: 0 18px 40px rgba(19, 37, 30, 0.22);
}

.lbx::before {
  /* soft leaf texture */
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  background: repeating-radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.035) 0 2px, transparent 2px 18px);
  pointer-events: none;
}

.lbx-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 2;
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #f3efe2;
  cursor: pointer;
}

.lbx-side {
  grid-area: side;
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  align-self: start;
}

.lbx-face {
  flex: none;
  width: 84px;
  height: 84px;
  padding: 8px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(230, 201, 142, 0.25);
}

.lbx.is-pending .lbx-face {
  animation: lbx-bob 1.4s ease-in-out infinite;
}

@keyframes lbx-bob {
  50% { transform: translateY(-5px) rotate(-4deg); }
}

@media (prefers-reduced-motion: reduce) {
  .lbx.is-pending .lbx-face { animation: none; }
}

.lbx-kicker {
  margin: 0;
  color: #e6c98e;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lbx h3 {
  margin: 0.2rem 0 0.5rem;
  color: #fff;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.7rem, 2.6vw, 2.35rem);
  font-weight: 400;
  line-height: 1.1;
}

.lbx-say {
  margin: 0 0 0.9rem;
  color: rgba(243, 239, 226, 0.88);
  font-size: 0.95rem;
  line-height: 1.55;
}

.lbx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.lbx-chip {
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  color: #f3efe2;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: capitalize;
}

/* The pick card + arrows */
.lbx-stage {
  grid-area: stage;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.lbx-nav {
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 50%;
  background: #16291f;
  box-shadow: 0 0 0 1px rgba(230, 201, 142, 0.35);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.lbx-nav:hover {
  background: #2b4f40;
}

.lbx-card {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(9rem, 0.9fr) minmax(0, 1.3fr);
  min-width: 0;
  overflow: hidden;
  border-radius: 20px;
  background: #fffcf7;
  box-shadow: 0 0 0 3px rgba(230, 201, 142, 0.35), 0 14px 30px rgba(0, 0, 0, 0.25);
  color: #293c33;
  animation: lbx-in 0.3s ease both;
}

@keyframes lbx-in {
  from { opacity: 0; transform: translateX(10px); }
}

.lbx-card.is-added {
  box-shadow: 0 0 0 3px rgba(111, 178, 141, 0.7), 0 14px 30px rgba(0, 0, 0, 0.25);
}

.lbx-media {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 13rem;
  margin: 0.55rem;
  border-radius: 14px;
  background:
    radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.35), transparent 45%),
    var(--lbx-art, linear-gradient(135deg, #f3dcc4, #e7b98f));
}

.lbx-media.is-lunch { --lbx-art: linear-gradient(135deg, #f6dfb8, #e9a864); }
.lbx-media.is-dinner { --lbx-art: linear-gradient(135deg, #f0c9a8, #b8653f); }
.lbx-media.is-brunch { --lbx-art: linear-gradient(135deg, #f4e6c9, #d9b27a); }
.lbx-media.is-party { --lbx-art: linear-gradient(135deg, #d9cbe8, #7d5ea8); }
.lbx-media.is-snack { --lbx-art: linear-gradient(135deg, #f7d9e0, #de8fa3); }

.lbx-art {
  font-size: 4.2rem;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.2));
}

.lbx-best {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: #b0572f;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.lbx-count {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.9);
  color: #293c33;
  font-size: 0.72rem;
  font-weight: 700;
}

.lbx-info {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
  padding: 1rem 1.1rem 1rem 0.5rem;
}

.lbx-info h4 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.15;
}

.lbx-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.9rem;
  color: #4e5a52;
  font-size: 0.84rem;
  font-weight: 600;
}

.lbx-addr {
  margin: 0;
  overflow: hidden;
  color: #6b6b6b;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lbx-why {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
}

.lbx-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.lbx-tags span {
  padding: 0.14rem 0.55rem;
  border-radius: 999px;
  background: #f1ece1;
  color: #4e5a52;
  font-size: 0.72rem;
  font-weight: 600;
}

.lbx-tags .lbx-diet {
  background: #e3f1e8;
  color: #1f5a3d;
}

.lbx-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.lbx-map,
.lbx-add {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 1.05rem;
  border-radius: 12px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.lbx-map {
  border: 1px solid #e3dccb;
  background: #fff;
  color: #293c33;
}

.lbx-add {
  border: 0;
  background: #1e3a2f;
  color: #fff;
}

.lbx-add:disabled {
  opacity: 0.6;
  cursor: progress;
}

.lbx-done {
  align-self: center;
  color: #1f5a3d;
  font-size: 0.86rem;
  font-weight: 700;
}

/* Footer: dots + more */
.lbx-foot {
  grid-area: foot;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0 3.1rem;
}

.lbx-dots {
  display: flex;
  gap: 0.35rem;
}

.lbx-dots button {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(243, 239, 226, 0.35);
  cursor: pointer;
  transition: width 0.2s ease;
}

.lbx-dots button[aria-selected="true"] {
  width: 1.4rem;
  background: #e6c98e;
}

.lbx-dots button.is-added {
  background: #6fb28d;
}

.lbx-more {
  min-height: 2.3rem;
  padding: 0 1rem;
  border: 1px solid rgba(243, 239, 226, 0.35);
  border-radius: 999px;
  background: transparent;
  color: #f3efe2;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.lbx-dietnote {
  flex-basis: 100%;
  margin: 0;
  color: rgba(243, 239, 226, 0.85);
  font-size: 0.8rem;
}

.lbx-dietnote a {
  color: #e6c98e;
  font-weight: 600;
}

.lbx > .lakbi-disclaimer,
.lbx > [class*="disclaimer"] {
  grid-area: note;
  margin: 0;
  color: rgba(243, 239, 226, 0.5);
  font-size: 0.72rem;
}

/* Waiting */
.lbx-card.is-skeleton .lbx-media {
  background: linear-gradient(90deg, #efe8da 25%, #f8f3ea 50%, #efe8da 75%);
  background-size: 200% 100%;
  animation: lbx-shimmer 1.2s linear infinite;
}

.lbx-card.is-skeleton b,
.lbx-card.is-skeleton i {
  display: block;
  height: 0.85rem;
  margin: 0.3rem 0;
  border-radius: 6px;
  background: linear-gradient(90deg, #efe8da 25%, #f8f3ea 50%, #efe8da 75%);
  background-size: 200% 100%;
  animation: lbx-shimmer 1.2s linear infinite;
}

.lbx-card.is-skeleton b { width: 60%; height: 1.2rem; }
.lbx-card.is-skeleton i:last-child { width: 45%; }

@keyframes lbx-shimmer {
  to { background-position: -200% 0; }
}

/* Narrower screens: stack — LakBi on top, the card below. */
@media (max-width: 900px) {
  .lbx {
    grid-template-columns: 1fr;
    grid-template-areas: "side" "stage" "foot" "note";
    padding: 1.3rem 1.1rem 1rem;
  }

  .lbx-foot {
    padding: 0;
  }
}

@media (max-width: 560px) {
  .lbx-card {
    grid-template-columns: 1fr;
  }

  .lbx-media {
    min-height: 9rem;
  }

  .lbx-info {
    padding: 0.4rem 1rem 1rem;
  }

  .lbx-face {
    width: 64px;
    height: 64px;
  }

  .lbx-nav {
    width: 2.1rem;
    height: 2.1rem;
  }
}

/* ——— LakBi food picks v2: richer banner, foodie mascot, no photo slot ——— */
.lbx {
  isolation: isolate;
  background:
    /* warm sunset glow top-right */
    radial-gradient(55% 80% at 88% 0%, rgba(246, 170, 92, 0.32), transparent 62%),
    /* golden haze behind the mascot */
    radial-gradient(38% 60% at 10% 38%, rgba(240, 201, 110, 0.26), transparent 70%),
    /* cool jungle light bottom-right */
    radial-gradient(60% 70% at 100% 100%, rgba(111, 178, 141, 0.26), transparent 65%),
    linear-gradient(125deg, #2c5645 0%, #1f4034 42%, #173127 75%, #122519 100%);
}

/* Palm-leaf silhouettes + sparkles, very soft. */
.lbx::before {
  inset: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  z-index: -1;
  opacity: 0.55;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='360' viewBox='0 0 520 360'%3E%3Cg fill='none' stroke='%23e6c98e' stroke-opacity='.10' stroke-width='2'%3E%3Cpath d='M-20 330 C 80 250 150 240 260 262'/%3E%3Cpath d='M20 300 l-26 -40 M60 284 l-20 -46 M100 272 l-12 -48 M140 264 l-4 -48 M180 258 l6 -46 M220 258 l14 -42'/%3E%3Cpath d='M20 300 l40 -8 M60 284 l44 0 M100 272 l44 8 M140 264 l42 14 M180 258 l38 20 M220 258 l30 24'/%3E%3C/g%3E%3Cg fill='none' stroke='%239fd4b6' stroke-opacity='.09' stroke-width='2'%3E%3Cpath d='M540 20 C 450 70 400 120 380 210'/%3E%3Cpath d='M510 40 l30 30 M478 60 l34 26 M450 84 l36 20 M426 112 l38 12 M406 144 l38 6 M392 176 l36 -2'/%3E%3Cpath d='M510 40 l-6 -40 M478 60 l-12 -40 M450 84 l-16 -38 M426 112 l-22 -34 M406 144 l-26 -28 M392 176 l-30 -22'/%3E%3C/g%3E%3Cg fill='%23f3d9a0' fill-opacity='.35'%3E%3Cpath d='M330 40 l3 9 9 3 -9 3 -3 9 -3 -9 -9 -3 9 -3z'/%3E%3Cpath d='M470 250 l2 6 6 2 -6 2 -2 6 -2 -6 -6 -2 6 -2z'/%3E%3Cpath d='M250 330 l2 6 6 2 -6 2 -2 6 -2 -6 -6 -2 6 -2z'/%3E%3C/g%3E%3C/svg%3E") left bottom / 520px 360px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='360' viewBox='0 0 520 360'%3E%3Cg fill='none' stroke='%23e6c98e' stroke-opacity='.08' stroke-width='2'%3E%3Cpath d='M540 20 C 450 70 400 120 380 210'/%3E%3Cpath d='M510 40 l30 30 M478 60 l34 26 M450 84 l36 20 M426 112 l38 12 M406 144 l38 6'/%3E%3C/g%3E%3C/svg%3E") right top / 520px 360px no-repeat;
}

/* Grain for depth. */
.lbx::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Foodie LakBi — big, no box, with a soft glow and a gentle bob. */
.lbx-face {
  display: block;
  width: 132px;
  height: 132px;
  padding: 0;
  margin: -0.6rem 0 0 -0.4rem;
  border-radius: 0;
  background: none;
  box-shadow: none;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 22px rgba(240, 201, 110, 0.25));
}

.lbx-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lbx .lbx-face {
  animation: lbx-float 4.5s ease-in-out infinite;
}

.lbx.is-pending .lbx-face {
  animation: lbx-bob 1.2s ease-in-out infinite;
}

@keyframes lbx-float {
  50% { transform: translateY(-4px) rotate(-2deg); }
}

@media (prefers-reduced-motion: reduce) {
  .lbx .lbx-face { animation: none; }
}

.lbx-chip {
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

/* The pick card: one column of words, no photo. */
.lbx-card {
  grid-template-columns: 1fr;
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(246, 219, 170, 0.35), transparent 60%),
    #fffcf7;
}

.lbx-info {
  gap: 0.5rem;
  padding: 1.1rem 1.3rem 1.15rem;
}

.lbx-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.lbx-best,
.lbx-count {
  position: static;
}

.lbx-rank {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: #f6ecd6;
  color: #7a5a14;
  font-size: 0.72rem;
  font-weight: 800;
}

.lbx-count {
  background: #f1ece1;
}

.lbx-info h4 {
  font-size: 1.6rem;
}

.lbx-reco {
  display: grid;
  gap: 0.45rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: #f7f1e3;
  box-shadow: inset 3px 0 0 #e2a93b;
}

.lbx-reco p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
}

.lbx-reco b {
  display: block;
  margin-bottom: 0.1rem;
  color: #8b3f1f;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 560px) {
  .lbx-face {
    width: 96px;
    height: 96px;
  }
}

/* ——— LakBi chat · 2026 refresh ——— */
.lakbi-chat {
  display: flex;
  flex-direction: column;
  width: min(24.5rem, calc(100vw - 1.5rem));
  height: min(38rem, calc(100dvh - 7rem));
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  background: #fbf8f1;
  box-shadow: 0 24px 60px rgba(19, 37, 30, 0.28), 0 0 0 1px rgba(30, 58, 47, 0.08);
}

.lakbi-chat[hidden] {
  display: none;
}

.lakbi-chat-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1rem 1rem 1.1rem;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(230, 201, 142, 0.22), transparent 55%),
    linear-gradient(135deg, #24473a, #16291f);
  color: #fff;
}

.lakbi-chat-avatar-wrap {
  position: relative;
  flex: none;
}

.lakbi-chat-avatar {
  width: 42px;
  height: 42px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
}

.lakbi-chat-online {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 12px;
  height: 12px;
  border: 2px solid #1c3a2e;
  border-radius: 50%;
  background: #6fd39a;
}

.lakbi-chat-title h2 {
  margin: 0;
  color: #fff;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.1;
}

.lakbi-chat-head .lakbi-chat-kicker {
  margin: 0.15rem 0 0;
  color: rgba(243, 239, 226, 0.75);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.lakbi-chat-close {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  margin-left: auto;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
}

.lakbi-chat-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Conversation */
.lakbi-chat-log {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 0;
  padding: 1rem 0.9rem;
  overflow-y: auto;
  background:
    radial-gradient(circle at 1px 1px, rgba(30, 58, 47, 0.06) 1px, transparent 0) 0 0 / 18px 18px,
    #fbf8f1;
}

.lakbi-chat-row {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  max-width: 100%;
  animation: lakbi-chat-in 0.22s ease both;
}

@keyframes lakbi-chat-in {
  from { opacity: 0; transform: translateY(6px); }
}

.lakbi-chat-row p {
  max-width: 82%;
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.lakbi-chat-row.is-lakbi p {
  border-bottom-left-radius: 5px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(30, 58, 47, 0.06);
  color: #293c33;
}

.lakbi-chat-row.is-user {
  justify-content: flex-end;
}

.lakbi-chat-row.is-user p {
  border-bottom-right-radius: 5px;
  background: linear-gradient(135deg, #2b5443, #1e3a2f);
  color: #fff;
}

.lakbi-chat-row-face {
  flex: none;
  width: 28px;
  height: 28px;
  padding: 2px;
  border-radius: 10px;
  background: #f1e7cf;
}

/* Typing dots */
.lakbi-chat-typing {
  display: inline-flex;
  gap: 4px;
  padding: 0.2rem 0.1rem;
}

.lakbi-chat-typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b9ae95;
  animation: lakbi-chat-dot 1s ease-in-out infinite;
}

.lakbi-chat-typing i:nth-child(2) { animation-delay: 0.15s; }
.lakbi-chat-typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes lakbi-chat-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .lakbi-chat-row { animation: none; }
  .lakbi-chat-typing i { animation: none; }
}

/* Suggestions */
.lakbi-chat-suggest {
  padding: 0.7rem 0.9rem 0.5rem;
  border-top: 1px solid rgba(30, 58, 47, 0.08);
  background: #fbf8f1;
}

.lakbi-chat-suggest-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}

.lakbi-chat-suggest-bar span {
  color: #8a8373;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lakbi-chat-chips-toggle {
  padding: 0.15rem 0.55rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #8b3f1f;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.lakbi-chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.lakbi-chat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.75rem;
  border: 1px solid #e6dfcf;
  border-radius: 999px;
  background: #fff;
  color: #293c33;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.lakbi-chat-chip:hover {
  border-color: #c8a960;
  background: #fffaf0;
  transform: translateY(-1px);
}

/* Composer */
.lakbi-chat-form {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  margin: 0.4rem 0.8rem 0.35rem;
  padding: 0.35rem 0.35rem 0.35rem 0.9rem;
  border: 1px solid #e3dccb;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(30, 58, 47, 0.06);
}

.lakbi-chat-form:focus-within {
  border-color: #1e3a2f;
  box-shadow: 0 0 0 3px rgba(30, 58, 47, 0.12);
}

.lakbi-chat-form textarea {
  flex: 1;
  min-height: 2.2rem;
  max-height: 7rem;
  padding: 0.5rem 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #293c33;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.4;
  resize: none;
  field-sizing: content;
}

.lakbi-chat-send {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #2b5443, #1e3a2f);
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.lakbi-chat-send:hover:not(:disabled) {
  transform: scale(1.06);
}

.lakbi-chat-send:disabled {
  opacity: 0.5;
  cursor: progress;
}

.lakbi-disclaimer.lakbi-disclaimer-chat {
  margin: 0;
  padding: 0 1rem 0.7rem;
  color: #9a9384;
  font-size: 0.68rem;
  text-align: center;
}

/* "1050/1200" near the chat box cap, a hint at the cap. */
.lakbi-chat-count {
  flex-shrink: 0;
  margin: -0.35rem 0 0;
  padding: 0 1rem 0.35rem;
  color: #7a7466;
  font-size: 0.7rem;
  text-align: right;
}
.lakbi-chat-count.is-full {
  color: #a4462f;
  text-align: left;
}
.lakbi-chat-count[hidden] {
  display: none;
}

/* A phone on its side (844×390 — bug hunt 2026-10-12: 32–56 px of conversation, the header scrolled away): "Try
   asking" starts folded (js/lakbi-chat.js chipsStartState), the header and the note slim down, the suggestions
   scroll in what's left and the conversation keeps a few lines. App twin: mobile/www/css/app.css. */
@media (max-height: 480px) {
  .lakbi-chat { height: calc(100dvh - 6.25rem); }
  .lakbi-chat-head,
  .lakbi-chat-form,
  .lakbi-disclaimer.lakbi-disclaimer-chat { flex-shrink: 0; }
  .lakbi-chat-head { padding: 0.4rem 0.75rem 0.4rem 0.9rem; gap: 0.55rem; }
  .lakbi-chat-avatar { width: 30px; height: 30px; }
  .lakbi-chat-head .lakbi-chat-kicker { display: none; }
  .lakbi-chat-log { min-height: 5rem; padding-top: 0.6rem; padding-bottom: 0.6rem; }
  .lakbi-chat-suggest { flex: 0 1 auto; min-height: 0; max-height: 40%; overflow-y: auto; overscroll-behavior: contain; padding: 0 0.85rem; }
  .lakbi-chat-suggest-bar { margin: 0; padding-top: 0.1rem; padding-bottom: 0.1rem; }
  .lakbi-chat-chips-toggle { min-height: 2rem; }
  .lakbi-chat-suggest:not(.is-chips-hidden) .lakbi-chat-chips { padding-bottom: 0.3rem; }
  .lakbi-chat-form { margin-top: 0.25rem; margin-bottom: 0.2rem; }
  .lakbi-chat-form textarea { min-height: 2rem; padding: 0.4rem 0; }
  .lakbi-disclaimer.lakbi-disclaimer-chat { padding-bottom: 0.35rem; font-size: 0.62rem; }
}

/* The refresh draws bubbles on the <p>; the row itself is just the lane. */
.lakbi-chat-row,
.lakbi-chat-row.is-lakbi,
.lakbi-chat-row.is-user {
  max-width: 100%;
  padding: 0;
  background: none;
  color: inherit;
}

.lakbi-chat-row.is-pending {
  opacity: 1;
  font-style: normal;
}

/* ——— LakBi launcher · refresh ——— */
.lakbi-chat-launch {
  gap: 0.6rem;
  max-width: none;
  min-height: 3.5rem;
  padding: 0.35rem 1.1rem 0.35rem 0.4rem;
  border: 0;
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(230, 201, 142, 0.3), transparent 55%),
    linear-gradient(135deg, #2b5443, #16291f);
  color: #fff;
  box-shadow:
    0 0 0 1.5px rgba(230, 201, 142, 0.55),
    0 12px 28px rgba(19, 37, 30, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.lakbi-chat-launch:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 2px rgba(230, 201, 142, 0.8),
    0 16px 34px rgba(19, 37, 30, 0.4);
}

/* Mascot peeks out of a golden disc. */
.lakbi-chat-launch .lakbi-mascot {
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  flex: 0 0 2.8rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3cf, #e6c98e 70%);
  box-shadow: inset 0 -2px 4px rgba(122, 90, 20, 0.25);
}

.lakbi-chat-launch .lakbi-mascot img {
  width: 2.35rem;
  height: 2.35rem;
  transform-origin: 50% 90%;
  animation: lakbi-launch-wave 3.8s ease-in-out infinite;
}

@keyframes lakbi-launch-wave {
  0%, 70%, 100% { transform: rotate(0deg); }
  76% { transform: rotate(-9deg); }
  82% { transform: rotate(7deg); }
  88% { transform: rotate(-4deg); }
}

.lakbi-launch-text {
  display: grid;
  line-height: 1.1;
  text-align: left;
}

.lakbi-launch-text b {
  font-size: 0.95rem;
  font-weight: 800;
}

.lakbi-launch-text small {
  color: rgba(243, 239, 226, 0.72);
  font-size: 0.72rem;
  font-weight: 600;
}

/* Online dot on the disc. */
.lakbi-launch-dot {
  position: absolute;
  left: 2.55rem;
  top: 0.45rem;
  width: 0.7rem;
  height: 0.7rem;
  border: 2px solid transparent;
  border-radius: 50%;
  --dot-ping-from: 0.4118; /* radius / (radius + 8px): the old 8px box-shadow ring */
}

/* Same look as the old box-shadow ping, but a transform/opacity ring on ::before runs on
   the compositor (a box-shadow animation repainted on the main thread every frame).
   The dot itself is ::after so the ring stays underneath it (app: same rule). */
.lakbi-launch-dot::before,
.lakbi-launch-dot::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
}

.lakbi-launch-dot::before {
  inset: -10px; /* full ring size (border + 8px), scaled down to the dot at the start */
  background: rgba(111, 211, 154, 0.55);
  opacity: 0;
  animation: lakbi-launch-ping 2.4s ease-out infinite;
}

.lakbi-launch-dot::after {
  border: 2px solid #1f3d31;
  background: #6fd39a;
}

@keyframes lakbi-launch-ping {
  0% { transform: scale(var(--dot-ping-from)); opacity: 1; }
  70%, 100% { transform: scale(1); opacity: 0; }
}

/* Chat open: the launcher shrinks to just the mascot. */
.lakbi-chat-launch[aria-expanded="true"] .lakbi-launch-text {
  display: none;
}

.lakbi-chat-launch[aria-expanded="true"] {
  padding-right: 0.4rem;
}

@media (max-width: 560px) {
  .lakbi-launch-text small {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lakbi-chat-launch .lakbi-mascot img,
  .lakbi-launch-dot::before {
    animation: none;
  }
}

/* Chat open: the launcher is a centred round button. */
.lakbi-chat-launch[aria-expanded="true"] {
  justify-content: center;
  width: 3.6rem;
  height: 3.6rem;
  min-height: 0;
  padding: 0;
  border-radius: 50%;
}

.lakbi-chat-launch[aria-expanded="true"] .lakbi-launch-dot {
  left: auto;
  right: 0.2rem;
  top: 0.2rem;
}

/* Traveller flights: plane icon before the route. */
.traveller-flight strong .tf-plane {
  display: inline-flex;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0 0.35rem 0 0 !important;
  padding: 0 !important;
  border-radius: 50%;
  background: #2d5f82 !important;
  color: #fff !important;
  align-items: center;
  justify-content: center;
  vertical-align: -0.2rem;
}
.traveller-flight strong .tf-plane svg { width: 0.72rem; height: 0.72rem; transform: rotate(90deg); }


/* Invite the crew: one box, field + button on one line. */
.wb-invite-box {
  padding: 0.9rem 1rem 1rem;
  border-radius: 12px;
  background: var(--paper-2, #f1efe8);
  margin-bottom: 1rem;
}
.wb-invite-box .detail-contrib-title { margin: 0 0 0.3rem; }
.wb-invite-box .hint { margin: 0 0 0.7rem; }
.wb-invite-box .wb-invite-row-form { display: flex; gap: 0.6rem; }
.wb-invite-box .wb-invite-row-form input {
  flex: 1 1 60%;
  min-width: 0;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font: inherit;
}
.wb-invite-box .wb-invite-row-form .wb-invite-send {
  flex: 1 1 40%;
  border: 0;
  border-radius: 9px;
  background: var(--brick, #8c4646);
  color: #fff;
  font-weight: 700;
}
.wb-invite-box .wb-invite-send:disabled { opacity: 0.6; }
.wb-invite-box #wb-contrib-results-host:not(:empty) { margin-top: 0.6rem; }
@media (max-width: 560px) {
  .wb-invite-box .wb-invite-row-form { flex-direction: column; }
  .wb-invite-box .wb-invite-row-form .wb-invite-send { padding: 0.7rem; }
}

/* Travellers: access-level legend. */
.traveller-legend {
  margin-top: 0.9rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--cream, #fffcf7);
}
.traveller-legend summary {
  cursor: pointer;
  padding: 0.65rem 0.9rem;
  font-size: 0.84rem;
  font-weight: 700;
  list-style: none;
}
.traveller-legend summary::-webkit-details-marker { display: none; }
.traveller-legend summary::before { content: "💡 "; }
.traveller-legend summary::after { content: "▾"; float: right; color: var(--ink-soft); transition: transform 0.2s; }
.traveller-legend[open] summary::after { transform: rotate(180deg); }
.traveller-legend summary small { margin-left: 0.4rem; font-weight: 500; color: var(--ink-soft); }
.traveller-legend ul {
  list-style: none;
  margin: 0;
  padding: 0 0.9rem 0.8rem;
  display: grid;
  gap: 0.5rem;
}
.traveller-legend li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  align-items: center;
  gap: 0.6rem;
}
.traveller-legend li .traveller-role { justify-self: start; }
.traveller-legend li p { margin: 0; font-size: 0.8rem; color: var(--ink-soft); }
@media (max-width: 560px) {
  .traveller-legend li { grid-template-columns: 1fr; gap: 0.2rem; }
}

/* Day chips: arrows when they don't fit */
.day-switch-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.8rem;
}
.day-switch-wrap .day-switch { flex: 1 1 auto; min-width: 0; margin-bottom: 0; }
.day-switch-nav {
  display: none;
  flex: 0 0 auto;
  width: 2.3rem;
  height: 2.3rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--cream);
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.day-switch-wrap.is-overflowing .day-switch-nav { display: grid; place-items: center; }
.day-switch-nav:disabled { opacity: 0.3; cursor: default; box-shadow: none; }
.day-switch-nav:not(:disabled):hover { border-color: var(--forest); color: var(--forest); }
.day-switch-wrap.is-overflowing .day-switch {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 1rem, #000 calc(100% - 1rem), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 1rem, #000 calc(100% - 1rem), transparent 100%);
  padding-inline: 0.6rem;
}

/* Ask LakBi (itinerary): type chips carry the legend colour; area hint */
.lbq-type-chip { display: inline-flex; align-items: center; gap: 0.4rem; background: var(--cream, #fffcf7); box-shadow: none; color: var(--ink); }
.lbq-type-chip i { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: currentColor; }
.lbq-type-chip.type-transpo i { background: #0369a1; }
.lbq-type-chip.type-food i { background: var(--brick); }
.lbq-type-chip.type-attraction i, .lbq-type-chip.type-see i { background: var(--forest); }
.lbq-type-chip.type-rest i { background: #a21caf; }
.lbq-type-chip.type-activity i { background: #9f1239; }
.lbq-type-chip.type-tour i { background: #a16207; }
.lbq-type-chip.type-rr i, .lbq-type-chip.type-freetime i { background: #15803d; }
.lbq-type-chip { color: var(--ink) !important; background: #fff !important; box-shadow: none !important; }
.lbq-type-chip[aria-checked="true"] { border-color: var(--forest) !important; background: color-mix(in srgb, var(--forest) 10%, #fff) !important; font-weight: 700; }
.lbq-hint { display: block; margin-top: 0.35rem; font-size: 0.76rem; color: var(--ink-soft); }
#ask-lakbi-area-field[hidden] { display: none; }
.lbq-note {
  margin: 0.55rem 0 0;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  background: #fbe8df;
  color: #7a3a1f;
  font-size: 0.8rem;
}
.lbq-note a { color: inherit; font-weight: 700; }

/* LakBi itinerary ideas: one at a time, ‹ 2 of 5 › */
.lbi { display: grid; gap: 0.5rem; margin-top: 0.4rem; animation: lbi-in 0.35s ease both; animation-delay: calc(var(--i, 1) * 0.12s); }
.lbi-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.lbi-label { font-size: 0.68rem; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase; color: #8a6a1f; }
.lbi-nav { display: inline-flex; align-items: center; gap: 0.35rem; }
.lbi-nav b { font-size: 0.78rem; color: var(--ink-soft); min-width: 3.4rem; text-align: center; }
.lbi-nav button {
  width: 1.9rem;
  height: 1.9rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}
.lbi-nav button:hover { border-color: var(--forest); color: var(--forest); }
.lbi-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid #ecd9a8;
  border-radius: 14px;
  background: linear-gradient(160deg, #fffaf0, #fff4dc);
  box-shadow: 0 4px 14px rgba(184, 134, 43, 0.12);
}
.lbi-card.is-used { border-color: #c9a24a; box-shadow: 0 0 0 1px #c9a24a inset, 0 4px 14px rgba(184, 134, 43, 0.18); }
.lbi-kind { display: flex; align-items: center; gap: 0.45rem; margin: 0; background: none !important; box-shadow: none !important; font-size: 0.66rem; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; }
.lbi-kind em { padding: 0.05rem 0.45rem; border-radius: 999px; background: #2f7d57; color: #fff; font-size: 0.6rem; font-style: normal; letter-spacing: 0.04em; text-transform: none; }
.lbi-card h4 { margin: 0; font-size: 1.02rem; font-weight: 700; color: var(--ink); line-height: 1.3; }
.lbi-why { margin: 0; font-size: 0.84rem; line-height: 1.45; color: var(--ink); }
.lbi-facts, .lbi-where { margin: 0; font-size: 0.78rem; color: var(--ink-soft); }
.lbi-tip { margin: 0; padding: 0.4rem 0.55rem; border-radius: 9px; background: rgba(255, 255, 255, 0.7); font-size: 0.8rem; line-height: 1.4; color: var(--ink); }
.lbi-tip b { display: block; font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: #8a6a1f; }
.lbi-use {
  justify-self: start;
  margin-top: 0.2rem;
  padding: 0.45rem 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--forest);
  color: #fff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.lbi-dots { display: flex; justify-content: center; gap: 0.3rem; }
.lbi-dots i { width: 0.4rem; height: 0.4rem; border-radius: 50%; background: #dccfae; }
.lbi-dots i.is-on { width: 1.1rem; border-radius: 999px; background: #c9a24a; }
.lbi-more {
  justify-self: center;
  padding: 0.35rem 0.8rem;
  border: 1px dashed #c9a24a;
  border-radius: 999px;
  background: transparent;
  color: #8a6a1f;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.lbi-more:hover { background: #fff4dc; }
@keyframes lbi-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lbi { animation: none; } }

/* Map picker (itinerary): today's stops, numbered like the pins */
.geo-map-quick.is-day .geo-day-pin { display: flex; align-items: center; gap: 0.6rem; }
.geo-day-pin-n {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 750;
}
.geo-day-pin.is-current { border-color: #c9a24a !important; background: #fff7e4 !important; }
.geo-day-pin.is-current .geo-day-pin-n { background: #e6c98e; color: #1a1410; box-shadow: 0 0 0 2px #b8862b; }

/* Timetable day header: how much of the day is still free */
.tt-day .tt-free {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.08rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #e6f0ea;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.tt-day .tt-free.is-full { background: #f3d9cf; color: #8a3a1f; }

/* Timetable: the new event being added, in its slot */
.tt-block.tt-draft-block {
  z-index: 4;
  border: 2px dashed #c9a24a !important;
  background: repeating-linear-gradient(135deg, #fff7e0 0 10px, #fff1cc 10px 20px) !important;
  color: #5a4210 !important;
  box-shadow: 0 4px 14px rgba(184, 134, 43, 0.25) !important;
  pointer-events: none;
}
.tt-draft-tag {
  display: inline-block;
  margin-bottom: 0.1rem;
  padding: 0.02rem 0.45rem;
  border-radius: 999px;
  background: #c9a24a;
  color: #fff;
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.lb-pv-legal .lb-pv-report-link {
  margin-left: 0.9rem;
  padding: 0;
  border: 0;
  background: none;
  color: #f0b8a4;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.lb-pv-legal .lb-pv-report-link:hover { color: #fff; }
img.lbx-face { object-fit: contain; }
.lbx-itin { margin-bottom: 1rem; }
.lbx-itin .lbi-kind { margin: 0.2rem 0 0; }
.lakbi-draft-pointer {
  margin: 0.2rem 0 0.8rem;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  background: #fff4dc;
  color: #7a5a14;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Itinerary LakBi banner: tighter — no empty corner under LakBi */
.lbx.lbx-itin {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.45fr);
  gap: 0.7rem 1.4rem;
  padding: 1.2rem 1.5rem 0.9rem;
}
.lbx.lbx-itin .lbx-side { align-self: center; }
.lbx.lbx-itin .lbx-face { width: 112px; height: 112px; }
.lbx.lbx-itin .lbx-foot { padding: 0 3.1rem; }
@media (max-width: 52rem) {
  .lbx.lbx-itin { grid-template-columns: minmax(0, 1fr); grid-template-areas: "side" "stage" "foot" "note"; }
}
/* Timetable: LakBi's pick */
.tt-block.is-lakbi { outline: 2px solid #d4a441; outline-offset: -2px; }
.tt-block .tt-lakbi {
  display: inline-block;
  margin-bottom: 0.1rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #f7e2a6, #d4a441);
  color: #3e2a06;
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 800;
}

/* Review editor: one button style, photo tools side by side, Cancel | Save on one row */
.rv-photo { display: grid; gap: 0.5rem; }
.rv-photo-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 0.5rem; }
.rv-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 0.5rem; margin-top: 0.4rem; }
.rv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.6rem;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.rv-btn:hover { border-color: var(--forest); }
.rv-btn.is-solid { border-color: var(--forest); background: var(--forest); color: #fff; }
.rv-btn.is-solid:hover { filter: brightness(1.1); }
.rv-btn.is-solid:disabled { opacity: 0.6; cursor: default; }
.rv-btn.is-danger { color: #9a4a26; border-color: color-mix(in srgb, #b44a2a 35%, var(--line)); }
.rv-btn.is-danger:hover { background: #fbe8df; }
/* An expense brought into view from elsewhere (e.g. a hotel's "View in expenses") */
@keyframes exp-focus-flash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 162, 74, 0); }
  20%, 60% { box-shadow: 0 0 0 3px #c9a24a, 0 8px 22px rgba(201, 162, 74, 0.35); }
}
.is-focus-flash { animation: exp-focus-flash 2.4s ease-in-out; border-radius: 12px; background-color: #fff7e4 !important; }
/* Review note counter (from 400 characters) */
.rv-count { margin: 0.2rem 0 0; text-align: right; font-size: 0.74rem; font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.rv-count.is-near { color: #9a4a26; }
/* Split bill: someone not on this bill (₱0.00) */
.person.is-out { opacity: 0.6; background: repeating-linear-gradient(135deg, transparent 0 8px, rgba(0, 0, 0, 0.025) 8px 16px); }
.person.is-out .pay-status,
.person.is-out .due-lbl { color: var(--ink-soft) !important; }
/* Split bill: Mark paid (everyone on the bill) */
.exp-row-actions { display: inline-flex; align-items: center; gap: 0.35rem; }
.exp-mark-paid {
  min-height: 2rem;
  padding: 0 0.8rem;
  border: 1px solid #2f7d57;
  border-radius: 999px;
  background: #e3f1e9;
  color: #1f5a3d;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}
.exp-mark-paid:hover { background: #2f7d57; color: #fff; }
.nu-settle-paid.is-empty { background: #eef0f3; color: #6b7280; }
/* Group total "?": the tip opens right under its own button, not at the card's far edge */
.exp-hero-kicker .stat-help { position: relative; display: inline-flex; vertical-align: middle; top: auto; right: auto; }
.exp-hero-kicker .stat-help .stat-help-tip { left: -0.4rem; right: auto; top: calc(100% + 0.5rem); width: min(24rem, calc(100vw - 2rem)); }
.exp-hero-kicker .stat-help .stat-help-tip::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 0.75rem;
  width: 10px;
  height: 10px;
  background: #1a1410;
  border-left: 1px solid color-mix(in srgb, #fffaf4 22%, transparent);
  border-top: 1px solid color-mix(in srgb, #fffaf4 22%, transparent);
  transform: rotate(45deg);
}

/* Public Travellers (Trip detail): a public profile row opens that profile — classic and new UI */
.traveller-roster.is-public { margin: 0; padding: 0; list-style: none; }
.traveller-profile-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 -0.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s;
}
.traveller-profile-link:hover,
.traveller-profile-link:focus-visible { background: color-mix(in srgb, var(--forest, #22392f) 7%, transparent); }
.traveller-profile-go {
  margin-left: auto;
  color: var(--forest, #22392f);
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0.7;
}
.traveller-profile-link:hover .traveller-profile-go { opacity: 1; }

/* Foodie: who can put a Food place on the schedule (web + app). */
.food-schedule-hint {
  margin: 0;
  color: var(--ink-soft, #6b6257);
  font-size: 0.78rem;
  line-height: 1.35;
}

/* Crew roles & invites (UAT): pending invitee, role legend, save-dialog role list, one-time role note. */
.wb-role-toggle[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.wb-pending-chip.is-pending {
  border-style: dashed;
}
.wb-role-legend {
  margin: 0 0 0.6rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.45;
}
.crew-role-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.8rem;
}
.mast-avatar.is-pending {
  opacity: 0.55;
  border-style: dashed;
}

/* Role note: a readable "Got it" and a ✕ (tooltip "Dismiss") in the corner. */
.crew-role-note {
  position: relative;
  padding-right: 2.6rem;
}
.crew-role-note .crew-role-ok {
  min-height: 2rem;
  padding: 0.25rem 0.85rem;
  border: 1px solid #2d5a45;
  border-radius: 999px;
  background: #fff;
  color: #1f3d30;
  font-weight: 700;
  font-size: 0.78rem;
}
.crew-role-note .crew-role-x {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #4d4a42;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}
.crew-role-note .crew-role-x:hover,
.crew-role-note .crew-role-x:focus-visible {
  background: rgba(31, 61, 48, 0.08);
}
/* The header's .btn-quiet / .btn-ghost colours out-rank the note's own; win on the note. */
html body .crew-role-note .crew-role-ok {
  border: 1px solid #2d5a45;
  background: #fff;
  color: #1f3d30;
}
html body .crew-role-note .crew-role-x {
  background: transparent;
  color: #4d4a42;
}

/* Ask LakBi's own When? (owner 2026-10-03): the slot it looks in, Change opens the day timeline. */
.lbq-when {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  min-height: 3rem;
  padding: 0.5rem 0.9rem;
  border: 1.5px solid var(--line, #e4dccb);
  border-radius: 14px;
  background: #fff;
  color: var(--ink, #1a1410);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.lbq-when strong {
  font-size: 0.95rem;
}
.lbq-when span {
  color: var(--forest, #1e3a2f);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: underline;
}

/* Files + receipts retention line and Download all (owner 2026-10-03; same on the app). */
.files-retention {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--ink-soft);
  font-weight: 500;
}
.files-dl-all {
  margin-top: 0.5rem;
  white-space: nowrap;
}
.files-dl-all[disabled] {
  opacity: 0.6;
  cursor: progress;
}

/* A PDF receipt has no thumbnail: name · View · Remove. */
.settle-receipt-preview:has(img[hidden]) {
  grid-template-columns: minmax(0, 1fr) auto auto;
}
.settle-receipt-preview img[hidden] {
  display: none;
}

/* Costs: the New / Edited tag sits on the card's top border — in the corner it covered the total
   (owner 2026-10-03). */
.cost-card.is-new::before,
.ledger-block.is-new::before,
.cost-card.is-edited:not(.is-new)::before,
.ledger-block.is-edited:not(.is-new)::before {
  top: -0.6rem;
  right: 0.9rem;
}
.cost-card.is-new,
.ledger-block.is-new,
.cost-card.is-edited,
.ledger-block.is-edited {
  overflow: visible;
}

/* Social sharing (owner 2026-10-04): Share + a labelled "Copy this itinerary" on a public trip,
   the day card button, and the page for an itinerary that isn't public anymore. */
.public-nav .public-nav-copy,
.public-nav .public-nav-share {
  padding-inline: 0.85rem;
  gap: 0.4rem;
  white-space: nowrap;
}
html.wb-new .sheet-nav-tray .public-nav-ico.public-nav-copy,
html.wb-new .sheet-nav-tray .public-nav-ico.public-nav-share {
  padding: 0 0.85rem;
}
.public-nav-text { font-weight: 600; }
/* Copy this itinerary is the primary action on a public page: the light pill. */
html .sheet-nav-tray #public-nav > #nav-edit.public-nav-copy:not([hidden]) {
  border-color: transparent;
  background: #fbf6ec;
  color: #1f3d30;
}
html .sheet-nav-tray #public-nav > #nav-edit.public-nav-copy .public-nav-svg {
  color: #1f3d30;
  stroke: currentColor;
}
.ss-day-btn { white-space: nowrap; }
html.is-public-gone body { overflow: hidden; }
html.is-public-gone .workbook,
html.is-public-gone .wb-boot,
html.is-public-gone .welcome { display: none !important; }

/* Split bill progress beside a cost’s own badge (owner 2026-10-04): "Split · 1 of 5 paid" / "Split · settled ✓". */
.exp-split-progress {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
  background: color-mix(in srgb, #f59e0b 16%, #fff);
  color: #92400e;
}
.exp-split-progress.is-settled {
  background: color-mix(in srgb, #22c55e 16%, #fff);
  color: #15803d;
}
.exp-status-badge + .exp-split-progress {
  margin-left: 0.3rem;
}

/* A review photo held for its safety check (Places Phase 1 step I): crew-only until checked. */
.rv-held {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.4rem 0 0;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #fbf3dc;
  color: #7a5a12;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
}

/* 👁 views on Explore / landing cards (owner 2026-10-14; World + app: shared/trip-card.css .tc-views) */
.lb-dest-meta .tc-views { display: inline-flex; align-items: center; gap: 0.25rem; margin-left: auto; padding: 0.05rem 0.45rem; border: 1px solid rgba(31, 61, 48, 0.18); border-radius: 999px; background: #f6f3ea; color: #3b4a40; font-size: 0.76rem; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.lb-dest-meta .tc-views + .lb-dest-upvote { margin-left: 0.35rem; }
