/* OrlandoHQ — components.css
 * Cards, modals, nav, toast, FAB, banners.
 */

/* ---------- Card ---------- */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 200ms ease;
  min-width: 0;
}
.card.elevated { box-shadow: var(--shadow-elevated); }
.card.accent { background: var(--color-accent-light); border-color: transparent; }
.card-title {
  font-size: var(--text-md);
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text-primary);
}
.card-subtitle { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: 12px; }

@media (min-width: 1024px) { .card { padding: 24px; } }

/* ---------- Grids ---------- */
/* minmax(0, 1fr) instead of plain 1fr so columns can shrink below their
 * content's intrinsic width — prevents long unbroken strings, fixed-width
 * SVGs, or wide flex children from pushing the column past the viewport. */
.grid-1 { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.grid-2 { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.grid-3 { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}

/* ---------- Bottom Nav (mobile) ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--color-bg-card);
  border-top: 1px solid var(--color-border);
  display: flex;
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  will-change: bottom;
}
.bottom-nav button {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 10px 4px 8px;
  gap: 2px;
  min-height: 64px;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 500;
  position: relative;
}
.bottom-nav button.active {
  color: var(--color-accent-text);
}
.bottom-nav button.active::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 3px;
  background: var(--color-accent-hover);
  border-radius: 0 0 4px 4px;
}
.bottom-nav .icon { font-size: 22px; line-height: 1; }

/* ---------- Sidebar (desktop) ---------- */
.sidebar {
  display: none;
}
@media (min-width: 1024px) {
  .sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 240px;
    background: var(--color-bg-secondary);
    border-right: 1px solid var(--color-border);
    padding: 24px 16px 16px;
    z-index: 40;
    overflow-y: auto;
  }
  .bottom-nav { display: none; }
  .fab { display: none !important; }
}
.sidebar .brand {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 22px;
  padding: 0 8px 24px;
  color: var(--color-text-primary);
}
.sidebar button {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--color-text-secondary);
  text-align: left;
  font-size: var(--text-base);
  font-weight: 500;
  margin-bottom: 2px;
  min-height: 44px;
}
.sidebar button:hover { background: var(--color-bg-elevated); }
.sidebar button.active {
  background: var(--color-accent-light);
  color: var(--color-accent-text);
}
.sidebar .icon { font-size: 18px; width: 22px; text-align: center; }
.sidebar .footer { margin-top: auto; padding: 16px 8px 4px; font-size: var(--text-xs); color: var(--color-text-muted); }

/* ---------- More Sheet (mobile) ---------- */
.more-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 12px 4px;
}
.more-grid button {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px;
  background: var(--color-bg-elevated);
  border-radius: 14px;
  padding: 18px 6px;
  min-height: 92px;
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  font-weight: 500;
}
.more-grid button .icon { font-size: 26px; }
.more-grid button.active { background: var(--color-accent-light); color: var(--color-accent-text); }

