/* The Saiki bar rebuilt in HTML for the demos: sizes, washes and motion taken from the app's Swift code. */

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1100 / 700;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #111 center / cover no-repeat;
  isolation: isolate;
}
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  pointer-events: none;
  z-index: 50;
}
.stage-inner {
  position: absolute;
  left: 0;
  top: 0;
  width: 1100px;
  height: 700px;
  transform-origin: 0 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Helvetica Neue", sans-serif;
  color: #fff;
  -webkit-font-smoothing: antialiased;
}

/* ---------- The bar (PanelSize.bar: 750 × 474, 26 pt corners) ---------- */
.bar {
  --field-h: 60px;
  position: absolute;
  left: 50%;
  top: 92px;
  width: 750px;
  height: 474px;
  border-radius: 26px;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-50%) scale(0.97);
  pointer-events: none;
  /* Resizing between views: one 0.28 s curve (PanelSize.animation). */
  transition: width 0.28s cubic-bezier(0.32, 0.72, 0, 1), height 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}
/* Opening: fades in over 0.16 s while a spring grows it from 97 % (PanelController.animateIn). */
.bar.is-open {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  transition: opacity 0.16s ease-out, transform var(--d-open) var(--e-open),
    width 0.28s cubic-bezier(0.32, 0.72, 0, 1), height 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}
/* Closing: a 0.1 s fade, nothing else (animateOut). */
.bar.is-closing {
  opacity: 0;
  transform: translateX(-50%) scale(1);
  transition: opacity 0.1s ease-in;
}

.bar-glass {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 0;
}
.bar-glass::before, .bar-glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.bar { box-shadow: 0 30px 70px -14px rgba(0, 0, 0, 0.55), 0 8px 24px -8px rgba(0, 0, 0, 0.4); }

/* Liquid ("spotlight" preset): clear glass; Apple's bar over the search row (black 98.8 % → 40 %),
   Apple's panel below it (36 % → 4 %), a faint sheen, a hairline and a lit top edge. */
