/* Slab to Fab family app, v2 look. Loaded last, so it sets the final word.
   Standard iPhone type: 17 body, 15 secondary, 13 captions, 11 tab labels,
   30 large title, 21 card titles. Inter for text, Fraunces for titles.
   Tap targets stay at least 44px. */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --ink: #1b2326;
  --muted: #5f696d;
  --teal: #0f5560;
  --teal-dark: #0b3a42;
  --teal-deep: #0b3a42;
  --gold: #c8a36a;
  --gold-soft: #d9c3a0;
  --dot: #c8873f;
  --cream: #f7f4ef;
  --sand: #f1ece4;
  --sand-deep: #e6e0d6;
  --white: #ffffff;
  --line: #e6e0d6;
  --orange: #c8873f;
  --orange-ink: #8a5a22;
  --sky: #eef3f2;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  --card-shadow: 0 1px 3px rgba(11, 58, 66, 0.06), 0 6px 18px rgba(11, 58, 66, 0.05);
  --radius: 14px;
  --tabbar-h: 56px;
  /* Semantic surfaces. --cream stays a light "on-teal" ink and is never
     remapped, because many chips and headers use it as light text. */
  --bg: #f7f4ef;
  --heading: #0b3a42;
  --link: #0f5560;
  --band: #0f5560;
  --band-text: #f7f4ef;
  color-scheme: light;
}

html { font-size: 16px; }
html, body { background: var(--bg); font-family: var(--sans); color: var(--ink); -webkit-font-smoothing: antialiased; }
body { font-size: 17px; line-height: 1.4; letter-spacing: -0.01em; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--heading); letter-spacing: -0.01em; }
.lede { font-size: 15px; color: var(--muted); margin: 0 0 14px; }
.fine-print { font-size: 13px; color: var(--muted); }
button, input, select, textarea { font-family: var(--sans); }

/* ---------- large title + slim top bar ---------- */
.hx-hero { background: var(--white); padding: calc(var(--safe-top) + 14px) 20px 8px; }
.hx-title { margin: 0; font-size: 30px; line-height: 1.15; letter-spacing: -0.3px; color: var(--heading); -webkit-user-select: none; user-select: none; }
.hx-sub { margin: 4px 0 0; font-size: 15px; color: var(--muted); }
.hx-top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px;
  background: rgba(255, 255, 255, 0.97); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
  padding: calc(var(--safe-top) * 0) 12px 0 14px; border-bottom: 1px solid var(--line); transition: box-shadow 0.2s ease;
}
.hx-top.is-stuck { box-shadow: 0 4px 14px rgba(11, 58, 66, 0.07); padding-top: var(--safe-top); }
.hx-link, .hx-icon-btn {
  appearance: none; border: 0; background: none; color: var(--heading); font: inherit; font-size: 15px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; min-width: 44px; padding: 0 4px; cursor: pointer;
}
.hx-icon-btn { justify-content: center; }
.hx-top svg { width: 22px; height: 22px; fill: none; stroke: var(--heading); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hx-ico { position: relative; display: inline-flex; }
.hx-ico.has-dot::after { content: ""; position: absolute; top: -1px; right: -2px; width: 8px; height: 8px; border-radius: 50%; background: var(--dot); border: 1.5px solid #fff; }
.hx-sp { flex: 1; }

/* ---------- main + bottom tab bar ---------- */
.g-main { padding: 16px 16px calc(var(--tabbar-h) + var(--safe-bot) + 28px); max-width: 680px; }
.g-main.is-selecting { padding-bottom: calc(200px + var(--safe-bot)); }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: flex; justify-content: space-around;
  background: rgba(255, 255, 255, 0.96); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--line); box-shadow: none; padding: 6px 4px calc(var(--safe-bot) + 4px);
}
.tab {
  flex: 1; max-width: 90px; min-height: 48px; padding: 2px 0; border-radius: 10px; gap: 3px;
  font-size: 11px; font-weight: 500; letter-spacing: 0; color: #8a9295; background: none;
}
.tab svg { width: 25px; height: 25px; stroke-width: 1.6; }
.tab.on { color: var(--link); background: none; }
.tab.on svg { stroke-width: 1.9; }