/* ---------- Modal / Bottom Sheet ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 100;
  display: flex; justify-content: center; align-items: flex-end;
  animation: backdropIn 200ms ease;
}
.modal {
  background: var(--color-bg-card);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-height: 85vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: modalSlideUp 280ms cubic-bezier(0.25,0.46,0.45,0.94);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-divider);
  flex-shrink: 0;
}
.modal-header h2 { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: var(--text-lg); }
.modal-header .close-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--color-bg-elevated);
  color: var(--color-text-secondary);
  font-size: 18px;
  display: grid; place-items: center;
}
.modal-body {
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}
.modal-footer {
  display: flex; gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--color-divider);
  flex-shrink: 0;
}
.modal-footer button { flex: 1; }

@media (min-width: 768px) {
  .modal-backdrop { align-items: center; }
  .modal {
    border-radius: 20px;
    max-width: 540px;
    max-height: 80vh;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 12px 18px;
  border-radius: 24px;
  background: var(--color-bg-elevated);
  color: var(--color-text-primary);
  font-weight: 600;
  font-size: var(--text-sm);
  min-height: 44px;
  transition: background-color 150ms ease, transform 100ms ease;
}
.btn:hover { background: var(--color-bg-secondary); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--color-accent-primary); color: var(--color-on-accent); }
.btn-primary:hover { background: var(--color-accent-hover); color: var(--color-on-accent-hover); }
.btn-secondary { background: var(--color-accent-2); color: var(--color-on-accent-2); }
.btn-secondary:hover { background: var(--color-accent-2-hover); color: var(--color-on-accent-2-hover); }
.btn[disabled], .btn.is-busy { opacity: 0.6; pointer-events: none; }
.btn-danger {
  background: transparent;
  color: var(--color-error);
  border: 1px solid var(--color-error);
}
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: var(--text-xs); min-height: 36px; }
.btn-icon { padding: 10px; border-radius: 50%; min-height: 40px; min-width: 40px; }

/* ---------- Chip / Badge ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--color-bg-elevated);
  color: var(--color-text-secondary);
  font-size: var(--text-xs);
  font-weight: 600;
  border: 1px solid var(--color-border);
  white-space: nowrap;
}
.chip.active { background: var(--color-accent-light); color: var(--color-accent-text); border-color: var(--color-accent-primary); }
.chip.success { background: var(--color-success); color: var(--color-on-status); border-color: transparent; }
.chip.warning { background: var(--color-warning); color: var(--color-on-status); border-color: transparent; }
.chip.error { background: var(--color-error); color: var(--color-on-status); border-color: transparent; }
.chip.info { background: var(--color-info); color: var(--color-on-status); border-color: transparent; }
/* Status labels (non-interactive <span class="chip">) read as tags, not tappable pills */
span.chip { border-radius: 6px; cursor: default; }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-row .chip { white-space: normal; text-align: left; }
/* Filter / tab rows wrap onto extra lines rather than hiding options behind an
 * invisible horizontal scroll (unreachable with a mouse). */
.chip-scroll {
  display: flex; gap: 8px;
  flex-wrap: wrap;
  padding: 4px 0 8px;
}
.chip-scroll .chip { cursor: pointer; padding: 8px 14px; min-height: 36px; }

/* ---------- Stat Chip ---------- */
.stat-chip {
  flex: 1; min-width: 0;
  background: var(--color-bg-elevated);
  border-radius: 14px;
  padding: 12px;
  text-align: center;
}
.stat-chip .num { font-size: var(--text-lg); color: var(--color-accent-text); font-weight: 400; font-family: 'DM Serif Display', Georgia, serif; }
.stat-chip .lbl { font-size: var(--text-xs); color: var(--color-text-muted); }

/* ---------- Progress Bar ---------- */
.progress-track {
  width: 100%;
  height: 8px;
  background: var(--color-bg-elevated);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--color-success);
  border-radius: 999px;
  transition: width 600ms ease-in-out;
}
/* Pastel fill + outline in the deeper shade (the outline carries the 3:1 contrast). */
.progress-fill:not(.warning):not(.error) { background: var(--color-success-soft); box-shadow: inset 0 0 0 1.5px var(--color-success); }
.progress-fill.warning { background: var(--color-warning); }
.progress-fill.error { background: var(--color-error); }

/* ---------- FAB ---------- */
.fab {
  position: fixed;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  right: 18px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--color-accent-2-hover);
  color: var(--color-on-accent-2-hover);
  font-size: 28px;
  display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
  z-index: 60;
  transition: transform 200ms ease, background-color 150ms ease;
}
.fab:hover { transform: scale(1.08); }
.fab.open { transform: rotate(45deg); }

/* ---------- Toast ---------- */
#toast-stack {
  position: fixed;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column-reverse;
  gap: 8px;
  z-index: 200;
  pointer-events: none;
  max-width: 360px;
  width: calc(100% - 32px);
}
.toast {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-success);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: var(--shadow-elevated);
  font-size: var(--text-sm);
  font-weight: 500;
  animation: toastIn 220ms ease-out;
  pointer-events: auto;
}
.toast.info { border-left-color: var(--color-info); }
.toast.warning { border-left-color: var(--color-warning); }
.toast.error { border-left-color: var(--color-error); }
.toast.fade-out { animation: toastOut 220ms ease-in forwards; }

