/* DynamicBar — site styles
   The page hangs from its centre line, like the island hangs from the notch.
   Colours come from the app's own dusk desktop; the island is always pure black. */

:root {
  --ink: #000;               /* the island, in both themes */
  --bg: #0e1120;             /* dusk night */
  --surface: #171b2f;
  --surface-2: #1d2238;
  --line: rgba(196, 206, 240, 0.1);
  --line-2: rgba(196, 206, 240, 0.18);
  --text: #eef0f6;
  --muted: #9aa3bf;
  --faint: #6b7392;
  --blue: #0a84ff;
  --sand: #c9a37d;
  --coral: #f24d66;
  --orange: #ff9933;
  --on-primary: #0e1120;
  --primary: #eef0f6;
  --code-bg: #0a0d19;
  --code-text: #d7dbe8;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
  --dusk: linear-gradient(180deg, #1f2945 0%, #4a5c87 55%, #c9a37d 100%);
  --spring: cubic-bezier(0.34, 1.32, 0.5, 1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --display: "Bricolage Grotesque", "SF Pro Display", system-ui, sans-serif;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #edf0f6;             /* dawn */
  --surface: #ffffff;
  --surface-2: #f3f5fa;
  --line: rgba(18, 22, 42, 0.09);
  --line-2: rgba(18, 22, 42, 0.17);
  --text: #12162a;
  --muted: #586079;
  --faint: #868da5;
  --on-primary: #fff;
  --primary: #000;
  --code-bg: #12162a;
  --code-text: #dfe3ee;
  --shadow: 0 30px 70px -34px rgba(30, 40, 80, 0.35);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #edf0f6; --surface: #ffffff; --surface-2: #f3f5fa;
    --line: rgba(18, 22, 42, 0.09); --line-2: rgba(18, 22, 42, 0.17);
    --text: #12162a; --muted: #586079; --faint: #868da5;
    --on-primary: #fff; --primary: #000; --code-bg: #12162a; --code-text: #dfe3ee;
    --shadow: 0 30px 70px -34px rgba(30, 40, 80, 0.35);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 110px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
code, pre, kbd, textarea { font-family: var(--mono); font-variant-ligatures: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
::selection { background: rgba(10, 132, 255, 0.35); }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }

/* ---------- Type scale ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(50px, 9vw, 112px); line-height: 0.95; letter-spacing: -0.03em; font-variation-settings: "wdth" 92; }
h2 { font-size: clamp(34px, 5vw, 56px); line-height: 1.03; letter-spacing: -0.025em; font-variation-settings: "wdth" 94; }
h3 { font-size: 22px; line-height: 1.2; letter-spacing: -0.02em; }
.lead { max-width: 34em; margin: 22px auto 0; font-size: clamp(17px, 2vw, 20px); line-height: 1.55; color: var(--muted); }
p { text-wrap: pretty; }

/* ---------- The nav is an island ---------- */
.nav {
  position: fixed; top: 0; left: 50%; z-index: 50; transform: translateX(-50%);
  display: flex; align-items: center; gap: 2px; height: 44px; padding: 0 8px 0 14px;
  background: var(--ink); color: #fff; border-radius: 0 0 20px 20px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
}
.nav::before, .nav::after { content: ""; position: absolute; top: 0; width: 14px; height: 14px; }
.nav::before { right: 100%; background: radial-gradient(circle at 0 100%, transparent 13.5px, var(--ink) 14px); }
.nav::after { left: 100%; background: radial-gradient(circle at 100% 100%, transparent 13.5px, var(--ink) 14px); }
.brand { display: flex; align-items: center; gap: 8px; margin-right: 8px; font: 600 15px var(--display); text-decoration: none; }
.brand img { width: 22px; height: 22px; border-radius: 6px; }
.nav a.link { padding: 6px 11px; border-radius: 999px; font-size: 14px; color: rgba(255, 255, 255, 0.62); text-decoration: none; transition: color 0.2s, background 0.2s; }
.nav a.link:hover, .nav a.link[aria-current] { color: #fff; background: rgba(255, 255, 255, 0.1); }
.theme-btn {
  all: unset; cursor: pointer; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  color: rgba(255, 255, 255, 0.75); transition: background 0.2s, color 0.2s;
}
.theme-btn:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.theme-btn:focus-visible { outline: 2px solid var(--blue); }
.theme-btn svg { width: 17px; height: 17px; }
.theme-btn .sun { display: none; }
:root[data-theme="light"] .theme-btn .sun { display: block; }
:root[data-theme="light"] .theme-btn .moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-btn .sun { display: block; }
  :root:not([data-theme="dark"]) .theme-btn .moon { display: none; }
}
.nav .btn.get { margin-left: 4px; height: 30px; padding: 0 13px; font-size: 13px; background: #fff; color: #000; border-color: #fff; }
@media (max-width: 640px) { .nav .opt { display: none; } .brand { font-size: 0; gap: 0; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 999px;
  font: 600 15px/1 var(--sans); text-decoration: none; color: var(--text); background: transparent; border: 1px solid var(--line-2);
  cursor: pointer; transition: transform 0.25s var(--spring), border-color 0.2s; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13.5px; }
.btn svg { width: 17px; height: 17px; }
.btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.fine { margin: 16px 0 0; font-size: 14px; color: var(--faint); }
.fine.brew { margin-top: 6px; }
.fine code { padding: 2px 7px; border-radius: 6px; font-size: 13px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); user-select: all; }

/* ---------- Hero ---------- */
.hero { padding: 132px 0 0; text-align: center; }
.stage { width: min(1040px, 100%); margin: 72px auto 0; perspective: 1600px; }
.screen {
  position: relative; aspect-ratio: 16 / 9.6; overflow: hidden; border-radius: 20px 20px 8px 8px;
  background: var(--dusk); border: 10px solid #0b0c10; border-bottom-width: 14px;
  box-shadow: 0 0 0 1px #2b2d35, var(--shadow);
  transform: rotateX(var(--tilt, 12deg)); transform-origin: 50% 100%;
}
.ridges { position: absolute; inset: auto 0 0 0; width: 100%; height: 60%; }
.menubar {
  position: absolute; inset: 0 0 auto 0; height: 26px; display: flex; align-items: center; gap: 16px; padding: 0 16px;
  background: rgba(0, 0, 0, 0.18); font-size: 12.5px; color: rgba(255, 255, 255, 0.85);
}
.menubar .right { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.menubar svg { width: 15px; height: 15px; }
.base { height: 15px; margin: 0 -4%; border-radius: 0 0 18px 18px; background: linear-gradient(#d4d7dd, #8d9098); }
.base::after { content: ""; display: block; width: 15%; height: 6px; margin: 0 auto; border-radius: 0 0 8px 8px; background: #a9acb3; }
@media (max-width: 700px) {
  .screen { aspect-ratio: 3 / 4; border-width: 7px; }
  .screen .island-wrap { transform: translateX(-50%) scale(0.8); }
  .menubar .opt { display: none; }
}

/* ---------- The live island ---------- */
.island-wrap { position: absolute; top: 0; left: 50%; z-index: 3; transform: translateX(-50%); transform-origin: top center; }
.island {
  --w: 190px; --h: 32px; --r: 11px; --ear: 0px;
  all: unset; position: relative; display: block; width: var(--w); height: var(--h); cursor: pointer;
  background: var(--ink); color: #fff; border-radius: 0 0 var(--r) var(--r);
  transition: width 0.6s var(--spring), height 0.6s var(--spring), border-radius 0.6s var(--spring), transform 0.3s var(--spring);
}
.island.glass {
  background: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.92) 24%, rgba(10, 12, 26, 0.6) 66%, rgba(22, 26, 52, 0.42) 100%);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.3), 0 20px 50px rgba(0, 0, 0, 0.3);
}
.island::before, .island::after { content: ""; position: absolute; top: 0; width: var(--ear); height: var(--ear); transition: width 0.6s var(--spring), height 0.6s var(--spring); }
.island::before { right: 100%; background: radial-gradient(circle at 0 100%, transparent calc(var(--ear) - 0.5px), #000 var(--ear)); }
.island::after { left: 100%; background: radial-gradient(circle at 100% 100%, transparent calc(var(--ear) - 0.5px), #000 var(--ear)); }
.island:not(.open):hover { transform: scale(1.05); }
.face { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0s 0.2s; }
.face.show { opacity: 1; visibility: visible; transition: opacity 0.3s 0.2s; }
.row { display: flex; align-items: center; justify-content: space-between; height: 32px; padding: 0 11px; font-size: 13px; font-weight: 600; }
.art { flex: none; position: relative; width: 20px; height: 20px; border-radius: 5px; overflow: hidden; background: linear-gradient(135deg, #f28c73, #8c4dbf); }
.art::after { content: ""; position: absolute; width: 32%; height: 32%; border-radius: 50%; background: rgba(255, 255, 255, 0.85); top: 22%; right: 20%; }
.bars { display: flex; gap: 2px; align-items: center; height: 12px; }
.bars i { width: 3px; height: 4px; border-radius: 3px; background: #f28c80; animation: eq 0.9s ease-in-out infinite alternate; }
.bars i:nth-child(2) { animation-duration: 0.6s; } .bars i:nth-child(3) { animation-duration: 1.1s; } .bars i:nth-child(4) { animation-duration: 0.75s; }
@keyframes eq { from { height: 3px; } to { height: 12px; } }
.lvl { flex: none; width: 54px; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.2); overflow: hidden; }
.lvl i { display: block; height: 100%; width: 65%; background: #fff; border-radius: 5px; transition: width 0.4s var(--ease); }
.batt { position: relative; width: 24px; height: 11px; border-radius: 3px; border: 1.5px solid rgba(255, 255, 255, 0.5); padding: 1px; }
.batt::after { content: ""; position: absolute; right: -4px; top: 2.5px; width: 2px; height: 4px; border-radius: 0 2px 2px 0; background: rgba(255, 255, 255, 0.5); }
.batt i { display: block; height: 100%; width: 64%; background: #34c759; border-radius: 1px; }
.player { padding: 44px 26px 0; text-align: left; }
.player .top { display: flex; gap: 14px; align-items: center; }
.player .art { width: 52px; height: 52px; border-radius: 12px; }
.player .t { font-size: 15px; font-weight: 600; line-height: 1.25; }
.player .a { font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, 0.45); }
.prog { display: flex; align-items: center; gap: 8px; margin-top: 14px; font: 500 10px var(--mono); color: rgba(255, 255, 255, 0.45); }
.prog div { flex: 1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.prog div i { display: block; height: 100%; width: 20%; background: rgba(255, 255, 255, 0.7); }
.ctl { display: flex; justify-content: space-around; align-items: center; margin-top: 12px; opacity: 0.85; }
.ctl svg { width: 18px; height: 18px; fill: #fff; }
.ctl svg.big { width: 26px; height: 26px; }
.dots { position: absolute; bottom: 9px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; }
.dots i { width: 5px; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.28); }
.dots i.on { width: 14px; background: rgba(255, 255, 255, 0.85); }
.tray { display: flex; gap: 12px; justify-content: center; padding-top: 46px; }
.tile { width: 58px; text-align: center; font-size: 10px; font-weight: 500; color: rgba(255, 255, 255, 0.65); }
.tile div { width: 46px; height: 46px; margin: 0 auto 6px; border-radius: 10px; display: grid; place-items: center; }
.side-pill {
  position: absolute; right: 2.4%; top: 50%; z-index: 3; width: 30px; height: 150px; padding: 4px; border-radius: 20px;
  display: flex; align-items: flex-end; background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 255, 255, 0.3);
  transform: translate(80px, -50%); transition: transform 0.6s var(--spring);
}
.side-pill.show { transform: translate(0, -50%); }
.side-pill i { display: block; width: 100%; height: 60%; border-radius: 16px; background: #fff; transition: height 0.5s var(--ease); }
@media (max-width: 700px) { .side-pill { display: none; } }

/* Looping animations stop while their part of the page is off screen. */
.paused, .paused * { animation-play-state: paused !important; }

/* A segmented control, as in macOS */
.seg {
  display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 2px; padding: 3px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.seg button, .seg a {
  all: unset; cursor: pointer; padding: 7px 14px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--muted);
  transition: color 0.2s, background 0.25s var(--ease), box-shadow 0.25s;
}
.seg button:hover, .seg a:hover { color: var(--text); }
.seg [aria-pressed="true"], .seg [aria-current="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18), 0 0 0 0.5px var(--line-2); }
.seg button:focus-visible, .seg a:focus-visible { outline: 2px solid var(--blue); }
.hero .seg { margin-top: 28px; }

/* ---------- Sections ---------- */
.section { padding-top: 130px; }
.head { max-width: 760px; margin: 0 auto 56px; text-align: center; }

/* ---------- Features: symmetric rows ---------- */
.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid + .grid { margin-top: 20px; }
@media (max-width: 860px) { .grid.two, .grid.three { grid-template-columns: 1fr; } }
.feature { display: flex; flex-direction: column; overflow: hidden; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); }
.feature .shot { position: relative; aspect-ratio: 2 / 1; overflow: hidden; background: #3f7fe8; }
.grid.three .feature .shot { aspect-ratio: 16 / 10; }
/* Narrow cards zoom into the top centre so the island reads at a glance. */
.grid.three .feature .shot img, .grid.three .feature .shot video { width: 160%; max-width: none; height: auto; margin-left: -30%; }
.feature .shot img, .feature .shot video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
/* A tall, narrow recording: shown whole, over a blurred copy of its own wallpaper. */
.feature .shot.pill { background: #1d63e8 url("img/side-bg.jpg") center / 100% 100%; }
.feature .shot.pill::before { content: ""; position: absolute; inset: -40px; background: inherit; filter: blur(40px); }
/* The recording is the right edge of the screen, so it sits on the card's right edge and fades in from the left. */
.feature .shot.pill video { position: absolute; top: 0; right: 0; width: auto; height: 100%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%); mask-image: linear-gradient(90deg, transparent, #000 45%); }
.feature .body { flex: 1; padding: 24px 26px 28px; text-align: center; }
.feature p { max-width: 32em; margin: 8px auto 0; font-size: 15.5px; color: var(--muted); }

/* ---------- Settings tour ---------- */
.tour { text-align: center; }
.tour-caption { min-height: 1.6em; margin: 16px 0 30px; color: var(--muted); }
.tour-shot { position: relative; width: min(860px, 100%); margin: 0 auto; aspect-ratio: 1200 / 1023; }
.tour-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 0.45s var(--ease); }
.tour-shot img.on { opacity: 1; }

/* ---------- Welcome ---------- */
.welcome-video { width: min(860px, 100%); margin: 0 auto; overflow: hidden; border-radius: 22px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin: 40px 0 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; text-align: center; font-size: 14px; color: var(--muted); }
.steps img { margin-bottom: 10px; border-radius: 12px; }
.steps li::before { content: counter(s) ". "; font-weight: 600; color: var(--text); }
@media (max-width: 860px) {
  .steps { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 72%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .steps li { scroll-snap-align: center; }
}

/* ---------- Developer teaser ---------- */
.card { padding: 30px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.card h3 { margin-bottom: 8px; }
.card p { max-width: 30em; margin: 0 auto 22px; font-size: 15.5px; color: var(--muted); }
.kit-icon { width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--orange), var(--coral)); }
.kit-icon svg { width: 24px; height: 24px; }
.card .btn-row { margin-top: 0; }

/* ---------- FAQ ---------- */
details { padding: 20px 0; border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 20px; font: 600 19px/1.35 var(--display); letter-spacing: -0.01em; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font: 300 26px/1 var(--sans); color: var(--muted); transition: transform 0.3s var(--ease); }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 10px 0 0; color: var(--muted); }

/* ---------- Closing + footer ---------- */
.closing { padding: 150px 0 110px; text-align: center; }
footer { padding: 28px 0 44px; border-top: 1px solid var(--line); font-size: 14px; color: var(--faint); }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px 28px; }
footer nav { display: flex; gap: 22px; }
footer a { text-decoration: none; } footer a:hover { color: var(--text); }

/* ================= Developer page ================= */
.dev-hero { padding: 132px 0 0; text-align: center; }
.dev-hero .kit-icon { width: 72px; height: 72px; margin-bottom: 26px; border-radius: 20px; }
.dev-hero .kit-icon svg { width: 32px; height: 32px; }
.dev-nav { position: sticky; top: 54px; z-index: 20; display: flex; justify-content: center; margin-top: 44px; padding: 0 16px; }
.dev-nav .seg { background: color-mix(in srgb, var(--surface-2) 85%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.doc { padding-top: 110px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.cols > * { min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }
.steplist { display: flex; flex-direction: column; gap: 24px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steplist li { counter-increment: s; position: relative; padding-left: 48px; }
.steplist li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font: 600 14px var(--sans); background: var(--ink); color: #fff;
}
.steplist h3 { margin-bottom: 4px; font-size: 18px; }
.steplist p { margin: 0 0 10px; font-size: 15.5px; color: var(--muted); }
p code, li code, td code { padding: 1px 5px; border-radius: 5px; font-size: 0.86em; background: var(--surface-2); border: 1px solid var(--line); }
kbd { padding: 1px 6px; border-radius: 5px; font-size: 0.86em; border: 1px solid var(--line-2); border-bottom-width: 2px; }
.code { overflow: hidden; border-radius: 16px; background: var(--code-bg); color: var(--code-text); }
.code header { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); font-size: 13px; color: #8a92ad; }
.code header .acts { margin-left: auto; display: flex; gap: 6px; }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; font-size: 13px; line-height: 1.65; }
.code pre.tree { color: #9aa3bf; } .code pre.tree b { color: #eef0f6; font-weight: 500; }
.copy {
  all: unset; cursor: pointer; padding: 4px 10px; border-radius: 8px; font: 500 12.5px var(--sans); color: #aab2cc;
  border: 1px solid rgba(255, 255, 255, 0.12); transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.copy:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.copy:focus-visible { outline: 2px solid var(--blue); }
.copy.done { color: #4cd964; border-color: rgba(76, 217, 100, 0.45); }
.t-k { color: #ff7ab2; } .t-s { color: #fc8a7d; } .t-n { color: #d9c97c; } .t-c { color: #6c7a96; font-style: italic; } .t-p { color: #b78bf0; }
.note { padding: 16px 18px; border-radius: 16px; font-size: 15px; background: color-mix(in srgb, var(--sand) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--sand) 35%, transparent); }
.tbl { overflow-x: auto; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { font-weight: 600; background: var(--surface-2); }
td { color: var(--muted); }
td:first-child { color: var(--text); }
tr:last-child td { border-bottom: 0; }
.layout-fig { display: block; width: 100%; max-width: 520px; margin: 0 auto; }
.layout-fig text { fill: var(--muted); font: 11px var(--mono); }
.layout-fig text.safe-lbl { fill: #e08a3c; font-size: 13px; }

/* Playground */
.play { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.play > * { min-width: 0; }
@media (max-width: 960px) { .play { grid-template-columns: 1fr; } }
.editor { display: flex; flex-direction: column; }
.editor textarea {
  flex: 1; width: 100%; min-height: 470px; padding: 16px 18px; resize: vertical; border: 0; outline: none; tab-size: 2;
  background: transparent; color: var(--code-text); font: 13px/1.65 var(--mono); font-variant-ligatures: none; white-space: pre;
}
.sim { display: flex; flex-direction: column; gap: 14px; }
.sim-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sim-tools select { height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: 500 13.5px var(--sans); }
.sim-tools label { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.sim-screen { position: relative; min-height: 330px; overflow: hidden; border-radius: 18px; background: var(--dusk); }
.sim-island {
  position: absolute; top: 0; left: 50%; width: 378px; height: 172px; overflow: hidden; border-radius: 0 0 34px 34px;
  transform: translateX(-50%) scale(var(--s, 1)); transform-origin: top center; transition: height 0.5s var(--spring), width 0.5s var(--spring);
  background: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.92) 22%, rgba(8, 10, 22, 0.75) 65%, rgba(20, 24, 50, 0.6) 100%);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.28);
}
.sim-island .notch { position: absolute; top: 0; left: 50%; z-index: 2; width: 190px; height: 32px; transform: translateX(-50%); background: #000; border-radius: 0 0 11px 11px; }
.sim-island .safe { position: absolute; inset: 36px 32px 26px; display: flex; align-items: center; justify-content: center; }
.sim-island.guides .safe { outline: 1px dashed rgba(255, 153, 51, 0.75); }
.sim-flash { position: absolute; top: 0; left: 50%; z-index: 3; display: none; align-items: center; justify-content: space-between; width: 190px; height: 32px; padding: 0 12px; transform: translateX(-50%); background: #000; border-radius: 0 0 11px 11px; font: 600 13px var(--sans); color: #fff; transition: width 0.5s var(--spring); }
.sim-flash.on { width: 300px; }
.console { height: 120px; overflow: auto; padding: 10px 16px; font: 12px/1.6 var(--mono); color: #9aa3bf; }
.console .err { color: #ff7b7b; } .console .warn { color: #ffcc66; }
.n { display: flex; min-width: 0; }
.n-v { flex-direction: column; } .n-h { flex-direction: row; align-items: center; }
.n-z { display: grid; } .n-z > * { grid-area: 1 / 1; }
.n-scroll { flex-direction: column; overflow-y: auto; max-height: 100%; align-self: stretch; }
.n-grid { display: grid; }
.n-text { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; color: #fff; line-height: 1.2; }
.n-btn { all: unset; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); color: #fff; font: 600 13px var(--sans); }
.n-btn:hover { filter: brightness(1.2); } .n-btn:active { transform: scale(0.95); }
.n-prog { align-self: stretch; height: 5px; overflow: hidden; border-radius: 5px; background: rgba(255, 255, 255, 0.2); }
.n-prog i { display: block; height: 100%; border-radius: 5px; }
.n-spacer { flex: 1; } .n-div { align-self: stretch; height: 1px; background: rgba(255, 255, 255, 0.15); }
.n-sym { display: inline-grid; place-items: center; line-height: 1; }

/* AI prompt */
.idea {
  width: 100%; min-height: 100px; padding: 14px 16px; resize: vertical; outline: none; border-radius: 16px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: 16px/1.5 var(--sans);
}
.idea:focus { border-color: var(--blue); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 22px; }
.chips button { all: unset; cursor: pointer; padding: 6px 13px; border-radius: 999px; font-size: 13.5px; color: var(--muted); border: 1px solid var(--line-2); transition: color 0.2s, border-color 0.2s; }
.chips button:hover { color: var(--text); border-color: var(--muted); }
.chips button:focus-visible { outline: 2px solid var(--blue); }
.prompt-out pre { max-height: 560px; white-space: pre-wrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.001ms !important; }
  .screen { transform: none; }
}