/* ---------- buttons ---------- */
.pill, .btn-primary, a.btn-primary {
  appearance: none; border: 0; background: var(--teal); color: #fff; font: inherit; font-size: 15px; font-weight: 600;
  min-height: 44px; padding: 0 20px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none;
}
.btn-primary { width: 100%; }
.btn-primary:hover, .pill:hover { background: var(--teal-dark); }
.pill-gold { background: var(--gold); color: #1f1a12; }
.pill-gold:hover { background: #b99359; }
.pill-ghost, .btn-secondary {
  appearance: none; background: var(--white); color: var(--link); border: 1px solid rgba(15, 85, 96, 0.35); font: inherit; font-size: 15px; font-weight: 600;
  min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.pill-ghost:hover, .btn-secondary:hover { background: #f3f7f7; }
.btn-text, .text-link { appearance: none; border: 0; background: none; color: var(--link); font: inherit; font-size: 15px; font-weight: 600; min-height: 44px; min-width: 44px; padding: 0 6px; cursor: pointer; }
.btn-orange, .btn-big, .btn-primary.btn-big { min-height: 48px; font-size: 16px; border-radius: 999px; }
.btn-orange { background: var(--gold); color: #1f1a12; font-weight: 600; }
.btn-orange:hover { background: #b99359; }
.back-btn { font-size: 15px; font-weight: 600; min-height: 44px; color: var(--link); }
.select-launch-inline { min-height: 44px; font-size: 15px; }

/* ---------- home cards ---------- */
.build-card {
  appearance: none; border: 0; width: 100%; text-align: left; font: inherit; cursor: pointer; position: relative; display: block;
  border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg, #0f5560, #0a3d45); color: #fff; padding: 16px 18px 18px; margin: 0 0 14px;
  box-shadow: 0 8px 22px rgba(11, 58, 66, 0.18);
}
.build-k { display: block; font-size: 13px; font-weight: 500; color: var(--gold-soft); letter-spacing: 0.4px; text-transform: uppercase; }
.build-big { display: block; font-family: var(--serif); font-weight: 600; font-size: 28px; line-height: 1.15; margin: 4px 36px 2px 0; }
.build-sub { display: block; font-size: 15px; color: #cfe0e0; }
.build-bar { display: block; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.18); margin-top: 14px; overflow: hidden; }
.build-bar i { display: block; height: 100%; background: var(--gold); border-radius: 3px; }
.build-chev { position: absolute; right: 14px; top: 16px; }
.build-chev svg { width: 22px; height: 22px; fill: none; stroke: var(--gold-soft); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.hcard, .whatsnew, .welcome-card, .celebrate, .keepsake-teaser {
  background: var(--white); border: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--card-shadow); margin: 0 0 14px; padding: 0;
}
.hcard-hit { appearance: none; border: 0; background: none; font: inherit; color: inherit; width: 100%; text-align: left; padding: 0; cursor: pointer; display: block; }
.hcard-body { padding: 14px 16px 16px; }
.hcard h2, .whatsnew h2 { margin: 3px 0 4px; font-size: 21px; line-height: 1.2; color: var(--heading); }
.hcard-date, .hcard-meta { margin: 0; font-size: 13px; color: var(--muted); }
.hcard-meta { margin-top: -2px; }
.hcard-text { margin: 0; font-size: 15px; color: var(--ink); }
.hcard-row { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; gap: 12px; }
.whatsnew-photo { display: block; position: relative; width: 100%; padding: 0; border: 0; background: var(--sand); cursor: pointer; }
.whatsnew-photo img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.new-badge { top: 12px; left: 12px; background: rgba(255, 255, 255, 0.94); color: var(--heading); font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.home-drone { margin: 0 0 22px; }
.home-drone .drone-card { margin: 0; }
.drone-card .hcard-body { padding-top: 12px; }
.drone-card .hcard-meta { margin: 0; }
.drone-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.drone-thumbs .dt { position: relative; display: block; }
.drone-thumbs img { width: 100%; height: 78px; object-fit: cover; border-radius: 8px; display: block; background: var(--sand); }
.drone-thumbs i, .vtile-img i, .rl-img i {
  position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, 0.92);
  display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.drone-thumbs i svg, .vtile-img i svg, .rl-img i svg { width: 16px; height: 16px; fill: var(--teal-deep); stroke: none; margin-left: 2px; }
.celebrate { background: linear-gradient(160deg, #ffffff, #fbf5ea); }
.celebrate-rule { width: 32px; height: 3px; background: var(--gold); }
.celebrate h2 { margin: 10px 0 4px; font-size: 21px; }
.welcome-card h2 { font-size: 21px; }

.home-share { margin: 0 0 22px; }
.share-group {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
.share-cta {
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.share-cta .hcard-text { margin: 0; font-size: 16px; line-height: 1.35; }
.share-cta .pill-gold { margin: 0; }

.quick { grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 22px; }
.quick-tile {
  border: 0; background: var(--white); border-radius: var(--radius); box-shadow: var(--card-shadow); min-height: 92px; padding: 14px; gap: 8px; justify-content: space-between;
}
.quick-tile strong { font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--heading); }
.q-icon { width: 36px; height: 36px; margin: 0; background: rgba(15, 85, 96, 0.08); color: var(--link); font-size: 15px; }
.q-icon svg { width: 19px; height: 19px; fill: none; stroke: var(--link); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#qStory .q-icon svg { fill: var(--link); stroke: none; margin-left: 2px; }

/* Four shortcuts sit inside the share-group card as one 2-up grid. */
.share-group .quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0;
}
.share-group .quick-tile {
  box-shadow: none;
  border-radius: 0;
  min-height: 88px;
  padding: 14px 16px;
  background: transparent;
  justify-content: flex-start;
  gap: 8px;
}
.share-group .quick-tile:nth-child(odd) { border-right: 1px solid var(--line); }
.share-group .quick-tile:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.share-group .quick-tile strong { font-family: var(--sans); font-size: 15px; font-weight: 600; }

/* Milestone card: stage scroller, then six tiles (2 x 3). */
.cel-stages {
  display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; scrollbar-width: none;
  padding: 8px 16px 4px;
}
.cel-stages::-webkit-scrollbar { display: none; }
/* Two steps inside the card: small semibold labels, not bands. */
.cel-step {
  margin: 0; padding: 14px 16px 0;
  font-size: 14px; font-weight: 600; line-height: 1.3; letter-spacing: 0.02em;
  color: var(--link);
}
.cel-step-2 { padding-bottom: 2px; }
#celSection .share-cta { padding-top: 10px; }
.cel-chip {
  flex: 0 0 auto; scroll-snap-align: center; display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  min-height: 52px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--white); color: var(--heading); font: inherit; text-align: left; white-space: nowrap; cursor: pointer;
}
.cel-chip-name { font-size: 15px; font-weight: 600; line-height: 1.2; }
.cel-chip-date { font-size: 13px; color: var(--muted); line-height: 1.2; }
.cel-chip.on { background: var(--band); border-color: var(--band); color: var(--band-text); }
.cel-chip.on .cel-chip-date { color: var(--band-text); }
.cel-chip.is-before { background: var(--sand); border-color: transparent; color: var(--muted); cursor: default; }
.cel-chip.is-todo { background: transparent; border-style: dashed; color: var(--muted); opacity: 0.6; cursor: default; }
.cel-chip:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

.share-group .quick-tile .q-sub { font-size: 13px; line-height: 1.3; color: var(--muted); margin-top: -4px; }
.share-group .quick-6 .quick-tile:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
.quick-tile.is-gold .q-icon { background: rgba(200, 163, 106, 0.3); }
.quick-tile.is-gold .q-icon svg { stroke: var(--orange-ink); }
.quick-tile[aria-disabled="true"] { cursor: default; }
.quick-tile[aria-disabled="true"] .q-icon,
.quick-tile[aria-disabled="true"] strong { opacity: 0.5; }
.quick-tile[aria-disabled="true"] .q-sub { font-style: italic; }

.progress { margin: 0 0 22px; }
.stepper { gap: 0; background: var(--white); border-radius: var(--radius); box-shadow: var(--card-shadow); overflow: hidden; }
.stepper li + li .step-btn { border-top: 1px solid var(--line); }
.step-btn { border: 0; border-radius: 0; min-height: 52px; padding: 0 16px; grid-template-columns: 28px 1fr auto; gap: 12px; background: var(--white); }
.step-btn.is-todo { background: var(--white); border-style: solid; border-color: var(--line); color: #8a9295; }
.step-dot { width: 24px; height: 24px; border-width: 1.5px; font-size: 13px; }
.done .step-dot { background: var(--teal); border-color: var(--teal); }
.step-name { font-weight: 500; font-size: 17px; }
.step-date { font-size: 15px; color: var(--muted); }
.potw { margin: 0 0 22px; }
.keepsake-teaser { background: var(--white); }

/* ---------- install card ---------- */
.install-card { border: 0; border-radius: var(--radius); box-shadow: var(--card-shadow); background: var(--white); margin: 0 0 14px; }
.install-go { font-size: 15px; font-weight: 600; min-height: 48px; }

/* ---------- photos ---------- */
.seg { background: #ebe6dd; border: 0; border-radius: 10px; padding: 3px; gap: 2px; margin: 0 0 14px; }
.seg-btn { min-height: 44px; border-radius: 8px; font-size: 15px; font-weight: 600; color: var(--heading); }
.seg-btn.on { background: var(--white); color: var(--heading); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.seg-3 .seg-btn { font-size: 15px; }
.gallery-heading h1 { font-size: 22px; line-height: 1.2; margin: 4px 0 2px; color: var(--heading); }
.gallery-heading h2 { font-size: 21px; }
.visit-line { font-size: 15px; font-weight: 400; color: var(--muted); margin: 0 0 12px; }
.date-strip { gap: 8px; padding-bottom: 12px; }
.date-card { min-width: 92px; min-height: 56px; border-radius: 12px; border: 0; background: var(--white); color: var(--heading); box-shadow: var(--card-shadow); padding: 6px 12px; }
.date-card .dc-day { font-size: 15px; font-weight: 600; }
.date-card .dc-sub { font-size: 13px; color: var(--muted); }
.date-card.on { background: var(--teal); color: #fff; }
.date-card.on .dc-sub { color: #cfe0e0; }
.action-grid { gap: 8px; margin: 0 0 8px; }
.act {
  border: 0; background: var(--white); box-shadow: var(--card-shadow); border-radius: 12px; min-height: 52px; padding: 8px 12px;
  font-size: 15px; font-weight: 600; color: var(--heading); gap: 8px;
}
.act span { color: var(--link); font-size: 15px; width: 20px; display: inline-flex; }
.act svg { width: 19px; height: 19px; fill: none; stroke: var(--link); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#watchFavs svg { fill: var(--link); stroke: none; }
.act-wide { width: 100%; margin: 0 0 14px; }
.room-group { margin-bottom: 22px; }
.room-group-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px;
  margin: 0 0 10px; padding: 10px 16px; border-radius: 12px;
  background: var(--band); color: var(--band-text);
}
.room-group-head h2 {
  font-size: 30px; line-height: 1.1; margin: 0;
  flex: 1 1 auto; min-width: 0;
  overflow-wrap: break-word;
  color: var(--band-text);
}
.room-open {
  font-size: 15px !important; flex: 0 0 auto; margin-left: auto; white-space: nowrap;
  color: var(--band-text) !important; opacity: 0.92;
}
/* Centered like every other title bar: room name, then "See it over time" under it. */
.room-group-head { flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; }
.room-group-head h2 { flex: 0 1 auto; width: 100%; text-align: center; text-wrap: pretty; text-wrap: balance; }
.room-group-head .room-open { margin-left: 0; }
.g-main .photo-card, .drone-grid .photo-card, .fav-grid .photo-card, .potw .photo-card {
  border: 0; border-radius: 12px; background: var(--white); box-shadow: var(--card-shadow); overflow: hidden;
}
.g-main .pair img, .g-main .play-stage img { border-radius: 0; }
.g-main figcaption { font-size: 15px !important; min-height: 48px; padding: 2px 6px 2px 14px !important; }
.fig-label { font-size: 15px; font-weight: 500; color: var(--ink); }
.heart-btn, .share-one { font-size: 15px !important; font-weight: 600; min-height: 44px; min-width: 44px; border-radius: 999px; color: var(--link); }
.share-one { background: none !important; }
.heart-btn.on { color: var(--dot); }
.room-list { gap: 0; background: var(--white); border-radius: var(--radius); box-shadow: var(--card-shadow); overflow: hidden; }
.room-list li + li .room-row { border-top: 1px solid var(--line); }
.room-row { border: 0; border-radius: 0; min-height: 60px; padding: 8px 14px 8px 8px; grid-template-columns: 64px 1fr auto; }
.room-row img, .room-row-ph { width: 64px; height: 46px; border-radius: 8px; }
.room-row-name { font-size: 17px; font-weight: 500; }
.room-row-count { font-size: 15px; }
.plan-frame { border-radius: var(--radius); box-shadow: var(--card-shadow); border: 0; background: var(--white); margin-bottom: 14px; }
.btn-play { background: var(--teal) !important; color: #fff; margin: 0 0 12px; }
.btn-play:disabled { background: var(--sand-deep) !important; color: var(--muted); }
.scrub-label span { font-size: 15px; font-weight: 600; }
.scrub-label input[type="range"] { accent-color: var(--teal); }
.play-date { font-size: 15px; font-weight: 600; color: var(--heading); }
.g-main .frame-btn { border-radius: 10px; border: 2px solid transparent; background: var(--white); box-shadow: var(--card-shadow); }
.g-main .frame-btn span { font-size: 13px; font-weight: 600; }
.g-main .frame-btn.on { border-color: var(--link); color: var(--heading); }
.compare-box { border: 0; border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 16px; }
.big-select { font-size: 17px; min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--white); }
.field-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.ba-labels { font-size: 13px !important; font-weight: 600; }
.empty-note h1, .empty-note h2 { font-size: 22px; }

/* ---------- videos ---------- */
.v-sec { margin: 0 0 24px; }
.vtiles { display: grid; gap: 12px; }
.vtile {
  appearance: none; border: 0; padding: 0; text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--white); border-radius: var(--radius); box-shadow: var(--card-shadow); overflow: hidden; display: block; width: 100%;
}
.vtile-img { position: relative; display: block; background: var(--sand); }
.vtile-img img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.vtile-img i { width: 52px; height: 52px; }
.vtile-img i svg { width: 22px; height: 22px; }
.vtile-text { display: block; padding: 12px 16px 14px; }
.vtile-text strong { display: block; font-family: var(--serif); font-weight: 600; font-size: 19px; color: var(--heading); }
.vtile-text span { display: block; font-size: 15px; color: var(--muted); margin-top: 2px; }
.lapse-picker { position: relative; margin: 0 -16px; }
.lapse-picker::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 16px; width: 44px;
  pointer-events: none;
  background: linear-gradient(to right, transparent, var(--bg));
  z-index: 1;
}
.room-lapses {
  display: flex; gap: 10px; overflow-x: auto;
  margin: 0; padding: 2px 28px 16px 16px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--heading) 35%, transparent) transparent;
}
.room-lapses::-webkit-scrollbar { display: block; height: 4px; }
.room-lapses::-webkit-scrollbar-track { background: transparent; }
.room-lapses::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--heading) 30%, transparent); border-radius: 99px; }
.rl-btn {
  appearance: none; flex: 0 0 142px; scroll-snap-align: start;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  padding: 8px 8px 10px; box-shadow: var(--card-shadow);
  font: inherit; color: var(--ink); text-align: left; cursor: pointer;
}
.rl-btn:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.rl-img { position: relative; display: block; }
.rl-img img { display: block; width: 100%; height: 80px; object-fit: cover; border-radius: 10px; background: var(--sand); }
.rl-img i { width: 30px; height: 30px; }
.rl-img i svg { width: 14px; height: 14px; }
.rl-name { display: block; font-size: 15px; font-weight: 600; margin-top: 8px; color: var(--heading); }

.drone-views { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 12px; }
.drone-view {
  appearance: none; width: 100%; border: 1px solid var(--line);
  background: var(--sand); color: var(--ink); border-radius: 14px;
  padding: 8px 12px 8px 8px; display: grid;
  grid-template-columns: 92px 1fr; grid-template-rows: auto auto;
  column-gap: 12px; row-gap: 2px; align-items: center;
  text-align: left; cursor: pointer; font: inherit;
}
.drone-view:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.drone-view-img { grid-row: 1 / span 2; position: relative; display: block; }
.drone-view-img img { width: 92px; height: 68px; object-fit: cover; border-radius: 10px; display: block; background: var(--line); }
.drone-view-name { font-weight: 600; color: var(--heading); font-size: 17px; }
.drone-view-meta { font-size: 15px; color: var(--muted); }
.drone-view-img i {
  position: absolute; inset: 0; margin: auto; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.drone-view-img i svg { width: 14px; height: 14px; fill: var(--teal-deep); stroke: none; margin-left: 2px; }
.video-card { border: 0; border-radius: var(--radius); box-shadow: var(--card-shadow); margin: 0 0 14px; }
.video-meta { padding: 10px 12px 12px 16px; }
.video-meta h3 { margin: 0; font-size: 19px; }
.video-meta p { margin: 0; font-size: 15px; color: var(--muted); }
.drone-visit h2 { font-size: 17px; font-family: var(--sans); font-weight: 600; margin: 16px 0 8px; color: var(--heading); }
.drone-grid, .fav-grid { gap: 12px; }
.drone-grid figcaption, .fav-grid figcaption, .potw figcaption { min-height: 48px; }

/* ---------- saved + keepsakes ---------- */
.ui-chip { font-size: 13px; font-weight: 600; padding: 1px 8px; border: 1px solid var(--line); }
.keepsakes { margin-top: 0; display: flex; flex-direction: column; gap: 22px; }
.ks-sec { margin: 0; }
.ks-sec .ks-card { margin: 0; }
.ks-card { border: 0; border-radius: var(--radius); box-shadow: var(--card-shadow); background: var(--white); padding: 16px; margin: 0; }
.ks-card h3 { font-size: 21px; margin: 0 0 4px; }
.ks-card p { font-size: 15px; color: var(--ink); margin: 0 0 12px; }
.ks-card img { border-radius: 10px; margin-bottom: 12px; }
.ks-art img { aspect-ratio: auto; width: 160px; height: 160px; object-fit: contain; margin: 0 auto 12px; background: none; }
.ks-price { font-family: var(--serif); font-weight: 600; font-size: 22px !important; color: var(--heading) !important; margin: 0 0 12px !important; }
.ks-price span { font-family: var(--sans); font-size: 15px; font-weight: 400; color: var(--muted); }
.ks-actions { gap: 10px; }
.ks-actions.one { grid-template-columns: 1fr; }
.ks-actions a { width: 100%; }
.v-sec-lede { margin: 0 0 14px; font-size: 15px; color: var(--muted); }
.drone-addon {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--card-shadow);
  padding: 16px;
}
.drone-addon p { margin: 0 0 12px; font-size: 15px; color: var(--ink); }


/* ---------- sheets (Updates, Visits, Account, alerts, share) ---------- */
.retake-sheet { background: rgba(11, 30, 34, 0.42); }
.retake-card { border-radius: 16px 16px 0 0; padding: 10px 18px calc(var(--safe-bot) + 18px); background: var(--white); color: var(--ink); max-height: 88dvh; overflow-y: auto; font-size: 17px; }
.retake-card h2 { font-size: 22px; }
.retake-card .btn-primary, .retake-card .btn-secondary { width: 100%; min-height: 44px; margin-top: 10px; }
.retake-card .btn-text { width: 100%; min-height: 44px; }
.sheet-row { position: sticky; top: -10px; background: var(--white); z-index: 1; padding: 6px 0; margin-bottom: 4px; }
.sheet-row .btn-text { width: auto !important; }
.settings-card h3 { font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; margin: 18px 0 6px; }
.switch-row { min-height: 48px; font-size: 17px; font-weight: 400; color: var(--ink); }
.switch-row input { width: 44px; height: 28px; accent-color: var(--teal); }
.list-btn { appearance: none; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; font-size: 17px; color: var(--ink); min-height: 48px; display: flex; justify-content: space-between; align-items: center; padding: 0; cursor: pointer; }
.list-btn span { color: #a0a8ab; font-size: 22px; }
.acct-head { display: flex; gap: 12px; align-items: center; padding: 6px 0 2px; }
.acct-head > span:last-child { display: grid; }
.acct-head strong { font-size: 17px; font-weight: 600; }
.acct-head > span:last-child span { font-size: 15px; color: var(--muted); }
.acct-mono { width: 48px; height: 48px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-size: 21px; }
.acct-out { color: #a3402a; margin-top: 12px; }
.fam-list li { background: var(--cream); font-size: 15px; }
.text-input, select.text-input { font-size: 17px; min-height: 44px; border-radius: 10px; border: 1px solid var(--line); }
.check-row { min-height: 44px; font-size: 17px; }
.up-list, .vs-list { list-style: none; margin: 4px 0 12px; padding: 0; }
.up-row, .vs-row {
  appearance: none; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; color: var(--ink);
  display: flex; align-items: center; gap: 12px; padding: 10px 0; min-height: 60px; text-align: left; cursor: pointer;
}
.up-row img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; }
.up-text { flex: 1; display: grid; gap: 2px; }
.up-text strong { font-size: 15px; font-weight: 600; line-height: 1.3; }
.up-text span { font-size: 13px; color: var(--muted); }
.up-new { font-size: 13px; font-weight: 600; color: #fff; background: var(--dot); border-radius: 999px; padding: 2px 9px; }
.vs-next { display: flex; justify-content: space-between; align-items: center; background: linear-gradient(135deg, #0f5560, #0a3d45); color: #fff; border-radius: 12px; padding: 12px 16px; margin: 4px 0 8px; }
.vs-next span { font-size: 13px; color: var(--gold-soft); text-transform: uppercase; letter-spacing: 0.4px; font-weight: 500; }
.vs-next strong { font-size: 15px; font-weight: 600; }
.vs-date { display: grid; width: 72px; flex: 0 0 auto; }
.vs-date strong { font-size: 15px; font-weight: 600; color: var(--heading); }
.vs-date span, .vs-text span { font-size: 13px; color: var(--muted); }
.vs-text { flex: 1; display: grid; font-size: 15px; }
.vs-chev { color: #a0a8ab; font-size: 22px; }

/* ---------- select bar ---------- */
.select-bar { background: rgba(255, 255, 255, 0.97); border-top: 1px solid var(--line); padding: 10px 16px calc(var(--safe-bot) + 12px); box-shadow: 0 -6px 20px rgba(11, 58, 66, 0.08); }
.select-bar-top p { font-size: 15px; font-weight: 600; }
.select-bar .btn-primary { background: var(--teal); color: #fff; }
.select-bar .btn-secondary { margin-top: 8px; width: 100%; }
.photo-card.is-selected img { outline-color: var(--teal); }

/* ---------- viewer + player ---------- */
.viewer-btn { font-size: 15px; font-weight: 600; min-height: 44px; min-width: 44px; padding: 0 14px; background: rgba(255, 255, 255, 0.14); }
.viewer-heart.on { color: var(--gold); }
.viewer-arrow { width: 44px; height: 64px; border-radius: 12px; font-size: 30px; background: rgba(0, 0, 0, 0.32); }
.viewer-caption { font-size: 15px; font-weight: 500; }
.viewer-count { font-size: 15px; }
.viewer-share { background: var(--white) !important; color: var(--heading) !important; }
.player-heading { font-size: 17px; }
.player-card h2 { font-size: 28px; }
.player-card-sub { font-size: 13px; color: var(--gold-soft); }
.player-caption { font-size: 15px; font-weight: 500; }
.player-play { width: 64px; height: 64px; font-size: 24px; }
.player-progress { accent-color: var(--gold); }

/* ---------- gallery not found / signed out ---------- */
.gallery-empty h1 { font-size: 28px; }
.gallery-empty p { font-size: 17px; color: var(--muted); }

/* ---------- high contrast keeps working ---------- */
html.hi-contrast { --muted: #2b3538; --line: rgba(11, 58, 66, 0.45); }
html.hi-contrast .tab { color: #3d474a; }
html.hi-contrast .tab.on { color: var(--heading); }

@media (min-width: 640px) { .vtiles { grid-template-columns: 1fr 1fr; } }

/* ---------- toast sits above the tab bar ---------- */
.s2f-toast { bottom: calc(var(--tabbar-h) + var(--safe-bot) + 22px) !important; font-size: 15px; font-weight: 500; border-radius: 12px; background: rgba(11, 58, 66, 0.95); max-width: calc(100% - 48px); }

/* ---------- iOS-style switches ---------- */
input[role="switch"] {
  -webkit-appearance: none; appearance: none; position: relative; width: 51px !important; height: 31px !important; margin: 0; flex: 0 0 auto;
  border-radius: 999px; background: #e3e1dc; cursor: pointer; transition: background 0.2s ease;
}
input[role="switch"]::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); transition: transform 0.2s ease;
}
input[role="switch"]:checked { background: var(--teal); }
input[role="switch"]:checked::after { transform: translateX(20px); }
input[role="switch"]:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.act-play svg { fill: var(--link) !important; stroke: none !important; }
.vtiles { grid-template-columns: 1fr 1fr; gap: 10px; }
.vtiles .vtile:first-child:nth-last-child(odd), .vtiles .vtile:only-child { grid-column: 1 / -1; }
.vtiles .vtile:not(:first-child) .vtile-img img, .vtiles .vtile:first-child:nth-last-child(even) .vtile-img img { aspect-ratio: 4 / 3; }
.vtiles .vtile:not(:first-child) .vtile-text strong, .vtiles .vtile:first-child:nth-last-child(even) .vtile-text strong { font-size: 17px; }
.vtiles .vtile:not(:first-child) .vtile-text, .vtiles .vtile:first-child:nth-last-child(even) .vtile-text { padding: 10px 12px 12px; }
.vtiles .vtile:not(:first-child) .vtile-text span, .vtiles .vtile:first-child:nth-last-child(even) .vtile-text span { font-size: 13px; }
.vtiles .vtile:not(:first-child) .vtile-img i, .vtiles .vtile:first-child:nth-last-child(even) .vtile-img i { width: 40px; height: 40px; }

/* ---------- light header on the other screens (onboarding, shared visit page) ---------- */
.topbar { background: var(--white); color: var(--heading); border-bottom: 1px solid var(--line); }
.topbar .brand strong { color: var(--heading); font-family: var(--serif); font-weight: 600; font-size: 17px; }
.topbar .brand span { color: var(--muted); font-size: 13px; }
.topbar .script { color: var(--gold); }
.topbar button, .topbar a { color: var(--heading); }

/* Share tab: one picture per build week */
.hx-link.on { color: var(--heading); font-weight: 600; }
.collages { display: grid; gap: 16px; margin: 0 0 8px; }
.cl-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--card-shadow); overflow: hidden; }
.cl-img { display: block; position: relative; width: 100%; aspect-ratio: 4 / 5; padding: 0; border: 0; background: var(--sand); cursor: pointer; }
.cl-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cl-wait { position: absolute; inset: 0; background: linear-gradient(100deg, var(--sand) 30%, #f8f5f0 50%, var(--sand) 70%); background-size: 300% 100%; animation: cl-shine 1.4s linear infinite; }
.cl-card.is-ready .cl-wait { display: none; }
@keyframes cl-shine { from { background-position: 100% 0; } to { background-position: 0 0; } }
.cl-body { padding: 12px 16px 16px; display: flex; align-items: center; gap: 12px; }
.cl-txt { flex: 1; min-width: 0; }
.cl-body h3 { font-size: 20px; line-height: 1.2; margin: 0; }
.cl-date { font-size: 16px; color: var(--muted); margin: 2px 0 0; }
.cl-body .btn-primary { width: auto; flex: 0 0 auto; min-height: 44px; margin: 0; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 17px; white-space: nowrap; }
.cl-body .btn-primary svg, .cl-actions svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.share-page { padding-bottom: 8px; }
.share-section { font-size: 22px; margin: 4px 0 12px; color: var(--heading); }
.share-own { width: 100%; min-height: 52px; margin-top: 6px; }
.share-hint { font-size: 16px; color: var(--muted); text-align: center; margin: 8px 0 0; }
.vp-list { display: grid; gap: 8px; margin-top: 8px; }
.vp-row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; background: var(--white); border: 1.5px solid var(--line, #e6e0d6); border-radius: 12px; padding: 14px 16px; font: inherit; color: inherit; cursor: pointer; }
.vp-row strong { color: var(--heading); font-size: 17px; }
.vp-row span { color: var(--muted); font-size: 16px; }
.cl-full { display: block; width: 100%; height: auto; border-radius: 10px; margin: 4px 0 12px; box-shadow: var(--card-shadow); }

/* Home: the family's name lockup under the greeting */
.hx-lockup { max-width: 300px; margin: 10px 0 2px; }
.hx-sub.hx-plan { margin-top: 4px; }

/* Home tab: welcome, lockup, and model line as one centered stack.
   Other tabs keep the left-aligned large title. */
.hx-hero-home { text-align: center; }
.hx-hero-home .hx-lockup { width: 100%; margin-left: auto; margin-right: auto; }
.hx-hero-home .hx-sub { text-align: center; }

/* ---------- Share v2: inline editor, History, tray, sheet ---------- */
.share-page { padding-bottom: 12px; }
.share-editor { background: var(--white); border-radius: 16px; box-shadow: var(--card-shadow); overflow: hidden; padding-bottom: 14px; }
.share-canvas { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; background: var(--sand); cursor: pointer; }
.share-pad { padding: 8px 14px 0; }
.share-meta { font-size: 15px; color: var(--muted); text-align: center; margin: 0 0 4px; }
.share-hint-line { font-size: 13px; color: var(--muted); text-align: center; margin: 0 0 6px; }
.share-label { display: block; font-size: 15px; font-weight: 600; color: var(--ink); margin: 12px 0 6px; }
.share-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.share-editor .share-chips { margin-bottom: 8px; }
/* Keep the Message label from peeking out under the tab bar on the first screen. */
.share-editor .share-chips + .share-label { margin-top: 42px; }
.tray-body { padding-bottom: 16px; }
.share-chip {
  border: 1.5px solid var(--line); background: var(--white); border-radius: 999px;
  min-height: 44px; padding: 8px 16px; font-size: 16px; color: var(--heading); cursor: pointer;
  font-family: inherit; line-height: 1.2; display: inline-flex; align-items: center;
}
.share-chip.on { border-color: var(--teal-deep); background: var(--teal-deep); color: #fff; font-weight: 600; }
.share-field {
  width: 100%; border: 1.5px solid var(--line); background: var(--white); border-radius: 12px;
  padding: 14px; font: 17px var(--sans); color: var(--ink);
}
.share-tools { display: flex; gap: 10px; margin-top: 14px; }
.share-btn-ghost, .share-btn-secondary, .share-btn-text {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; font: 600 17px var(--sans); height: 44px; padding: 0 20px;
  cursor: pointer; white-space: nowrap; flex: 1;
}
.share-btn-ghost {
  background: transparent; color: var(--heading); border: 1.5px solid var(--line);
}
.share-btn-ghost:disabled { opacity: 0.4; color: var(--muted); }
.share-btn-secondary {
  background: var(--white); color: var(--heading); border: 1.5px solid var(--teal); width: 100%; flex: none; height: 52px;
}
.share-btn-text { background: none; border: 0; color: var(--heading); width: 100%; flex: none; height: 48px; }
.share-editor #sdShare, .share-sheet .sd-share { width: 100%; min-height: 54px; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.share-editor #sdShare svg, .share-sheet .sd-share svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.share-section { font-size: 22px; margin: 28px 0 12px; color: var(--heading); }
.share-history { display: flex; flex-direction: column; gap: 16px; }
.h-card {
  display: block;
  background: var(--white); border-radius: 16px; box-shadow: var(--card-shadow);
  padding: 0; overflow: hidden; cursor: pointer;
}
.h-thumb {
  position: relative; display: block; width: 100%; aspect-ratio: 4 / 5;
  border: 0; padding: 0; background: var(--sand); overflow: hidden; cursor: pointer;
}
.h-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.h-thumb .cl-wait { border-radius: 0; }
.h-txt { min-width: 0; padding: 12px 16px 16px; }
.h-card h3 { font-size: 20px; line-height: 1.2; margin: 0 0 4px; }
.h-yours { font-size: 15px; margin: 0 0 2px; }
.h-yours em { font-style: italic; font-family: var(--serif); font-weight: 600; color: #7a5a2e; }

.share-overlay {
  position: fixed; inset: 0; background: rgba(11,58,66,.38);
  z-index: 60; display: flex; align-items: flex-end; justify-content: center;
}
.share-sheet, .share-tray {
  background: var(--white); width: 100%; border-radius: 20px 20px 0 0;
  padding: 8px 16px 20px; box-shadow: 0 -8px 28px rgba(11,58,66,.12);
}
.share-handle { width: 36px; height: 4px; border-radius: 4px; background: var(--line); margin: 6px auto 14px; }
.share-sheet { padding-bottom: 28px; }
.share-sheet h2, .share-tray h2 { font-size: 22px; text-align: center; margin: 0 0 4px; }
.share-tray h2 { text-align: left; margin: 0 0 10px; }
.share-sheet-sub { text-align: center; font-size: 15px; color: var(--muted); margin: 0 0 18px; }
.share-sheet-sub em { font-style: italic; font-family: var(--serif); font-weight: 600; color: #7a5a2e; }
.share-sheet .btn-primary, .share-sheet .share-btn-secondary { width: 100%; margin-bottom: 10px; }
.share-sheet.is-history {
  max-height: 100%;
  max-height: 100dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}
.hs-preview {
  position: relative;
  width: min(100%, calc((100dvh - 17rem) * 4 / 5));
  aspect-ratio: 4 / 5;
  margin: 0 auto 12px;
  background: var(--sand);
  border-radius: 12px;
  overflow: hidden;
  flex: 0 0 auto;
}
.hs-preview img { width: 100%; height: 100%; object-fit: contain; display: block; }
.hs-preview.is-ready .cl-wait { display: none; }
.share-sheet.is-history h2 { margin-top: 0; }
.share-tray { height: min(560px, 68vh); display: flex; flex-direction: column; padding-bottom: 16px; }
.share-tray .tray-chips { margin: 0 0 12px; }
.share-tray .share-chip { padding: 8px 13px; font-size: 15px; min-height: 44px; }
.tray-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.tray-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tray-pick { border: 0; padding: 0; background: none; border-radius: 10px; overflow: hidden; cursor: pointer; }
.tray-pick img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--sand); border-radius: 10px; }
.tray-pick.pick { box-shadow: 0 0 0 2.5px var(--teal-deep); }
.tray-group { margin-bottom: 16px; }
.tray-group h3 { font-size: 16px; margin: 0 0 8px; color: var(--heading); }


/* Section divider bands: the same treatment as Photos room headers.
   Page titles (Welcome home, Photos, Share, …), titles inside cards,
   and sheet/dialog titles stay as they are. */
.sec-title,
.share-section,
.progress h2,
.potw h2,
.compare-box h2,
.ks-sec .sec-title {
  background: var(--band);
  color: var(--band-text);
  border-radius: 12px;
  padding: 10px 16px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.1;
  margin: 0 0 10px;
  /* Centered, with wrapped lines kept about even ("A Milestone / to Celebrate"). */
  text-align: center;
  text-wrap: pretty;
  text-wrap: balance;
}
.share-section { margin-top: 28px; margin-bottom: 12px; }

/* ---------- Dark mode (prefers-color-scheme) ----------
   Standing rule: every color choice must also look good when the phone
   is in dark mode. --cream, --teal, --teal-dark, and --teal-deep stay
   as they are (cream is light text on teal; teal stays a dark fill so
   white button labels keep AA contrast). Collage canvases and exports
   keep their light paper and are not recolored. */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #101c1f;
    --white: #1a2c30;
    --sand: #1e3338;
    --sand-deep: #244046;
    --line: #3a555b;
    --ink: #f3efe8;
    --muted: #b7c2c4;
    --heading: #eef4f4;
    --link: #5eb8c2;
    --band: #1a7a86;
    --band-text: #f7f4ef;
    --sky: #1e3a3e;
    --orange-ink: #e0b07a;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), 0 8px 22px rgba(0, 0, 0, 0.28);
  }

  html, body { background: var(--bg); color: var(--ink); }

  .hx-top {
    background: rgba(16, 28, 31, 0.94);
  }
  .hx-ico.has-dot::after { border-color: var(--white); }
  .tabbar {
    background: rgba(16, 28, 31, 0.96);
  }
  .tab { color: #a8b2b4; }
  .pill-ghost:hover, .btn-secondary:hover { background: #22383c; }
  .pill-ghost, .btn-secondary { border-color: rgba(94, 184, 194, 0.45); }

  /* Home name lockup: invert ink so the cartouche stays legible on a dark hero.
     Canvas/export drawing in panel.js and brand.js is unchanged. */
  .s2f-lockup {
    --ink: #f3efe8;
    --inner: #5eb8c2;
    --paper: #1a2c30;
    --outer: #d4b07a;
    --border: var(--outer);
    --metal: #d4b07a;
  }

  .room-group-head,
  .sec-title,
  .share-section,
  .progress h2,
  .potw h2,
  .compare-box h2,
  .ks-sec .sec-title {
    box-shadow: inset 0 0 0 1px rgba(247, 244, 239, 0.14);
  }
  .sec-title, .share-section, .progress h2, .potw h2, .compare-box h2, .ks-sec .sec-title,
  .room-group-head, .room-group-head h2, .room-open {
    color: var(--band-text);
  }

  /* Milestone celebrate card: warm dark gold-teal gradient, cream text, gold button stays */
  .celebrate,
  .celebrate-card {
    background: linear-gradient(160deg, #24363a, #2d291f);
    color: var(--ink);
    border-color: rgba(200, 163, 106, 0.28);
  }
  .celebrate h2, .celebrate-card h2 { color: var(--heading); }
  .celebrate .hcard-text, .celebrate p, .celebrate-card p { color: var(--ink); }

  .retake-card { color: var(--ink); }

  /* Install coach is a self-contained light iOS-style sheet; don't let themed
     heading color wash the title out. */
  .s2fi-sheet, .s2fi-sheet h1, .s2fi-sheet h2, #s2fiTitle { color: #0b2a2f; }

  .did-you-mean {
    background: #3a2e1c;
    border-color: #c8a36a;
    color: var(--ink);
  }
  .name-chip[aria-pressed="true"] {
    background: rgba(94, 184, 194, 0.16);
    color: var(--heading);
  }
  .status-banner { background: #1e3338; color: var(--ink); }
  .status-banner.offline,
  .status-banner.storage { background: #3a2e1c; color: #f3d7b3; }
  .status-banner.queue { background: #1e3338; color: var(--ink); }

  /* iOS-style segmented control: cream selected pill on a dark track */
  .seg { background: #152226; }
  .seg-btn { color: var(--muted); }
  .seg-btn.on {
    background: #f3efe8;
    color: #0b3a42;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  }

  /* gallery2.css still hard-codes color: var(--teal-deep) on many titles */
  .gallery-heading h1, .gallery-heading h2,
  .whatsnew-body h1, .welcome-card h1,
  .celebrate h2, .celebrate-card h2,
  .quick-tile strong, .keepsake-teaser h2,
  .ks-card h3,
  .pm-loading, .pm-card figcaption, .pm-h, .pm-label,
  .pm-seg-btn, .pm-layout, .pm-tile, .frame-btn,
  .render-card h2, .play-date, .vtile-text strong, .rl-name,
  .drone-visit h2, .vs-date strong, .date-card, .act,
  .tray-group h3, .sheet-count, .stage-item.on .stage-name {
    color: var(--heading);
  }
  .date-card.on { color: #fff; }
  .date-card.on .dc-sub { color: #cfe0e0; }


  .q-icon { background: rgba(94, 184, 194, 0.16); }
  .quick-tile.is-gold .q-icon { background: rgba(212, 176, 122, 0.24); }
  .quick-tile.is-gold .q-icon svg { stroke: #e0c08a; }
  .cel-chip.on { box-shadow: inset 0 0 0 1px rgba(247, 244, 239, 0.14); }
  .new-badge { background: rgba(26, 44, 48, 0.94); color: var(--heading); }
  .fam-list li { background: var(--sand); }
  .select-bar { background: rgba(16, 28, 31, 0.96); }
  .head-btn, .select-launch { background: var(--sand); color: var(--heading); }

  .h-yours em, .share-sheet-sub em { color: #e0c08a; }
  .acct-out { color: #ee8a74; }
  .share-overlay { background: rgba(0, 0, 0, 0.62); }

  .cl-wait {
    background: linear-gradient(100deg, var(--sand) 30%, #2a4449 50%, var(--sand) 70%);
    background-size: 300% 100%;
  }

  /* Forms, chips, and sheets: follow the dark surface tokens.
     Collage paper (pm-canvas-wrap, share-preview, sd-hero-wrap) stays light. */
  .share-chip:not(.on),
  .share-field,
  .share-btn-secondary,
  .share-detail .sd-chip,
  .share-detail .sd-field,
  .share-detail .pm-tile,
  .pm-scroll .text-input,
  .pm-scroll textarea,
  .vp-row,
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="search"],
  input[type="number"],
  input[type="date"],
  input[type="password"],
  select,
  textarea {
    background-color: var(--sand);
    color: var(--ink);
    border-color: var(--line);
  }
  .share-chip:not(.on),
  .share-detail .sd-chip,
  .share-detail .pm-tile { color: var(--heading); }
  input::placeholder, textarea::placeholder, .share-field::placeholder { color: var(--muted); }

  input[role="switch"] { background: #3a555b; }

  .sheet,
  .panel-maker,
  .demo,
  .pm-sheet-card,
  .tour-card,
  .render-card { background: var(--bg); color: var(--ink); }

  /* Links and icons in files that still say color: var(--teal) */
  .script, .script.mini, .tour-more summary, .demo-ic,
  .topbar .script.mini { color: var(--link); }
  .demo-ic, .demo-points svg, .pv-done svg { color: var(--link); stroke: var(--link); }
  .t-photo { stroke: var(--link); }
  .hotspot.done { stroke: var(--link); }

  .choice.on, .choice:hover,
  .pkg.on,
  .pm-seg-btn.on, .pm-layout.on {
    background: rgba(94, 184, 194, 0.16);
    border-color: var(--link);
  }

  html.hi-contrast { --muted: #d5ddde; --line: rgba(247, 244, 239, 0.38); --ink: #f7f4ef; }
  html.hi-contrast .tab { color: #d5ddde; }
  html.hi-contrast .tab.on { color: var(--link); }
  html.hi-contrast .fine-print, html.hi-contrast .lede { color: #d5ddde; }
}