/* ---------- Banners ---------- */
.update-banner, .install-banner, .offline-banner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  font-size: var(--text-sm);
  font-weight: 500;
  position: sticky; top: 0;
  z-index: 80;
}
.update-banner { background: var(--color-accent-2); color: var(--color-on-accent-2); }
.install-banner { background: var(--color-accent-light); color: var(--color-accent-text); }
.offline-banner { background: var(--color-warning); color: var(--color-on-status); }
.banner-close { background: transparent; color: inherit; font-size: 18px; line-height: 1; padding: 4px 8px; min-width: 32px; min-height: 32px; }
.banner-btn {
  background: rgba(255,255,255,0.5);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: var(--text-xs);
  white-space: nowrap;
}

/* ---------- Form ---------- */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}
.field .hint { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: 4px; }
.field-row { display: flex; gap: 8px; align-items: flex-end; }
.field-row > * { flex: 1; }

.copyable {
  display: flex; gap: 6px; align-items: center;
}
.copyable input { font-family: 'JetBrains Mono', monospace; }
.copyable .btn-sm { flex-shrink: 0; }

/* ---------- Accordion ---------- */
.accordion {
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-bg-card);
  margin-bottom: 10px;
  overflow: hidden;
}
.accordion-trigger {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  text-align: left;
  font-weight: 600;
  font-size: var(--text-md);
  min-height: 56px;
}
.accordion-trigger .chev { transition: transform 200ms ease; font-size: 18px; color: var(--color-text-muted); }
.accordion[open] .accordion-trigger .chev { transform: rotate(180deg); }
.accordion-body { padding: 4px 18px 18px; border-top: 1px solid var(--color-divider); }

/* ---------- List item ---------- */
.list-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  margin-bottom: 8px;
}
.list-item .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--color-accent-primary);
  flex-shrink: 0;
}

/* ---------- Empty state ---------- */
.empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--color-text-muted);
}
.empty .icon { font-size: 40px; margin-bottom: 10px; }
.empty h3 { font-size: var(--text-md); color: var(--color-text-secondary); margin-bottom: 4px; }
.empty p { font-size: var(--text-sm); margin-bottom: 14px; }

/* ---------- Page header ---------- */
.page-header { margin-bottom: 16px; }
.page-header h1 { font-size: var(--text-xl); margin-bottom: 4px; }
.page-header p { font-size: var(--text-sm); color: var(--color-text-muted); }

@media (min-width: 1024px) {
  .page-header h1 { font-size: 32px; }
  .page-header { margin-bottom: 24px; }
}

/* ---------- Section header ---------- */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin: 20px 0 10px;
}
.section-header h2 { font-size: var(--text-md); font-weight: 600; }

/* ---------- Countdown photo (OrlandoHQ Pro) ----------
 * The text sits on a card-coloured panel at 92% so it stays ≥4.5:1 over any
 * photo, from pure black to pure white, in every theme. */
.countdown-card { position: relative; }
.countdown-card.has-photo {
  background-size: cover;
  background-repeat: no-repeat;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
}
.countdown-panel {
  position: relative;
  isolation: isolate;
  border-radius: 14px;
  max-width: 100%;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.countdown-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--color-bg-card);
  opacity: 0.92;
}
.countdown-photo-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 50%;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  font-size: 18px;
  line-height: 1;
}
.photo-preview {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-secondary);
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
@media print {
  .countdown-photo-btn { display: none; }
}

/* ---------- Trip readiness rings (OrlandoHQ Pro) ---------- */
@media (min-width: 1024px) { #w-ready { grid-column: span 2; } }
.rings-layout { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 24px; }
.rings-legend { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ring-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; min-height: 44px;
  background: transparent; border: 1px solid var(--color-border); border-radius: 12px;
  color: var(--color-text-primary); font: inherit; text-align: left; cursor: pointer;
}
.ring-row:hover { background: var(--color-bg-elevated); }
.ring-row .grow { display: flex; flex-direction: column; min-width: 0; }
.ring-label { font-weight: 600; font-size: var(--text-sm); }
.ring-key { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.ring-pct { font-family: 'DM Serif Display', Georgia, serif; font-size: var(--text-lg); color: var(--color-accent-text); flex-shrink: 0; }

/* ---------- Budget charts (OrlandoHQ Pro) ---------- */
.cbars { display: flex; flex-direction: column; gap: 12px; }
.cbar-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.cbar-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.cbar-key { width: 14px; height: 8px; border-radius: 4px; background: var(--color-bg-secondary); box-shadow: inset 0 0 0 1.5px var(--color-text-secondary); }
.cbar-key.faded { box-shadow: none; background: var(--color-divider); }
.cbar-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: var(--text-sm); }
.cbar-name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.cbar-val { font-weight: 600; white-space: nowrap; }
.cbar-track { position: relative; height: 12px; margin-top: 6px; }
.cbar-alloc, .cbar-spent { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; }
.cbar-alloc { opacity: 0.45; }
.cbar-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--color-text-secondary); }
.spend-line { display: block; max-width: 100%; height: auto; overflow: visible; }
.spend-line .sl-label { font-size: 11px; fill: var(--color-text-muted); font-family: inherit; }
.spend-line .sl-strong { fill: var(--color-text-secondary); font-weight: 600; }

