:root {
  color-scheme: light;
  --color-ocean-900: #052e56;
  --color-ocean-700: #075f93;
  --color-ocean-500: #0a8fb5;
  --color-white: #ffffff;
  --color-ink: #082d5c;
  --radius-card: 8px;
  --radius-pill: 999px;
  --shadow-soft: 0 14px 40px rgba(6, 47, 105, 0.14);
  --shadow-floating: 0 18px 50px rgba(6, 47, 105, 0.22);
  --gradient-ocean: linear-gradient(135deg, #052e56 0%, #075f93 45%, #0a8fb5 100%);
  --paper: #eef9fd;
  --paper-strong: var(--color-white);
  --ink: var(--color-ink);
  --muted: #52758d;
  --line: #b9dff0;
  --line-strong: #7fbddd;
  --teal: var(--color-ocean-500);
  --coral: #d85f55;
  --gold: #a98933;
  --green: #247f70;
  --blue: var(--color-ocean-700);
  --navy: var(--color-ocean-900);
  --shadow: var(--shadow-soft);
}

* {
  box-sizing: border-box;
}

/* The hidden attribute must always win, even over display:grid/flex rules. */
[hidden] {
  display: none !important;
}

/* When a real destination photo is applied, keep heading text crisp. */
.has-photo {
  background-color: var(--navy);
}

/* Calm skeleton shimmer while a hero photo resolves (brief). */
.is-loading-image {
  background-color: rgba(7, 95, 147, 0.55);
  background-image: linear-gradient(110deg, rgba(255, 255, 255, 0.05) 30%, rgba(255, 255, 255, 0.16) 50%, rgba(255, 255, 255, 0.05) 70%) !important;
  background-size: 220% 100%;
  animation: shimmer 1.3s linear infinite;
}

.skeleton {
  background-color: rgba(115, 210, 231, 0.18);
  background-image: linear-gradient(110deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 70%);
  background-size: 220% 100%;
  border-radius: var(--radius-card);
  animation: shimmer 1.3s linear infinite;
}

@keyframes shimmer {
  from { background-position: 220% 0; }
  to { background-position: -220% 0; }
}

.ai-skeleton {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.skel-line {
  height: 12px;
  border-radius: 6px;
}

.skel-line.short {
  width: 62%;
}

/* Restrained motion: views fade/slide in on navigation; buttons depress. */
.view.is-active {
  animation: view-in 240ms ease;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.primary-btn:active,
.secondary-btn:active,
.icon-btn:active,
.tab:active,
.review-toggle:active,
.journey-item:active {
  transform: translateY(1px) scale(0.985);
}

.review-card {
  animation: card-in 220ms ease both;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.backup-row {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* Print: render only the purpose-built #print-doc (chosen via the print popup). */
#print-doc {
  display: none;
}

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .app-shell,
  .bottom-nav,
  .toast,
  .sheet-overlay,
  .login-overlay,
  .ask-fab {
    display: none !important;
  }

  #print-doc {
    display: block !important;
    color: #111;
    font-size: 11pt;
    line-height: 1.4;
  }

  .print-head {
    margin-bottom: 12pt;
    padding-bottom: 8pt;
    border-bottom: 2px solid #111;
  }

  .print-head h1 {
    margin: 0 0 2pt;
    font-size: 20pt;
  }

  .print-head p {
    margin: 0;
    color: #444;
    font-size: 10pt;
  }

  .print-section-title {
    margin: 0 0 8pt;
    font-size: 14pt;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #1a3a5a;
  }

  .print-break {
    break-before: page;
    page-break-before: always;
  }

  .print-day {
    margin-bottom: 10pt;
    break-inside: avoid;
  }

  .print-day-title {
    margin: 10pt 0 4pt;
    padding-bottom: 2pt;
    font-size: 12pt;
    border-bottom: 1px solid #999;
  }

  .print-day-title span {
    font-weight: 600;
    color: #555;
  }

  /* Summary lines */
  .print-line {
    display: grid;
    grid-template-columns: 64pt 1fr;
    gap: 8pt;
    padding: 2pt 0;
  }

  .print-time {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .print-line-where {
    display: block;
    color: #555;
    font-size: 9.5pt;
  }

  /* Detailed events */
  .print-event {
    margin: 0 0 7pt;
    padding: 4pt 0 6pt;
    border-bottom: 1px solid #ddd;
    break-inside: avoid;
  }

  .print-event-head {
    margin: 0 0 1pt;
    font-size: 11.5pt;
  }

  .print-event-loc {
    margin: 0 0 3pt;
    color: #555;
    font-size: 9.5pt;
  }

  .print-detail-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4pt 14pt;
  }

  .print-detail {
    font-size: 9.5pt;
    color: #333;
  }

  .print-notes {
    margin: 3pt 0 0;
    font-size: 9.5pt;
    color: #333;
    white-space: pre-wrap;
  }
}

.has-photo h2,
.has-photo h3,
.has-photo p,
.has-photo .section-kicker {
  text-shadow: 0 1px 14px rgba(5, 28, 54, 0.45);
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background:
    linear-gradient(135deg, rgba(88, 189, 231, 0.24), transparent 34%),
    linear-gradient(215deg, rgba(6, 47, 105, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(10, 143, 181, 0.1), transparent 46%),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

:focus-visible {
  outline: 3px solid rgba(0, 139, 139, 0.35);
  outline-offset: 2px;
}

.app-shell {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(16px + env(safe-area-inset-top)) 14px calc(104px + env(safe-area-inset-bottom));
}

.app-header,
.section-head,
.button-row,
.field-grid,
.event-actions,
.timeline-meta,
.header-actions,
.bottom-nav {
  display: flex;
  align-items: center;
}

.app-header {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.brand-lockup {
  display: grid;
  gap: 5px;
}

.brand-logo {
  display: block;
  width: clamp(176px, 48vw, 300px);
  height: auto;
  mix-blend-mode: multiply;
}

.header-actions {
  gap: 8px;
}

.offline-badge {
  min-height: 32px;
  align-content: center;
  padding: 0 10px;
  border: 1px solid rgba(168, 137, 51, 0.32);
  border-radius: var(--radius-pill);
  background: rgba(246, 241, 231, 0.86);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.eyebrow,
.section-kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2.25rem, 12vw, 4.1rem);
  line-height: 0.92;
}

h2 {
  margin-bottom: 0;
  font-size: 1.45rem;
  line-height: 1.08;
}

h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.icon-btn,
.tab,
.primary-btn,
.secondary-btn,
.danger-btn {
  min-height: 44px;
  border-radius: var(--radius-card);
  border: 1px solid transparent;
  font-weight: 800;
}

.icon-btn {
  width: 48px;
  padding: 0;
  background: var(--paper-strong);
  border-color: var(--line);
  color: var(--teal);
  box-shadow: var(--shadow);
}

.icon-btn span {
  display: block;
  font-size: 1.4rem;
  line-height: 1;
}

.bottom-nav {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 8;
  gap: 6px;
  padding: 6px;
  max-width: 760px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(248, 253, 255, 0.94);
  box-shadow: var(--shadow-floating);
  backdrop-filter: blur(18px);
}

.tab {
  flex: 1;
  padding: 0 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.86rem;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.tab.is-active {
  background: var(--navy);
  color: var(--paper-strong);
  transform: translateY(-1px);
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.now-panel,
.add-form,
.settings-list,
.event-card,
.day-group,
.destination-hero,
.map-stop,
.contact-card,
.place-guide,
.guide-section {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(248, 253, 255, 0.92);
  box-shadow: var(--shadow);
}

.destination-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 164px;
  overflow: hidden;
  padding: 20px;
  margin-bottom: 12px;
  border-color: rgba(115, 210, 231, 0.42);
  background:
    linear-gradient(160deg, rgba(5, 46, 86, 0.92), rgba(7, 95, 147, 0.78) 54%, rgba(115, 210, 231, 0.56)),
    linear-gradient(0deg, rgba(255, 255, 255, 0.14) 0 2px, transparent 2px 18px);
  color: var(--paper-strong);
}

.destination-hero::before {
  position: absolute;
  right: -18%;
  bottom: -42%;
  width: 78%;
  height: 84%;
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-top: 0;
  border-left: 0;
  border-radius: 0 0 0 88px;
  content: "";
  transform: rotate(-10deg);
}

.destination-hero > * {
  position: relative;
  z-index: 1;
}

.destination-hero .section-kicker,
.destination-hero p {
  color: rgba(255, 255, 255, 0.78);
}

.destination-hero h2 {
  margin-bottom: 6px;
  font-size: clamp(1.9rem, 9vw, 3.1rem);
  line-height: 0.98;
}

.destination-hero p {
  margin-bottom: 0;
  line-height: 1.35;
}

/* Full-width weather bar under the hero greeting (fits narrow portrait phones). */
.weather-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(14px);
  color: white;
  cursor: pointer;
  text-align: left;
  transition: background 140ms ease, transform 140ms ease;
}

.weather-temp {
  flex: none;
  font-size: 1.3rem;
  line-height: 1;
  font-weight: 800;
}

.weather-summary {
  flex: 1;
  min-width: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.weather-cue {
  flex: none;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* "New version ready" banner — sits above the bottom nav and the Ask FAB. */
.update-toast {
  position: fixed;
  left: 50%;
  bottom: calc(146px + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 24px);
  padding: 10px 10px 10px 16px;
  border-radius: var(--radius-pill);
  background: linear-gradient(150deg, var(--teal), var(--navy));
  color: #fff;
  box-shadow: var(--shadow-floating);
  font-size: 0.84rem;
  font-weight: 700;
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
}

.update-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.update-refresh {
  flex: none;
  border: 0;
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--navy);
  font-weight: 800;
  font-size: 0.84rem;
  padding: 7px 16px;
  cursor: pointer;
}

.update-refresh:disabled {
  opacity: 0.65;
  cursor: default;
}

.update-dismiss {
  flex: none;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  line-height: 1;
  padding: 6px;
  cursor: pointer;
}

/* Animated weather icon — shapes inherit the chip's white via currentColor. */
.weather-icon {
  flex: none;
  width: 36px;
  height: 36px;
  color: #fff;
  filter: drop-shadow(0 1px 3px rgba(6, 47, 105, 0.35));
}

.wx-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.wx-svg circle,
.wx-svg rect,
.wx-svg path {
  fill: currentColor;
}

.wx-svg line {
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.wx-bolt {
  fill: #ffd56b;
}

/* Rotating / pulsing sun. transform-box keeps the px origin on the viewBox. */
.wx-rays,
.wx-core,
.wx-rays-sm,
.wx-core-sm {
  transform-box: view-box;
}

.wx-rays {
  transform-origin: 20px 20px;
  animation: wx-spin 9s linear infinite;
}

.wx-core {
  transform-origin: 20px 20px;
  animation: wx-pulse 3s ease-in-out infinite;
}

.wx-rays-sm {
  transform-origin: 13px 13px;
  animation: wx-spin 9s linear infinite;
}

.wx-core-sm {
  transform-origin: 13px 13px;
  animation: wx-pulse 3s ease-in-out infinite;
}

/* Drifting clouds */
.wx-cloud {
  animation: wx-drift 4.5s ease-in-out infinite;
}

.wx-cloud-front {
  animation-duration: 5.5s;
}

/* Falling rain + snow (staggered) */
.wx-drop {
  animation: wx-fall 1.1s linear infinite;
}

.wx-drop.d2 {
  animation-delay: 0.37s;
}

.wx-drop.d3 {
  animation-delay: 0.73s;
}

.wx-flake {
  animation: wx-fall 1.9s ease-in infinite;
}

.wx-flake.f2 {
  animation-delay: 0.63s;
}

.wx-flake.f3 {
  animation-delay: 1.26s;
}

/* Flashing lightning */
.wx-bolt {
  animation: wx-flash 2.6s steps(1, end) infinite;
}

/* Drifting fog lines */
.wx-fog .fl {
  animation: wx-fogdrift 4s ease-in-out infinite;
}

.wx-fog .f2 {
  animation-delay: 0.5s;
}

.wx-fog .f3 {
  animation-delay: 1s;
}

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

@keyframes wx-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes wx-drift {
  0%, 100% { transform: translateX(-1.5px); }
  50% { transform: translateX(1.5px); }
}

@keyframes wx-fall {
  0% { transform: translateY(-3px); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: translateY(5px); opacity: 0; }
}

@keyframes wx-flash {
  0%, 90%, 100% { opacity: 0.35; }
  93%, 97% { opacity: 1; }
}

@keyframes wx-fogdrift {
  0%, 100% { transform: translateX(-2px); opacity: 0.55; }
  50% { transform: translateX(2px); opacity: 1; }
}

.weather-chip:hover {
  background: rgba(255, 255, 255, 0.24);
}

.weather-chip:active {
  transform: translateY(1px) scale(0.985);
}

.contacts-list {
  display: grid;
  gap: 10px;
}

/* Trip Confidence — premium readiness module */
.confidence-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 2px 0 0;
  padding: 2px 12px;
  border-radius: var(--radius-pill);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.confidence-status.is-ready {
  background: rgba(36, 127, 112, 0.16);
  color: var(--green);
}

.confidence-status.is-good {
  background: rgba(10, 143, 181, 0.16);
  color: var(--blue);
}

.confidence-status.is-watch {
  background: rgba(168, 137, 51, 0.18);
  color: var(--gold);
}

.confidence-status.is-needs-action {
  background: rgba(216, 95, 85, 0.16);
  color: var(--coral);
}

.confidence-group-label {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.confidence-ready,
.confidence-attention {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.confidence-ready li,
.confidence-attention li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.3;
}

.confidence-ready li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 900;
}

.confidence-attention li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: var(--coral);
  font-size: 1.2rem;
  line-height: 1;
}

.now-panel {
  position: relative;
  overflow: hidden;
  padding: 22px;
}

.next-action-card {
  display: grid;
  gap: 4px;
  align-content: start;
  border-color: rgba(7, 95, 147, 0.18);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(238, 249, 253, 0.9)),
    var(--paper-strong);
}

.now-headline {
  max-width: 16ch;
  margin: 2px 0 4px;
  font-size: clamp(1.9rem, 8vw, 2.9rem);
  letter-spacing: -0.01em;
  line-height: 1.02;
}

.now-headline.is-duration {
  color: var(--teal);
  font-size: clamp(2.6rem, 13vw, 4.4rem);
  line-height: 0.95;
}

.now-headline.is-place {
  max-width: 18ch;
}

.now-sub {
  max-width: 38rem;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.45;
}

.now-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.now-reminder {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.now-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(7, 95, 147, 0.2);
  border-radius: var(--radius-pill);
  background: rgba(67, 191, 209, 0.12);
  color: var(--blue);
  font-size: 0.85rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.button-row {
  flex-wrap: wrap;
  gap: 8px;
}

.primary-btn,
.secondary-btn,
.danger-btn {
  padding: 0 14px;
}

.primary-btn {
  background: var(--teal);
  color: white;
}

.secondary-btn {
  background: var(--paper-strong);
  border-color: var(--line-strong);
  color: var(--navy);
}

.danger-btn {
  width: 100%;
  margin-top: 16px;
  background: rgba(186, 81, 69, 0.1);
  border-color: rgba(186, 81, 69, 0.34);
  color: var(--coral);
}

.compact-head {
  margin: 0 0 10px;
}

/* Smart insight — one restrained line */
.smart-insight {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(248, 253, 255, 0.92);
  box-shadow: var(--shadow);
}

.smart-insight.is-warn {
  border-color: rgba(216, 95, 85, 0.4);
  background: linear-gradient(135deg, rgba(216, 95, 85, 0.1), rgba(248, 253, 255, 0.92));
}

.smart-insight.is-calm {
  border-color: rgba(36, 127, 112, 0.34);
  background: linear-gradient(135deg, rgba(36, 127, 112, 0.1), rgba(248, 253, 255, 0.92));
}

.insight-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.insight-copy {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.35;
}

/* Today's Journey — compact day checklist */
.journey-panel {
  margin-top: 14px;
}

.journey-list {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(248, 253, 255, 0.92);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.journey-item {
  display: grid;
  grid-template-columns: 26px 58px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid rgba(185, 220, 230, 0.6);
  background: transparent;
  color: var(--ink);
  text-align: left;
  transition: background 140ms ease;
}

.journey-item:last-child {
  border-bottom: 0;
}

.journey-item:active {
  background: rgba(67, 191, 209, 0.12);
}

.journey-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 900;
  background: rgba(185, 223, 240, 0.5);
  color: var(--muted);
}

.journey-item.is-done {
  color: var(--muted);
}

.journey-item.is-done .journey-mark {
  background: rgba(36, 127, 112, 0.16);
  color: var(--green);
}

.journey-item.is-current {
  background: rgba(67, 191, 209, 0.14);
}

.journey-item.is-current .journey-mark {
  background: var(--teal);
  color: white;
  box-shadow: 0 0 0 4px rgba(10, 143, 181, 0.16);
}

.journey-item.is-next .journey-mark {
  background: var(--navy);
  color: white;
}

.journey-item.is-risk .journey-mark {
  background: var(--coral);
  color: white;
}

.journey-time {
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.journey-body {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.journey-name {
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journey-item.is-done .journey-name {
  text-decoration: line-through;
  text-decoration-color: rgba(82, 117, 141, 0.5);
}

.journey-where {
  color: var(--muted);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journey-status {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.journey-item.is-next .journey-status {
  color: var(--blue);
}

.journey-item.is-risk .journey-status {
  color: var(--coral);
}

/* Look-ahead strip — horizontal scroll of upcoming stops across the trip. */
.upnext-panel {
  margin-top: 14px;
}

.upnext-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.upnext-strip::-webkit-scrollbar {
  height: 8px;
}

.upnext-strip::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: var(--radius-pill);
}

.upnext-strip::-webkit-scrollbar-track {
  background: transparent;
}

.upnext-card {
  flex: 0 0 auto;
  width: 158px;
  display: grid;
  gap: 2px;
  align-content: start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(248, 253, 255, 0.92);
  box-shadow: var(--shadow);
  text-align: left;
  scroll-snap-align: start;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.upnext-card:active {
  transform: translateY(1px) scale(0.985);
}

.upnext-day {
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.upnext-time {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.upnext-name {
  margin-top: 2px;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.upnext-where {
  color: var(--muted);
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-empty,
.empty-state {
  color: var(--muted);
  line-height: 1.4;
}

.empty-cta {
  display: grid;
  gap: 12px;
  justify-items: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(248, 253, 255, 0.92);
  box-shadow: var(--shadow);
}

.empty-cta p {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.section-head {
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 14px;
}

.plan-list {
  display: grid;
  gap: 14px;
}

.day-group {
  overflow: hidden;
}

.day-group.is-day-done {
  opacity: 0.82;
}

.day-header {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  min-height: 116px;
  padding: 16px;
  background:
    linear-gradient(150deg, rgba(5, 46, 86, 0.9), rgba(7, 95, 147, 0.66)),
    var(--gradient-ocean);
  color: var(--paper-strong);
}

.day-header.has-photo .day-city,
.day-header.has-photo .day-date,
.day-header.has-photo .day-meta,
.day-header.has-photo .day-first {
  text-shadow: 0 1px 12px rgba(5, 28, 54, 0.5);
}

.day-header-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.day-city {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.day-date {
  margin: 0;
  font-size: 1.3rem;
  color: var(--paper-strong);
}

.day-meta {
  margin: 2px 0 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.86);
}

.day-first {
  margin: 1px 0 0;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.78);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 22ch;
}

.day-risk {
  flex-shrink: 0;
  align-self: flex-start;
  min-height: 26px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 900;
  white-space: nowrap;
}

.day-risk.is-ready {
  background: rgba(36, 127, 112, 0.9);
  color: white;
}

.day-risk.is-watch {
  background: rgba(168, 137, 51, 0.92);
  color: white;
}

.day-events {
  display: grid;
  gap: 0;
}

.event-card {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 16px;
  border-width: 0 0 1px;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.event-card:last-child {
  border-bottom: 0;
}

.event-card.is-current {
  background: rgba(0, 139, 139, 0.11);
}

.event-card.is-past {
  opacity: 0.62;
}

.timeline-meta {
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(17, 106, 160, 0.11);
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 900;
}

.event-title {
  margin: 0;
  font-size: 1.08rem;
}

.event-location,
.event-detail-row {
  display: grid;
  gap: 8px;
}

.event-detail-row span {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid rgba(185, 223, 240, 0.82);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.25;
}

.event-detail-row strong {
  color: var(--navy);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event-actions {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

/* On trip cards, the actions read as real (pill) buttons, not text links. */
.event-actions .link-btn {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--paper-strong);
  color: var(--blue);
  box-shadow: 0 2px 8px rgba(7, 53, 79, 0.06);
}

.event-actions .link-btn:active {
  transform: translateY(1px) scale(0.985);
}

.link-btn {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--teal);
  font-weight: 900;
}

.file-drop,
.import-box,
.add-form textarea,
.add-form input,
.add-form select,
.settings-list input,
.settings-list select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--paper-strong);
  color: var(--ink);
}

.file-drop {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 86px;
  padding: 14px;
  margin-bottom: 12px;
  border-style: dashed;
  background:
    linear-gradient(135deg, rgba(67, 191, 209, 0.16), transparent 58%),
    var(--paper-strong);
  cursor: pointer;
}

.file-drop.is-dragging {
  border-color: var(--teal);
  background: rgba(67, 191, 209, 0.2);
}

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

.file-drop-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
}

.file-drop strong,
.file-drop small {
  display: block;
}

.file-drop small {
  margin-top: 3px;
  color: var(--muted);
}

.manual-add-panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(248, 253, 255, 0.82);
  box-shadow: var(--shadow);
}

.manual-add-panel summary {
  min-height: 54px;
  align-content: center;
  padding: 0 16px;
  color: var(--navy);
  font-weight: 900;
  list-style: none;
  cursor: pointer;
}

.manual-add-panel summary::-webkit-details-marker {
  display: none;
}

.manual-add-panel summary::after {
  float: right;
  color: var(--teal);
  content: "+";
}

.manual-add-panel[open] summary {
  border-bottom: 1px solid var(--line);
}

.manual-add-panel[open] summary::after {
  content: "−";
}

.import-box {
  min-height: 220px;
  padding: 14px;
  resize: vertical;
}

.status-line {
  min-height: 22px;
  margin: 10px 0 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Import review */
.import-review {
  margin-top: 8px;
}

.review-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.review-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(248, 253, 255, 0.92);
  box-shadow: var(--shadow);
  transition: opacity 150ms ease;
}

.review-card.is-rejected {
  opacity: 0.5;
}

.review-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.kind-tag,
.confidence-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.kind-tag {
  background: rgba(7, 95, 147, 0.12);
  color: var(--blue);
}

.confidence-tag.is-high {
  background: rgba(36, 127, 112, 0.14);
  color: var(--green);
}

.confidence-tag.is-med {
  background: rgba(168, 137, 51, 0.16);
  color: var(--gold);
}

.confidence-tag.is-low {
  background: rgba(216, 95, 85, 0.14);
  color: var(--coral);
}

.review-name {
  margin: 0 0 2px;
  font-size: 1.02rem;
}

.review-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.review-missing {
  margin: 4px 0 0;
  color: var(--coral);
  font-size: 0.8rem;
  font-weight: 700;
}

.review-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper-strong);
  color: var(--muted);
  font-size: 1.3rem;
  font-weight: 900;
}

.review-toggle.is-on {
  border-color: var(--teal);
  background: var(--teal);
  color: white;
}

.add-form {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.add-form label {
  display: grid;
  gap: 6px;
}

.add-form label span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.add-form input,
.add-form select,
.add-form textarea,
.settings-list input,
.settings-list select {
  min-height: 44px;
  padding: 10px 12px;
}

.field-grid {
  align-items: stretch;
  gap: 10px;
}

.field-grid > label {
  flex: 1;
  min-width: 0;
}

.settings-list {
  display: grid;
}

/* Map view — one collapsible map per stop, grouped by day. */
.map-sections {
  display: grid;
  gap: 18px;
}

.map-day {
  display: grid;
  gap: 10px;
}

.map-day-title {
  margin: 0;
  font-size: 0.95rem;
  color: var(--blue);
  letter-spacing: 0.02em;
}

.map-stop {
  overflow: hidden;
  padding: 0;
}

.map-stop-head {
  display: grid;
  grid-template-columns: 58px 1fr 22px;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.map-stop-head::-webkit-details-marker {
  display: none;
}

.map-stop-time {
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.map-stop-body {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.map-stop-name {
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-stop-where {
  color: var(--muted);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-stop-chevron {
  justify-self: center;
  color: var(--blue);
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
  transition: transform 180ms ease;
}

.map-stop[open] .map-stop-chevron {
  transform: rotate(180deg);
}

.map-stop-panel {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.map-embed {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, rgba(115, 210, 231, 0.5), rgba(246, 241, 231, 0.72));
}

.map-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  border: 0;
}

.map-embed-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 16px;
  color: var(--blue);
  font-weight: 700;
  text-align: center;
}

.map-stop .event-actions {
  margin: 0;
}

.contact-card {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.contact-card strong {
  display: block;
  overflow-wrap: anywhere;
}

.contact-card span {
  color: var(--muted);
  line-height: 1.35;
}

.contact-group-title {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.back-link {
  margin: 0 0 12px;
}

.guide-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.guide-step-nav {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
}

.guide-step-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
}

.guide-step-btn:hover:not(:disabled) {
  background: var(--paper);
  border-color: var(--line-strong);
}

.guide-step-btn:active {
  transform: scale(0.94);
}

.guide-step-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.place-guide {
  overflow: hidden;
  background: rgba(248, 253, 255, 0.96);
}

.place-guide-hero {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  padding: 22px;
  background:
    linear-gradient(145deg, rgba(5, 46, 86, 0.92), rgba(10, 143, 181, 0.72)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px 22px);
  color: white;
}

.place-guide-hero::after {
  position: absolute;
  right: -28px;
  bottom: -44px;
  width: 180px;
  height: 180px;
  border: 2px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  content: "";
}

.place-guide-hero h2 {
  position: relative;
  z-index: 1;
  max-width: 13ch;
  margin: 0 0 10px;
  color: white;
  font-size: clamp(2.1rem, 10vw, 4.2rem);
  line-height: 0.95;
}

.place-guide-hero p,
.place-guide-hero .section-kicker {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.78);
}

.guide-hotel {
  background: linear-gradient(145deg, rgba(5, 46, 86, 0.94), rgba(168, 137, 51, 0.58));
}

.guide-flight,
.guide-transport {
  background: linear-gradient(145deg, rgba(5, 46, 86, 0.94), rgba(7, 95, 147, 0.78));
}

.guide-restaurant {
  background: linear-gradient(145deg, rgba(5, 46, 86, 0.92), rgba(36, 127, 112, 0.7));
}

.guide-hero-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.guide-hero-meta span {
  min-height: 32px;
  align-content: center;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.86);
  font-weight: 850;
}

.guide-section {
  display: grid;
  gap: 10px;
  padding: 16px;
  margin: 12px;
  box-shadow: none;
}

.guide-insight,
.guide-address {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.48;
}

.guide-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.guide-photo {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(115, 210, 231, 0.18);
  cursor: pointer;
  transition: transform 140ms ease;
}

.guide-photo:active {
  transform: scale(0.97);
}

.guide-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guide-photo.is-loading {
  background: linear-gradient(100deg, rgba(115, 210, 231, 0.18) 30%, rgba(115, 210, 231, 0.34) 50%, rgba(115, 210, 231, 0.18) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  cursor: default;
}

.guide-detail-grid {
  display: grid;
  gap: 8px;
}

.guide-detail {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid rgba(185, 223, 240, 0.82);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.72);
}

.guide-detail span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guide-detail strong {
  overflow-wrap: anywhere;
}

.guide-ai-section .section-head {
  margin: 0 0 4px;
}

.nearby-kicker {
  margin-top: 14px;
}

.nearby-btn {
  min-height: 38px;
  padding: 0 12px;
  font-size: 0.9rem;
}

.guide-ai-body {
  display: grid;
  gap: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.guide-ai-body h4 {
  margin: 10px 0 2px;
  color: var(--navy);
  font-size: 0.95rem;
}

.guide-ai-body h4:first-child {
  margin-top: 0;
}

.guide-ai-body p {
  margin: 0;
}

.guide-ai-body ul {
  display: grid;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.guide-ai-body li {
  padding-left: 12px;
  border-left: 3px solid rgba(10, 143, 181, 0.42);
}

.guide-ai-body strong {
  color: var(--navy);
}

.guide-ai-loading {
  margin: 0;
  color: var(--teal);
  font-weight: 800;
}

.guide-notes ul {
  display: grid;
  gap: 9px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.guide-notes li {
  padding-left: 12px;
  border-left: 3px solid rgba(10, 143, 181, 0.42);
  color: var(--muted);
  line-height: 1.42;
}

.setting-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.setting-row:last-child {
  border-bottom: 0;
}

.setting-row strong,
.setting-row small {
  display: block;
}

.setting-row small {
  margin-top: 3px;
  color: var(--muted);
}

.setting-row input,
.setting-row select {
  width: 132px;
}

.sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(5, 28, 54, 0.42);
  backdrop-filter: blur(4px);
}

body.sheet-open {
  overflow: hidden;
}

.edit-sheet {
  width: min(100%, 560px);
  max-height: 92vh;
  overflow-y: auto;
  padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
  border-radius: 18px 18px 0 0;
  background: var(--paper-strong);
  box-shadow: 0 -18px 50px rgba(5, 28, 54, 0.3);
  animation: sheet-rise 220ms ease;
}

@keyframes sheet-rise {
  from { transform: translateY(18px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}

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

.edit-sheet-head h2 {
  margin: 0;
  font-size: 1.3rem;
}

.edit-form {
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: 0;
}

.edit-sheet-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 6px;
}

.edit-sheet-actions .primary-btn {
  grid-column: 1;
}

.edit-sheet-actions .secondary-btn {
  grid-column: 2;
}

/* 7-day forecast sheet (local + destination). */
.weather-sheet {
  width: min(100%, 560px);
  max-height: 92vh;
  overflow-y: auto;
  padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
  border-radius: 18px 18px 0 0;
  background: var(--paper-strong);
  box-shadow: 0 -18px 50px rgba(5, 28, 54, 0.3);
  animation: sheet-rise 220ms ease;
}

.weather-sheet-body {
  display: grid;
  gap: 18px;
}

.forecast-block {
  display: grid;
  gap: 8px;
}

.forecast-head {
  display: grid;
  gap: 1px;
}

.forecast-role {
  margin: 0;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.forecast-city {
  margin: 0;
  font-size: 1.15rem;
}

.forecast-rows {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(248, 253, 255, 0.92);
  overflow: hidden;
}

.forecast-row {
  display: grid;
  grid-template-columns: 64px 28px 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(185, 220, 230, 0.6);
}

.forecast-row:last-child {
  border-bottom: 0;
}

.forecast-row.is-today {
  background: rgba(67, 191, 209, 0.12);
}

.forecast-day {
  display: grid;
  line-height: 1.15;
}

.forecast-day strong {
  font-weight: 800;
}

.forecast-day small {
  color: var(--muted);
  font-size: 0.74rem;
}

.forecast-icon {
  font-size: 1.1rem;
  text-align: center;
}

.forecast-desc {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forecast-rain {
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.forecast-temp {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.forecast-temp strong {
  font-weight: 900;
}

.forecast-temp small {
  color: var(--muted);
  font-size: 0.82rem;
}

.weather-empty {
  margin: 0;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-card);
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.edit-delete-btn {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 2px;
}

.toast {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(86px + env(safe-area-inset-bottom));
  z-index: 10;
  max-width: 720px;
  margin: 0 auto;
  padding: 13px 14px;
  border-radius: var(--radius-card);
  background: var(--ink);
  color: var(--paper-strong);
  box-shadow: 0 18px 50px rgba(29, 36, 48, 0.28);
  font-weight: 800;
}

@media (min-width: 720px) {
  .app-shell {
    padding-top: 28px;
  }

  .event-detail-row,
  .guide-detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .now-panel {
    padding: 30px;
  }
}

@media (max-width: 390px) {
  .tab {
    padding: 0 4px;
    font-size: 0.76rem;
  }

  .destination-hero {
    grid-template-columns: 1fr;
  }

  .field-grid {
    display: grid;
  }

  .section-head {
    align-items: flex-start;
  }

  .setting-row {
    grid-template-columns: 1fr;
  }

  .setting-row input,
  .setting-row select {
    width: 100%;
  }
}

/* ===== Accounts, login, and Admin =================================== */

.account-btn #account-initials {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--blue);
}

/* Login screen */
body.login-open {
  overflow: hidden;
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    linear-gradient(160deg, rgba(7, 53, 79, 0.92), rgba(10, 99, 140, 0.86)),
    var(--paper, #eef9fd);
  backdrop-filter: blur(6px);
}

.login-card {
  width: min(100%, 420px);
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 26px 22px calc(24px + env(safe-area-inset-bottom));
  border-radius: 22px;
  background: var(--paper-strong, #fff);
  box-shadow: 0 24px 60px rgba(5, 28, 54, 0.4);
  text-align: center;
}

.login-logo {
  width: 180px;
  height: auto;
}

.login-card h2 {
  margin: 0;
  font-size: 1.45rem;
}

.login-sub {
  margin: 0;
  color: var(--muted);
}

.login-profiles {
  width: 100%;
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.login-profile {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(248, 253, 255, 0.96);
  text-align: left;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.login-profile:hover {
  box-shadow: 0 6px 18px rgba(7, 53, 79, 0.12);
}

.login-profile:active {
  transform: translateY(1px) scale(0.99);
}

.login-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--teal, #0a8fb5), var(--navy, #07354f));
  color: #fff;
  font-weight: 900;
  font-size: 0.95rem;
}

.login-name {
  font-weight: 800;
}

.login-role {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.login-pin-form {
  width: 100%;
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.login-pin-name {
  margin: 0;
  font-weight: 800;
}

#login-pin {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  font-size: 1.4rem;
  letter-spacing: 0.4em;
  text-align: center;
}

.login-error {
  margin: 0;
  color: var(--coral, #d2553f);
  font-weight: 800;
  font-size: 0.85rem;
}

/* Admin sub-tabs */
.subtab-bar {
  display: flex;
  gap: 6px;
  margin: 4px 0 14px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: rgba(17, 106, 160, 0.1);
}

.subtab {
  flex: 1;
  min-height: 38px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--blue);
  font-weight: 800;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.subtab.is-active {
  background: var(--paper-strong, #fff);
  color: var(--navy, #07354f);
  box-shadow: 0 2px 8px rgba(7, 53, 79, 0.12);
}

.subview {
  display: grid;
  gap: 14px;
}

/* Calendar button icon */
.btn-cal-icon {
  font-size: 1.05em;
}

.admin-cal-row {
  margin-top: 2px;
}

/* Review Trip */
.review-confidence,
.review-warnings {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(248, 253, 255, 0.92);
  box-shadow: var(--shadow);
}

.review-confidence-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.review-summary {
  margin: 0;
  font-weight: 700;
  line-height: 1.4;
}

.review-next {
  margin: 0;
  padding-top: 6px;
  border-top: 1px solid rgba(185, 220, 230, 0.6);
  color: var(--ink);
}

.warning-card {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.7);
}

.warning-card.is-warn {
  border-color: rgba(210, 85, 63, 0.5);
  background: rgba(210, 85, 63, 0.08);
}

.warning-card.is-ok {
  border-color: rgba(36, 127, 112, 0.4);
  background: rgba(36, 127, 112, 0.08);
}

.warning-icon {
  font-size: 1.1rem;
  line-height: 1.3;
}

.warning-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.warning-day {
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.warning-body strong {
  line-height: 1.25;
}

.warning-body small {
  color: var(--muted);
  font-size: 0.84rem;
}

/* Users */
.account-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(248, 253, 255, 0.92);
  box-shadow: var(--shadow);
}

.account-me {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-me strong {
  display: block;
}

.account-me small {
  color: var(--muted);
  font-size: 0.8rem;
}

.users-kicker {
  margin-bottom: -4px;
}

.users-list {
  display: grid;
  gap: 8px;
}

.user-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.7);
}

.user-row .login-avatar {
  width: 40px;
  height: 40px;
}

.user-row-body {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.user-row-body small {
  color: var(--muted);
  font-size: 0.8rem;
}

.user-remove {
  color: var(--coral, #d2553f);
  font-weight: 800;
}

.add-user-form {
  margin-top: 4px;
}

.account-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

/* Icon-only action button (e.g. Add to calendar → 📅) */
.secondary-btn.icon-action,
.primary-btn.icon-action {
  min-width: 46px;
  padding-left: 12px;
  padding-right: 12px;
  font-size: 1.15rem;
  line-height: 1;
}

/* Small embedded map in the hotel "Your base" section */
.hotel-map {
  min-height: 180px;
}

.hotel-map iframe {
  min-height: 180px;
}

/* ===== Trip Chart — bird's-eye day-by-day flow ====================== */
.trip-chart {
  padding: 6px 0 24px;
}

.chart-flow {
  position: relative;
  display: grid;
  gap: 0;
}

.head-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Each day + transition is a row with a left rail carrying the route spine. */
.chart-day,
.chart-transition {
  position: relative;
  padding-left: 46px;
}

.chart-day::before,
.chart-transition::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(10, 143, 181, 0.32);
}

.chart-flow > .chart-day:first-child::before {
  top: 16px;
  border-radius: 3px 3px 0 0;
}

.chart-flow > .chart-day:last-child::before {
  bottom: auto;
  height: 28px;
}

.chart-day {
  margin: 7px 0;
}

.chart-dot {
  position: absolute;
  left: -39px;
  top: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 900;
  font-size: 0.8rem;
  box-shadow: 0 0 0 4px var(--paper);
}

.chart-day.is-today .chart-dot {
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(10, 143, 181, 0.18);
}

.chart-day.is-past {
  opacity: 0.72;
}

.chart-day-head {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 22px;
  align-items: center;
  gap: 10px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(248, 253, 255, 0.92);
  box-shadow: var(--shadow);
}

.chart-day-head::-webkit-details-marker {
  display: none;
}

.chart-day[open] .chart-day-head {
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  box-shadow: none;
}

.chart-day-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.chart-day-city {
  font-weight: 900;
  font-size: 1rem;
  line-height: 1.2;
}

.chart-day-date {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.chart-day-meta {
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 700;
}

.chart-day-risk {
  color: var(--coral);
  font-size: 0.76rem;
  font-weight: 800;
}

.chart-chevron {
  justify-self: center;
  color: var(--blue);
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
  transition: transform 180ms ease;
}

.chart-day[open] .chart-chevron {
  transform: rotate(180deg);
}

.chart-day-stops {
  display: grid;
  gap: 3px;
  padding: 6px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius-card) var(--radius-card);
  background: rgba(255, 255, 255, 0.66);
}

.chart-stop {
  display: grid;
  grid-template-columns: 52px 20px 1fr;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease;
}

.chart-stop:hover {
  background: rgba(67, 191, 209, 0.1);
}

.chart-stop:active {
  transform: scale(0.99);
}

.chart-stop.is-current {
  background: rgba(67, 191, 209, 0.14);
}

.chart-stop.is-done {
  opacity: 0.55;
}

.chart-stop-time {
  color: var(--blue);
  font-weight: 800;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.chart-stop-icon {
  text-align: center;
}

.chart-stop-body {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.chart-stop-title {
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-stop-where {
  color: var(--muted);
  font-size: 0.76rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Travel connector between two days */
.chart-transition {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0 6px 46px;
  min-height: 40px;
}

.chart-move-icon {
  position: absolute;
  left: 7px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-size: 0.85rem;
  box-shadow: 0 0 0 4px var(--paper);
}

.chart-move-label {
  color: var(--muted);
  font-weight: 800;
  font-size: 0.84rem;
}

.chart-day-area {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  opacity: 0.78;
}

.user-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.user-invite {
  color: var(--blue);
  font-weight: 800;
}

/* ===== Ask the Cat ================================================== */
.ask-fab {
  position: fixed;
  right: 16px;
  bottom: calc(82px + env(safe-area-inset-bottom));
  z-index: 7;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-pill);
  background: linear-gradient(150deg, var(--teal), var(--navy));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(7, 53, 79, 0.34);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.ask-fab:hover {
  box-shadow: 0 14px 32px rgba(7, 53, 79, 0.42);
}

.ask-fab:active {
  transform: translateY(1px) scale(0.98);
}

.ask-fab-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.ask-fab-label {
  font-size: 0.92rem;
}

@media (max-width: 380px) {
  .ask-fab-label {
    display: none;
  }
  .ask-fab {
    padding: 0;
    width: 52px;
    justify-content: center;
  }
}

/* Ask sheet */
.ask-sheet {
  display: flex;
  flex-direction: column;
  width: min(100%, 560px);
  height: min(80vh, 640px);
  padding: 16px 16px calc(14px + env(safe-area-inset-bottom));
  border-radius: 18px 18px 0 0;
  background: var(--paper-strong);
  box-shadow: 0 -18px 50px rgba(5, 28, 54, 0.3);
  animation: sheet-rise 220ms ease;
}

.ask-log {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 6px 2px 10px;
}

.ask-bubble {
  max-width: 86%;
  padding: 10px 14px;
  border-radius: 16px;
  line-height: 1.4;
}

.ask-bubble p {
  margin: 0 0 6px;
}

.ask-bubble p:last-child {
  margin-bottom: 0;
}

.ask-bubble.is-user {
  align-self: flex-end;
  background: var(--navy);
  color: #fff;
  border-bottom-right-radius: 5px;
}

.ask-bubble.is-cat {
  align-self: flex-start;
  background: rgba(115, 210, 231, 0.18);
  color: var(--ink);
  border-bottom-left-radius: 5px;
}

.ask-bubble.is-cat h4 {
  margin: 8px 0 4px;
  font-size: 0.92rem;
}

.ask-bubble.is-cat ul {
  margin: 4px 0;
  padding-left: 18px;
}

.ask-bubble.is-cat li {
  margin-bottom: 3px;
}

.ask-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.ask-chip {
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--paper-strong);
  color: var(--blue);
  font-size: 0.84rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.ask-chip:active {
  transform: translateY(1px) scale(0.99);
}

.ask-typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.ask-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  opacity: 0.5;
  animation: ask-blink 1.1s infinite both;
}

.ask-typing span:nth-child(2) { animation-delay: 0.18s; }
.ask-typing span:nth-child(3) { animation-delay: 0.36s; }

@keyframes ask-blink {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40% { opacity: 0.9; transform: translateY(-2px); }
}

.ask-form {
  display: flex;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.ask-form input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: rgba(248, 253, 255, 0.96);
}

#ask-send-btn {
  min-width: 64px;
  padding: 0 16px;
}

/* Attach a screenshot / PDF / email to the Cat */
.ask-attach-btn {
  flex: none;
  width: 44px;
  align-self: stretch;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--paper-strong);
  color: var(--blue);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.ask-attach-btn:hover {
  background: var(--paper);
}

.ask-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 2px 0;
}

.ask-att-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 8px 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--paper);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
}

.ask-att-name {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ask-att-x {
  flex: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0 2px;
}

.ask-user-attach {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  opacity: 0.85;
}

/* Proposed-change cards inside the chat */
.op-bubble {
  max-width: 92%;
  padding: 0;
  background: transparent;
}

.op-card {
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--blue);
  border-radius: 12px;
  background: var(--paper-strong);
  padding: 12px 14px;
}

.op-card.op-remove {
  border-left-color: var(--coral);
}

.op-card.op-add {
  border-left-color: var(--green);
}

.op-summary {
  margin: 0 0 6px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.35;
}

.op-icon {
  margin-right: 4px;
}

.op-current {
  margin: 0 0 10px;
  font-size: 0.82rem;
  color: var(--muted);
}

.op-warn {
  margin: 0 0 10px;
  font-size: 0.82rem;
  color: var(--coral);
  font-weight: 700;
}

.op-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.op-apply {
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 7px 16px;
  cursor: pointer;
}

.op-apply:disabled {
  opacity: 0.5;
  cursor: default;
}

.op-discard {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 7px 14px;
  cursor: pointer;
}

.op-done {
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--green);
}

.op-card.is-applied {
  border-left-color: var(--green);
  opacity: 0.92;
}

.op-card.is-discarded {
  opacity: 0.6;
}

.op-card.is-discarded .op-done {
  color: var(--muted);
}

.op-ticket-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

/* --- Ticket wallet ------------------------------------------------------- */

.ticket-badge {
  font-size: 0.85em;
}

.guide-tickets {
  display: grid;
  gap: 8px;
}

.ticket-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ticket-open {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--paper-strong);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
}

.ticket-open:hover {
  background: var(--paper);
}

.ticket-open-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-del {
  flex: none;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.import-attach-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

/* Full-screen viewer: white and bright on purpose — it exists to be scanned. */
.ticket-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(5, 46, 86, 0.55);
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.ticket-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 720px;
  background: #fff;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

.ticket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.ticket-title {
  margin: 0;
  font-weight: 800;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 16px 0;
}

.ticket-tab {
  flex: none;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--paper-strong);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.ticket-tab.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.ticket-body {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: #fff;
}

.ticket-frame {
  width: 100%;
  height: 100%;
  border: 0;
}

.ticket-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Server-backed login form + invite link box */
.login-form {
  width: 100%;
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.login-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: rgba(248, 253, 255, 0.96);
  font-size: 1rem;
}

.login-form .primary-btn {
  margin-top: 4px;
}

.login-foot {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.invite-link-box {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: rgba(115, 210, 231, 0.12);
}

.invite-link-label {
  margin: 0;
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--ink);
  line-height: 1.35;
}

.invite-link-row {
  display: flex;
  gap: 8px;
}

.invite-link-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: #fff;
  font-size: 0.82rem;
}

.user-row.is-pending {
  opacity: 0.9;
}

.user-row.is-pending .login-avatar {
  background: rgba(168, 137, 51, 0.55);
}

/* "Next" block in the command card — shown while inside an event */
.now-next {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 4px 0 12px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(67, 191, 209, 0.12);
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease;
}

.now-next:hover {
  background: rgba(67, 191, 209, 0.18);
}

.now-next:active {
  transform: translateY(1px) scale(0.99);
}

.now-next-label {
  align-self: center;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(7, 95, 147, 0.14);
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.now-next-body {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.now-next-title {
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.now-next-meta {
  color: var(--muted);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.now-next-chevron {
  color: var(--blue);
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
}

/* Print options popup */
.print-sheet {
  width: min(100%, 460px);
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  border-radius: 18px 18px 0 0;
  background: var(--paper-strong);
  box-shadow: 0 -18px 50px rgba(5, 28, 54, 0.3);
  animation: sheet-rise 220ms ease;
}

.print-opt-group {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(248, 253, 255, 0.7);
}

.print-opt-group legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.print-opt-group[disabled] {
  opacity: 0.45;
}

.print-opt {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 2px;
  cursor: pointer;
}

.print-opt input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
  flex: 0 0 auto;
}

.print-opt span {
  font-weight: 700;
}

.print-opt small {
  display: block;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
}