[data-glass="liquid"] .bar-glass {
  /* Clear glass in dark mode still dims and softens what's behind it a little. */
  -webkit-backdrop-filter: blur(20px) saturate(160%) brightness(0.82);
  backdrop-filter: blur(20px) saturate(160%) brightness(0.82);
  background:
    linear-gradient(180deg, rgba(255,255,255,0) 0, rgba(255,255,255,0.07) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.988) 0, rgba(0,0,0,0.40) var(--field-h), rgba(0,0,0,0.36) var(--field-h), rgba(0,0,0,0.04) 100%);
}
[data-glass="liquid"] .bar-glass::before {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), inset 0 0 22px rgba(255, 255, 255, 0.05);
}
[data-glass="liquid"] .bar-glass::after {
  padding: 1px;
  background: linear-gradient(180deg, rgba(255,255,255,0.4) 0, rgba(255,255,255,0.08) 6%, rgba(255,255,255,0) 14%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
/* Frosted ("tinycast" preset): regular frosted glass under an even 40 % black scrim, no drawn edges. */
[data-glass="frosted"] .bar-glass {
  -webkit-backdrop-filter: blur(34px) saturate(185%);
  backdrop-filter: blur(34px) saturate(185%);
  background: rgba(0, 0, 0, 0.4);
}

.bar-field {
  position: relative;
  z-index: 2;
  height: var(--field-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.bar-field .mag { width: 20px; height: 20px; color: rgba(255,255,255,0.62); flex: none; }
.bar-field .back { width: 18px; height: 18px; color: rgba(255,255,255,0.8); flex: none; margin-right: -4px; }
.bar-text {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  font-size: 22px;
  letter-spacing: -0.01em;
  white-space: pre;
  overflow: hidden;
}
.bar-text .ph { color: rgba(255,255,255,0.32); }
.bar-text .ttl { font-weight: 600; font-size: 20px; }
.bar-scope {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 11px;
  margin-right: 10px;
  border-radius: 9px;
  background: rgba(255,255,255,0.12);
  font-size: 16px;
  font-weight: 500;
}
.bar-scope.enter { animation: scopeIn var(--d-scope) var(--e-scope); }
@keyframes scopeIn { from { transform: scale(0.6); opacity: 0; } }
.bar-scope :is(svg, .sym), .bar-scope .fav { width: 17px; height: 17px; }
.bar-scope .fav { font-size: 10px; border-radius: 4px; }
/* The glowing caret (macOS 27's): white, blue at the top, amber at the bottom. */
.caret {
  display: inline-block;
  width: 2px;
  height: 27px;
  margin-left: 1px;
  border-radius: 2px;
  background: linear-gradient(180deg, #74b8ff 0%, #ffffff 30%, #ffffff 70%, #ffb45a 100%);
  box-shadow: 0 0 6px rgba(140, 190, 255, 0.85), 0 0 14px rgba(255, 190, 120, 0.35);
  animation: caret 1.1s steps(1) infinite;
}
.is-typing .caret { animation: none; }
@keyframes caret { 50% { opacity: 0; } }
.bar-ask {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  transition: opacity 0.2s;
}
.bar-ask.hidden { opacity: 0; }

.bar-body {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: var(--field-h);
  bottom: 0;
  overflow: hidden;
  /* EdgeDissolve: rows fade toward the footer (to 25 %) instead of being cut. */
  -webkit-mask: linear-gradient(180deg, #000 0, #000 calc(100% - 74px), rgba(0,0,0,0.25) 100%);
  mask: linear-gradient(180deg, #000 0, #000 calc(100% - 74px), rgba(0,0,0,0.25) 100%);
}
.bar-list { position: relative; padding: 6px 8px 60px; transition: transform 0.12s ease-out; }
/* Section titles: 12 pt semibold, 8 above and 4 below (RootView.sectionHeader). */
.bar-section {
  padding: 8px 12px 4px;
  font-size: 12px;
  line-height: 15px;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
}
.bar-row {
  position: relative;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  margin-bottom: 2px;
  border-radius: 18px;
  z-index: 1;
}
.bar-row .icon { width: 32px; height: 32px; flex: none; display: grid; place-items: center; }
.bar-row .title { font-size: 16px; white-space: nowrap; }
.bar-row .detail { font-size: 14px; color: rgba(255,255,255,0.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.bar-row .acc { margin-left: auto; padding-left: 8px; font-size: 14px; color: rgba(255,255,255,0.5); white-space: nowrap; display: flex; gap: 6px; align-items: center; }
/* Keys on a row are the filled keycap (Keycap, 22 pt); the pills' are outlined. */
.bar-row .kc { min-width: 22px; height: 22px; font-size: 12px; border: 0; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6); }
.bar-row.two { height: 54px; }
.bar-row.two .tt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.bar-row.two .title { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.bar-row.two .detail { font-size: 13px; }
/* One highlight that glides between rows: 12 %, radius 18, measured from the list's top edge. */
.bar-hl {
  position: absolute;
  top: 0;
  left: 8px;
  right: 8px;
  height: 48px;
  border-radius: 18px;
  background: rgba(255,255,255,0.12);
  /* The highlight glides: spring(duration: 0.18, bounce: 0.05). */
  transition: transform var(--d-select) var(--e-select), height var(--d-select) var(--e-select), opacity 0.12s;
  opacity: 0;
  z-index: 0;
}

.bar-hl.flash { animation: flash 0.3s ease; }
@keyframes flash { 35% { background: rgba(255,255,255,0.2); } }

/* Footer: the now-playing pill and the Actions pill (FooterPills), 36 pt tall, 8 pt from the edges. */
.bar-foot {
  position: absolute;
  left: 8px; right: 8px; bottom: 8px;
  height: 36px;
  z-index: 4;
}
.pill {
  position: absolute;
  bottom: 0;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
  border-radius: 18px;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.28s var(--e-pills), transform 0.28s var(--e-pills);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12), inset 0 1px 0 rgba(255,255,255,0.16), 0 4px 14px rgba(0,0,0,0.18);
}
[data-glass="liquid"] .pill { background: linear-gradient(180deg, rgba(0,0,0,0.36), rgba(0,0,0,0.04)), rgba(255,255,255,0.08); }
[data-glass="frosted"] .pill { background: rgba(0,0,0,0.24); box-shadow: 0 4px 14px rgba(0,0,0,0.18), inset 0 0 0 0.5px rgba(255,255,255,0.1); }
.pill.np { left: 0; padding: 0 12px 0 8px; }
.pill.np.mark { width: 36px; padding: 0; justify-content: center; }
/* A pill with nothing to show goes (opacity and a little scale), never an empty capsule. */
.pill.gone { opacity: 0; transform: scale(0.9); pointer-events: none; }
.pill.stop { right: 0; transform-origin: right center; transition: right var(--d-pills) var(--e-pills), opacity 0.2s, transform 0.28s var(--e-pills); }
.morph.open ~ .stop, .bar-foot .morph.open + .stop { transition-duration: var(--d-morph); }

/* A control in a pill: label 13 pt medium, outlined keycaps, 28 pt tall with 8 pt sides (PillButton). */
.hint { height: 28px; padding: 0 8px; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: rgba(255,255,255,0.6); }
.hint.primary { color: #fff; }
.hint .ks { display: inline-flex; gap: 2px; }
.hint .kc { min-width: 18px; height: 18px; font-size: 11px; color: rgba(255,255,255,0.6); }
/* The Actions pill *is* the ⌘K menu and the confirm card: one glass shape that grows from the pill's size and capsule
   corners to theirs, the pill's text going at once and theirs fading in (RootView.actionsMorph). */
.morph {
  right: 0;
  padding: 0;
  align-items: stretch;
  overflow: visible;
  transform-origin: right bottom;
  transition: width var(--d-pills) var(--e-pills), height var(--d-pills) var(--e-pills), border-radius var(--d-pills) var(--e-pills),
    background 0.2s, opacity 0.28s var(--e-pills), transform 0.28s var(--e-pills);
}
/* The glass clips its content; the open menu's shadow sits outside it, only while open. */
.morph > .mc { position: absolute; right: 0; bottom: 0; animation: mcIn 0.18s ease-out 0.08s both; }
.morph { clip-path: inset(0 round 18px); }
.morph.open { clip-path: none; }
.morph::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), inset 0 0 0 1px rgba(255,255,255,0.1);
}
.morph.open {
  border-radius: 16px 16px 18px 16px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12), 0 6px 28px rgba(0,0,0,0.38);
  transition: width var(--d-morph) var(--e-morph), height var(--d-morph) var(--e-morph), border-radius var(--d-morph) var(--e-morph),
    background 0.2s, box-shadow 0.2s;
}
.morph.open::after { opacity: 1; }
.morph.closing { transition: width 0.15s ease-in, height 0.15s ease-in, border-radius 0.15s ease-in, background 0.2s; }
/* Open, the menu's wash: the same glass as the pill, a touch denser so its rows read over anything. */
[data-glass="liquid"] .morph.open { background: linear-gradient(180deg, rgba(0,0,0,0.42), rgba(0,0,0,0.3)), rgba(28,28,32,0.3); -webkit-backdrop-filter: blur(26px) saturate(170%); backdrop-filter: blur(26px) saturate(170%); }
[data-glass="frosted"] .morph.open { background: rgba(22,22,26,0.62); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); }
.morph > .mc.pc { height: 36px; display: flex; align-items: center; gap: 2px; padding: 0 4px; animation-duration: 0.16s; animation-delay: 0.1s; }
@keyframes mcIn { from { opacity: 0; } }

.np .art { width: 26px; height: 26px; border-radius: 6px; background: linear-gradient(135deg, #e8b4a2, #8e6fb8 60%, #3e4a8c); flex: none; }
.np .t { font-size: 12.5px; font-weight: 600; line-height: 1.15; }
.np .a { font-size: 11.5px; color: rgba(255,255,255,0.55); line-height: 1.15; }
.np .ctl { display: flex; gap: 6px; align-items: center; margin-left: 10px; color: rgba(255,255,255,0.8); }
.np .ctl :is(svg, .sym) { width: 14px; height: 14px; }
.np .ctl .play { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.7); display: grid; place-items: center; }
.np .ctl .play :is(svg, .sym) { width: 10px; height: 10px; }

/* The ⌘K menu (ActionsPanel): 320 pt; 8 pt inset; a 22 pt header; 36 pt rows 1 pt apart on one gliding
   highlight (10 %, radius 10); a hairline before the red ones; a 36 pt search field under a hairline. */
.menu { width: 320px; font-size: 13px; white-space: normal; }
.menu .mlist { position: relative; padding: 8px; max-height: 316px; overflow: hidden; } /* 7.5 rows, a header and the insets */
.menu .mhl { position: absolute; left: 8px; right: 8px; top: 0; height: 36px; border-radius: 10px; background: rgba(255,255,255,0.1); opacity: 0; transition: transform var(--d-select) var(--e-select), opacity 0.12s; }
.menu .mh { position: relative; height: 22px; display: flex; align-items: center; font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.55); padding: 0 10px; margin-bottom: 1px; }
.menu .mr { position: relative; height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 8px; margin-bottom: 1px; }
.menu .mr:last-child { margin-bottom: 0; }
.menu .mi { width: 20px; height: 20px; display: grid; place-items: center; color: rgba(255,255,255,0.7); flex: none; }
.menu .mi :is(svg, .sym) { width: 15px; height: 15px; }
.menu .mi .ai-app, .menu .mi .fav { width: 18px; height: 18px; border-radius: 5px; font-size: 10px; }
.menu .mt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu .mr .k { margin-left: auto; display: flex; gap: 2px; padding-left: 6px; }
.menu .mr .kc { min-width: 18px; height: 18px; font-size: 11px; }
.menu .mr .chev { color: rgba(255,255,255,0.55); }
.menu .mr .chev :is(svg, .sym) { width: 12px; height: 12px; }
.menu .mr.danger, .menu .mr.danger .mi { color: #ff6961; }
.menu .mr.none { justify-content: center; color: rgba(255,255,255,0.35); }
.menu .msep { height: 1px; background: rgba(255,255,255,0.1); margin: 8px 8px 9px; }
.menu .ms { border-top: 1px solid rgba(255,255,255,0.1); height: 36px; display: flex; align-items: center; padding: 0 18px; }
.menu .mph { color: rgba(255,255,255,0.35); }
.menu .mq { display: inline-flex; align-items: center; }
.caret.sm { height: 16px; width: 2px; margin-left: 1px; }

/* ConfirmCard: 360 pt, 14 pt padding, grown from the same pill. */
.confirm { width: 360px; padding: 14px; font-size: 12px; white-space: normal; }
.confirm .ch { display: flex; gap: 10px; align-items: flex-start; }
.confirm .ch .ci { font-size: 17px; width: 22px; color: #ffb45a; }
.confirm .ch b { display: block; font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.confirm .ch span { color: rgba(255,255,255,0.6); line-height: 1.45; }
.confirm .btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }

.kc {
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.28);
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  line-height: 1;
}

/* ---------- Icons: SF Symbols (masks in the text colour), real app, file and site icons ---------- */
.sym {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--s) center / contain no-repeat;
  mask: var(--s) center / contain no-repeat;
}
img.ai-app { width: 100%; height: 100%; display: block; object-fit: contain; border-radius: 0 !important; }
.bar-row .icon > img.ai-app, .bar-row .icon > img.fileicon { width: 32px; height: 32px; }
img.fileicon { width: 32px; height: 32px; display: block; object-fit: contain; }
/* A favicon keeps its 22 pt in the 32 pt box (ResultIcon .image). */
.fav { width: 22px; height: 22px; border-radius: 5px; display: grid; place-items: center; object-fit: contain; }
.fav.gh { background: #24292f; border-radius: 6px; color: #fff; }
.fav.gh :is(svg, .sym) { width: 15px; height: 15px; }
/* A symbol on the glass: 21 pt, in the glyph colour (RowMetrics.glyph). */
.glyph { width: 32px; height: 32px; color: rgba(255,255,255,0.88); display: grid; place-items: center; }
.glyph .sym { width: 21px; height: 21px; }

/* ---------- Calculator card ---------- */
.calc {
  height: 118px;
  margin: 0 0 2px;
  border-radius: 14px;
  background: rgba(255,255,255,0.1);
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: center;
  position: relative;
}
.calc .side { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 0 16px; }
.calc .big { font-size: 26px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.calc .chip { font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 6px; background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); }
.calc .mid { height: 100%; background: rgba(255,255,255,0.08); }
.calc .arrow { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 30px; height: 30px; display: grid; place-items: center; color: rgba(255,255,255,0.7); background: rgba(40,40,44,0.9); border-radius: 50%; }

/* ---------- Views inside the bar ---------- */
.view { padding: 10px 18px 76px; font-size: 14px; }
.view-title { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 600; margin: 4px 0 2px; }
.view-sub { font-size: 13px; color: rgba(255,255,255,0.55); margin-bottom: 12px; }

.chk { width: 18px; height: 18px; border-radius: 5px; background: #3b82f6; display: grid; place-items: center; flex: none; transition: background 0.2s; }
.chk :is(svg, .sym) { width: 12px; height: 12px; color: #fff; }
.chk.off { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.35); }
.chk.off :is(svg, .sym) { opacity: 0; }

.lrow { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 10px; border-radius: 12px; transition: opacity 0.35s, transform 0.35s, background 0.2s; }
.lrow .name { font-size: 15px; white-space: nowrap; }
.lrow .path { font-size: 12.5px; color: rgba(255,255,255,0.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.lrow .size { margin-left: auto; font-size: 13.5px; color: rgba(255,255,255,0.7); font-variant-numeric: tabular-nums; }
.lrow.sel { background: rgba(255,255,255,0.1); }
.lrow.gone { opacity: 0; transform: translateX(30px); }

.meter { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.12); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 3px; background: #3b82f6; transition: width 0.9s cubic-bezier(0.3, 0.8, 0.3, 1); }

/* Table (Task Manager, ports) */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tbl th { text-align: right; font-weight: 600; font-size: 12px; color: rgba(255,255,255,0.5); padding: 6px 10px; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl td { text-align: right; padding: 0 10px; height: 38px; white-space: nowrap; }
.tbl tr.sel td { background: rgba(255,255,255,0.1); }
.tbl tr.sel td:first-child { border-radius: 10px 0 0 10px; }
.tbl tr.sel td:last-child { border-radius: 0 10px 10px 0; }
.tbl .app { display: flex; align-items: center; gap: 10px; }
.tbl .app .ai-app { width: 20px; height: 20px; border-radius: 5px; }
.tbl tr.child td { color: rgba(255,255,255,0.6); font-size: 12.5px; height: 30px; }
.tbl tr.child td:first-child { padding-left: 40px; }
.hot { color: #ffb45a; }

/* ---------- Chat ---------- */
.chat { padding: 14px 22px 80px; font-size: 14px; line-height: 1.55; }
.chat .you { margin-left: auto; width: fit-content; max-width: 80%; background: rgba(255,255,255,0.12); padding: 8px 13px; border-radius: 14px; margin-bottom: 14px; }
.chat .meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: rgba(255,255,255,0.5); margin-bottom: 8px; }
.chat .model { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 7px; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.75); font-weight: 500; }
.chat .model .dot { width: 12px; height: 12px; border-radius: 3px; }
.chat .ans p { margin: 0 0 8px; color: rgba(255,255,255,0.92); }
.chat code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; background: rgba(255,255,255,0.1); padding: 1px 5px; border-radius: 5px; }
.chat .steps { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(255,255,255,0.6); margin: 6px 0 10px; }
.chat .steps .diff { font-family: ui-monospace, monospace; font-size: 12px; }
.plus { color: #4ade80; } .minus { color: #f87171; }
.orb { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #9fc6ff 40%, #ffb45a 100%); animation: orb 1.2s ease-in-out infinite; }
@keyframes orb { 50% { transform: scale(0.75); opacity: 0.6; } }
.stream-caret::after { content: ""; display: inline-block; width: 7px; height: 14px; margin-left: 2px; vertical-align: -2px; border-radius: 2px; background: rgba(255,255,255,0.7); animation: caret 0.9s steps(1) infinite; }

.card {
  border-radius: 16px;
  background: rgba(255,255,255,0.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
  padding: 14px 16px;
  margin: 8px 0;
}
.card .cmd { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; background: rgba(0,0,0,0.3); border-radius: 9px; padding: 9px 12px; margin: 10px 0 12px; }
.card .btns { display: flex; gap: 8px; }
.btn { height: 32px; padding: 0 12px; border-radius: 10px; display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; background: rgba(255,255,255,0.1); box-shadow: inset 0 1px 0 rgba(255,255,255,0.1); transition: background 0.2s, transform 0.15s; }
.btn.primary { background: rgba(255,255,255,0.92); color: #111; }
.btn.primary .kc { border-color: rgba(0,0,0,0.25); color: rgba(0,0,0,0.6); }
.btn.press { transform: scale(0.95); }

/* ---------- Keystroke HUD: a strip under each demo, so keys never cover the scene ---------- */
.keys-strip { height: 58px; display: flex; align-items: center; justify-content: center; }
.hud {
  display: flex;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.18s, transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1);
  font: 13px -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  color: #fff;
  align-items: center;
}
.hud.show { opacity: 1; transform: none; }
.hud .key {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 500;
  background: linear-gradient(rgba(255,255,255,0.14), rgba(255,255,255,0.07));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 2px 0 rgba(0,0,0,0.5);
  transition: transform 0.08s, box-shadow 0.08s, background 0.08s;
}
.hud .key.down { transform: translateY(1px); box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 1px 0 rgba(0,0,0,0.5); background: linear-gradient(rgba(116,184,255,0.32), rgba(255,180,90,0.18)); }
.hud .lbl { color: rgba(255,255,255,0.6); padding: 0 6px 0 4px; }

/* ---------- Toast / needs-you card ---------- */
.toast {
  position: absolute;
  left: 50%;
  top: 30px;
  transform: translate(-50%, -14px);
  opacity: 0;
  height: 44px;
  padding: 0 8px 0 16px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.2s, transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
  z-index: 30;
  background: rgba(24,24,28,0.6);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.needs {
  position: absolute;
  right: 26px;
  top: 26px;
  width: 360px;
  border-radius: 22px;
  padding: 14px 16px;
  background: rgba(20,20,24,0.62);
  transform: translateX(420px);
  transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.25, 1);
  z-index: 30;
  font-size: 13.5px;
}
.needs.show { transform: none; }
.needs .who { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14px; }
.needs .who .ai-app { width: 22px; height: 22px; border-radius: 6px; }
.needs .who small { margin-left: auto; color: rgba(255,255,255,0.5); font-weight: 400; font-size: 12px; }
.needs p { margin: 8px 0 10px; color: rgba(255,255,255,0.8); }

/* ---------- Mini desktop (windows, dictation) ---------- */
.menubar {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 26px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 500;
  background: rgba(0,0,0,0.18);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  z-index: 20;
}
.menubar .r { margin-left: auto; display: flex; gap: 14px; align-items: center; opacity: 0.9; }
.menubar .mark { width: 14px; height: 14px; }
.win {
  position: absolute;
  border-radius: 14px;
  background: rgba(28,28,32,0.86);
  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);
  box-shadow: 0 24px 60px -10px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(255,255,255,0.1), inset 0 1px 0 rgba(255,255,255,0.12);
  overflow: hidden;
  transition: left 0.42s cubic-bezier(0.2, 0.9, 0.25, 1), top 0.42s cubic-bezier(0.2, 0.9, 0.25, 1), width 0.42s cubic-bezier(0.2, 0.9, 0.25, 1), height 0.42s cubic-bezier(0.2, 0.9, 0.25, 1), opacity 0.3s, transform 0.42s cubic-bezier(0.2, 0.9, 0.25, 1);
}
.win.light { background: rgba(246,246,248,0.94); color: #1d1d1f; }
.win .tb { height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 12px; font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,0.7); }
.win.light .tb { color: rgba(0,0,0,0.6); border-bottom: 1px solid rgba(0,0,0,0.07); }
.win .lights { display: flex; gap: 7px; margin-right: 8px; }
.win .lights i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.win .lights i:nth-child(2) { background: #febc2e; }
.win .lights i:nth-child(3) { background: #28c840; }
.win .bd { padding: 12px 16px; font-size: 13px; line-height: 1.6; }
.win.focus { box-shadow: 0 24px 60px -10px rgba(0,0,0,0.55), 0 0 0 2px rgba(120,170,255,0.75), inset 0 1px 0 rgba(255,255,255,0.12); }
.ln { height: 8px; border-radius: 4px; background: rgba(255,255,255,0.12); margin: 9px 0; }
.win.light .ln { background: rgba(0,0,0,0.08); }


.strip-ind {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  padding: 7px;
  border-radius: 16px;
  background: rgba(30,30,34,0.5);
  z-index: 25;
  transition: opacity 0.3s;
}
.strip-ind .s { width: 30px; height: 30px; border-radius: 8px; padding: 3px; transition: background 0.25s; }
.strip-ind .s.on { background: rgba(255,255,255,0.22); }

/* Dictation pill */
.dict {
  position: absolute;
  left: 50%;
  bottom: 40px;
  transform: translate(-50%, 16px) scale(0.92);
  opacity: 0;
  height: 46px;
  min-width: 120px;
  max-width: 620px;
  padding: 0 18px 0 14px;
  border-radius: 23px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(16,16,20,0.62);
  font-size: 14.5px;
  color: rgba(255,255,255,0.72);
  transition: opacity 0.2s, transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1), width 0.3s;
  z-index: 30;
}
.dict.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.dict::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 34px;
  background: conic-gradient(from var(--a, 0deg), #6aa8ff, #b892ff, #ff9ec7, #ffb45a, #6aa8ff);
  filter: blur(18px);
  opacity: 0.55;
  z-index: -1;
  animation: glowspin 3s linear infinite;
}
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes glowspin { to { --a: 360deg; } }
.wave { display: flex; gap: 3px; align-items: center; height: 20px; }
.wave i { width: 3px; border-radius: 2px; background: #fff; height: 30%; animation: wv 0.9s ease-in-out infinite; }
.wave i:nth-child(2) { animation-delay: -0.2s; } .wave i:nth-child(3) { animation-delay: -0.45s; }
.wave i:nth-child(4) { animation-delay: -0.1s; } .wave i:nth-child(5) { animation-delay: -0.6s; }
@keyframes wv { 50% { height: 100%; } }
.dict .raw { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: rtl; text-align: left; max-width: 520px; }
.dict .raw span { direction: ltr; unicode-bidi: plaintext; }
.ins { background: rgba(120,170,255,0.25); border-radius: 3px; transition: background 1.2s; }
.ins.settled { background: transparent; }

@media (prefers-reduced-motion: reduce) {
  .bar, .bar-body, .bar-hl, .win, .hud, .toast, .needs, .dict, .pill, .menu .mhl { transition: none !important; }
  .caret, .orb, .wave i, .dict::after { animation: none !important; }
}

/* Symbols that fill the box they sit in. */
.bar-field .mag .sym { width: 20px; height: 20px; }
.bar-scope .sym { width: 16px; height: 16px; }
.lrow .fileicon { width: 26px; height: 26px; flex: none; }
.tbl .app img.ai-app { width: 22px; height: 22px; }

/* With ⌘K or a card open, focus is in the menu: the field's caret stops (ActionsPanel takes focus). */
.bar:has(.morph.open) .bar-field .caret { animation: none; opacity: 0; }
