/* ═══════════════════════════════════════════════════════════════════════════
   J-Bot Home — the mobile command chair (Wave 1 of the native-PWA build).
   Zones you glance at + one drawer grammar for everything else. Rendered as the
   5th chat-slim mode (body.is-mode-home), flag-gated by window.jbotHomeMode().

   Fully self-contained: every class is `hm-`-prefixed and scoped under
   .home-panel, so nothing here can collide with the chat/study/tabletop CSS.
   Design ported from the approved v3 prototype (artifact 6736f384). Inherits Pro
   UI tokens where present, falls back to the prototype palette.
   ═══════════════════════════════════════════════════════════════════════════ */

.home-panel {
  --hm-base: var(--pro-base, #060a10);
  --hm-panel: var(--pro-panel, #0b111a);
  --hm-panel-2: #0e1826;
  --hm-cyan: var(--pro-spine-cyan, #22d3ee);
  --hm-glow: var(--pro-glow-cyan, #5cf0ff);
  --hm-deep: var(--pro-deep-cyan, #12b6cf);
  --hm-green: var(--pro-success, #4ade80);
  --hm-amber: var(--pro-amber, #f0b64d);
  --hm-red: var(--pro-danger, #f0555f);
  --hm-fin: var(--pro-finance, #43e0a3);
  --hm-social: var(--pro-social, #f281c0);
  --hm-violet: var(--pro-tabletop, #b39cf9);
  --hm-study: var(--pro-study, #5cc7f6);
  --hm-text: var(--pro-text, #e8eef2);
  --hm-muted: var(--pro-text-muted, #8996a0);
  --hm-faint: #5a6c72;
  --hm-line: rgba(90, 150, 190, .13);
  --hm-line-2: rgba(90, 150, 190, .22);
  --hm-mono: var(--pro-font-mono, ui-monospace, "JetBrains Mono", Consolas, monospace);

  display: none;              /* shown only under body.is-mode-home (below) */
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  color: var(--hm-text);
  padding: 14px 15px 26px;
  gap: 16px;
}
.home-panel.hidden { display: none; }

/* ── mode integration (the ONLY rules that reach outside .home-panel) ──────── */
body.is-mode-home .jbot-presence-card,
body.is-mode-home .chat-stage,
body.is-mode-home .composer-wrap,
body.is-mode-home .study-panel,
body.is-mode-home .tabletop-panel,
body.is-mode-home .social-panel,
body.is-mode-home .botspot-panel,
body.is-mode-home .welcome-state { display: none !important; }
body.is-mode-home .home-panel { display: flex; }
/* Belt-and-suspenders: home-panel never shows while another mode owns the body. */
body.is-mode-study .home-panel,
body.is-mode-tabletop .home-panel,
body.is-mode-social .home-panel,
body.is-mode-botspot .home-panel { display: none !important; }

/* Menu discoverability — the "Home (command chair)" entry in the Modes menu is
   hidden until Home mode is enabled (pro-home.js stamps body.hm-enabled when the
   jbotHomeMode() flag is on). Flag off ⇒ no menu entry, byte-identical. */
.hm-nav-entry { display: none !important; }
body.hm-enabled .hm-nav-entry { display: block !important; }

/* ── persistent bottom tab bar (installed-app nav; the way BACK to the chair) ─
   Injected by pro-home.js onto <body> when hm-enabled, so it's a fixed overlay
   above every mode. Browser / flag-off ⇒ never rendered. */
.hm-tabbar { display: none; }
body.hm-enabled .hm-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: flex;
  background: rgba(6, 10, 16, .97); border-top: 1px solid rgba(90, 150, 190, .16);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.hm-tabbar .hm-tab {
  flex: 1; background: none; border: none; color: #8996a0;  /* AA-legible inactive label */
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif; font-size: 10px;
  letter-spacing: .03em; cursor: pointer; display: flex; flex-direction: column;
  align-items: center; gap: 3px; padding: 5px 0; -webkit-tap-highlight-color: transparent;
  transition: color .16s;
}
.hm-tabbar .hm-tab .hm-tab-ic { font-size: 19px; line-height: 1; }
.hm-tabbar .hm-tab.on { color: var(--pro-spine-cyan, #22d3ee); }
.hm-tabbar .hm-tab.on .hm-tab-ic { filter: drop-shadow(0 0 8px rgba(34, 211, 238, .5)); }

/* ── ONE clearance system for the fixed bar ────────────────────────────────────
   The bar's real height GROWS with the gesture-nav safe-area inset. A flat 56px
   left the composer / study Submit-Next / tabletop composer / bottom sheets
   clipped behind it on gesture-nav phones. Everything that must sit above the bar
   reserves var(--hm-tabbar-h) so it tracks the bar's true height. */
:root { --hm-tabbar-h: calc(56px + env(safe-area-inset-bottom)); }
body.hm-enabled .home-panel { padding-bottom: calc(var(--hm-tabbar-h) + 18px); }
body.hm-enabled .composer-wrap { margin-bottom: var(--hm-tabbar-h); }
/* The OTHER modes' panels live in the shared .chat-shell and reached the viewport
   bottom with zero clearance — the bar painted over their last ~56px, making the
   study Submit/Next + tabletop/botspot composers unreachable. Reserve the bar. */
@media (max-width: 767px) {
  body.hm-enabled .study-panel,
  body.hm-enabled .tabletop-panel,
  body.hm-enabled .social-panel,
  body.hm-enabled .botspot-panel { padding-bottom: var(--hm-tabbar-h); }
  /* Home-mode bottom sheet + toast float ABOVE the bar (their action rows were
     occluded by it). */
  body.hm-enabled .home-panel .hm-sheet { bottom: var(--hm-tabbar-h); }
  body.hm-enabled .home-panel .hm-toast { bottom: calc(var(--hm-tabbar-h) + 14px); z-index: 95; }
}

/* Tab-bar toast: a body-level sibling of #hm-tabbar so feedback shows in EVERY
   mode (the chair's own #hm-toast is display:none outside Home). Sits above the bar. */
.hm-tabbar-toast {
  position: fixed; left: 50%; bottom: calc(var(--hm-tabbar-h) + 12px);
  transform: translateX(-50%) translateY(10px); z-index: 96;
  background: rgba(9, 16, 24, .97); border: 1px solid rgba(34, 211, 238, .35);
  color: var(--pro-spine-cyan, #22d3ee); font-size: 12.5px; font-weight: 560;
  padding: 9px 15px; border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
  opacity: 0; pointer-events: none; transition: .3s; max-width: 82%; text-align: center;
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
}
.hm-tabbar-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Keyboard/switch-access focus indicator (dark theme had none). */
.home-panel .hm-watch:focus-visible,
.home-panel .hm-pill:focus-visible,
.home-panel .hm-chip:focus-visible,
.home-panel .hm-qa-btn:focus-visible,
.home-panel .hm-btn:focus-visible,
.home-panel .hm-btn-wide:focus-visible,
.home-panel .hm-metric-seg button:focus-visible,
.hm-tabbar .hm-tab:focus-visible {
  outline: 2px solid var(--hm-glow, #5cf0ff); outline-offset: 2px; border-radius: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE POLISH — bring chat-slim's Chat view + side panels up to the
   command-chair's phone bar. Loaded LAST (after chat-slim.css + pro-chatroom.css),
   so these win the cascade without editing the desktop-first rules. Every block
   is gated so ≥768px stays byte-identical to today. Reversible via jbot_pro_ui.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── PHONE (<768px): the layout flips (matches JS MOBILE_MEDIA + scrim gate) ── */
@media (max-width: 767px) {
  /* Persona portrait dominates the phone — reclaim the screen for content. */
  .jbot-presence-card,
  body.pro-chatroom .jbot-presence-card { display: none !important; }
  .chat-shell,
  body.pro-chatroom .chat-shell { padding-left: 14px !important; padding-right: 14px !important; }

  /* Side panels: desktop RIGHT-dock card → full-bleed BOTTOM SHEET. */
  .chat-panels,
  body.pro-chatroom .chat-panels {
    top: auto; left: 0; right: 0; bottom: 0; width: auto;
    height: min(88dvh, calc(100dvh - 72px));
    border-radius: 22px 22px 0 0;
    transform: translateY(110%);           /* slide up, not in from the right */
  }
  .chat-panels.is-open,
  body.pro-chatroom .chat-panels.is-open { transform: translateY(0); }
  .war-room-frame-wrap { min-height: 0; flex: 1; }   /* iframe fills the sheet */

  /* Mode-chip rail: real horizontal scroll + edge fade (was clipping). */
  .composer-mode-rail,
  body.pro-chatroom .composer-mode-rail {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
  }
  .composer-mode-rail::-webkit-scrollbar { display: none; }

  /* Safe-area: clear the gesture bar under the composer. */
  body.pro-chatroom .chat-shell { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
}

/* ── installed app only: the side-sheet must clear the fixed bar (inset-aware) ── */
@media (max-width: 767px) {
  body.hm-enabled .chat-panels {
    bottom: var(--hm-tabbar-h); height: min(88dvh, calc(100dvh - var(--hm-tabbar-h) - 72px));
  }
}

/* ── SMALL PHONE (<521px): tighten hero + topbar ── */
@media (max-width: 520px) {
  .welcome-state { margin-top: 4vh; }
  .welcome-state h1,
  body.pro-chatroom .welcome-state h1 { font-size: 1.5rem; }
  .topbar { gap: 6px; }
  .topbar-model-chip { max-width: 108px; font-size: 0.64rem; }
}

/* ── TOUCH targets: ≥44px (safe on desktop; also helps touch laptops) ── */
@media (pointer: coarse) {
  .composer-icon, .composer-send,
  body.pro-chatroom .composer-icon, body.pro-chatroom .composer-send { width: 44px; height: 44px; }
  .composer-mode-chip, body.pro-chatroom .composer-mode-chip { min-height: 38px; }
  .welcome-chip { min-height: 44px; }
  /* command-chair controls were below the 44px target under coarse pointers */
  .home-panel .hm-chip, .home-panel .hm-qa-btn, .home-panel .hm-pill { min-height: 44px; }
  .home-panel .hm-metric-seg button { min-height: 34px; padding: 7px 12px; }
  .hm-tabbar .hm-tab { min-height: 48px; }
}

/* ── section labels ───────────────────────────────────────────────────────── */
.home-panel .hm-lbl {
  font-family: var(--hm-mono); font-size: 10px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--hm-faint);
  margin: 0 2px 9px; display: flex; justify-content: space-between; align-items: center;
}
.home-panel .hm-lbl .hm-cnt { color: var(--hm-cyan); }
.home-panel .hm-sec { margin: 0; }

/* ── watch strip ──────────────────────────────────────────────────────────── */
.home-panel .hm-watch {
  display: flex; align-items: center; gap: 9px; padding: 9px 12px;
  border: 1px solid var(--hm-line); background: rgba(9, 16, 24, .5);
  border-radius: 12px; cursor: pointer; transition: .16s;
}
.home-panel .hm-watch:active { transform: scale(.99); }
.home-panel .hm-watch-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--hm-green); box-shadow: 0 0 8px var(--hm-green);
}
.home-panel .hm-watch.warn .hm-watch-dot { background: var(--hm-amber); box-shadow: 0 0 8px var(--hm-amber); }
.home-panel .hm-watch.crit { border-color: rgba(240, 85, 95, .5); background: rgba(240, 85, 95, .09); }
.home-panel .hm-watch.crit .hm-watch-dot { background: var(--hm-red); box-shadow: 0 0 9px var(--hm-red); }
.home-panel .hm-watch-txt {
  flex: 1; min-width: 0; font-size: 12px; color: var(--hm-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.home-panel .hm-watch-txt b { color: var(--hm-text); font-weight: 600; }
.home-panel .hm-watch-txt .hm-sep { color: var(--hm-faint); margin: 0 5px; }
.home-panel .hm-watch-chev { color: var(--hm-faint); font-size: 14px; flex: none; }

/* ── needs-you cards ──────────────────────────────────────────────────────── */
.home-panel .hm-card {
  background: linear-gradient(180deg, var(--hm-panel-2), var(--hm-panel));
  border: 1px solid var(--hm-line-2); border-radius: 16px; padding: 14px;
  display: flex; flex-direction: column; gap: 11px; transition: .4s;
}
.home-panel .hm-card + .hm-card { margin-top: 10px; }
.home-panel .hm-card-top { display: flex; align-items: flex-start; gap: 11px; }
.home-panel .hm-card-dot {
  width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex: none;
  background: var(--hm-amber); box-shadow: 0 0 9px var(--hm-amber);
}
.home-panel .hm-card-body { flex: 1; min-width: 0; }
.home-panel .hm-card-t { font-weight: 620; font-size: 14px; }
.home-panel .hm-card-d { font-size: 12.5px; color: var(--hm-muted); margin-top: 3px; line-height: 1.45; }
.home-panel .hm-card-acts { display: flex; gap: 8px; }
.home-panel .hm-btn {
  flex: 1; border: none; border-radius: 11px; padding: 11px; font-weight: 640;
  font-size: 13px; cursor: pointer; transition: .18s; -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}
.home-panel .hm-btn-go { background: linear-gradient(180deg, var(--hm-glow), var(--hm-deep)); color: #04141a; box-shadow: 0 6px 16px rgba(34, 211, 238, .28); }
.home-panel .hm-btn-go:active { transform: translateY(1px); }
.home-panel .hm-btn-ghost { background: rgba(255, 255, 255, .04); color: var(--hm-muted); border: 1px solid var(--hm-line); }
.home-panel .hm-card.done { border-color: rgba(74, 222, 128, .4); }
.home-panel .hm-card.done .hm-card-dot { background: var(--hm-green); box-shadow: 0 0 9px var(--hm-green); }
.home-panel .hm-card.done .hm-card-acts { display: none; }
.home-panel .hm-done-note { display: none; align-items: center; gap: 7px; font-size: 12.5px; color: var(--hm-green); font-weight: 600; }
.home-panel .hm-card.done .hm-done-note { display: flex; }
.home-panel .hm-empty { font-size: 12.5px; color: var(--hm-muted); padding: 6px 2px; }

/* ── money ────────────────────────────────────────────────────────────────── */
.home-panel .hm-money { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.home-panel .hm-tile { background: var(--hm-panel); border: 1px solid var(--hm-line); border-radius: 14px; padding: 12px 12px 13px; min-width: 0; }
.home-panel .hm-tile.wide { grid-column: 1 / -1; }
.home-panel .hm-tile-k {
  font-family: var(--hm-mono); font-size: 9.5px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--hm-faint); display: flex; align-items: center; gap: 6px;
}
.home-panel .hm-tile-k .hm-swatch { width: 7px; height: 7px; border-radius: 2px; }
.home-panel .hm-tile-v { font-family: var(--hm-mono); font-size: 17px; font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; }
.home-panel .hm-tile-s { font-size: 10.5px; color: var(--hm-muted); margin-top: 2px; }
.home-panel .hm-carry-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.home-panel .hm-fresh {
  font-family: var(--hm-mono); font-size: 9px; letter-spacing: .04em; display: inline-flex;
  align-items: center; gap: 5px; padding: 3px 7px; border-radius: 7px; white-space: nowrap;
}
.home-panel .hm-fresh.live { color: var(--hm-green); background: rgba(74, 222, 128, .1); border: 1px solid rgba(74, 222, 128, .25); }
.home-panel .hm-fresh.stale { color: var(--hm-amber); background: rgba(240, 182, 77, .1); border: 1px solid rgba(240, 182, 77, .25); }
.home-panel .hm-fresh .hm-fdot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
.home-panel .hm-metric-seg { display: inline-flex; gap: 2px; margin-top: 9px; padding: 2px; background: rgba(255, 255, 255, .04); border: 1px solid var(--hm-line); border-radius: 9px; }
.home-panel .hm-metric-seg button { border: none; background: none; color: var(--hm-faint); font-family: var(--hm-mono); font-size: 9.5px; letter-spacing: .04em; padding: 4px 8px; border-radius: 7px; cursor: pointer; }
.home-panel .hm-metric-seg button.on { background: rgba(34, 211, 238, .14); color: var(--hm-cyan); }
.home-panel .hm-spark { margin-top: 9px; width: 100%; height: 36px; display: block; }

/* ── drawer rail ──────────────────────────────────────────────────────────── */
.home-panel .hm-rail { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.home-panel .hm-rail::-webkit-scrollbar { display: none; }
.home-panel .hm-pill {
  position: relative; flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 70px; padding: 11px 6px 10px; background: var(--hm-panel); border: 1px solid var(--hm-line);
  border-radius: 14px; color: var(--hm-text); cursor: pointer; transition: .16s;
  -webkit-tap-highlight-color: transparent;
}
.home-panel .hm-pill:active { transform: scale(.96); border-color: var(--hm-line-2); }
.home-panel .hm-pill-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 16px; background: rgba(34, 211, 238, .1); color: var(--hm-cyan); }
.home-panel .hm-pill-n { font-size: 10.5px; font-weight: 560; white-space: nowrap; }
.home-panel .hm-pill-badge {
  position: absolute; top: 7px; right: 9px; min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 8px; font-family: var(--hm-mono); font-size: 9px; font-weight: 700; display: grid;
  place-items: center; color: #04141a; background: var(--hm-amber);
}
.home-panel .hm-pill-badge.ok { background: var(--hm-green); }
.home-panel .hm-pill-badge.crit { background: var(--hm-red); color: #fff; }

/* ── smart chips + quick actions ──────────────────────────────────────────── */
.home-panel .hm-chips { display: flex; gap: 8px; overflow-x: auto; padding: 1px 2px 5px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.home-panel .hm-chips::-webkit-scrollbar { display: none; }
.home-panel .hm-chip {
  flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px;
  background: linear-gradient(180deg, rgba(34, 211, 238, .08), rgba(34, 211, 238, .03));
  border: 1px solid var(--hm-line-2); border-radius: 20px; color: var(--hm-text);
  font-size: 12.5px; font-weight: 540; cursor: pointer; white-space: nowrap;
  -webkit-tap-highlight-color: transparent; font-family: inherit; transition: .16s;
}
.home-panel .hm-chip:active { transform: scale(.97); }
.home-panel .hm-qa { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 4px; }
.home-panel .hm-qa-btn {
  display: flex; align-items: center; gap: 10px; background: var(--hm-panel); border: 1px solid var(--hm-line);
  border-radius: 13px; padding: 12px; color: var(--hm-text); font-size: 13px; font-weight: 560; cursor: pointer;
  text-align: left; -webkit-tap-highlight-color: transparent; font-family: inherit; transition: .16s;
}
.home-panel .hm-qa-btn:active { transform: scale(.98); }
.home-panel .hm-qa-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 14px; background: rgba(34, 211, 238, .1); color: var(--hm-cyan); flex: none; }

/* ── bottom sheet (reusable drawer grammar) ───────────────────────────────── */
.home-panel .hm-scrim { position: absolute; inset: 0; background: rgba(3, 6, 10, .66); opacity: 0; pointer-events: none; transition: .3s; z-index: 60; }
.home-panel .hm-scrim.show { opacity: 1; pointer-events: auto; }
.home-panel .hm-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 65; background: var(--hm-panel);
  border-top: 1px solid var(--hm-line-2); border-radius: 22px 22px 0 0; transform: translateY(105%);
  transition: transform .34s cubic-bezier(.22, .75, .3, 1); padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
  max-height: 82%; overflow-y: auto;
}
.home-panel .hm-sheet.show { transform: translateY(0); }
.home-panel .hm-grab { width: 38px; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, .16); margin: 8px auto 14px; }
.home-panel .hm-sheet-h { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.home-panel .hm-sheet-h .hm-sh-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 15px; background: rgba(34, 211, 238, .1); color: var(--hm-cyan); flex: none; }
.home-panel .hm-sheet-h b { font-size: 15px; flex: 1; }

.home-panel .hm-dev-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 14px; }
.home-panel .hm-dev-stat { background: var(--hm-panel-2); border: 1px solid var(--hm-line); border-radius: 12px; padding: 11px; position: relative; overflow: hidden; }
.home-panel .hm-dev-stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--hm-sc, var(--hm-cyan)); }
.home-panel .hm-dev-k { font-family: var(--hm-mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--hm-faint); }
.home-panel .hm-dev-v { font-family: var(--hm-mono); font-size: 16px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; }
.home-panel .hm-dev-s { font-size: 10px; color: var(--hm-muted); margin-top: 1px; }

.home-panel .hm-email { background: #070c13; border: 1px solid var(--hm-line); border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.home-panel .hm-email-sub { padding: 11px 13px; border-bottom: 1px solid var(--hm-line); font-size: 13px; font-weight: 600; }
.home-panel .hm-email-sub span { display: block; font-family: var(--hm-mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--hm-faint); font-weight: 400; margin-bottom: 3px; }
.home-panel .hm-email-body { margin: 0; padding: 13px; font-family: var(--hm-mono); font-size: 11px; line-height: 1.6; color: #c7d2da; white-space: pre-wrap; word-break: break-word; max-height: 240px; overflow-y: auto; }
.home-panel .hm-honesty { display: flex; align-items: flex-start; gap: 8px; font-size: 11px; color: var(--hm-muted); background: rgba(74, 222, 128, .06); border: 1px solid rgba(74, 222, 128, .18); border-radius: 10px; padding: 9px 11px; margin-bottom: 12px; line-height: 1.45; }
.home-panel .hm-honesty .hm-hi { color: var(--hm-green); flex: none; }
.home-panel .hm-sheet-acts { display: flex; gap: 8px; }

.home-panel .hm-stat-row { display: flex; align-items: center; gap: 11px; padding: 11px 2px; border-bottom: 1px solid var(--hm-line); }
.home-panel .hm-stat-row:last-of-type { border-bottom: none; }
.home-panel .hm-stat-row .hm-sr-k { flex: 1; font-size: 13px; font-weight: 530; }
.home-panel .hm-stat-row .hm-sr-k small { display: block; font-size: 10.5px; color: var(--hm-faint); font-weight: 400; margin-top: 2px; }
.home-panel .hm-stat-row .hm-sr-v { font-family: var(--hm-mono); font-size: 12.5px; color: var(--hm-cyan); font-variant-numeric: tabular-nums; }
.home-panel .hm-stat-row .hm-sr-v.g { color: var(--hm-green); }
.home-panel .hm-stat-row .hm-sr-v.a { color: var(--hm-amber); }
.home-panel .hm-btn-wide { width: 100%; margin-top: 12px; border: 1px solid var(--hm-line-2); background: rgba(34, 211, 238, .06); color: var(--hm-cyan); border-radius: 12px; padding: 12px; font-weight: 600; font-size: 13px; cursor: pointer; font-family: inherit; }
.home-panel .hm-searchbar { display: flex; align-items: center; gap: 9px; background: rgba(255, 255, 255, .04); border: 1px solid var(--hm-line-2); border-radius: 12px; padding: 10px 13px; margin-bottom: 12px; }
.home-panel .hm-searchbar span { color: var(--hm-faint); font-size: 15px; }
.home-panel .hm-searchbar input { flex: 1; background: none; border: none; outline: none; color: var(--hm-text); font-family: inherit; font-size: 13.5px; }
.home-panel .hm-everything-note { font-size: 11px; color: var(--hm-faint); text-align: center; padding: 12px 6px 2px; line-height: 1.5; }

/* ── toast ────────────────────────────────────────────────────────────────── */
.home-panel .hm-toast {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(14px); z-index: 70;
  background: rgba(9, 16, 24, .96); border: 1px solid rgba(34, 211, 238, .35); color: var(--hm-cyan);
  font-size: 12.5px; font-weight: 560; padding: 9px 15px; border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: .3s; max-width: 82%; text-align: center;
}
.home-panel .hm-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* desktop: the same components reflow wider */
@media (min-width: 768px) {
  .home-panel { max-width: 720px; margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .home-panel *, .hm-tabbar, .hm-tabbar *, .hm-tabbar-toast {
    animation: none !important; transition: none !important;
  }
}