/* ---------- Park Day mode (OrlandoHQ Pro) ----------
 * Made for bright sun and one hand: big type, primary-text-on-card contrast
 * (≥12:1 in light themes), and the main buttons as solid text-colour blocks. */
.pd { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; padding-bottom: 8px; }
.pd-head { display: flex; align-items: center; gap: 12px; }
.pd-day { font-family: 'DM Serif Display', Georgia, serif; font-size: 30px; line-height: 1.1; color: var(--color-text-primary); }
.pd-date { font-size: var(--text-md); font-weight: 600; color: var(--color-text-secondary); }
.pd-pick { width: auto; min-height: 48px; font-size: 17px; font-weight: 700; }
.pd-note { font-size: var(--text-sm); font-weight: 600; color: var(--color-text-secondary); background: var(--color-bg-secondary); border-radius: 10px; padding: 8px 12px; }
.pd-progress-text { font-size: 17px; color: var(--color-text-primary); margin-bottom: 6px; }
.pd-card {
  background: var(--color-bg-card); color: var(--color-text-primary);
  border: 2px solid var(--color-text-primary); border-left-width: 10px;
  border-radius: 18px; padding: 16px 18px;
}
.pd-empty { border-left-width: 2px; text-align: center; }
.pd-label { font-size: 14px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-text-secondary); }
.pd-time { font-size: 22px; font-weight: 800; margin-top: 4px; }
.pd-title { font-size: clamp(26px, 7vw, 34px); font-weight: 800; line-height: 1.15; margin-top: 2px; overflow-wrap: anywhere; }
.pd-sub { font-size: 17px; font-weight: 600; color: var(--color-text-secondary); margin-top: 6px; overflow-wrap: anywhere; }
.pd-big {
  display: block; width: 100%; min-height: 68px; margin-top: 16px;
  background: var(--color-text-primary); color: var(--color-bg-card);
  border: none; border-radius: 16px; font: inherit; font-size: 24px; font-weight: 800; cursor: pointer;
}
.pd-big:active, .pd-expense:active, .pd-tick:active { transform: scale(0.98); }
.pd-next { border-color: var(--color-border); border-left-color: var(--cat-attraction); }
.pd-next-row, .pd-row { display: flex; align-items: center; gap: 12px; }
.pd-time-sm { font-size: 16px; font-weight: 700; color: var(--color-text-secondary); }
.pd-title-sm { font-size: 22px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.pd-section { font-size: 14px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-text-secondary); margin: 4px 2px 0; }
.pd-row {
  background: var(--color-bg-card); border: 1px solid var(--color-border); border-left: 8px solid var(--cat-attraction);
  border-radius: 14px; padding: 12px 14px; min-height: 64px; margin-top: 8px; color: var(--color-text-primary);
}
.pd-row-title { font-size: 19px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.pd-row.is-done { border-left-color: var(--color-border); }
.pd-row.is-done .pd-row-title { text-decoration: line-through; }
.pd-tick {
  flex-shrink: 0; width: 56px; height: 56px; border-radius: 50%;
  background: var(--color-bg-card); color: var(--color-text-primary);
  border: 2px solid var(--color-text-primary); font-size: 26px; font-weight: 800; cursor: pointer;
}
.pd-undo {
  flex-shrink: 0; min-height: 48px; padding: 0 16px; border-radius: 12px;
  background: var(--color-bg-secondary); color: var(--color-text-primary);
  border: 1px solid var(--color-border); font: inherit; font-weight: 700; cursor: pointer;
}
.pd-expense {
  width: 100%; min-height: 64px; border-radius: 16px; cursor: pointer;
  background: var(--color-accent-2); color: var(--color-on-accent-2);
  border: 2px solid var(--color-on-accent-2); font: inherit; font-size: 22px; font-weight: 800;
}
.pd-last { display: flex; align-items: center; gap: 12px; font-size: 17px; color: var(--color-text-primary); background: var(--color-bg-secondary); border-radius: 12px; padding: 8px 8px 8px 14px; }
.pd-done-list > summary { font-size: 17px; font-weight: 700; color: var(--color-text-primary); cursor: pointer; min-height: 48px; display: flex; align-items: center; }
.pd-sheet-step { font-size: 20px; font-weight: 800; margin-bottom: 12px; color: var(--color-text-primary); }
.pd-cats, .pd-amounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pd-amounts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pd-cat, .pd-amount {
  min-height: 72px; border-radius: 14px; cursor: pointer; font: inherit; font-weight: 700;
  background: var(--color-bg-card); color: var(--color-text-primary); border: 2px solid var(--color-border);
}
.pd-cat { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 15px; padding: 8px; overflow-wrap: anywhere; }
.pd-cat-icon { font-size: 26px; line-height: 1; }
.pd-amount { font-size: 24px; font-weight: 800; }
.pd-cat:active, .pd-amount:active { border-color: var(--color-text-primary); }
@media print { .pd-expense, .pd-tick, .pd-big, .pd-undo { display: none; } }

/* ---------- Confirmation vault (OrlandoHQ Pro) ---------- */
.vault-summary { font-size: var(--text-md); }
.vault-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 0; border-top: 1px solid var(--color-divider); }
.card-title + .vault-row { border-top: none; padding-top: 4px; }
.vault-info { flex: 1 1 200px; min-width: 0; }
.vault-title { font-weight: 700; overflow-wrap: anywhere; }
.vault-code-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 8px; }
.vault-code {
  min-width: 0; font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 22px; font-weight: 700; letter-spacing: 0.06em; color: var(--color-text-primary);
  overflow-wrap: anywhere; user-select: all; -webkit-user-select: all;
}
.vault-actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; flex: 0 0 auto; }
.vault-copy { flex-shrink: 0; min-height: 48px; min-width: 96px; font-size: 17px; font-weight: 700; }

