/* ============================================================
   VibePet — HIGH-FIDELITY NOTCH GEOMETRY
   Real MacBook display chrome + carved-out unified capsule.
   ============================================================ */

:root {
  /* Notch capsule — sized to match a real macOS notch: ~½ the previous wide pill,
     and the same height as our menubar so the camera bar tucks in flush. */
  --notch-total-w: 188px;
  --notch-total-h: 26px;
  --notch-camera-w: 120px;
  --notch-radius-top: 4px;
  --notch-radius-bottom: 10px;
  --notch-anti-radius: 8px;

  /* island palette — locked to the dark capsule regardless of page theme */
  --hf-text:       #f5f5f7;
  --hf-text-dim:   #a1a1aa;
  --hf-text-faint: #6b6b73;
  --hf-divider:    rgba(255,255,255,0.08);
  --hf-card-bg:    rgba(20,20,22,0.85);
  --hf-blue:       #006bff;
  --hf-green:      #00d6a3;
  --hf-yellow:     #f5b301;
  --hf-orange:     #ff9b3d;
  --hf-red:        #ff4d5e;
  --hf-purple:     #8b5cf6;
}

/* ─── Display chrome ─────────────────────────────────────── */
.hf-display {
  position: relative;
  background: #000;
  overflow: hidden;
  isolation: isolate;
  margin: 0 auto;
}
.hf-display.macbook {
  border-radius: 22px 22px 8px 8px;
  box-shadow:
    0 0 0 6px #2a2a2e,
    0 0 0 7px #45454a,
    0 30px 80px -20px rgba(0,0,0,0.7),
    0 12px 32px -12px rgba(0,0,0,0.4);
}
.hf-display.external {
  border-radius: 12px;
  box-shadow:
    0 0 0 8px #1a1a1d,
    0 0 0 9px #2a2a2e,
    0 30px 80px -20px rgba(0,0,0,0.7);
}

