:root {
  --bg: #f7f2e9;
  --card: #fffdf8;
  --ink: #172033;
  --muted: #667085;
  --line: rgba(23,32,51,.12);
  --accent: #0f766e;
  --accentDark: #0b5f59;
  --accent2: #1d4ed8;
  --soft: #e5f6f2;
  --soft2: #eef2ff;
  --warm: #fff7ed;
  --warn: #92400e;
  --danger: #b42318;
  --good: #067647;
  --shadow: 0 10px 24px rgba(23,32,51,.09);
  --radius: 20px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body { margin: 0; color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif; background: radial-gradient(circle at top left, rgba(15,118,110,.16), transparent 28rem), linear-gradient(180deg,#f9f4ea 0%, #f7f2e9 56%, #f1ede5 100%); min-height: 100vh; padding-bottom: 104px; }
button, input, textarea, select { font: inherit; }
button { border: 0; cursor: pointer; }
a { color: var(--accent2); }
.hero { position: sticky; top: 0; z-index: 25; padding: 14px 14px 10px; background: rgba(247,242,233,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.titlebar { display: flex; align-items: center; gap: 11px; max-width: 980px; margin: 0 auto; }
.logo { width: 48px; height: 48px; border-radius: 17px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2)); font-size: 25px; box-shadow: var(--shadow); flex: 0 0 auto; }
h1 { margin: 0; font-size: 1.14rem; line-height: 1.1; letter-spacing: -.02em; }
.titleText p { margin: 4px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.2; }
.syncbar { display: flex; align-items: center; gap: 8px; max-width: 980px; margin: 10px auto 0; overflow: auto; padding-bottom: 1px; }
.pill { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; white-space: nowrap; border-radius: 999px; padding: 6px 10px; font-size: .76rem; font-weight: 800; background: #fff; border: 1px solid var(--line); color: var(--muted); }
.pill.good { color: var(--good); background: #ecfdf3; border-color: #abefc6; }
.pill.warn { color: var(--warn); background: #fffaeb; border-color: #fedf89; }
.smallBtn, .fileBtn { border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); min-height: 30px; padding: 6px 11px; font-weight: 850; font-size: .76rem; white-space: nowrap; }
.fileBtn input { display: none; }
.tabs { max-width: 980px; margin: 10px auto 0; display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.tabBtn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 8px 12px; background: #fff; color: var(--muted); border: 1px solid var(--line); font-weight: 850; font-size: .82rem; }
.tabBtn.active { background: var(--soft); color: var(--accent); border-color: rgba(15,118,110,.28); }
main { max-width: 980px; margin: 0 auto; padding: 14px; }
.screen { display: none; }
.screen.active { display: block; }
.screenHeader { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 6px 0 12px; }
h2 { margin: 0; font-size: 1.26rem; letter-spacing: -.02em; }
h2.sectionTitle { margin-top: 16px; margin-bottom: 10px; }
.note { color: var(--muted); font-size: .88rem; margin: 4px 0 0; line-height: 1.42; }
.heroCard { background: linear-gradient(135deg, rgba(15,118,110,.12), rgba(29,78,216,.10)); border: 1px solid rgba(15,118,110,.16); border-radius: 24px; padding: 16px; box-shadow: var(--shadow); margin-bottom: 12px; }
.heroCard h2 { font-size: 1.32rem; }
.heroCard .note { color: #344054; }
.quickActions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin-bottom: 12px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 12px; box-shadow: 0 5px 14px rgba(23,32,51,.05); }
.kpi strong { display: block; color: var(--accent); font-size: 1.58rem; line-height: 1; letter-spacing: -.04em; }
.kpi span { color: var(--muted); font-size: .76rem; font-weight: 800; }
.cardGrid { display: grid; gap: 12px; align-items: start; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); overflow: hidden; }
.card.focus { border-color: rgba(15,118,110,.30); background: linear-gradient(180deg,#fffdf8 0%,#f6fffc 100%); }
.cardHeader { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.card h3 { margin: 0; font-size: 1rem; line-height: 1.25; }
.card .caption { color: var(--muted); font-size: .78rem; line-height: 1.35; margin-top: 3px; }
.tagRow { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.tag { display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-weight: 850; font-size: .74rem; padding: 5px 8px; }
.tag.good { background: #ecfdf3; color: var(--good); border-color: #abefc6; }
.tag.warn { background: #fffaeb; color: var(--warn); border-color: #fedf89; }
.row { display: grid; grid-template-columns: 112px 1fr; gap: 9px; padding: 8px 0; border-top: 1px solid rgba(23,32,51,.08); }
.row:first-of-type { border-top: 0; }
.row b { color: var(--muted); font-size: .72rem; line-height: 1.25; text-transform: uppercase; letter-spacing: .02em; overflow-wrap: anywhere; }
.row span { font-size: .92rem; line-height: 1.36; white-space: pre-wrap; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.primary, .secondary, .danger, .ghost { border-radius: 14px; padding: 10px 12px; font-weight: 880; min-height: 40px; }
.primary { background: var(--accent); color: #fff; }
.primary:active { background: var(--accentDark); }
.secondary { background: var(--soft); color: var(--accent); }
.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.danger { background: #fee4e2; color: var(--danger); }
.searchbar { display: flex; gap: 8px; margin: 0 0 12px; }
.searchbar input { flex: 1; border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 11px 12px; color: var(--ink); min-height: 44px; }
.callout { background: var(--soft2); border: 1px solid rgba(29,78,216,.16); color: #293056; border-radius: 18px; padding: 12px; margin-bottom: 12px; font-size: .9rem; line-height: 1.45; }
.callout.good { background: #ecfdf3; border-color: #abefc6; color: #075e45; }
.callout.warn { background: #fffaeb; border-color: #fedf89; color: #7a4100; }
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: rgba(255,253,248,.96); border-top: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.bottom-scroll { max-width: 980px; margin: 0 auto; display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bottom-scroll .tabBtn { min-width: 74px; flex-direction: column; gap: 1px; border-radius: 15px; padding: 7px 8px; font-size: .74rem; }
.bottom-scroll .tabBtn .emoji { font-size: 1.05rem; }
.editorBackdrop { position: fixed; inset: 0; z-index: 99; background: rgba(0,0,0,.36); display: none; align-items: flex-end; padding: 16px 12px 0; }
.editorBackdrop.show { display: flex; }
.editorSheet { width: 100%; max-width: 980px; margin: 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: 24px 24px 0 0; box-shadow: 0 -12px 40px rgba(0,0,0,.22); max-height: 88vh; overflow: auto; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
.editorHeader { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; position: sticky; top: 0; background: var(--card); padding-bottom: 10px; z-index: 2; }
.editorHeader h2 { font-size: 1.12rem; }
.editorHeader p { margin: 4px 0 0; color: var(--muted); font-size: .82rem; }
.iconBtn { width: 38px; height: 38px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-weight: 900; flex: 0 0 auto; }
.editorForm { display: grid; gap: 12px; }
.field label { display: block; color: var(--muted); font-weight: 850; font-size: .78rem; margin-bottom: 4px; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 11px 12px; color: var(--ink); line-height: 1.35; }
.field select { min-height: 44px; }
.fieldHelp { margin-top: 6px; font-size: .78rem; color: var(--muted); line-height: 1.35; }
.field textarea { min-height: 86px; resize: vertical; }
.field select { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 11px 12px; color: var(--ink); line-height: 1.35; }
.fieldHelp { color: var(--muted); font-size: .76rem; line-height: 1.35; margin-top: 5px; }
.editorActions { display: flex; gap: 8px; flex-wrap: wrap; position: sticky; bottom: 0; background: linear-gradient(180deg, rgba(255,253,248,.7), var(--card) 35%); padding-top: 12px; margin-top: 12px; }
.empty { background: #fff; border: 1px dashed rgba(23,32,51,.25); border-radius: 18px; padding: 16px; color: var(--muted); line-height: 1.45; }
.footerNote { color: var(--muted); font-size: .8rem; margin: 16px 0 0; text-align: center; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(5, minmax(0,1fr)); } .cardGrid.two { grid-template-columns: repeat(2, minmax(0,1fr)); } .cardGrid.three { grid-template-columns: repeat(3, minmax(0,1fr)); } .row { grid-template-columns: 132px 1fr; } }
@media (max-width: 420px) { .row { grid-template-columns: 100px 1fr; } h1 { font-size: 1.04rem; } .titleText p { font-size: .76rem; } .hero { padding-left: 12px; padding-right: 12px; } main { padding: 12px; } }

.debugLog{margin-top:10px;padding:10px;border-radius:14px;background:#f8fafc;border:1px solid #dbeafe;color:#334155;font-size:.86rem;line-height:1.35;max-height:150px;overflow:auto}
.debugLog div{padding:3px 0;border-bottom:1px solid rgba(148,163,184,.25)}
.debugLog div:last-child{border-bottom:0}

/* v6.2: Search filters cards in place so iPhone Safari keeps the keyboard open while typing. */
.searchHidden { display: none !important; }

/* v8 polish: sync health, trip alerts, section update badges, family/admin split */
.statusDot{display:inline-flex;align-items:center;gap:6px;border:1px solid rgba(23,32,51,.12);background:#fff;border-radius:999px;padding:7px 10px;font-weight:850;font-size:.78rem;color:var(--ink)}
.statusDot.good{background:#ecfdf5;border-color:#bbf7d0;color:#166534}.statusDot.warn{background:#fff7ed;border-color:#fed7aa;color:#9a3412}.statusDot.bad{background:#fef2f2;border-color:#fecaca;color:#991b1b}
.healthGood{border-color:#bbf7d0;background:linear-gradient(180deg,#f0fdf4,#fff)}.healthWarn{border-color:#fed7aa;background:linear-gradient(180deg,#fff7ed,#fff)}
.warnCard{border-color:#fecaca;background:linear-gradient(180deg,#fff7f7,#fff)}.watchCard{border-color:#fde68a;background:linear-gradient(180deg,#fffbeb,#fff)}.infoCard{border-color:#bfdbfe;background:linear-gradient(180deg,#eff6ff,#fff)}
.sectionBadges{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 12px}.adminPanel{margin:16px 0;border:1px solid var(--line);border-radius:20px;background:#fff;padding:12px;box-shadow:0 10px 26px rgba(15,23,42,.06)}
.adminPanel>summary,.adminDetails>summary{cursor:pointer;font-weight:900;color:var(--ink);padding:4px 2px}.adminDetails{margin-top:10px;border-top:1px dashed rgba(148,163,184,.5);padding-top:8px}
.adminPanel[open]>summary{margin-bottom:12px}.quickActions{gap:8px;flex-wrap:wrap}

/* v12 Command Center additions */
.dayPicker { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; margin: -2px 0 8px; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scrollbar-width: thin; scroll-padding-inline: 12px; }
.dayChip { border: 1px solid rgba(31,41,55,.14); background: rgba(255,255,255,.9); border-radius: 999px; padding: 9px 12px; font-weight: 800; color: var(--muted); white-space: nowrap; box-shadow: 0 3px 12px rgba(17,24,39,.05); }
.dayChip.active { background: var(--accent); color: white; border-color: transparent; }
.dayChip:active { transform: scale(.98); }

/* v13.3 mobile editor stability */
body.modalOpen { overflow: hidden; }
.editorBackdrop.show { overflow: hidden; overscroll-behavior: contain; }
.editorSheet { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scroll-padding-top: 80px; }
@media (max-width: 720px) {
  .editorBackdrop { align-items: stretch; padding: 0; }
  .editorSheet {
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    padding: 14px 14px calc(18px + env(safe-area-inset-bottom));
  }
  .editorHeader { padding-top: env(safe-area-inset-top); }
  .editorActions { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .field input, .field textarea, .field select { font-size: 16px; }
}

/* v14.1 Trip Alerts cleanup */
.rollingAlerts { max-height: 154px; overflow-y: auto; padding-right: 4px; -webkit-overflow-scrolling: touch; }
.rollingAlertItem { border-bottom: 1px solid rgba(148,163,184,.28); padding: 8px 0; }
.rollingAlertItem:last-child { border-bottom: 0; }
.rollingAlertDetail { font-weight: 750; color: var(--ink); line-height: 1.35; }
.rollingAlertCaption { color: var(--muted); font-size: .8rem; margin-top: 3px; }

/* v14.2 alert details */
.detailsList { max-height: 220px; }
.alertDisclosure { cursor: pointer; }
.alertDisclosure summary { list-style: none; display: grid; gap: 3px; padding: 2px 0; }
.alertDisclosure summary::-webkit-details-marker { display: none; }
.alertDisclosure summary:after { content: 'Details'; justify-self: start; margin-top: 4px; font-size: .72rem; font-weight: 800; color: var(--accent); background: rgba(37,99,235,.08); border: 1px solid rgba(37,99,235,.18); padding: 3px 8px; border-radius: 999px; }
.alertDisclosure[open] summary:after { content: 'Hide details'; }
.rollingAlertTitle { font-weight: 850; color: var(--ink); }
.alertDetails { margin-top: 8px; padding: 9px; border-radius: 12px; background: rgba(255,255,255,.64); border: 1px solid rgba(148,163,184,.24); }
.alertDetailEmpty { color: var(--muted); font-size: .82rem; }

/* v16.4 custom tabs + booking drag/drop + calculated LLMP booking windows */
.sortableList { display: grid; gap: 8px; }
.sortableRow { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 10px 11px; }
.sortActions { display: flex; gap: 6px; flex: 0 0 auto; }
.tinyBtn { min-height: 34px; padding: 6px 10px; border-radius: 12px; }
.tinyBtn:disabled, .sortCardActions button:disabled { opacity: .45; }
.sortCardActions { border-top: 1px dashed rgba(148,163,184,.45); margin-top: 10px; padding-top: 10px; }
@media (max-width: 720px) {
  .sortableRow { align-items: flex-start; }
  .sortActions { flex-wrap: nowrap; }
  .sortCardActions button { flex: 1 1 0; }
}

/* v16.4: Booking drag/drop polish */
.draggableCard { touch-action: pan-y; }
.dragCardActions { display: flex; }
.dragHandle { width: 100%; cursor: grab; user-select: none; -webkit-user-select: none; }
.dragHandle:active { cursor: grabbing; }
.draggableCard.dragging { opacity: .72; outline: 2px solid rgba(15,118,110,.35); transform: scale(.995); }
.draggableCard.dropTarget { outline: 2px dashed rgba(15,118,110,.55); background: linear-gradient(180deg,#fffdf8 0%,#f0fdfa 100%); }

/* v16.5 Trip Setup foundation */
.setupGrid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.setupGrid label { display: grid; gap: 5px; color: var(--muted); font-weight: 850; font-size: .78rem; }
.setupGrid input, .setupGrid select { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); padding: 11px 12px; font-size: 16px; }
.setupGrid .wide { grid-column: 1 / -1; }
@media (min-width: 760px) { .setupGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }


/* v16.7 UX polish */
.draggableTabRow { touch-action: pan-y; }
.tabDragHandle { cursor: grab; min-width: 86px; }
.draggableTabRow.tabDragging { opacity: .72; outline: 2px solid rgba(15,118,110,.35); transform: scale(.995); }
.draggableTabRow.tabDropTarget { outline: 2px dashed rgba(15,118,110,.55); background: linear-gradient(180deg,#fffdf8 0%,#f0fdfa 100%); }
.editorBackdrop.show { cursor: default; }
.editorSheet { cursor: auto; }


/* v16.8 layout + backup tools polish */
.draggableTabRow { cursor: grab; user-select: none; touch-action: none; }
.draggableTabRow:active { cursor: grabbing; }
.tabDragHandle { touch-action: none; min-width: 44px; }
.dragHint { color: var(--muted); font-size: .78rem; font-weight: 800; margin-left: 8px; }
.tabDragging { opacity: .72; transform: scale(.995); }
.tabDropTarget { outline: 2px dashed rgba(15,118,110,.45); outline-offset: 3px; }
.adminPanel .note { margin-top: 10px; }
@media (max-width: 560px) { .dragHint { display: none; } .sortableRow { align-items: center; } }


/* v16.9 polish: make Import Backup match the other Advanced Backup buttons. */
.actions .fileBtn.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 10px 12px;
  min-height: 40px;
  font-size: 1rem;
  line-height: 1.1;
  font-weight: 880;
  background: var(--soft);
  color: var(--accent);
}


/* v17.3 mobile pinned tabs + More menu + editor safety */
.pinned-scroll { overflow: visible; justify-content: space-between; }
.pinned-scroll .tabBtn { flex: 1 1 0; min-width: 0; justify-content: center; }
.bottom-scroll .moreTab { max-width: 72px; }
.bottom-more-menu {
  display: none;
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: calc(72px + env(safe-area-inset-bottom));
  max-width: 980px;
  margin: 0 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  background: rgba(255,253,248,.98);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 10px;
  box-shadow: 0 -10px 32px rgba(23,32,51,.18);
}
.bottom-more-menu.show { display: grid; }
.moreMenuItem {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 9px 10px;
  text-align: left;
}
.moreMenuItem.active { background: var(--soft); color: var(--accent); border-color: rgba(15,118,110,.28); }
.customTabsNote { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; margin-bottom: 10px; color: var(--muted); font-size: .8rem; }
.customTabsNote b { color: var(--ink); text-align: right; }
.pinBadge { display: inline-flex; margin-left: 8px; padding: 3px 7px; border-radius: 999px; font-size: .68rem; font-style: normal; font-weight: 900; color: var(--accent); background: var(--soft); border: 1px solid rgba(15,118,110,.20); }
.pinBadge.moreBadge { color: var(--muted); background: #fff; border-color: var(--line); }
.editorSheet.dirty .editorHeader::after { content: 'Unsaved changes'; display: inline-flex; align-self: flex-start; margin-top: 2px; padding: 5px 8px; border-radius: 999px; background: #fffaeb; border: 1px solid #fedf89; color: var(--warn); font-size: .72rem; font-weight: 900; white-space: nowrap; }
.appTagline { display: inline-block; margin-bottom: 3px; color: var(--accent); font-weight: 900; letter-spacing: .01em; }
@media (max-width: 420px) {
  .bottom-scroll .tabBtn { font-size: .66rem; padding-left: 5px; padding-right: 5px; }
  .bottom-scroll .tabBtn .emoji { font-size: .98rem; }
  .bottom-more-menu { grid-template-columns: 1fr; }
}


/* v17.3.1 ticket + iOS editor hotfix */
.editorHeader { align-items: flex-start; gap: 8px; }
.editorHeaderActions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.editorMiniBtn { min-height: 38px; padding: 8px 10px; border-radius: 999px; font-size: .78rem; line-height: 1; }
.editorActions { gap: 8px; }
.editorActions .primary, .editorActions .secondary, .editorActions .danger { flex: 1 1 120px; }
@media (max-width: 420px) {
  .editorHeader h2 { font-size: 1rem; }
  .editorHeader p { font-size: .76rem; }
  .editorHeaderActions { gap: 5px; }
  .editorMiniBtn { min-height: 36px; padding: 7px 8px; font-size: .72rem; }
  .iconBtn { width: 36px; height: 36px; }
}

/* v17.3.2 no-drag Customize Tabs hotfix */
.stableTabList { gap: 10px; }
.tabOrderRow { cursor: default; user-select: auto; -webkit-user-select: auto; touch-action: manipulation; align-items: center; }
.tabOrderLabel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.tabOrderActions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.tabOrderActions .tinyBtn { min-height: 40px; min-width: 58px; padding: 8px 11px; }
.tabOrderActions .slotBtn { min-width: 94px; }
@media (max-width: 560px) {
  .tabOrderRow { display: grid; grid-template-columns: 1fr; align-items: stretch; }
  .tabOrderActions { justify-content: stretch; }
  .tabOrderActions .tinyBtn { flex: 1 1 0; min-width: 0; }
  .tabOrderActions .slotBtn { flex-basis: 100%; }
}
.subsectionTitle { margin: 12px 0 8px; color: var(--muted); font-size: .98rem; font-weight: 900; }


/* v17.4.1 mobile word-wrap/readability polish */
.card,
.cardHeader,
.cardHeader > div,
.row,
.row b,
.row span,
.tag,
.pill,
.smallBtn,
.fileBtn,
.tabBtn,
.moreMenuItem,
.titleText,
.screenHeader,
.callout,
.empty {
  min-width: 0;
}
.card h3,
.card .caption,
.note,
.callout,
.empty,
.row span,
.titleText p {
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}
.row b {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
.cardHeader > div { flex: 1 1 auto; }
.actions .primary,
.actions .secondary,
.actions .ghost,
.actions .danger,
.editorActions .primary,
.editorActions .secondary,
.editorActions .danger {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}
@media (max-width: 560px) {
  .row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 9px 0;
  }
  .row b {
    font-size: .68rem;
    line-height: 1.15;
    letter-spacing: .045em;
    white-space: normal;
  }
  .row span {
    font-size: .92rem;
    line-height: 1.38;
  }
  .card {
    padding: 13px;
  }
  .cardHeader {
    gap: 8px;
  }
  .titlebar {
    align-items: flex-start;
  }
  .syncbar {
    scrollbar-width: none;
  }
  .syncbar::-webkit-scrollbar,
  .tabs::-webkit-scrollbar,
  .bottom-scroll::-webkit-scrollbar,
  .dayPicker::-webkit-scrollbar {
    display: none;
  }
}
@media (max-width: 380px) {
  .pill,
  .smallBtn,
  .fileBtn {
    font-size: .72rem;
    padding-left: 9px;
    padding-right: 9px;
  }
  .bottom-scroll .tabBtn {
    min-width: 66px;
  }
}

/* v17.4.3: independent Lightning Lane options in Trip Setup */
.fieldLabel {
  display: block;
  margin-bottom: 6px;
  font-size: .72rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 800;
  color: #6b5f4e;
}
.checkboxStack {
  display: grid;
  gap: 8px;
}
.checkOption {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid rgba(15, 118, 110, .18);
  border-radius: 14px;
  background: rgba(255, 255, 255, .72);
  font-weight: 750;
}
.checkOption input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #0f766e;
}
.llOptionStack {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
@media (max-width: 560px) {
  .llOptionStack {
    grid-template-columns: 1fr;
  }
}

/* v17.4.3 cleanup: quieter header statuses, LL warnings, and mobile word-wrap polish */
.hidden { display: none !important; }
.syncbar .pill.good { display: none; }
.syncbar .pill.warn:empty { display: none; }
.llWarning { margin-top: 10px; border-radius: 14px; border: 1px solid #fed7aa; background: #fff7ed; color: #9a3412; padding: 10px 11px; font-size: .84rem; line-height: 1.4; font-weight: 750; }
.card, .callout, .note, .tag, .tabBtn, .smallBtn, .primary, .secondary, .ghost, .danger { overflow-wrap: break-word; word-break: normal; hyphens: auto; }
.row b { overflow-wrap: normal; word-break: keep-all; hyphens: none; }
.row span { overflow-wrap: break-word; word-break: normal; }
@media (max-width: 520px) {
  .row { grid-template-columns: 1fr; gap: 4px; padding: 10px 0; }
  .row b { font-size: .68rem; }
  .syncbar { margin-top: 8px; }
}

/* v17.4.4: quieter header status area and card-count wording cleanup */
.statusQuiet { display: none !important; }
.syncbarEmpty { display: none !important; }
.syncbar { min-height: 0; }
@media (min-width: 760px) {
  .hero { padding-top: 18px; }
}

/* v17.4.8: close the More menu by tapping outside it, without changing editor modal behavior */
.more-menu-backdrop {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: calc(78px + env(safe-area-inset-bottom));
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  z-index: 29;
}
.bottom-more-menu {
  z-index: 31;
}
.bottom-nav .bottom-scroll {
  position: relative;
  z-index: 32;
}

/* v17.5.2: Trip Manager polish + compact advanced tools */
.tripAdvanced { margin-top: 10px; }
.tripAdvanced .compactSetupGrid { margin-top: 10px; }
.tripAdvanced .actions { margin-top: 10px; }
.compactSetupGrid { gap: 10px; }
@media (max-width: 560px) {
  .tripAdvanced .actions { gap: 8px; }
  .tripAdvanced .primary,
  .tripAdvanced .secondary,
  .tripAdvanced .ghost { min-height: 38px; padding: 8px 10px; }
}


/* v17.5.2: Keep cards sized to their content instead of stretching to match neighboring cards. */
.cardGrid.two, .cardGrid.three { align-items: start; }


/* v17.5.3: Home + Ask Mouse House Foundation */
.askMouseHousePanel {
  background: linear-gradient(135deg, rgba(255,247,237,.96), rgba(229,246,242,.98));
  border: 1px solid rgba(15,118,110,.22);
  border-radius: 24px;
  padding: 16px;
  box-shadow: var(--shadow);
  margin: 0 0 14px;
}
.askMouseHouseHeader { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.askMouseHouseHeader h2 { margin: 0; font-size: 1.22rem; }
.askBadge { flex: 0 0 auto; display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 9px; background: #fff; border: 1px solid rgba(15,118,110,.22); color: var(--accent); font-size: .72rem; font-weight: 900; }
.askInsight { background: rgba(255,255,255,.78); border: 1px solid rgba(23,32,51,.09); border-radius: 18px; padding: 12px; line-height: 1.45; font-size: .92rem; }
.askActionRow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.askActionRow .primary, .compactQuickActions .primary { min-height: 38px; padding: 8px 10px; border-radius: 13px; font-size: .82rem; }
.askFinePrint { color: var(--muted); font-size: .76rem; line-height: 1.35; margin: 10px 0 0; }
.compactQuickActions { margin: 0 0 12px; }
.kpis { display: none; }
@media (max-width: 520px) {
  .askMouseHousePanel { padding: 14px; border-radius: 22px; }
  .askMouseHouseHeader { flex-direction: column; gap: 8px; }
  .askBadge { align-self: flex-start; }
  .askActionRow .primary, .compactQuickActions .primary { flex: 1 1 130px; }
}


.sectionTitleRow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; margin-bottom: 10px; }
.sectionTitleRow .sectionTitle { margin: 0; }
.sectionTitleAction { display: flex; flex: 0 0 auto; }
.sectionTitleAction .primary { min-height: 34px; padding: 7px 11px; border-radius: 999px; font-size: .78rem; }
@media (max-width: 560px) {
  .sectionTitleRow { align-items: flex-start; }
  .sectionTitleAction .primary { min-height: 32px; padding: 6px 10px; }
}