/* ---------- Add to phone calendar (OrlandoHQ Pro) ---------- */
.ics-groups { display: flex; flex-direction: column; gap: 6px; }
.ics-row { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 12px; border: 1px solid var(--color-border); border-radius: 12px; cursor: pointer; }
.ics-row input { width: 22px; height: 22px; flex-shrink: 0; accent-color: var(--color-accent-hover); }
.ics-row.is-empty { cursor: default; color: var(--color-text-muted); }
.ics-buttons { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Height check (OrlandoHQ Pro) ---------- */
.hc-person { padding: 12px 0; border-top: 1px solid var(--color-divider); }
.hc-person:first-child { border-top: none; padding-top: 4px; }
.hc-name { font-weight: 700; font-size: var(--text-md); }
.hc-sub { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-secondary); margin: 8px 0 2px; }
.hc-row { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-size: var(--text-sm); }
.hc-x { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--color-error); border: 1.5px solid var(--color-error); margin-top: 1px; }
.hc-ok { font-size: var(--text-sm); font-weight: 600; color: var(--color-success); margin-top: 6px; }
.hc-more { margin-top: 6px; }
.hc-more > summary { cursor: pointer; font-size: var(--text-sm); font-weight: 600; color: var(--color-text-secondary); min-height: 40px; display: flex; align-items: center; }