.hf-display .wallpaper {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 600px at 18% -10%, #1a3a6e 0%, transparent 55%),
    radial-gradient(900px 500px at 88% 26%, #5a2466 0%, transparent 55%),
    radial-gradient(700px 400px at 50% 110%, #1f4b3c 0%, transparent 60%),
    linear-gradient(180deg, #0a1428 0%, #0a0a14 100%);
}
.hf-display[data-wallpaper="warm"] .wallpaper {
  background:
    radial-gradient(900px 500px at 70% -5%, #6e3a1a 0%, transparent 55%),
    radial-gradient(700px 400px at 20% 80%, #2a1a4a 0%, transparent 60%),
    linear-gradient(180deg, #1a0e08 0%, #0a0a14 100%);
}
.hf-display[data-wallpaper="mono"] .wallpaper {
  background: linear-gradient(180deg, #0e0e12 0%, #050507 100%);
}

/* Menu bar */
.hf-menubar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px 0 calc(50% + var(--notch-total-w) / 2 + 16px);
  font-size: 11px;
  color: rgba(255,255,255,0.92);
  background: rgba(0,0,0,0.28);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  z-index: 10;
  font-family: var(--font-display, -apple-system, sans-serif);
  letter-spacing: 0.005em;
}
.hf-menubar-left {
  position: absolute;
  left: 14px; top: 0; bottom: 0;
  right: calc(50% + var(--notch-total-w) / 2 + 8px);
  display: flex; align-items: center; gap: 14px;
  font-size: 12px;
  overflow: hidden;
}
.hf-menubar-left .apple-glyph { width: 12px; height: 12px; display: inline-grid; place-items: center; opacity: 0.95; }
.hf-menubar-left .item { font-weight: 600; }
.hf-menubar-left .item.dim { font-weight: 400; opacity: 0.78; }
.hf-menubar-right {
  display: flex; align-items: center; gap: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Code window mock */
.hf-window {
  position: absolute;
  background: rgba(18,18,22,0.78);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px -10px rgba(0,0,0,0.5);
  overflow: hidden;
}
.hf-window .titlebar {
  height: 22px;
  background: rgba(28,28,32,0.6);
  display: flex; align-items: center; gap: 6px;
  padding: 0 10px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.hf-window .titlebar .dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.hf-window .titlebar .dot.r { background: #ff5f57; }
.hf-window .titlebar .dot.y { background: #febc2e; }
.hf-window .titlebar .dot.g { background: #28c840; }
.hf-window .titlebar .name {
  color: rgba(255,255,255,0.5);
  font-size: 10px;
  margin-left: 8px;
  font-family: var(--font-mono, ui-monospace, monospace);
}
.hf-window .body {
  padding: 12px 14px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 10.5px;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
}
.hf-window .body .k { color: #c586c0; }
.hf-window .body .s { color: #ce9178; }
.hf-window .body .f { color: #dcdcaa; }
.hf-window .body .c { color: #6a9955; }
.hf-window .body .n { color: #b5cea8; }

/* Dock */
.hf-dock {
  position: absolute;
  left: 50%; bottom: 8px;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  padding: 6px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  z-index: 5;
}
.hf-dock .app {
  width: 28px; height: 28px; border-radius: 7px;
  background: linear-gradient(135deg, #4d8eff, #2a4a8e);
}
.hf-dock .app.b { background: linear-gradient(135deg, #d97757, #8e3a22); }
.hf-dock .app.c { background: linear-gradient(135deg, #00d6a3, #007a5a); }
.hf-dock .app.d { background: linear-gradient(135deg, #f5b301, #8e6602); }
.hf-dock .app.e { background: linear-gradient(135deg, #8b5cf6, #4a2a8a); }

/* Wrapper that lets a caption sit above the display without
   colliding with the menu bar */
.hf-display-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
}
.hf-display-wrap .hf-display-caption {
  position: static;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  align-self: flex-start;
  padding-left: 4px;
}
[data-theme="light"] .hf-display-wrap .hf-display-caption {
  color: rgba(10, 10, 10, 0.55);
}

/* Scene label/hint */
.hf-scene-hint {
  position: absolute;
  top: 8px;
  left: 12px;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.36);
  font-family: var(--font-mono, ui-monospace, monospace);
  z-index: 12;
  pointer-events: none;
}

/* ─── Notch wrap + anti-fillets ──────────────────────────── */
.hf-notch-wrap {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  justify-content: center;
}

/* The concave outward curls where the notch's BOTTOM corners meet the bezel.
   Hidden — they read as stray dark blotches on a colored wallpaper, and the
   notch reads cleanly without them at this scale. */
.hf-notch-wrap::before,
.hf-notch-wrap::after {
  display: none;
}

/* Hide the anti-fillets when expanded grows wider than the notch */
.hf-notch-wrap.expanded::before,
.hf-notch-wrap.expanded::after {
  display: none;
}

/* ─── Live island wrap ───────────────────────────────────── */
.hf-live-island {
  display: flex;
  justify-content: center;
}

/* ─── Base island (collapsed) ────────────────────────────── */
.hf-island {
  background: #000;
  color: #fff;
  border-radius: var(--notch-radius-top) var(--notch-radius-top) var(--notch-radius-bottom) var(--notch-radius-bottom);
  display: flex;
  align-items: center;
  height: var(--notch-total-h);
  padding: 0 10px;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  position: relative;
  font-family: var(--font-display, -apple-system, sans-serif);
  transition:
    width 0.4s cubic-bezier(0.32, 0.72, 0.2, 1.0),
    min-height 0.4s cubic-bezier(0.32, 0.72, 0.2, 1.0),
    border-radius 0.4s cubic-bezier(0.32, 0.72, 0.2, 1.0);
}

.hf-island.collapsed {
  width: var(--notch-total-w);
  min-width: var(--notch-total-w);
  max-width: var(--notch-total-w);
  height: var(--notch-total-h);
  box-sizing: border-box;
}

/* MacBook unified collapsed capsule: black pill swallowing the real notch */
.hf-island.collapsed.macbook-unified {
  display: flex;
  align-items: stretch;
  padding: 0;
  gap: 0;
  background: #000;
}
.hf-island.collapsed.macbook-unified .wing {
  display: flex;
  align-items: center;
  height: var(--notch-total-h);
  flex: 1 1 0;
  min-width: 0;
  padding: 0 6px;
  gap: 4px;
  background: #000;
  overflow: hidden;
}
.hf-island.collapsed.macbook-unified .wing.left {
  border-top-left-radius: var(--notch-radius-top);
  border-bottom-left-radius: var(--notch-radius-bottom);
  justify-content: center;
}
.hf-island.collapsed.macbook-unified .wing.right {
  border-top-right-radius: var(--notch-radius-top);
  border-bottom-right-radius: var(--notch-radius-bottom);
  justify-content: center;
}
.hf-island.collapsed.macbook-unified .notch-cutout {
  background: #000;
  height: var(--notch-total-h);
  width: var(--notch-camera-w);
  flex: 0 0 var(--notch-camera-w);
  position: relative;
}
.hf-island.collapsed.macbook-unified .notch-cutout::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #0a0a0a;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

/* Virtual (external) variant — single capsule, identical footprint */
.hf-island.virtual {
  background: #0a0a0c;
  box-shadow: inset 0 0 0 0.5px rgba(255,255,255,0.06);
  justify-content: center;
  padding: 0 14px;
  gap: 8px;
  overflow: hidden;
}

/* Inline atoms */
.hf-island .pet-img {
  width: 18px;
  height: 18px;
  image-rendering: pixelated;
  flex-shrink: 0;
}
.hf-island .tool-dot {
  width: 6px; height: 6px; border-radius: 50%;
  flex-shrink: 0;
}
.hf-island .ticker {
  font-weight: 500;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.hf-island .ticker.tool-name { font-weight: 600; }
.hf-island .ticker.label { color: rgba(255,255,255,0.62); font-weight: 400; margin-left: 2px; }
.hf-island .approval-chip {
  font-size: 10px; font-weight: 600;
  padding: 1.5px 6px; border-radius: 999px;
  color: var(--hf-yellow);
  background: rgba(245,179,1,0.16);
  border: 1px solid rgba(245,179,1,0.34);
  margin-left: 2px;
}
.hf-island .time-tag {
  font-size: 10px;
  color: rgba(255,255,255,0.36);
  font-variant-numeric: tabular-nums;
  margin-left: 2px;
}

/* Usage mini bar */
.hf-usage-mini {
  display: inline-flex; align-items: center; gap: 6px;
  font-variant-numeric: tabular-nums;
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  font-family: var(--font-mono, ui-monospace, monospace);
}
.hf-usage-mini .bar {
  width: 36px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,0.15);
  overflow: hidden;
}
.hf-usage-mini .bar > span {
  display: block; height: 100%; border-radius: 2px;
  transition: width 0.3s ease;
}
.hf-usage-mini.stacked {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.hf-usage-mini.stacked .lbl {
  font-size: 9px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: rgba(255,255,255,0.55); line-height: 1;
}
.hf-usage-mini.stacked .row {
  display: inline-flex; align-items: center; gap: 5px; font-size: 10px;
}
.hf-usage-mini.stacked .bar { width: 28px; height: 3px; }

/* ─── Expanded panel ─────────────────────────────────────── */
.hf-island.expanded {
  width: 540px;
  min-width: 540px;
  max-width: 540px;
  height: auto;
  min-height: 480px;
  border-radius: var(--notch-radius-top) var(--notch-radius-top) 28px 28px;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  gap: 0;
  font-size: 13px;
  background: #050505;
  box-shadow: 0 24px 80px -10px rgba(0,0,0,0.7);
}

.exp-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--hf-divider);
}
.exp-top-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.exp-top-tool { font-weight: 600; font-size: 13px; }
.exp-top-text { color: var(--hf-text); font-size: 12px; opacity: 0.92; }
.exp-top-right { display: flex; align-items: center; gap: 8px; }

.exp-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  position: relative;
}
.exp-pulse::after {
  content: ""; position: absolute; inset: -2px;
  border-radius: 50%; border: 1px solid currentColor;
  opacity: 0.5;
  animation: hf-pulse 1.6s ease-out infinite;
}
@keyframes hf-pulse {
  0%   { transform: scale(0.6); opacity: 0.7; }
  100% { transform: scale(2.2); opacity: 0; }
}

.exp-icon-btn {
  width: 24px; height: 24px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; color: var(--hf-text-dim);
  border: 0; cursor: pointer;
  transition: all 150ms ease;
}
.exp-icon-btn:hover { background: rgba(255,255,255,0.06); color: var(--hf-text); }
.exp-icon-btn.small {
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 10px;
  background: rgba(255,255,255,0.03);
}
.exp-icon-btn.small.danger {
  border-color: rgba(255,77,94,0.30);
  color: rgba(255,77,94,0.75);
  background: rgba(255,77,94,0.06);
}
.exp-icon-btn.small:hover { background: rgba(255,255,255,0.10); color: #fff; }
.exp-icon-btn.small.danger:hover { background: rgba(255,77,94,0.14); color: #ff7a85; }

.exp-status {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--hf-divider);
}
.exp-pet-rail {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px;
  padding: 8px 0;
  border-right: 1px solid var(--hf-divider);
}
.exp-pet-rail .pet-stage {
  width: 96px; height: 96px;
  display: grid;
  place-items: center;
  image-rendering: pixelated;
}
.exp-pet-state {
  font-size: 10.5px;
  color: var(--hf-text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-mono, ui-monospace, monospace);
}

.exp-tools-tabs {
  display: flex; align-items: center; gap: 4px;
  margin-bottom: 8px;
}
.exp-tools-tabs .tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 11px;
  color: var(--hf-text-dim);
  background: transparent;
  border: 1px solid transparent;
}
.exp-tools-tabs .tab.active {
  background: rgba(217,119,87,0.12);
  color: #e89478;
  border-color: rgba(217,119,87,0.32);
}
.exp-tools-tabs .tab .logo {
  width: 14px; height: 14px; border-radius: 3px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: #fff;
}
.exp-tools-tabs .pager {
  margin-left: auto;
  display: flex; gap: 4px;
}
.exp-tools-tabs .pager span {
  width: 14px; height: 3px; border-radius: 2px;
  background: rgba(255,255,255,0.12);
}
.exp-tools-tabs .pager span.active { background: #d97757; }

.usage-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  padding: 8px 0 6px;
  border-bottom: 1px solid var(--hf-divider);
  font-size: 12px;
  position: relative;
}
.usage-row:last-child { border-bottom: 0; }
.usage-row .label { color: var(--hf-text-dim); }
.usage-row .value { color: var(--hf-text); font-variant-numeric: tabular-nums; font-family: var(--font-mono, ui-monospace, monospace); font-size: 11px; }
.usage-row .value .pct { color: var(--hf-text-dim); margin-left: 4px; }
.usage-row.warn .value { color: var(--hf-yellow); }
.usage-row.danger .value { color: var(--hf-yellow); font-weight: 600; }
.usage-row .bar-bg {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1.5px;
  background: var(--hf-divider);
}
.usage-row .bar-bg > span {
  display: block; height: 100%;
  transition: width 350ms cubic-bezier(0.4, 0, 0.2, 1);
}
.usage-row.ok .bar-bg > span { background: var(--hf-green); }
.usage-row.warn .bar-bg > span { background: var(--hf-yellow); }
.usage-row.danger .bar-bg > span { background: var(--hf-red); }

/* Messages header */
.msgs-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hf-text-faint);
  font-family: var(--font-mono, ui-monospace, monospace);
}
.msgs-header .actions {
  display: inline-flex; align-items: center; gap: 6px;
  text-transform: none;
  letter-spacing: 0;
}
.msgs-header .approval-pill {
  color: var(--hf-yellow);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  font-size: 11px;
  margin-right: 4px;
  font-family: var(--font-display, sans-serif);
}

.msg-list {
  display: flex; flex-direction: column;
  padding: 0 10px 10px;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
}
.msg-empty {
  display: flex; align-items: center; justify-content: center;
  padding: 24px 12px;
  color: rgba(255,255,255,0.35);
  font-size: 12px; gap: 6px;
}

.hf-msg {
  border: 1px solid var(--hf-divider);
  background: var(--hf-card-bg);
  border-radius: 10px;
  padding: 10px 12px;
}
.hf-msg.high  { border-color: rgba(255,77,94,0.45); background: rgba(60,16,20,0.55); }
.hf-msg.warn  { border-color: rgba(245,179,1,0.35); background: rgba(46,32,8,0.45); }
.hf-msg.rate  { border-color: rgba(255,155,61,0.32); background: rgba(40,24,8,0.45); }
.hf-msg.done  { border-color: rgba(0,214,163,0.28); background: rgba(8,32,24,0.5); }
.hf-msg.working { border-color: rgba(139,92,246,0.30); background: rgba(20,14,40,0.55); }

.hf-msg-row1 {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px;
  color: var(--hf-text-dim);
  margin-bottom: 4px;
}
.hf-msg-row1 .tool-logo {
  width: 16px; height: 16px; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.hf-msg-row1 .tool-name { color: var(--hf-text); font-weight: 600; font-size: 12px; }
.hf-msg-row1 .badge {
  font-size: 10px; padding: 1px 6px; border-radius: 4px;
  background: rgba(245,179,1,0.15); color: var(--hf-yellow);
  border: 1px solid rgba(245,179,1,0.3);
  font-family: var(--font-mono, ui-monospace, monospace);
  letter-spacing: 0.02em;
}
.hf-msg-row1 .badge.high   { color: var(--hf-red);    background: rgba(255,77,94,0.12);  border-color: rgba(255,77,94,0.35); }
.hf-msg-row1 .badge.warn   { color: var(--hf-yellow); background: rgba(245,179,1,0.14);  border-color: rgba(245,179,1,0.32); }
.hf-msg-row1 .badge.rate   { color: var(--hf-orange); background: rgba(255,155,61,0.14); border-color: rgba(255,155,61,0.34); }
.hf-msg-row1 .badge.done   { color: var(--hf-green);  background: rgba(0,214,163,0.14);  border-color: rgba(0,214,163,0.34); }
.hf-msg-row1 .badge.working{ color: var(--hf-purple); background: rgba(139,92,246,0.14); border-color: rgba(139,92,246,0.34); }
.hf-msg-row1 .time { margin-left: auto; color: var(--hf-text-faint); font-size: 11px; font-family: var(--font-mono, ui-monospace, monospace); }

.hf-msg-title {
  font-size: 13px;
  color: var(--hf-text);
  font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 2px;
}
.hf-msg-detail {
  font-size: 11.5px;
  color: var(--hf-text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: var(--font-mono, ui-monospace, monospace);
}
.hf-msg-actions {
  display: flex; justify-content: flex-end; gap: 8px;
  margin-top: 8px;
}
.hf-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 500;
  border: 1px solid var(--hf-divider);
  background: transparent;
  color: var(--hf-text-dim);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-display, sans-serif);
}
.hf-btn:hover { color: var(--hf-text); background: rgba(255,255,255,0.04); }
.hf-btn.primary { color: var(--hf-blue); border-color: rgba(0,107,255,0.4); }
.hf-btn.primary:hover { background: rgba(0,107,255,0.08); }
.hf-btn.danger { color: var(--hf-red); border-color: rgba(255,77,94,0.4); }
.hf-btn.danger:hover { background: rgba(255,77,94,0.08); }

.exp-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px;
  border-top: 1px solid var(--hf-divider);
  color: var(--hf-text-faint);
  font-size: 11px;
  font-family: var(--font-mono, ui-monospace, monospace);
}
.exp-footer .quit {
  width: 26px; height: 26px; border-radius: 8px;
  border: 1px solid rgba(255,77,94,0.3);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--hf-red);
  background: transparent;
}
.exp-footer .quit:hover { background: rgba(255,77,94,0.08); }

/* State chips (small cycler floating in the display) */
.hf-state-chips {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(8, 9, 12, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  z-index: 200;
}
.hf-state-chips .lbl {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.32);
  padding: 0 6px 0 4px;
  font-family: var(--font-mono, ui-monospace, monospace);
}
.hf-state-chips .chip {
  font-family: var(--font-display, sans-serif);
  font-size: 10.5px;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: all 0.14s ease;
}
.hf-state-chips .chip:hover { color: #fff; background: rgba(255,255,255,0.06); }
.hf-state-chips .chip.active.idle     { background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.20); color: #fff; }
.hf-state-chips .chip.active.running  { background: rgba(139,92,246,0.22); border-color: rgba(139,92,246,0.45); color: #c5b1ff; }
.hf-state-chips .chip.active.approval { background: rgba(245,179,1,0.18);  border-color: rgba(245,179,1,0.42);  color: #ffd864; }
.hf-state-chips .chip.active.rate     { background: rgba(255,155,61,0.18); border-color: rgba(255,155,61,0.4);  color: #ffc890; }
.hf-state-chips .chip.active.done     { background: rgba(0,214,163,0.16);  border-color: rgba(0,214,163,0.4);   color: #6effd6; }
.hf-state-chips .chip.active.error    { background: rgba(255,77,94,0.16);  border-color: rgba(255,77,94,0.45);  color: #ff95a0; }

.hf-display-caption {
  position: absolute;
  top: -22px;
  left: 4px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
}
[data-theme="light"] .hf-display-caption {
  color: rgba(10, 10, 10, 0.55);
}

/* Inline hint shown below mini scenes */
.hf-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  justify-content: center;
  color: var(--text-muted);
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.04em;
}

/* Mini display for HowItWorks steps — no menu bar fluff, just notch + island */
.hf-display.mini {
  border-radius: 18px 18px 6px 6px;
  box-shadow:
    0 0 0 4px #2a2a2e,
    0 0 0 5px #45454a,
    0 16px 36px -12px rgba(0,0,0,0.55);
}
.hf-display.mini .hf-menubar { height: 22px; padding: 0 10px; font-size: 10px; }
.hf-display.mini .hf-menubar-left { left: 10px; right: calc(50% + var(--notch-total-w) / 2 + 6px); gap: 10px; font-size: 11px; }
.hf-display.mini .hf-menubar-right { gap: 10px; font-size: 10px; }
.hf-display.mini .hf-window { box-shadow: 0 10px 24px -8px rgba(0,0,0,0.4); }

/* Allow the expanded island to overhang the bottom of a mini display */
.hf-display .hf-island.expanded {
  position: relative;
  z-index: 60;
}

/* ─── Cursor demo overlay ────────────────────────────────── */
.hf-cursor-demo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  overflow: hidden;
}
.hf-demo-cursor {
  position: absolute;
  transform: translate(-2px, -2px);
  transition: transform 90ms ease-out;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.55));
  will-change: transform, left, top;
}
.hf-demo-cursor.clicking { transform: translate(-2px, -2px) scale(0.84); }
.hf-demo-cursor.dragging { transform: translate(-2px, -2px) scale(0.92); }
.hf-demo-cursor .hf-click-ring {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.9);
  opacity: 0;
  pointer-events: none;
}
.hf-demo-cursor.clicking .hf-click-ring {
  animation: hf-click-pulse 360ms ease-out;
}
@keyframes hf-click-pulse {
  0%   { transform: scale(0.3); opacity: 0.85; }
  100% { transform: scale(1.7); opacity: 0; }
}
.hf-dragged-pet {
  position: absolute;
  image-rendering: pixelated;
  pointer-events: none;
  opacity: 0.98;
  transform: rotate(-8deg) scale(1.08);
  filter: drop-shadow(0 10px 22px rgba(0,0,0,0.65));
  transition: transform 160ms cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 210;
}
.hf-dragged-pet.popping {
  animation: hf-pet-pop 320ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes hf-pet-pop {
  0%   { transform: rotate(0deg) scale(0.6); opacity: 0.6; }
  60%  { transform: rotate(-12deg) scale(1.25); opacity: 1; }
  100% { transform: rotate(-8deg) scale(1.08); opacity: 0.98; }
}
.hf-landed-pet {
  position: absolute;
  image-rendering: pixelated;
  pointer-events: none;
  z-index: 6;
  animation: hf-pet-land 520ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.5));
}
@keyframes hf-pet-land {
  0%   { transform: translateY(-14px) scale(1.05); opacity: 0; }
  60%  { transform: translateY(4px) scale(1.06); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
