/* ============================================================================
   products.css — flip cards + full-screen product "peek" heroes.

   Two of the personal-project cards (AI Island, Liquid Music) flip on click and
   open a full-screen preview. Each preview reuses the rito-website hero layout
   (overline / mono headline with a rotating word / copy / meta) and gives the
   lower half to a mock of the real app, rebuilt from the shipping source:

     · AI Island   — NotchPanelShape geometry (topExtension / bottomRadius /
                     k=0.62 squircle), SwiftUI spring timings, real status
                     colours, the real Clawd mascot.
     · Liquid Music — DESIGN.md light mode: #F7F7F9 canvas, #FF2153 accent,
                     76pt player (r20), 56pt nav (r16), 54pt artwork (r12).

   Mocks are authored at true product point sizes and scaled to fit by JS, so a
   preview never scrolls and never crops — on a desktop or a phone.
   ========================================================================== */

/* ── Flip card ─────────────────────────────────────────────────────────── */

.flip-card {
  min-width: 0;
  perspective: 1100px;
}

.flip-card-inner {
  position: relative;
  display: grid;
  transform-style: preserve-3d;
  transition: transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

.flip-card.is-flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-face {
  grid-area: 1 / 1;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* iOS Safari rasterises `backdrop-filter` and SVG `filter: url()` badly inside a
   rotating 3D context — the card's liquid-glass layer goes black or drops out
   mid-turn. Both are decorative, so they sit out the ~600ms the card is moving. */
.flip-card.is-turning .link-card::before {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  -webkit-filter: none;
  filter: none;
}

.flip-card.is-turning .link-card::after {
  mix-blend-mode: normal;
}

/* A button needs the text defaults reset back to the card's. The last column
   widens from the 18px arrow slot to fit the "Peek ⤢" affordance. */
button.flip-front {
  width: 100%;
  margin: 0;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
}

/* Touch has no hover, so the press itself has to answer. */
button.flip-front:active {
  transform: translateY(0) scale(0.985);
}

.flip-back {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  /* Decorative and aria-hidden — it must never swallow a tap meant for the
     button underneath, including when reduced motion flattens the flip. */
  pointer-events: none;
  transform: rotateY(180deg);
}

.flip-back-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  overflow: hidden;
}

.flip-back-island {
  background: #f5f5f6;
}

.flip-back-mark img {
  display: block;
  width: 46px;
  height: 46px;
}

.flip-back-label {
  color: rgba(255, 255, 255, 0.82);
  font-family: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 10px;
  font-weight: 550;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* App icons keep their real colours — unlike the monochrome link glyphs. */
.icon-wrap-app {
  background: rgba(255, 255, 255, 0.06);
}

.icon-wrap-app img {
  width: 24px;
  height: 24px;
  opacity: 1;
  filter: none;
}

/* The only thing telling a sighted user the card opens something, so it has to
   clear 4.5:1 against the card rather than sit at the .card-status whisper. */
.card-peek {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(214, 214, 220, 0.92);
  font-family: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 9px;
  font-weight: 550;
  letter-spacing: 0.08em;
  text-align: right;
  text-transform: uppercase;
  transition: color 160ms ease;
}

.card-peek::after {
  content: "⤢";
  font-size: 11px;
  line-height: 1;
}

.flip-front:hover .card-peek,
.flip-front:focus-visible .card-peek {
  color: rgba(255, 255, 255, 0.86);
}

/* ── Peek overlay ──────────────────────────────────────────────────────── */

/* Scroll lock. Desktop already pins html/body, but mobile scrolls the body —
   pinning it with the offset preserved is the only thing iOS Safari respects. */
body.peek-open {
  position: fixed;
  right: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
}

.peek {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
}

.peek[hidden] {
  display: none;
}

.peek-scrim {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 9, 0.82);
  -webkit-backdrop-filter: blur(22px) saturate(120%);
  backdrop-filter: blur(22px) saturate(120%);
  opacity: 0;
  transition: opacity 320ms ease;
}

.peek-stage {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(100%, 1240px);
  height: 100%;
  max-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background:
    radial-gradient(ellipse 60% 44% at 50% -6%, rgba(255, 255, 255, 0.06), transparent 70%),
    radial-gradient(circle at 0% 0%, #1c1c20 0%, transparent 46%),
    radial-gradient(circle at 100% 100%, #1c1c20 0%, transparent 46%),
    #101012;
  box-shadow: 0 42px 120px rgba(0, 0, 0, 0.62);
  opacity: 0;
  outline: none;
  transform: translateY(16px) scale(0.985);
  transition: opacity 340ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.peek-close:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.peek.is-open .peek-scrim {
  opacity: 1;
}

.peek.is-open .peek-stage {
  opacity: 1;
  transform: none;
}

.peek-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 6;
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.07);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.peek-close svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.peek-close:hover,
.peek-close:focus-visible {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  transform: scale(1.06);
}

/* ── The hero itself (mirrors rito-website's) ──────────────────────────── */

.phero {
  position: relative;
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-rows: auto minmax(0, 1fr);
  isolation: isolate;
  text-align: center;
}

.phero-scatter {
  position: absolute;
  z-index: 0;
  display: block;
  width: 100%;
  height: 62%;
  inset: 0 0 auto;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 76% 78% at 50% 42%, #000 0%, #000 52%, rgba(0, 0, 0, 0.7) 70%, transparent 100%);
  mask-image: radial-gradient(ellipse 76% 78% at 50% 42%, #000 0%, #000 52%, rgba(0, 0, 0, 0.7) 70%, transparent 100%);
}

.phero-content {
  position: relative;
  z-index: 2;
  width: min(100%, 780px);
  margin: 0 auto;
  padding: clamp(20px, 3.2vmin, 40px) 24px 0;
}

.peek.is-open .phero-content {
  animation: pheroEnter 800ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.phero-overline {
  margin: 0 0 11px;
  color: var(--rito-muted);
  font-family: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.phero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 0 13px;
  color: #e7e7e9;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: clamp(24px, 3.9vmin, 46px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.14;
}

/* The caret's translateY makes a filled line box taller than an empty one, so
   the headline jumped 2-3px every time the word finished deleting. Pin the row
   to one height and keep a zero-width character in it so it never collapses. */
.phero-rotator {
  position: relative;
  display: inline-flex;
  height: 1.3em;
  align-items: center;
  justify-content: center;
}

.phero-rotator::before {
  content: "\200B";
}

.phero-caret {
  display: inline-block;
  width: 0.045em;
  height: 1em;
  margin-left: 1px;
  background: var(--rito-muted);
  transform: translateY(0.1em);
  vertical-align: text-bottom;
  animation: pheroBlink 1s steps(1, end) infinite;
}

.phero-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.phero-copy {
  max-width: 540px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.7);
  font-size: clamp(12.5px, 1.4vmin, 16px);
  line-height: 1.6;
  text-wrap: balance;
}

.phero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.phero-btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0;
  padding: 11px 22px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.phero-btn-primary {
  color: #09090b;
  background: #f5f5f6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.phero-btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.07);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.phero-btn:hover,
.phero-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.phero-btn-ghost:hover,
.phero-btn-ghost:focus-visible {
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
}

.phero-btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.phero-meta {
  margin: 11px 0 0;
  color: var(--rito-muted);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
}

/* ── Mock scaling — authored at true size, scaled to fit ──────────────── */

.phero-stage {
  position: relative;
  z-index: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0 clamp(18px, 5vw, 76px);
}

/* Absolutely positioned and pulled back by half its own width, so the box stays
   centred even when its layout width is far wider than the stage — which is the
   normal case, since it is authored at true product size and then scaled down. */
.mock {
  /* A plain length, not a clamp(): getPropertyValue on a custom property hands
     back the unresolved token stream, so the fit engine could not parse it. */
  --mock-top: 30px;
  position: absolute;
  top: calc(var(--mock-top) + var(--mock-shift, 0px));
  left: 50%;
  width: var(--mock-w);
  height: var(--mock-h);
  margin-left: calc(var(--mock-w) / -2);
  /* The hero centres its type; app chrome inside the mock must not inherit it. */
  text-align: left;
  transform: scale(var(--mock-scale, 1));
  transform-origin: center top;
}

/* Authored screen sizes. The user asked for vibeisland's screen-only crop, so
   there is no hardware bezel around these measurements. */
.mock-mac {
  --mock-w: 1120px;
  --mock-h: 700px;
  /* The fade must finish by the time the crop bites, or the laptop ends in a
     hard cut instead of dissolving — so --mock-fade-end tracks --mock-keep. */
  --mock-fade: 62%;
  --mock-fade-end: 84%;
  --mock-keep: 0.84;
}

.mock-lm {
  /* 1280pt app window at its real geometry, plus desktop breathing room. */
  --mock-w: 1380px;
  --mock-h: 800px;
  /* The app window has to survive the crop whole, so this one barely fades. */
  --mock-fade: 88%;
  --mock-fade-end: 99%;
  --mock-keep: 0.99;
}

/* ══ AI Island mock ═══════════════════════════════════════════════════════ */

.mock-mac,
.mock-lm {
  --mac-inset: 40px; /* ScreenDetector's island margin: panelWidth ≤ screen − 40 */
}

/* ── The Mac screen ───────────────────────────────────────────────────────
   Keep the wrapper for shared markup, but remove the hardware bezel entirely.
   The old 11px inset made a hairline above the menu bar and left awkward dark
   gutters at both edges. */
.mac-lid {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
  background: transparent;
}

.mock-mac,
.mock-lm {
  -webkit-mask-image: linear-gradient(to bottom, #000 var(--mock-fade), transparent var(--mock-fade-end));
  mask-image: linear-gradient(to bottom, #000 var(--mock-fade), transparent var(--mock-fade-end));
}

.mac-cam {
  display: none;
}

.mac-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
  background: #0a0a0a;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.68);
}

/* macOS 27 "Golden Gate Bridge", the same desktop under both apps. */
.mac-wall {
  position: absolute;
  inset: 0;
  background: url("../images/products/golden-gate.jpg") center 42% / cover no-repeat, #1d2b3a;
}

.mac-menubar {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 4;
  display: flex;
  height: var(--island-bar-h, 34px);
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--mock-ui);
  font-size: 11.5px;
  letter-spacing: -0.005em;
  background: rgba(0, 0, 0, 0.22);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.mb-group {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.mb-group b { font-weight: 600; }
.mb-group span { opacity: 0.92; }

.mb-apple {
  display: inline-flex;
  align-items: center;
  color: #fff;
}

.mb-right { gap: 10px; }

/* Keeps the menus clear of the notch. Width is written by the scene machine so
   it tracks the collapsed island exactly. */
.mb-notch-gap {
  flex: 0 0 auto;
  width: var(--notch-gap, 0px);
}

.mb-ico {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.7;
}

.mb-batt { stroke-width: 1.3; }

/* ── Dock ─────────────────────────────────────────────────────────────── */

.mac-dock {
  position: absolute;
  bottom: 8px;
  left: 50%;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 10px 30px rgba(0, 0, 0, 0.34);
  transform: translateX(-50%);
}

.dock-app {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 2px 5px rgba(0, 0, 0, 0.28);
}

.dock-app img {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.dock-finder { background: linear-gradient(180deg, #4aa8ff, #1f6fd0); }
.dock-safari { background: radial-gradient(circle at 50% 50%, #fff 18%, #4aa8ff 20%, #1a72c9 70%); }
.dock-term   { background: linear-gradient(180deg, #2f2f36, #17171b); }
.dock-notes  { background: linear-gradient(180deg, #ffe27a, #f5b93c); }

.dock-app.dock-live { box-shadow: none; }

/* Running-app indicator. */
.dock-app.dock-live i {
  position: absolute;
  bottom: -5px;
  left: 50%;
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  transform: translateX(-50%);
}

.dock-sep {
  width: 1px;
  height: 30px;
  margin: 0 2px;
  background: rgba(255, 255, 255, 0.24);
}

/* Terminal windows on the fake desktop */

.mac-windows {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.term {
  position: absolute;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  background: rgba(24, 24, 28, 0.86);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.5);
  transition: opacity 500ms ease, transform 500ms cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.term-b1 {
  top: 34%;
  left: 4%;
  z-index: 1;
  width: 42%;
  opacity: 0.52;
  transform: scale(0.97);
}

.term-b2 {
  top: 25%;
  right: 4%;
  z-index: 2;
  width: 42%;
  opacity: 0.52;
  transform: scale(0.97);
}

.term-front {
  top: 54%;
  left: 50%;
  z-index: 3;
  width: 50%;
  margin-left: -25%;
}

.term.is-min {
  opacity: 0;
  transform: scale(0.85) translateY(12px);
}

.term.is-pop {
  z-index: 9;
  opacity: 1;
  transform: scale(1.02);
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  font-size: 9.5px;
}

.term-bar span {
  margin-left: 6px;
  overflow: hidden;
  font-family: "Geist Mono", ui-monospace, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tl {
  display: block;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.tl-r { background: #ff5f56; }
.tl-y { background: #ffbd2e; }
.tl-g { background: #27c93f; }

.term-body {
  min-height: 96px;
  padding: 10px 12px 14px;
  color: rgba(255, 255, 255, 0.74);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 9.5px;
  line-height: 1.7;
}

.term-body > div {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.term-body.is-typing > div {
  opacity: 0;
  transform: translateY(4px);
}

.term-body.is-typing > div.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 300ms ease-out, transform 300ms ease-out;
}

.t-dim { color: rgba(255, 255, 255, 0.38); }
.t-gr  { color: #66ff80; }
.t-bl  { color: #80b3ff; }
.t-cy  { color: #e6cc66; }
.t-rm  { color: #4dbf80; }
.t-am  { color: #ffb347; }

/* ── The island ────────────────────────────────────────────────────────── */

.island-wrap {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 20;
  transform: translateX(-50%);
}

.island {
  position: relative;
}

.island-skin,
.island-clip {
  position: absolute;
  inset: 0;
  clip-path: var(--island-path);
}

/* Pure opaque black, and nothing else. The real panel is `.fill(.black)` on a
   window with `hasShadow = false`; there is no material, border, shadow or
   gradient anywhere in the app. Adding glass here would be a lie. */
.island-skin {
  background: #000;
}

.island-clip {
  overflow: hidden;
  color: #fff;
  /* SF, not Geist — Geist is the site's voice, SF is the product's. */
  font-family: var(--mock-mono);
  letter-spacing: 0;
}

/* Compact bar — CompactLeftWing / CompactRightWing, padding 6, spacing 6.
   Both wings swap their whole contents when the panel expands. */

.ib-bar {
  position: absolute;
  top: 0;
  left: var(--island-inset, 14px);
  display: flex;
  width: var(--island-w, 330px);
  height: var(--island-bar-h, 34px);
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
}

.ib-wing {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.ib-compact,
.ib-expanded {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.ib-expanded { display: none; }
.is-expanded .ib-compact { display: none; }
.is-expanded .ib-expanded { display: inline-flex; }

.ib-mascot {
  display: block;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
}

.ib-tool {
  overflow: hidden;
  max-width: 120px;
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 200ms ease;
}

.ib-tool.is-on {
  opacity: 1;
}

.ib-logo {
  display: inline-flex;
  align-items: center;
}

/* PixelText grouping tabs, in the expanded bar's left wing where they live. */
.ib-seg {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.ib-seg b,
.ib-seg span {
  padding: 4px 7px;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 700;
}

.ib-seg b {
  color: #4dd966;
  background: rgba(255, 255, 255, 0.1);
}

/* NotchIconButton: 22x22, tint at 8% rest. */
.ib-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.1);
}

.ib-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.ib-icon-quit {
  color: #ff6666;
  background: rgba(255, 102, 102, 0.14);
}

.ib-glance {
  display: block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #66ff80;
  box-shadow: 0 0 3px rgba(102, 255, 128, 0.7);
}

.ib-bell {
  display: inline-flex;
  color: #ffb347;
  animation: ibPulse 1.2s ease-in-out infinite;
}

/* AgentModelChip: model, then a chevron, then the delegated agent. */
.ib-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.ib-chip b { color: #cc9eff; font-weight: 500; }
.ib-chip i { color: rgba(255, 255, 255, 0.35); font-style: normal; }
.ib-chip em { color: #a68cf2; font-style: normal; }

.ib-count {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.ib-count b { color: #66ff80; font-weight: 600; }
.ib-count i { color: rgba(255, 255, 255, 0.4); font-style: normal; }
.ib-count em { color: rgba(255, 255, 255, 0.9); font-style: normal; }

/* Expanded layers — blur-crossfade, exactly like the app's .blurFade */

.ib-layer {
  position: absolute;
  top: var(--island-bar-h, 34px);
  left: var(--island-inset, 14px);
  width: var(--island-w, 330px);
  padding: 8px 0 12px;
  opacity: 0;
  filter: blur(5px);
  pointer-events: none;
  transform: scale(0.97);
  transition: opacity 220ms ease, filter 260ms ease, transform 320ms cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.ib-layer.is-on {
  opacity: 1;
  filter: blur(0);
  transform: none;
  transition-delay: 60ms;
}

/* ApprovalBar */

.ib-appr-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 0 14px 8px;
  font-size: 11px;
  font-weight: 700;
}

.ib-appr-head b { color: #ffb347; }

.ib-appr-file {
  color: rgba(255, 255, 255, 0.6);
  font-size: 10px;
  font-weight: 500;
}

.ib-detail {
  display: flex;
  align-items: baseline;
  gap: 6px;
  overflow: hidden;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 10px;
  white-space: nowrap;
}

.ib-detail i {
  color: #4dd966;
  font-style: normal;
  font-weight: 700;
}

.ib-detail span {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.55);
  text-overflow: ellipsis;
}

.ib-actions {
  display: flex;
  gap: 6px;
  padding: 8px 14px 0;
}

/* PixelButton, with the app's exact fills. Equal widths, as the HStack gives. */
.ib-btn {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.95);
  background: #404040;
  font-family: var(--mock-ui);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
}

.ib-btn-deny {
  border-color: #b34040;
  background: #731f1f;
}

.ib-btn-allow {
  border-color: #479e52;
  background: #29612e;
}

.ib-btn-always {
  border-color: #477ad1;
  background: #244785;
}

.ib-btn.is-hit {
  transform: scale(0.95);
  filter: brightness(1.5);
  transition: transform 120ms ease, filter 120ms ease;
}

/* QuestionBar */

.ib-ask-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 0 14px 8px;
}

.ib-ask-head b {
  color: #66b3ff;
  font-size: 11px;
  font-weight: 700;
}

.ib-ask-head em {
  padding: 1px 4px;
  border-radius: 3px;
  color: rgba(102, 179, 255, 0.7);
  background: rgba(102, 179, 255, 0.1);
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
}

.ib-ask-head span {
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--mock-ui);
  font-size: 11px;
  font-weight: 500;
}

.ib-opts {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 14px;
}

/* OptionRow: hover arrow, "1." in the accent, label at white .75. */
.ib-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--mock-ui);
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.75);
  text-align: left;
}

.ib-opt s {
  width: 10px;
  color: #66b3ff;
  font-size: 9px;
  font-weight: 700;
  text-decoration: none;
  opacity: 0;
}

.ib-opt i {
  color: rgba(102, 179, 255, 0.6);
  font-family: var(--mock-mono);
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
}

.ib-opt.is-hit {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 600;
  transition: background 140ms ease;
}

.ib-opt.is-hit s { opacity: 1; }
.ib-opt.is-hit i { color: #66b3ff; }

/* SessionCard — grouped by repo, each card carrying the last few transcript
   lines, with an idle row above and the token footer below. */

.ib-idle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px 9px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
}

.ib-idle em {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid rgba(77, 217, 102, 0.42);
  border-radius: 999px;
  color: #4dd966;
  font-size: 10px;
  font-style: normal;
}

.ib-idle svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}

.ib-group {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 14px 6px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
}

.ib-group b { font-weight: 500; }

.ib-group span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
}

.ib-group span i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4dd966;
}

.ib-cube {
  fill: none;
  stroke: rgba(255, 255, 255, 0.55);
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.ib-sess {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin: 0 10px 8px;
  padding: 9px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
}

.ib-sess-mascot {
  position: relative;
  display: grid;
  width: 44px;
  place-items: center;
}

.ib-sess-mascot canvas {
  display: block;
  width: 34px;
  height: 34px;
}

/* Sub-agent pip, drawn under the mascot the way MiniAgentIcon is. */
.ib-sub {
  display: block;
  width: 8px;
  height: 8px;
  margin-top: 2px;
  border-radius: 2px;
  background: #4dd966;
}

.ib-sess-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.ib-sess-head {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  font-size: 12px;
  white-space: nowrap;
}

/* Status lives in the project-name colour, not in a card tint. */
.ib-sess-head b {
  overflow: hidden;
  color: #fff;
  font-weight: 600;
  text-overflow: ellipsis;
}

.ib-sess-head b.is-run  { color: #4dd966; }
.ib-sess-head b.is-wait { color: #ff9933; }
.ib-sess-head b.is-int  { color: #ff7359; }

.ib-sess-head u {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  text-overflow: ellipsis;
}

.ib-sess-head s {
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
  text-decoration: none;
}

.ib-branch {
  flex: 0 0 auto;
  fill: none;
  stroke: rgba(255, 255, 255, 0.45);
  stroke-linecap: round;
  stroke-width: 2;
}

.ib-sess-tags {
  display: inline-flex;
  flex: 0 0 auto;
  margin-left: auto;
  align-items: center;
  gap: 5px;
  padding-left: 8px;
}

/* SessionTag: 9.5px medium mono on a 12% tint of its own colour. */
.ib-sess-tags em {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.09);
  font-size: 10px;
  font-style: normal;
  font-weight: 500;
  white-space: nowrap;
}

.ib-sess-tags em svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.ib-sess-tags .tag-opus   { color: #cc9eff; background: rgba(204, 158, 255, 0.14); }
.ib-sess-tags .tag-sonnet { color: #8cc7ff; background: rgba(140, 199, 255, 0.14); }
.ib-sess-tags .tag-haiku  { color: #8cf2bf; background: rgba(140, 242, 191, 0.14); }
.ib-sess-tags .tag-fable  { color: #ffb86b; background: rgba(255, 184, 107, 0.14); }
.ib-sess-tags .tag-gpt    { color: #73f2b8; background: rgba(115, 242, 184, 0.14); }
.ib-sess-tags .tag-gemini { color: #8cb8ff; background: rgba(140, 184, 255, 0.14); }
.ib-sess-tags .tag-sub    { color: #a68cf2; background: rgba(166, 140, 242, 0.14); }

/* Transcript preview: the user's prompt in green, the agent's lines in rust. */
.ib-line {
  display: flex;
  gap: 7px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ib-line i {
  flex: 0 0 auto;
  font-style: normal;
  font-weight: 700;
}

.ib-line em {
  color: rgba(255, 255, 255, 0.4);
  font-style: normal;
}

.t-user { color: #4dd966; }
.t-ai   { color: #d97857; }

.ib-usage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
}

.ib-usage span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ib-usage svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.ib-usage b { color: rgba(255, 255, 255, 0.68); font-weight: 500; }

.ib-spark {
  display: inline-flex;
  height: 14px;
  align-items: flex-end;
  gap: 2px;
}

.ib-spark i {
  display: block;
  width: 3px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.42);
}

/* Fake cursor */

.mac-cursor {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 25;
  display: block;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity 300ms ease, transform 450ms cubic-bezier(0.34, 1.4, 0.64, 1);
}

.mac-cursor svg {
  display: block;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
}

.mac-cursor.is-on { opacity: 1; }
.mac-cursor.is-big { transform: translate(-50%, -50%) scale(1.6); }
.mac-cursor.is-press { animation: macPress 350ms cubic-bezier(0.34, 1.56, 0.64, 1); }

.mac-cursor-ring {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 40px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
}

.mac-cursor.is-press .mac-cursor-ring {
  animation: macRing 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ══ Liquid Music mock — DESIGN.md light mode ═════════════════════════════ */

.mock-lm {
  --lm-canvas: #f2f2f5;
  --lm-accent: #ff144b;
  --lm-ink: #0d0d0f;
  --lm-ink-2: rgba(13, 13, 15, 0.56);
  --lm-ink-3: rgba(13, 13, 15, 0.34);
  /* Direct translations of the SwiftUI tints:
     NavigationGlassSurface = white 0.08
     PlayerGlassSurface     = white 0.10
     Controls               = untinted .regular.interactive() */
  --lm-glass-nav: rgba(255, 255, 255, 0.08);
  --lm-glass-player: rgba(255, 255, 255, 0.1);
  --lm-glass-control: rgba(255, 255, 255, 0.075);
}

.lm-traffic {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 30;
  display: flex;
  gap: 9px;
}

.lm-traffic .tl {
  width: 14px;
  height: 14px;
}

/* Real artwork cropped from the product capture supplied for this preview. */
[data-art] {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

[data-art="1"] { background-image: url("../images/products/liquid/this-i-know.png"); }
[data-art="2"] { background-image: url("../images/products/liquid/metropolis.jpg"); }
[data-art="3"] { background-image: url("../images/products/liquid/six-degrees.jpg"); }
[data-art="4"] { background-image: url("../images/products/liquid/pimp.jpg"); }
[data-art="5"] { background-image: url("../images/products/covers/5.jpg"); }
[data-art="6"] { background-image: url("../images/products/covers/6.jpg"); }
[data-art="7"] { background-image: url("../images/products/covers/7.jpg"); }
[data-art="8"] { background-image: url("../images/products/covers/8.jpg"); }

/* A real window on the desktop, not a full-bleed screenshot: inset from the
   screen edges, with the wallpaper visible around it. */
.lm-window {
  position: absolute;
  top: 44px;
  left: 50%;
  z-index: 3;
  width: 1280px;
  height: 696px;
  margin-left: -640px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--lm-canvas);
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.35),
    0 2px 6px rgba(0, 0, 0, 0.28),
    0 28px 70px rgba(0, 0, 0, 0.55);
  color: var(--lm-ink);
  font-family: var(--mock-ui);
}

.lm-web {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--lm-canvas);
}

/* 150 of the capture's 2536px window width. */
.lm-rail-shot {
  position: absolute;
  top: 56px;
  bottom: 0;
  left: 0;
  width: 5.91%;
  background: url("../images/products/lm-rail.jpg") top left / 100% auto no-repeat, var(--lm-canvas);
}

/* The page itself. Height comes from the capture's aspect so the artwork keeps
   its real proportions, and it is stacked twice to give the scroll somewhere
   to go. */
.lm-page {
  position: absolute;
  top: 56px;
  right: 0;
  left: 5.91%;
  /* Height follows the capture, so the artwork keeps its real proportions and
     the element is tall enough for the scroll to have somewhere to go. */
  aspect-ratio: 1420 / 1250;
  background: url("../images/products/lm-page.jpg") top left / 100% auto no-repeat;
  will-change: transform;
}

/* Invisible target inside the page, so the pointer can click a real card and
   the target travels with the content as it scrolls. */
.lm-hit {
  position: absolute;
  top: 12%;
  left: 3%;
  width: 13%;
  height: 15%;
  border-radius: 6px;
}

.lm-hit.is-hit {
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
  transition: background 140ms ease;
}

/* Floating navigation glass — 56pt tall, r16, leading inset 84 */

.lm-nav {
  position: absolute;
  top: 6px;
  right: 8px;
  left: 84px;
  z-index: 20;
  display: flex;
  height: 56px;
  align-items: center;
  gap: 14px;
  padding: 0 12px;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--lm-glass-nav);
  -webkit-backdrop-filter: blur(32px) saturate(195%) brightness(1.04);
  backdrop-filter: blur(32px) saturate(195%) brightness(1.04);
  isolation: isolate;
}

.lm-nav::before,
.lm-player::before {
  position: absolute;
  z-index: 1;
  border-radius: inherit;
  content: "";
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 50%, rgba(255, 255, 255, 0.12));
  box-shadow: inset 0 0 0 0.9px rgba(0, 0, 0, 0.102);
}

.lm-nav::after,
.lm-player::after {
  position: absolute;
  z-index: 3;
  padding: 0.8px;
  border-radius: inherit;
  content: "";
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.52) 50%, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.lm-nav > *,
.lm-player > * {
  position: relative;
  z-index: 2;
}

/* SwiftUI's `.regular` glass refracts the live backdrop; backdrop-filter alone
   only blurs it. This aligned content clone supplies that missing lens pass,
   then the same optical-edge stack as InactiveGlassHighlight sits above it. */
.lm-nav > .lm-glass-refraction,
.lm-player > .lm-glass-refraction {
  position: absolute;
  z-index: 0;
  background-image: url("../images/products/lm-page.jpg");
  background-position: var(--lm-lens-x, 0) var(--lm-lens-y, 0);
  background-repeat: no-repeat;
  background-size: var(--lm-lens-w, 1px) var(--lm-lens-h, 1px);
  content: "";
  filter: url("#rito-liquid-glass-distortion") blur(0.7px) saturate(1.16);
  inset: -12px;
  opacity: 0.24;
  pointer-events: none;
  transform: scale(1.012);
  transform-origin: center;
}

.lm-brand {
  display: inline-flex;
  min-width: 112px;
  align-items: center;
  gap: 8px;
}

.lm-brand img {
  display: block;
  width: 26px;
  height: 26px;
}

.lm-brand b {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.lm-search {
  display: flex;
  max-width: 620px;
  height: 40px;
  flex: 1;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--lm-ink-3);
  font-size: 13px;
}

.lm-search svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.lm-nav-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.lm-account {
  display: block;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: url("../images/products/liquid/account.png") center / cover no-repeat;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.lm-gear {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--lm-ink-2);
  background: var(--lm-glass-control);
  -webkit-backdrop-filter: blur(12px) saturate(180%) brightness(1.08);
  backdrop-filter: blur(12px) saturate(180%) brightness(1.08);
  box-shadow:
    inset 0 0 0 0.8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.lm-gear svg.is-filled {
  fill: currentColor;
  stroke: none;
}

/* Floating player glass — 76pt tall, r20, inset 12 */

.lm-player {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 20;
  display: flex;
  height: 76px;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  border: 0;
  border-radius: 20px;
  overflow: hidden;
  background: var(--lm-glass-player);
  -webkit-backdrop-filter: blur(32px) saturate(195%) brightness(1.04);
  backdrop-filter: blur(32px) saturate(195%) brightness(1.04);
  isolation: isolate;
}

.lm-track {
  display: inline-flex;
  width: 250px;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
}

.lm-art {
  position: relative;
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  box-shadow: 0 3px 16px rgba(0, 0, 0, 0.35), inset 0 0 0 0.75px rgba(255, 255, 255, 0.18);
  transition: background-image 420ms ease;
}

.lm-track-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.lm-track-copy b {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lm-track-copy small {
  overflow: hidden;
  color: var(--lm-ink-2);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lm-transport {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.lm-buttons {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* The app has no GlassEffectContainer, so every transport disc is its own glass
   layer stacked on the bar's — which is why they read brighter and frostier
   than the surface behind them. Keep the nesting. */
.lm-ctl {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--lm-ink);
  background: var(--lm-glass-control);
  -webkit-backdrop-filter: blur(12px) saturate(180%) brightness(1.08);
  backdrop-filter: blur(12px) saturate(180%) brightness(1.08);
  box-shadow:
    inset 0 0 0 0.8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: background 180ms cubic-bezier(0.32, 0.72, 0, 1),
    box-shadow 180ms cubic-bezier(0.32, 0.72, 0, 1),
    transform 120ms cubic-bezier(0.32, 0.72, 0, 1);
}

.lm-ctl.is-hit {
  background: rgba(255, 255, 255, 0.24);
  box-shadow:
    inset 0 0 0 0.8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
  transform: scale(0.96);
}

.lm-ctl svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.lm-ctl-play {
  width: 38px;
  height: 38px;
}

.lm-scrub {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
}

.lm-scrub em {
  width: 36px;
  flex: 0 0 auto;
  color: var(--lm-ink-2);
  font-size: 10px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.lm-scrub em:first-child { text-align: right; }

.lm-track-bar {
  position: relative;
  height: 4px;
  flex: 1;
  border-radius: 999px;
  background: rgba(13, 13, 15, 0.13);
}

.lm-track-bar i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  display: block;
  width: 28%;
  border-radius: 999px;
  background: var(--lm-accent);
}

.lm-track-bar b {
  position: absolute;
  top: 50%;
  left: 28%;
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
}

.lm-volume {
  display: inline-flex;
  width: 150px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.lm-vol-bar {
  position: relative;
  display: block;
  width: 92px;
  height: 4px;
  border-radius: 999px;
  background: rgba(13, 13, 15, 0.13);
}

.lm-vol-bar i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  display: block;
  width: 68%;
  border-radius: 999px;
  background: var(--lm-accent);
}

.lm-vol-bar b {
  position: absolute;
  top: 50%;
  left: 68%;
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.32), inset 0 0 0 0.5px rgba(0, 0, 0, 0.06);
  transform: translate(-50%, -50%);
}

/* ── Keyframes ─────────────────────────────────────────────────────────── */

@keyframes pheroEnter {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@keyframes pheroBlink {
  0%, 45%   { opacity: 1; }
  50%, 95%  { opacity: 0; }
  100%      { opacity: 1; }
}

@keyframes ibPulse {
  50% { opacity: 0.42; }
}

@keyframes macPress {
  0%   { transform: translate(-50%, -50%) scale(1.6); }
  25%  { transform: translate(-50%, -50%) scale(1.1); }
  100% { transform: translate(-50%, -50%) scale(1.6); }
}

@keyframes macRing {
  0%   { opacity: 0.7; transform: translate(-50%, -50%) scale(0); }
  60%  { opacity: 0.3; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.2); }
}

@keyframes lmEq {
  from { height: 22%; }
  to   { height: 100%; }
}

/* ── Responsive ────────────────────────────────────────────────────────── */

/* Compact device — triggered by either a narrow screen or a short one, since a
   landscape phone is wide but has almost no height to give the stage. */
@media (max-width: 720px), (max-height: 560px) {
  .mb-group span:not([data-clock]),
  .mb-group b {
    display: none;
  }

  .mb-notch-gap,
  .mb-right {
    display: none;
  }

  .lm-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .lm-content {
    padding: 70px 16px 0 4px;
  }
  .lm-rail {
    padding-top: 70px;
  }
  .lm-shelf,
  .lm-row {
    display: none;
  }
  .lm-hero-art {
    width: 84px;
    height: 84px;
  }
  .lm-hero-copy h3 {
    font-size: 24px;
  }
  .mock {
    --mock-top: 14px;
  }

  /* On a phone a full-size Mac would scale down to unreadable UI, so the whole
     device is authored smaller instead. The chassis stays — it is what makes
     the preview read as a Mac — but the screen inside is a stylised panel sized
     so the island and the app window keep roughly their real point sizes. */
  .mock-mac {
    --mock-w: 420px;
    --mock-h: 263px;
  }

  .mock-lm {
    --mock-w: 470px;
    --mock-h: 294px;
  }

  .lm-window {
    top: 32px;
    width: 430px;
    height: 234px;
    margin-left: -215px;
  }

  .mac-menubar {
    height: 20px;
    padding: 0 8px;
    font-size: 9px;
  }

  .mac-dock {
    bottom: 5px;
    gap: 5px;
    padding: 4px 6px;
    border-radius: 12px;
  }

  .dock-app,
  .dock-app img {
    width: 22px;
    height: 22px;
    border-radius: 6px;
  }

  .dock-sep { height: 20px; }

  /* Terminal text would be a few pixels tall here — the island is the point. */
  .mac-windows {
    display: none;
  }

  /* "File Edit Window Help" does not fit a 380pt screen — keep the mark and
     the clock, which is all a real narrow display would show anyway. */

  /* The window has a 960pt minimum in the app, so any phone-sized rendering is
     a compromise. Prefer legible chrome over a faithful aspect ratio scaled
     into mush: drop search and volume, keep everything that carries the design
     — glass, accent, artwork, transport, scrubber. */
  .lm-search,
  .lm-volume {
    display: none;
  }

  .lm-web {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .lm-nav {
    left: 76px;
    height: 50px;
  }

  .lm-track {
    width: auto;
    flex: 1;
  }

  .lm-transport {
    flex: 0 0 auto;
    width: 190px;
  }

}

@media (max-width: 720px) {






  .peek {
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  }

  .peek-stage {
    border-radius: 18px;
  }

  /* Sole way out of the preview on touch, so it gets a full 44px target. */
  .peek-close {
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
  }

  .phero-content {
    padding-inline: 18px;
  }

  .phero-title {
    letter-spacing: -0.045em;
    line-height: 1.22;
  }

  .phero-overline {
    margin-bottom: 10px;
    font-size: 10px;
  }

  .phero-meta {
    font-size: 9px;
  }

  /* The rotating word gets its own line so the headline never reflows. */
  .phero-rotator {
    justify-content: center;
  }
}

/* Very short viewports (landscape phones): drop the supporting copy so the
   headline and the mock both survive without scrolling. */
@media (max-height: 520px) {
  .phero-copy,
  .phero-meta {
    display: none;
  }

  .phero-content {
    padding-top: 22px;
  }
}


/* Landscape phone: ~390px of height total. Copy and meta are already gone; the
   headline and buttons shrink so the device still gets a usable share. */
@media (max-height: 430px) {
  .phero-overline {
    display: none;
  }

  .phero-content {
    padding-top: 12px;
  }

  .phero-title {
    margin-bottom: 8px;
    font-size: clamp(18px, 3.4vmin, 26px);
  }

  .phero-actions {
    gap: 8px;
    margin-top: 10px;
  }

  .phero-btn {
    min-height: 34px;
    padding: 7px 14px;
    font-size: 12px;
  }

  .mock {
    --mock-top: 8px;
  }

  .mock-mac {
    --mock-w: 360px;
    --mock-h: 225px;
  }

  .mock-lm {
    --mock-w: 400px;
    --mock-h: 250px;
  }

  .lm-window {
    top: 26px;
    width: 348px;
    height: 189px;
    margin-left: -174px;
  }

  .lm-nav {
    left: 58px;
    height: 40px;
  }

  .lm-brand b { font-size: 14px; }
  .lm-brand img { width: 20px; height: 20px; }

  .lm-avatar,
  .lm-gear {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .lm-web { grid-template-columns: 46px minmax(0, 1fr); }
  .lm-rail { padding-top: 52px; }
  .lm-rail-item { padding: 5px 0; }
  .lm-rail-item svg { width: 15px; height: 15px; }
  .lm-rail-item b { font-size: 7px; }
  .lm-content { padding: 52px 12px 0 4px; }
  .lm-hero-row { gap: 10px; padding-bottom: 12px; }
  .lm-hero-art { width: 56px; height: 56px; }
  .lm-hero-copy small { font-size: 7px; }
  .lm-hero-copy h3 { font-size: 16px; margin: 4px 0 3px; }
  .lm-hero-copy p { font-size: 9px; }
  .lm-grid { gap: 8px; }
  .lm-tile b { font-size: 9px; margin-top: 5px; }
  .lm-tile small { font-size: 8px; }

  .lm-player {
    height: 54px;
    padding: 0 10px;
    gap: 10px;
    border-radius: 14px;
  }

  .lm-art { width: 38px; height: 38px; border-radius: 4px; }
  .lm-track-copy b { font-size: 11px; }
  .lm-track-copy small { font-size: 9px; }
  .lm-ctl { width: 24px; height: 24px; }
  .lm-ctl-play { width: 30px; height: 30px; }
  .lm-scrub em { width: 26px; font-size: 8px; }
}

@media (hover: none), (pointer: coarse) {
  .flip-front:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flip-card-inner,
  .peek-scrim,
  .peek-stage,
  .ib-layer,
  .term,
  .island-skin {
    transition: none !important;
  }

  .peek.is-open .phero-content {
    animation: none;
  }

  .phero-caret,
  .ib-bell,
  .ib-dot-warn,
  .lm-eq i,
  .mac-cursor,
  .mac-cursor.is-press,
  .mac-cursor.is-press .mac-cursor-ring {
    animation: none;
  }

  /* No 3D flip — cross-fade the faces instead. */
  .flip-card.is-flipped .flip-card-inner {
    transform: none;
  }

  .flip-back {
    opacity: 0;
    transform: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .peek-scrim {
    background: rgba(6, 6, 9, 0.97);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .lm-nav,
  .lm-player {
    background: rgba(252, 252, 253, 0.97);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .lm-glass-refraction {
    display: none;
  }

  .term {
    background: #16161a;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