/* ---------- Search (OrlandoHQ Pro) ---------- */
.search-box { display: flex; align-items: center; gap: 10px; background: var(--color-bg-card); border: 2px solid var(--color-border); border-radius: 14px; padding: 4px 14px; }
.search-box:focus-within { border-color: var(--color-accent-hover); }
.search-box input { border: none; background: transparent; font-size: 18px; min-height: 48px; padding: 0; box-shadow: none; }
.search-box input:focus { outline: none; }
.search-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; background: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; }
.search-main { flex: 1 1 220px; min-width: 0; }
.search-where { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.04em; color: var(--color-text-secondary); }
.search-title { font-weight: 700; overflow-wrap: anywhere; }
.search-snippet { font-size: var(--text-sm); margin-top: 4px; overflow-wrap: anywhere; }
.search-code { font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; font-size: 15px; font-weight: 700; }
.search-box input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search-clear { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--color-bg-secondary); color: var(--color-text-secondary); font-size: 16px; font-weight: 700; cursor: pointer; }
.search-actions { display: flex; gap: 8px; flex-shrink: 0; }
.search-row mark { background: var(--color-accent-light); color: var(--color-text-primary); border-radius: 3px; padding: 0 2px; box-shadow: inset 0 -2px 0 var(--color-accent-hover); }

/* ---------- Printable trip pack (OrlandoHQ Pro) ----------
 * On screen: theme colours, each part shown as a sheet. In print: plain
 * black on white (same as V1's print styles), one part per page. */
.pk-pack { display: flex; flex-direction: column; gap: 16px; }
.pk-section { background: var(--color-bg-card); color: var(--color-text-primary); border: 1px solid var(--color-border); border-radius: 12px; padding: 18px; font-size: 14px; line-height: 1.4; }
.pk-head { margin-bottom: 10px; }
.pk-brand { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-secondary); }
.pk-section h2 { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: 24px; margin: 2px 0 4px; }
.pk-sub { color: var(--color-text-secondary); font-size: 13px; }
.pk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pk-box { border: 1px solid var(--color-border); border-radius: 8px; padding: 8px 10px; break-inside: avoid; page-break-inside: avoid; }
.pk-wide { grid-column: 1 / -1; }
.pk-box h3, .pk-day h3, .pk-cat h3 { font-size: 13px; font-weight: 800; margin: 0 0 4px; }
.pk-item + .pk-item { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--color-divider); }
.pk-code { font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; font-weight: 700; }
.pk-line { overflow-wrap: anywhere; }
.pk-label { font-weight: 700; }
.pk-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pk-table td { padding: 4px 6px; border-top: 1px solid var(--color-divider); vertical-align: top; overflow-wrap: anywhere; }
.pk-nowrap { white-space: nowrap; }
.pk-time { font-weight: 700; width: 1%; }
.pk-what { color: var(--color-text-secondary); width: 1%; white-space: nowrap; }
.pk-note { color: var(--color-text-secondary); font-size: 12px; }
.pk-theme { font-weight: 600; color: var(--color-text-secondary); }
.pk-day { margin-top: 14px; break-inside: avoid; page-break-inside: avoid; }
.pk-checks { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 12px; }
.pk-columns { columns: 2 220px; column-gap: 18px; }
.pk-cat { break-inside: avoid; page-break-inside: avoid; margin-bottom: 10px; }
.pk-check { display: flex; gap: 8px; align-items: flex-start; padding: 2px 0; }
.pk-tick { display: inline-block; flex-shrink: 0; width: 13px; height: 13px; border: 1.5px solid var(--color-text-primary); border-radius: 3px; margin: 2px 6px 0 0; position: relative; vertical-align: -2px; }
.pk-check .pk-tick { margin-right: 0; }
.pk-tick.is-on::after { content: '✓'; position: absolute; inset: -4px 0 0 1px; font-size: 13px; font-weight: 800; line-height: 1; }
@media (max-width: 520px) { .pk-grid { grid-template-columns: minmax(0, 1fr); } }
@media print {
  .pk-pack { gap: 0; }
  .pk-section { border: none !important; border-radius: 0; padding: 0; background: #fff !important; color: #000 !important; font-size: 11pt; }
  .pk-section + .pk-section, .pk-break { break-before: page; page-break-before: always; }
  .pk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .pk-box, .pk-table td, .pk-item + .pk-item { border-color: #999 !important; }
  .pk-tick { border-color: #000 !important; }
  .pk-brand, .pk-sub, .pk-note, .pk-what, .pk-theme { color: #333 !important; }
  .pk-card { font-size: 9.5pt; }
  .pk-card h2 { font-size: 18pt; }
}

/* ---------- First-run setup (OrlandoHQ Pro) ---------- */
.su { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.su-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.su-dots { display: flex; gap: 6px; }
.su-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--color-bg-secondary); box-shadow: inset 0 0 0 1.5px var(--color-border); }
.su-dot.is-done { background: var(--color-accent-2); box-shadow: none; }
.su-dot.is-on { background: var(--color-accent-hover); box-shadow: none; width: 22px; border-radius: 5px; }
.su-hello { display: flex; align-items: center; gap: 12px; }
.su-wave { font-size: 40px; line-height: 1; }
.su-q { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: 26px; line-height: 1.15; margin-bottom: 12px; }
.su-warn { color: var(--color-error); font-weight: 600; min-height: 1.2em; }
.su-stepper { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--color-divider); }
.su-stepper:first-of-type { border-top: none; }
.su-step-label { flex: 1; font-size: 18px; font-weight: 700; }
.su-round { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--color-border); background: var(--color-bg-card); color: var(--color-text-primary); font-size: 24px; font-weight: 700; cursor: pointer; }
.su-count { min-width: 2ch; text-align: center; font-size: 26px; font-weight: 800; }
.su-group { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-secondary); margin: 10px 0 6px; }
.su-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.su-choice { min-height: 56px; padding: 10px; border-radius: 14px; border: 2px solid var(--color-border); background: var(--color-bg-card); color: var(--color-text-primary); font: inherit; font-weight: 700; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; overflow-wrap: anywhere; }
.su-choice.is-on { border-color: var(--color-accent-hover); background: var(--color-accent-light); color: var(--color-accent-text); }
.su-icon { font-size: 24px; line-height: 1; }
.su-review { padding-left: 20px; line-height: 1.6; font-size: var(--text-sm); }
.su-review li + li { margin-top: 6px; }
.su-note { font-size: var(--text-sm); background: var(--color-bg-secondary); border-radius: 10px; padding: 8px 12px; }
.su-nav { display: flex; justify-content: space-between; gap: 12px; }
.su-next { min-width: 150px; min-height: 52px; font-size: 17px; }

