/* ===== Mock Home layouts (shared) ===== */
.hub-intro { margin: 0 2px; font-size: 13.5px; color: var(--ui-sub); line-height: 1.4; }
.hub-all-head {
  margin: 10px 2px -2px; font-size: 15px; font-weight: 800; color: var(--ui-title);
}
.home-shelf-grid > .need-btn.is-span { grid-column: 1 / -1; }
.need-icon.is-glyph { font-size: 22px; line-height: 1; color: var(--c); }
.hub-screen .need-btn.is-ice .need-sub { color: rgba(255,255,255,.86); }
.hub-screen .need-btn.is-ice::after { display: none; }

/* BugOutBot tip card — hero of Home top */
.home-mini-bot {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 14px 12px;
  border-radius: 18px;
  background: var(--ui-surface);
  border: 1.5px solid color-mix(in srgb, #ff8a52 42%, var(--ui-hairline-strong));
  box-shadow:
    var(--ui-elev),
    0 0 0 1px color-mix(in srgb, #ff8a52 18%, transparent),
    0 10px 28px -12px rgba(255, 107, 43, 0.35);
}
.home-mini-bot img, .home-mini-bot-avatar {
  width: 72px; height: 72px; border-radius: 16px; flex-shrink: 0;
  object-fit: cover;
  box-shadow:
    0 0 0 2px color-mix(in srgb, #ff8a52 55%, transparent),
    0 6px 16px rgba(0, 0, 0, 0.28);
}
.home-mini-bot-role { display: block; font-size: 11px; font-weight: 650; color: var(--ui-sub); margin: 0 0 4px; }
.home-mini-bot-text { flex: 1; min-width: 0; padding-top: 2px; }
.home-mini-bot-label {
  display: block; font-size: 13px; font-weight: 900; letter-spacing: .12em;
  text-transform: uppercase; color: #ff8a52;
}
.home-mini-bot-tip {
  margin: 2px 0 0; font-size: 14.5px; line-height: 1.35; color: var(--ui-title); font-weight: 600;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.home-tip-next {
  margin-top: 6px; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 800; color: #ff8a52;
  text-decoration: underline; text-underline-offset: 2px;
}
[data-theme="red"] .home-mini-bot-label,
[data-theme="red"] .home-tip-next { color: #ff6b2b; }
[data-theme="red"] .home-mini-bot {
  border-color: color-mix(in srgb, #ff6b2b 50%, var(--ui-hairline-strong));
  box-shadow: var(--ui-elev), 0 0 0 1px rgba(255, 107, 43, 0.25), 0 10px 28px -12px rgba(255, 107, 43, 0.4);
}

/* Legacy / optional chip beside tip (off by default on Home) */
.home-chip {
  --c: #e8a56c;
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
  min-height: 44px; padding: 4px 9px 4px 4px;
  border-radius: 12px; border: 1px solid var(--ui-hairline-strong);
  background: color-mix(in srgb, var(--c) 10%, var(--ui-surface));
  color: var(--ui-title); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer;
}
[data-theme="red"] .home-chip { --c: #ff7a45; }
.home-chip .need-svg { width: 32px; height: 32px; display: block; image-rendering: pixelated; shape-rendering: crispEdges; }
.home-chip-count { font-size: 10.5px; font-weight: 700; color: var(--ui-sub); }
.home-chip:active { transform: scale(.97); }

/* Quiet footer chip under bottom sections (Hatchet n/8) */
.home-hatchet-foot {
  display: flex; justify-content: center; margin: 2px 0 -2px;
}
.home-chip-quiet {
  --c: transparent;
  min-height: 36px; padding: 4px 10px; gap: 6px;
  border-radius: 999px;
  border: 1px solid var(--ui-hairline);
  background: transparent;
  color: var(--ui-sub); font-size: 11.5px; font-weight: 650;
  box-shadow: none;
}
.home-chip-quiet .need-svg { width: 18px; height: 18px; opacity: 0.75; }
.home-chip-quiet .home-chip-count { font-size: 11px; font-weight: 650; color: var(--ui-sub); }
.home-chip-sep { font-weight: 500; opacity: 0.7; }
.home-chip-quiet:active { transform: scale(.98); opacity: 0.85; }
[data-theme="day"] .home-chip-quiet {
  color: #6b7268;
  border-color: rgba(26, 30, 24, 0.12);
  background: transparent;
}
[data-theme="day"] .home-chip-quiet .home-chip-count { color: #6b7268; }

/* Emergency strip: SOS + Back to camp side by side */
.home-sos-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.home-hub .home-sos-strip .need-btn-wide { min-height: 64px; padding: 8px 10px 8px 8px; gap: 8px; }
.home-hub .home-sos-strip .need-btn.is-ice { padding-right: 10px; }
.home-hub .home-sos-strip .need-btn.is-ice::after { display: none; }
.home-hub .home-sos-strip .need-title { font-size: 15.5px; }
.home-sos-strip .need-sub {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
/* Hide quiet check-in when nothing is set; show when a timer is running */
.home-checkin-slot .checkin-home-banner.is-none { display: none; }

/* Five section tiles */
.home-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.home-sections .need-btn-compact { min-height: 74px; }
.home-sections > .need-btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
.home-section-head { margin: 2px 2px -4px; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ui-sub); display: flex; align-items: center; gap: 10px; }
.home-section-head::after { content: ''; flex: 1; height: 1px; background: var(--ui-hairline-strong); }
.home-hub.is-one-screen { gap: 10px; }
.home-hub.is-one-screen .home-disclaimer { margin: 0; font-size: 11px; text-align: center; opacity: 0.75; }
.home-hub.is-one-screen .home-hatchet-foot { margin-top: 4px; }

/* Layout B: Trip / Camp toggle */
.home-mode-row { display: flex; align-items: center; gap: 10px; }
.home-mode-row img { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; box-shadow: 0 0 0 1px var(--ui-hairline-strong); }
.home-mode-toggle {
  flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px;
  border-radius: 14px; background: var(--ui-surface); border: 1px solid var(--ui-hairline); box-shadow: var(--ui-elev);
}
.home-mode-toggle button {
  min-height: 44px; border: 0; border-radius: 10px; background: transparent;
  color: var(--ui-sub); font: inherit; font-size: 15px; font-weight: 800; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.home-mode-toggle button .need-svg { width: 24px; height: 24px; image-rendering: pixelated; shape-rendering: crispEdges; display: block; }
.home-mode-toggle button[aria-pressed="true"] {
  background: color-mix(in srgb, #ff8a52 18%, var(--ui-surface-press)); color: var(--ui-title);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #ff8a52 45%, transparent);
}
[data-theme="red"] .home-mode-toggle button[aria-pressed="true"] { background: #2a0a00; box-shadow: inset 0 0 0 1px rgba(255,107,43,.6); }
.home-mode-note { margin: -2px 2px 0; font-size: 12.5px; color: var(--ui-sub); }
.home-all-link {
  align-self: center; min-height: 44px; padding: 8px 18px;
  border-radius: 999px; border: 1px solid var(--ui-hairline-strong);
  background: transparent; color: var(--ui-title); font: inherit; font-size: 13.5px; font-weight: 800; cursor: pointer;
}
.home-all-link:active { transform: scale(.97); }
.home-mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.home-mode-grid .need-btn-compact { min-height: 66px; }
.home-mode-grid > .need-btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
[data-theme="day"] :is(.home-mini-bot, .home-mode-toggle, .home-chip:not(.home-chip-quiet), .home-all-link) {
  --ui-surface: #1e231d;
  --ui-surface-press: #283027;
  --ui-hairline: rgba(255, 255, 255, 0.07);
  --ui-hairline-strong: rgba(255, 255, 255, 0.14);
  --ui-elev: 0 1px 2px rgba(26, 30, 24, 0.18), 0 8px 18px -10px rgba(26, 30, 24, 0.45);
  --ui-title: #f1ece0;
  --ui-sub: #a9b0a1;
}
[data-theme="day"] .home-mini-bot {
  background: #1a1f19;
  border-color: color-mix(in srgb, #ff8a52 48%, rgba(255,255,255,0.14));
}
[data-theme="day"] .home-all-link { background: #1e231d; }

/* ===== Waypoints hero card ===== */
.home-wp-hero {
  --c: #f08a6a;
  position: relative;
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--c) 22%, transparent) 0%, transparent 60%),
    var(--ui-surface);
  border: 1.5px solid color-mix(in srgb, var(--c) 70%, transparent);
  box-shadow: var(--ui-elev), 0 0 0 3px color-mix(in srgb, var(--c) 12%, transparent);
  color: var(--ui-title);
}
[data-theme="red"] .home-wp-hero { --c: #ff6b2b; }
[data-theme="day"] .home-wp-hero {
  --ui-surface: #1e231d; --ui-surface-press: #283027;
  --ui-hairline: rgba(255,255,255,.07); --ui-hairline-strong: rgba(255,255,255,.14);
  --ui-elev: 0 1px 2px rgba(26,30,24,.18), 0 10px 22px -10px rgba(26,30,24,.5);
  --ui-title: #f1ece0; --ui-sub: #a9b0a1;
}
.wp-hero-main {
  display: flex; align-items: center; gap: 12px;
  padding: 0; border: 0; background: transparent; color: inherit;
  font: inherit; text-align: left; cursor: pointer; width: 100%;
}
.home-hub .home-wp-hero .wp-hero-icon { width: 56px; height: 56px; border-radius: 13px; }
.home-hub .home-wp-hero .wp-hero-icon .need-svg { width: 48px; height: 48px; }
.wp-hero-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.wp-hero-kicker { font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--c); }
.wp-hero-title { font-size: 17px; font-weight: 800; line-height: 1.2; color: var(--ui-title); margin-top: 1px; }
.wp-hero-sub { font-size: 12px; line-height: 1.3; color: var(--ui-sub); margin-top: 2px;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; }
.wp-hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wp-hero-btn {
  min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 12px; font: inherit; font-size: 14.5px; font-weight: 800; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
  background: color-mix(in srgb, var(--c) 10%, transparent); color: var(--ui-title);
}
.wp-hero-btn.is-primary { background: var(--c); border-color: var(--c); color: #1a120c; }
[data-theme="red"] .wp-hero-btn.is-primary { color: #160400; }
.wp-hero-btn:active { transform: scale(.97); }
.wp-hero-plus, .wp-hero-arrow { font-size: 17px; font-weight: 900; line-height: 1; }
.home-wp-hero.is-compact { padding: 10px; gap: 8px; }
.home-hub .home-wp-hero.is-compact .wp-hero-icon { width: 44px; height: 44px; }
.home-hub .home-wp-hero.is-compact .wp-hero-icon .need-svg { width: 32px; height: 32px; }
.home-wp-hero.is-compact .wp-hero-title { font-size: 15px; }
.home-wp-hero.is-compact .wp-hero-btn { min-height: 44px; font-size: 13.5px; }
/* Slim full-width SOS when it stands alone */
.home-hub .home-sos-solo .need-btn.is-ice { min-height: 54px; padding: 6px 12px 6px 8px; }
.home-hub .home-sos-solo .need-btn.is-ice .need-icon { width: 38px; height: 38px; }
.home-wp-hero.is-compact .wp-hero-sub { display: none; }
.home-b[data-mode="camp"] .home-mode-grid .need-btn-compact { min-height: 58px; padding-top: 8px; padding-bottom: 8px; }
/* Red mode: keep Home tile text red-on-black (no cream) */
[data-theme="red"] .home-hub .need-btn:not(.is-ice) .need-title,
[data-theme="red"] .home-hub .need-btn:not(.is-ice) .need-text { color: #ff8a5c; border-color: transparent; }
[data-theme="red"] .home-hub .need-btn:not(.is-ice) { color: #ff8a5c; }

/* Download for offline use banner */
.offline-dl:empty { display: none; }
.offline-dl { position: relative; padding: 14px 14px 12px; border-radius: 14px; background: #1f5f2e; color: #fff; border: 2px solid #ffd23f; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.offline-dl[data-state="done"] { background: #e9f5e6; color: #1d3d17; border-color: #4c8a3f; box-shadow: none; padding: 10px 14px; }
.offline-dl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.offline-dl-title { font-size: 17px; font-weight: 800; }
.offline-dl-info { margin: 6px 0 0; font-size: 13.5px; line-height: 1.35; }
.offline-dl-note { margin: 6px 0 0; font-size: 12px; opacity: .8; }
.offline-dl-row { display: flex; gap: 8px; margin-top: 10px; }
.offline-dl-btn { font: inherit; border: 0; border-radius: 12px; cursor: pointer; }
.offline-dl-btn.is-main { flex: 1; min-height: 52px; font-size: 17px; font-weight: 800; background: #ffd23f; color: #1a1a1a; }
.offline-dl-btn.is-main:active { transform: scale(.98); }
.offline-dl-btn.is-quiet { min-height: 44px; padding: 0 18px; background: rgba(255,255,255,.18); color: inherit; font-weight: 700; }
.offline-dl-btn.is-x { min-width: 44px; min-height: 44px; background: transparent; color: inherit; font-size: 18px; opacity: .8; }
.offline-dl-prog { margin-top: 10px; height: 10px; border-radius: 5px; background: rgba(255,255,255,.25); overflow: hidden; }
.offline-dl-fill { display: block; height: 100%; width: 0; background: #ffd23f; transition: width .2s; }
.lib-screen > .offline-dl { margin-bottom: 12px; }

.home-tip-next { margin-top: 6px; padding: 2px 0; background: none; border: 0; color: #ff8a52; font-size: 12.5px; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.home-mini-bot-tip { display: block !important; -webkit-line-clamp: unset !important; line-clamp: unset !important; overflow: visible !important; white-space: normal !important; text-overflow: clip !important; font-size: 14.5px !important; line-height: 1.35 !important; font-weight: 600; }