/* ---------- Welcome card (first load, Settings) ---------- */
.welcome-card { border: 2px solid var(--color-accent-hover); background: var(--color-accent-light); }
.welcome-title { font-family: 'DM Serif Display', Georgia, serif; font-size: 22px; line-height: 1.2; color: var(--color-text-primary); }
.welcome-steps { padding-left: 20px; margin-top: 10px; line-height: 1.6; }
.welcome-steps li + li { margin-top: 4px; }

/* ---------- Device sync (v2.0.16) ---------- */
.sync-status { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: var(--text-sm); background: var(--color-bg-secondary); color: var(--color-text-secondary); border: 1px solid var(--color-border); }
.sync-status.ok { background: var(--color-accent-light); color: var(--color-accent-text); border-color: var(--color-accent-hover); }
.sync-status.warn { background: var(--color-accent-2-light); color: var(--color-accent-2-text); border-color: var(--color-warning); }
.sync-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sync-actions .btn { flex: 1 1 auto; }
.sync-code { font-family: 'DM Serif Display', Georgia, serif; font-size: 44px; letter-spacing: 6px; text-align: center; color: var(--color-text-primary); margin: 8px 0 4px; }
.sync-code-input { font-size: 26px; letter-spacing: 4px; text-align: center; }
.sync-pics { display: flex; justify-content: center; gap: 20px; margin: 12px 0; }
.sync-pics > span { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sync-pic { font-size: 40px; line-height: 1.1; }
.sync-key { display: block; width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: var(--text-sm); line-height: 1.6; word-break: break-all; text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--color-border); background: var(--color-bg-secondary); color: var(--color-text-primary); }
.sync-key-hidden { color: transparent; text-shadow: 0 0 8px var(--color-text-muted); cursor: pointer; user-select: none; }

/* Journal short answers: one line to start, growing to fit (v2.0.17) */
textarea.ta-short { min-height: 44px; resize: none; overflow: hidden; }

/* ---------- Free demo (v2.0.17) — only used by the separate demo copy ---------- */
.is-demo .demo-hide { display: none !important; }
.demo-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px;
  padding: 8px 16px; text-align: center; font-size: var(--text-sm);
  background: var(--color-accent-2-light); color: var(--color-accent-2-text);
  border-bottom: 1px solid var(--color-border);
}
