@font-face { font-family: "Nunito"; src: url(fonts/nunito-latin.woff2) format("woff2"); font-weight: 400 1000; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito"; src: url(fonts/nunito-latin-ext.woff2) format("woff2"); font-weight: 400 1000; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Nunito Sans"; src: url(fonts/nunito-sans-latin.woff2) format("woff2"); font-weight: 400 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito Sans"; src: url(fonts/nunito-sans-latin-ext.woff2) format("woff2"); font-weight: 400 800; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; src: url(fonts/jetbrains-mono-latin.woff2) format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2212; }
@font-face { font-family: "JetBrains Mono"; src: url(fonts/jetbrains-mono-latin-ext.woff2) format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F; }

@property --tint { syntax: "<color>"; inherits: true; initial-value: #ec7a5c; }

:root {
  /* the tray: ebru paper, warm and light; the black notch and panel sit on it like the hardware */
  --ink: #f2eee6;       /* paper: the page ground */
  --ink-2: #e9e3d7;     /* paper, a step darker: the privacy section */
  --ink-3: #e4ddcf;     /* sheet underlay before pigment renders */
  --line: rgba(24, 28, 36, .13);
  --deep: #3a5a8a;      /* the ebru's deep blue: links, focus, accents on paper */
  --night: #16191f;     /* text and the primary button */
  /* Damla's own colours: the agents' pale water blue, white, the cover's coral, amber for waiting */
  --mint: #3a5a8a;      /* on paper the water blue reads too pale: the deep blue stands in */
  --pale: #f3f6fa;      /* the default accent is white */
  --sea: #8fb3e6;
  --teal: #233651;
  --bone: #2a2f38;      /* command text and quiet buttons, now ink on paper */
  --edge: #fbf8f1;      /* the held edge of a pulled sheet */
  --coral: #f4a18b;     /* the demo cover's tint: Allow, the progress bar */
  --saffron: #ffcc5c;   /* Theme.amber */
  --indigo: #6d7fd6;
  --rose: #d98aa0;
  /* text on paper */
  --text: #16191f;
  --mute: #4c5361;
  --faint: #7a7f89;
  /* the product's own colours */
  --agent: #cce3ff;
  --amber: #ffcc5c;

  --display: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Nunito Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  --mac: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.36, .5, 1);
  --tint: var(--coral);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #c9c1b1 var(--ink); }
body {
  margin: 0; background: var(--ink); color: var(--text);
  font: 400 1.0625rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  caret-color: var(--mint);
  overflow-x: clip;
}
::selection { background: #cce3ff; color: var(--night); }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 850; margin: 0; text-wrap: balance; letter-spacing: -.022em; }
p { margin: 0; text-wrap: pretty; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
code, kbd, pre { font-family: var(--mono); }
kbd {
  display: inline-block; min-width: 1.7em; padding: .05em .42em; margin: 0 .08em;
  border: 1px solid rgba(24, 28, 36, .22); border-bottom-width: 2px; border-radius: 6px;
  font-size: .8em; line-height: 1.5; text-align: center; color: var(--text); background: rgba(255, 255, 255, .55);
}
svg { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--night); color: #fff; padding: .6em 1em; border-radius: 10px; }
.skip:focus { top: 44px; }

/* ——— the water ——— */
.tray { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; background: var(--ink); }
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .05; filter: invert(1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, .foot { position: relative; z-index: 2; }

/* ——— the notch, which is also the menu ——— */
.notch {
  --nw: 196px;
  position: fixed; top: 0; left: 50%; z-index: 50; translate: -50% 0;
  width: var(--nw); background: #000; color: #fff;
  border-radius: 0 0 14px 14px;
  transition: width .5s var(--spring), border-radius .5s var(--ease-out);
  font-family: var(--mac);
}
.notch::before, .notch::after {
  content: ""; position: absolute; top: 0; width: 10px; height: 10px; pointer-events: none;
}
.notch::before { left: -10px; background: radial-gradient(circle at 0 100%, transparent 9.5px, #000 10px); }
.notch::after { right: -10px; background: radial-gradient(circle at 100% 100%, transparent 9.5px, #000 10px); }
.notch[data-mode="agents"], .notch[data-mode="music"], .notch[data-mode="notif"] { --nw: 236px; }
.notch[data-open="true"] { --nw: min(480px, calc(100vw - 24px)); border-radius: 0 0 28px 28px; }
.notch-bar {
  display: flex; align-items: center; justify-content: space-between; width: 100%; height: 32px; padding: 0 12px 0 10px;
}
.notch-bar .mascot.mini { width: 22px; height: 22px; }
.notch-status { position: relative; height: 18px; min-width: 44px; display: grid; justify-items: end; align-items: center; font: 600 13px/1 var(--mac); font-variant-numeric: tabular-nums; }
.ns { grid-area: 1 / 1; opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .4s var(--ease-out); white-space: nowrap; }
.notch[data-mode="brand"] .ns-brand, .notch[data-mode="music"] .ns-music, .notch[data-mode="agents"] .ns-agents,
.notch[data-mode="files"] .ns-files, .notch[data-mode="notif"] .ns-notif { opacity: 1; transform: none; }
.ns-brand { font: 800 13px/1 var(--display); letter-spacing: .01em; color: rgba(255,255,255,.86); }
.ns-agents { color: var(--amber); }
.ns-files { color: rgba(255,255,255,.8); }
.ns-notif { display: flex; align-items: center; gap: 5px; font: 600 10.5px/1 ui-rounded, var(--mac); color: rgba(255,255,255,.8); }
.ns-notif svg { width: 13px; height: 13px; fill: #fff; }
.ns-music { display: flex; gap: 3px; align-items: center; height: 16px; }
.ns-music i, .eq i { display: block; width: 3px; border-radius: 2px; background: var(--tint); height: 100%; transform-origin: 50% 50%; animation: eq 1s ease-in-out infinite alternate; }
.ns-music i:nth-child(2), .eq i:nth-child(2) { animation-duration: .7s; animation-delay: -.3s; }
.ns-music i:nth-child(3), .eq i:nth-child(3) { animation-duration: .85s; animation-delay: -.5s; }
.ns-music i:nth-child(4), .eq i:nth-child(4) { animation-duration: .6s; animation-delay: -.2s; }
@keyframes eq { from { transform: scaleY(.3); } to { transform: scaleY(1); } }

.notch-menu {
  display: grid; grid-template-rows: 0fr; overflow: hidden;
  transition: grid-template-rows .5s var(--spring);
}
.notch[data-open="true"] .notch-menu { grid-template-rows: 1fr; }
.notch-menu-in { min-height: 0; overflow: hidden; }
.notch-menu ul {
  list-style: none; margin: 0; padding: 6px 18px 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px;
  opacity: 0; transition: opacity .25s;
}
.notch-tools { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px 16px; opacity: 0; transition: opacity .25s; }
.notch[data-open="true"] .notch-menu ul, .notch[data-open="true"] .notch-tools { opacity: 1; transition-delay: .12s; }
.notch-menu a { display: block; padding: 8px 0; text-decoration: none; font: 800 1.08rem/1.2 var(--display); color: rgba(255,255,255,.9); letter-spacing: -.01em; }
.notch-menu a:hover { color: var(--tint); }
.lang { display: flex; background: rgba(255,255,255,.1); border-radius: 999px; padding: 3px; }
.lang button { font: 600 12px/1 var(--mac); padding: 6px 11px; border-radius: 999px; color: rgba(255,255,255,.7); }
.lang button[aria-pressed="true"] { background: rgba(255,255,255,.9); color: #000; }

/* ——— hero: the tray ——— */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 var(--gutter) clamp(28px, 6vh, 64px); cursor: crosshair; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to top, rgba(242,238,230,.95) 0%, rgba(242,238,230,.82) 26%, rgba(242,238,230,0) 58%);
}
.hero-inner { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 72px); align-items: end; max-width: 1480px; width: 100%; margin: 0 auto; cursor: auto; }
.kicker { margin-bottom: clamp(12px, 2vh, 20px); font: 600 .9rem/1.2 var(--sans); letter-spacing: .01em; color: var(--mint); }
.hero h1 { font-size: clamp(2.9rem, 6.4vw, 6rem); line-height: .98; font-weight: 900; letter-spacing: -.03em; max-width: 13ch; text-shadow: 0 2px 24px rgba(242,238,230,.7); }
.lede { margin-top: clamp(16px, 2.4vh, 26px); font-size: clamp(1.05rem, 1.3vw, 1.25rem); color: var(--mute); max-width: 44ch; }
.hint {
  position: absolute; left: 50%; bottom: 14px; translate: -50% 0; margin: 0; font-size: .82rem; color: var(--faint);
  transition: opacity .6s; pointer-events: none; white-space: nowrap;
}
.hero.combed .hint { opacity: 0; }
@media (hover: none) { .hint { display: none; } }

.install-block { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; max-width: 460px; justify-self: end; width: 100%; min-width: 0; }
.brew { min-width: 0; }
.hero-inner > *, .finale-grid > *, .pv-grid > *, .book-head > *, .chapter > * { min-width: 0; }
.brew {
  display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 16px;
  background: rgba(255,253,248,.94); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 20px -14px rgba(40,34,20,.4);
}
.brew code { flex: 1; min-width: 0; font-size: .82rem; color: var(--bone); white-space: nowrap; overflow-x: auto; scrollbar-width: none; padding: 10px 0; }
.brew code::-webkit-scrollbar { display: none; }
.copy {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 10px;
  font-size: .85rem; font-weight: 600; color: var(--bone); background: rgba(24,28,36,.06);
  transition: background .2s;
}
.copy:hover { background: rgba(24,28,36,.11); }
.copy svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.copy.done { color: #fff; background: var(--deep); }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 54px; padding: 0 24px; border-radius: 14px;
  font: 650 1.02rem/1 var(--sans); text-decoration: none; letter-spacing: -.005em;
  transition: transform .25s var(--ease-out), box-shadow .25s, background .2s;
}
.button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.button.primary { background: var(--night); color: #fff; box-shadow: 0 10px 24px -12px rgba(20,18,12,.55); }
.button.primary:hover { background: #000; transform: translateY(-1px); box-shadow: 0 16px 30px -14px rgba(20,18,12,.6); }
.button.primary:active { transform: translateY(0); }
.button.quiet { height: 46px; padding: 0 18px; border: 1px solid rgba(24,28,36,.24); color: var(--bone); font-size: .95rem; }
.button.quiet:hover { background: rgba(24,28,36,.05); }
.fine { font-size: .85rem; color: var(--faint); }
.version:not(:empty)::before { content: "· "; }

/* ——— stage: the panel melts out of the notch ——— */
.stage { position: relative; }
.js .stage { height: 860svh; }
.stage-pin { position: relative; }
.js .stage-pin { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.js .stage-pin::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(242,238,230,.97) 0%, rgba(242,238,230,.92) 38%, rgba(242,238,230,.6) 50%, rgba(242,238,230,0) 64%);
}
/* The panel is drawn at the app's own size (1px = 1pt: 384 × 218, pill 336 × 36) and scaled up as one piece. */
.panel-wrap {
  --ps: 1;
  position: absolute; top: 0; left: 50%; z-index: 3; width: 384px; margin-left: -192px;
  transform: scale(var(--ps)); transform-origin: 50% 0;
  display: flex; flex-direction: column; align-items: center;
  font-family: var(--mac); color: #fff; -webkit-font-smoothing: antialiased;
}
.panel {
  --open: 0; --content: 0; --page-h: 218px;
  position: relative;
  width: calc(196px + (384px - 196px) * var(--open));
  height: calc(32px + (var(--page-h) - 32px) * var(--open));
  border-radius: 0 0 calc(12px + 10px * var(--open)) calc(12px + 10px * var(--open));
  background: linear-gradient(180deg, #000 0, #000 13%, color-mix(in oklab, var(--tint) 20%, #1a1115) 100%);
  box-shadow: 0 calc(22px * var(--open)) calc(44px * var(--open)) -14px rgba(0,0,0,.7), inset 0 -1px 0 rgba(255,255,255,calc(.07 * var(--open)));
  transition: --tint 1.1s var(--ease-out), height .55s var(--ease-out), border-radius .4s var(--ease-out);
}
/* Another app's notification: the notch drops into a card (the app's glass, drawn here without a lens). */
.panel.as-card {
  border-radius: 0 0 24px 24px;
  background: linear-gradient(180deg, #000 0, #000 32%, rgba(14,16,22,.9) 72%, rgba(30,34,44,.82) 100%);
  box-shadow: 0 calc(16px * var(--open)) calc(36px * var(--open)) -14px rgba(0,0,0,.75), inset 0 -.75px 0 rgba(255,255,255,calc(.22 * var(--open))), inset .75px 0 0 rgba(255,255,255,calc(.06 * var(--open))), inset -.75px 0 0 rgba(255,255,255,calc(.06 * var(--open)));
}
.panel::before, .panel::after { content: ""; position: absolute; top: 0; width: 10px; height: 10px; }
.panel::before { left: -10px; background: radial-gradient(circle at 0 100%, transparent 9.5px, #000 10px); }
.panel::after { right: -10px; background: radial-gradient(circle at 100% 100%, transparent 9.5px, #000 10px); }
.page {
  position: absolute; inset: 0; padding: 38px 14px 14px; overflow: hidden; border-radius: inherit;
  opacity: 0; visibility: hidden; transform: translateY(-4px); filter: blur(4px);
  transition: opacity .4s, transform .55s var(--ease-out), filter .4s, visibility 0s .4s;
}
.panel[data-page="music"] .page-music, .panel[data-page="agents"] .page-agents, .panel[data-page="files"] .page-files,
.panel[data-page="notif"] .page-notif, .panel[data-page="mirror"] .page-mirror {
  visibility: visible; opacity: var(--content); transform: none; filter: none; transition-delay: 0s;
}
.panel svg, .tabbar svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.panel svg .fill, .tabbar svg .fill { fill: currentColor; stroke: none; }
.glass {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; color: #fff;
  background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 .75px rgba(255,255,255,.16), 0 3px 8px -4px rgba(0,0,0,.6);
  font: 600 12px/1 var(--mac); transition: background .2s, transform .15s;
}
button.glass:hover { background: rgba(255,255,255,.17); }
button.glass:active { transform: scale(.93); }
.glass.pill { height: 28px; padding: 0 11px 0 9px; border-radius: 14px; }
.glass.pill svg { width: 16px; height: 16px; }
.glass.disc { width: 32px; height: 32px; border-radius: 50%; }
.glass.disc svg { width: 17px; height: 17px; }
.glass.disc.big { width: 37px; height: 37px; }
.glass.disc.big svg { width: 19px; height: 19px; }
.glass.disc.sm { width: 22px; height: 22px; }
.glass.disc.sm svg { width: 13px; height: 13px; }
.app-badge { display: inline-grid; place-items: center; width: 13px; height: 13px; border-radius: 3.5px; background: rgba(255,255,255,.14); flex: none; }
.app-badge svg { width: 9px; height: 9px; }

/* home */
.np { display: grid; grid-template-columns: 100px 1fr; gap: 14px; }
.cover { width: 100px; height: 100px; border-radius: 22px; overflow: hidden; box-shadow: 0 8px 18px -8px rgba(0,0,0,.8); }
.cover svg { width: 100%; height: 100%; }
.np-top { display: flex; justify-content: space-between; align-items: flex-start; padding-top: 1px; }
.np-text { min-width: 0; }
.np-title { font: 700 16.5px/1.2 var(--mac); letter-spacing: -.01em; white-space: nowrap; }
.np-artist { margin-top: 4px; display: flex; align-items: center; gap: 7px; font: 500 13px/1.2 var(--mac); color: rgba(255,255,255,.55); }
.np-icons { display: flex; align-items: center; gap: 10px; }
.ghost { width: 20px; height: 20px; display: grid; place-items: center; color: rgba(255,255,255,.75); }
.ghost svg { width: 15px; height: 15px; }
.heart[aria-pressed="true"] svg { fill: var(--tint); stroke: var(--tint); }
.eq { display: flex; gap: 3px; height: 13px; align-items: center; }
.eq i { width: 2.6px; }
.panel.paused .eq i, .notch.paused .ns-music i { animation-play-state: paused; }
.bar { margin-top: 40px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.16); overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 40%; background: var(--tint); border-radius: inherit; }
.times { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; font: 600 10.5px/1 var(--mac); color: rgba(255,255,255,.4); font-variant-numeric: tabular-nums; }
.meeting { display: inline-flex; align-items: center; gap: 4px; color: rgba(255,255,255,.5); }
.meeting svg { width: 11px; height: 11px; color: color-mix(in oklab, var(--tint) 80%, #fff); }
.meeting b { color: color-mix(in oklab, var(--tint) 80%, #fff); font-weight: 600; }
.controls { position: absolute; left: 14px; right: 14px; top: 166px; display: flex; align-items: center; gap: 6px; }
.transport { display: flex; align-items: center; gap: 13px; margin-left: 30px; }
.lyrics-btn { margin-left: auto; }
.lyrics-btn[aria-pressed="true"] { background: rgba(255,255,255,.3); }
.i-play { display: none; }
.panel.paused .i-play { display: block; }
.panel.paused .i-pause { display: none; }
.lyrics {
  list-style: none; margin: 0; padding: 0; position: absolute; left: 16px; right: 16px; top: 212px; height: 104px; overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, #000 25%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 25%, #000 70%, transparent);
  opacity: 0; transition: opacity .4s;
}
.lyrics li { font: 700 15px/1.3 var(--mac); color: rgba(255,255,255,.26); padding: 3px 0; transform: translateY(calc(var(--line, 0) * -25.5px + 34px)); transition: transform .7s var(--ease-out), color .4s; }
.lyrics li.now { color: #fff; }
.panel.lyrics-on .lyrics { opacity: 1; }

/* agents */
.ag-list { -webkit-mask-image: linear-gradient(#000 78%, transparent 99%); mask-image: linear-gradient(#000 78%, transparent 99%); }
.ag-list, .ag-ask, .ag-q { position: absolute; inset: 34px 14px 12px; transition: opacity .4s, transform .55s var(--ease-out), visibility 0s; }
.page-agents:not([data-view="list"]) .ag-list, .page-agents:not([data-view="ask"]) .ag-ask, .page-agents:not([data-view="q"]) .ag-q {
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .25s, transform .55s var(--ease-out), visibility 0s .25s;
}
.ag-head { display: flex; justify-content: space-between; align-items: center; font: 700 15px/1 var(--mac); }
.bell { color: #ff8f78; }
.usage { display: grid; grid-template-columns: auto 1fr auto auto 1fr auto; align-items: center; gap: 8px; margin-top: 7px; font: 500 11px/1 var(--mac); color: rgba(255,255,255,.62); }
.usage i { height: 3px; border-radius: 2px; background: linear-gradient(to right, var(--agent) calc(var(--u) * 100%), rgba(255,255,255,.14) 0); }
.usage b { font-weight: 600; color: rgba(255,255,255,.7); }
.usage b:nth-of-type(1) { margin-right: 10px; }
.session { display: grid; grid-template-columns: 50px 1fr; gap: 10px; align-items: center; margin-top: 9px; padding: 9px 12px 9px 9px; border-radius: 14px; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 .75px rgba(255,255,255,.1); }
.session.waiting { background: color-mix(in oklab, var(--amber) 8%, rgba(255,255,255,.05)); box-shadow: inset 0 0 0 .75px color-mix(in oklab, var(--amber) 40%, transparent); }
.s-fig { position: relative; width: 50px; height: 48px; }
.s-fig .mascot { width: 44px; height: 44px; position: absolute; left: 4px; top: 0; }
.s-fig.small { height: 22px; }
.s-fig.small .mascot { width: 24px; height: 24px; left: 13px; top: -1px; }
.host { position: absolute; bottom: -2px; width: 17px; height: 17px; border-radius: 5px; background: #1e1e22; box-shadow: 0 0 0 1.5px #000, inset 0 0 0 .75px rgba(255,255,255,.25); display: grid; place-items: center; }
.host svg { width: 10px; height: 10px; }
.h-editor { left: 0; color: #9ecbff; }
.h-agent { left: 25px; color: #fff; }
.s-name { display: flex; align-items: baseline; gap: 6px; font: 700 15px/1.2 var(--mac); white-space: nowrap; }
.s-name span { font-weight: 500; font-size: 11px; color: rgba(255,255,255,.45); }
.ctx { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; padding: 2px 5px; border-radius: 6px; background: rgba(255,255,255,.1); font: 600 10.5px/1 var(--mac); color: rgba(255,255,255,.75); font-style: normal; align-self: center; }
.ctx svg { width: 10px; height: 10px; }
.s-age { font: 500 10.5px/1 var(--mac); color: rgba(255,255,255,.4); font-style: normal; align-self: center; }
.s-state { margin-top: 3px; font: 600 12.5px/1.25 var(--mac); color: var(--amber); white-space: nowrap; }
.s-state.muted { color: rgba(255,255,255,.55); font-weight: 500; }
.session.approved .s-state { color: var(--agent); }
.s-tools { display: flex; gap: 5px; margin-top: 5px; }
.s-tools span { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.08); color: rgba(255,255,255,.6); }
.s-tools svg { width: 10px; height: 10px; }
.ask-head { display: flex; align-items: center; gap: 6px; font: 700 13px/1.2 var(--mac); white-space: nowrap; }
.ask-head .amber { color: var(--amber); font-weight: 500; }
.burst { display: grid; place-items: center; width: 15px; height: 15px; border-radius: 4px; background: #1c1c1e; box-shadow: inset 0 0 0 .75px rgba(255,255,255,.2); flex: none; }
.burst svg { width: 10px; height: 10px; stroke-width: 1.8; }
.more { margin-left: auto; padding: 2px 5px; border-radius: 5px; background: rgba(255,255,255,.1); font: 600 9.5px/1 var(--mac); color: rgba(255,255,255,.7); }
.ask-timer { font: 600 10.5px/1 var(--mac); color: rgba(255,255,255,.38); font-style: normal; font-variant-numeric: tabular-nums; }
.q-timer { margin-left: auto; }
.cmd { margin: 9px 0 0; padding: 9px 10px; height: 52px; border-radius: 10px; background: rgba(0,0,0,.34); box-shadow: inset 0 0 0 .75px rgba(255,255,255,.07); font: 500 11.5px/1.4 var(--mono); white-space: pre-wrap; overflow: hidden; }
.ask-why { margin-top: 9px; font: 500 11px/1.3 var(--mac); color: rgba(255,255,255,.5); }
.ask-foot { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.goto { display: flex; align-items: center; gap: 7px; font: 500 11px/1.25 var(--mac); color: rgba(255,255,255,.5); max-width: 104px; }
.goto svg { width: 11px; height: 11px; flex: none; }
.ask-actions { display: flex; gap: 5px; }
.pillbtn { height: 26px; padding: 0 11px; border-radius: 13px; font: 600 12.5px/1 var(--mac); color: #fff; background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 .75px rgba(255,255,255,.16); transition: transform .15s, filter .2s; white-space: nowrap; }
.pillbtn:hover { filter: brightness(1.15); }
.pillbtn:active { transform: scale(.94); }
.pillbtn.allow { background: #f4a18b; color: #000; box-shadow: 0 3px 8px -4px rgba(0,0,0,.6); }
.ask-done, .q-done { position: absolute; left: 0; right: 0; bottom: 4px; font: 600 12px/1.3 var(--mac); color: var(--agent); opacity: 0; transition: opacity .3s; }
.page-agents[data-answered] .ask-done { opacity: 1; }
.page-agents[data-answered] .ask-foot { opacity: 0; pointer-events: none; }
.q-text { margin-top: 10px; font: 600 13px/1.3 var(--mac); }
.q-options { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.q-opt { height: 26px; padding: 0 12px; border-radius: 13px; font: 600 12.5px/1 var(--mac); background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 .75px rgba(255,255,255,.16); transition: background .2s; }
.q-opt:hover { background: rgba(255,255,255,.17); }
.q-opt[aria-pressed="true"] { background: #f4a18b; color: #000; }
.q-foot { position: absolute; left: 0; bottom: 4px; max-width: none; }
.page-agents[data-asked] .q-foot { opacity: 0; }
.page-agents[data-asked] .q-done { opacity: 1; }

/* shelf */
.sh-head { display: flex; justify-content: space-between; align-items: center; font: 600 11px/1 var(--mac); color: rgba(255,255,255,.45); margin-top: -4px; }
.sh-tools { display: flex; gap: 6px; }
.shelf { position: relative; display: flex; gap: 6px; margin-top: 8px; height: 132px; -webkit-mask-image: linear-gradient(to right, #000 86%, transparent); mask-image: linear-gradient(to right, #000 86%, transparent); }
.shelf-empty { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 14px; border: 1px dashed rgba(255,255,255,.25); color: rgba(255,255,255,.5); font: 600 12.5px/1 var(--mac); transition: opacity .3s; }
.shelf.has-items .shelf-empty { opacity: 0; }
.shelf.dragging .shelf-empty { opacity: 1; border-color: var(--agent); color: var(--agent); background: rgba(204,227,255,.08); z-index: 2; }
.tile {
  flex: none; width: 84px; height: 118px; padding: 9px 6px 6px; border-radius: 13px; background: rgba(255,255,255,.07);
  display: grid; grid-template-rows: auto 1fr; gap: 6px; justify-items: center;
  transform: translateY(-120%) rotate(-6deg); opacity: 0; transition: transform .7s var(--spring), opacity .35s;
}
.tile.in { transform: none; opacity: 1; }
.tile .thumb { width: 66px; height: 50px; border-radius: 7px; overflow: hidden; box-shadow: 0 5px 10px -6px rgba(0,0,0,.8); background: #2a2a30; display: grid; place-items: center; }
.tile .thumb svg, .tile .thumb img { width: 100%; height: 100%; object-fit: cover; }
.tile .thumb .ext { font: 700 11px/1 var(--mac); color: rgba(255,255,255,.8); }
.tile p { font: 700 10px/1.25 var(--mac); text-align: center; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* notifications: the card, then the page that keeps them */
.page-notif { padding: 32px 0 0; }
.nc, .nl { position: absolute; inset: 32px 0 0; transition: opacity .35s, transform .5s var(--ease-out), filter .35s, visibility 0s; }
.page-notif[data-view="list"] .nc, .page-notif:not([data-view="list"]) .nl {
  opacity: 0; visibility: hidden; transform: translateY(-6px); filter: blur(3px); transition: opacity .2s, transform .5s var(--ease-out), filter .2s, visibility 0s .2s;
}
.nc { padding: 10px 16px 12px; }
.page-notif.gone .nc { opacity: 0; transform: translateY(-10px) scale(.97); filter: blur(4px); }
.nc-row { display: grid; grid-template-columns: 34px 1fr; gap: 11px; align-items: start; cursor: pointer; border-radius: 10px; }
.nc-row:focus-visible { outline-offset: 2px; }
.nc-icon { width: 34px; height: 34px; margin-top: 2px; }
.nc-icon svg { width: 34px; height: 34px; }
.nc-icon svg .fill { fill: #2fbf5c; }
.nc-text { min-width: 0; display: grid; gap: 1.5px; }
.nc-head { display: flex; align-items: center; gap: 6px; font: 600 10.5px/1.25 var(--mac); color: rgba(255,255,255,.55); }
.chip { padding: 1px 5px; border-radius: 999px; background: rgba(255,255,255,.16); font: 700 9.5px/1.3 ui-rounded, var(--mac); color: #fff; font-variant-numeric: tabular-nums; }
.nc-x { margin-left: auto; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: rgba(255,255,255,.08); color: rgba(255,255,255,.55); }
.nc-x svg { width: 8.5px; height: 8.5px; stroke-width: 2.6; }
.nc-x:hover { background: rgba(255,255,255,.16); color: #fff; }
.nc-title { font: 600 12.5px/1.25 var(--mac); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nc-body { font: 400 11.5px/1.3 var(--mac); color: rgba(255,255,255,.78); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nc-reply { display: flex; align-items: center; gap: 8px; margin: 8px 0 0 45px; height: 28px; opacity: 0; transform: translateY(-4px); transition: opacity .25s, transform .4s var(--ease-out); pointer-events: none; }
.page-notif[data-view="reply"] .nc-reply { opacity: 1; transform: none; pointer-events: auto; }
.nc-reply input {
  flex: 1; min-width: 0; height: 28px; padding: 0 11px; border: 0; border-radius: 14px; background: rgba(255,255,255,.08);
  font: 400 12px/1 var(--mac); color: #fff; outline: none; caret-color: #fff;
}
.nc-reply input::placeholder { color: rgba(255,255,255,.4); }
.nc-reply input:focus-visible { box-shadow: 0 0 0 1px rgba(255,255,255,.35); }
.nc-send { width: 22px; height: 22px; color: #fff; flex: none; }
.nc-send svg { width: 22px; height: 22px; }
.nc-send .up { stroke: #000; stroke-width: 2.2; }
.nc-reply input:placeholder-shown + .nc-send { opacity: .45; }
.pillbtn.open { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; font: 500 11px/1 var(--mac); flex: none; cursor: default; }
.pillbtn.open svg { width: 12px; height: 12px; }
.nc-sent { position: absolute; left: 61px; right: 16px; bottom: 15px; font: 600 11.5px/1.3 var(--mac); color: var(--agent); opacity: 0; transition: opacity .3s; }
.page-notif.sent .nc-sent { opacity: 1; }
.page-notif.sent .nc-reply { opacity: 0; }
.nl { padding: 4px 14px 12px; display: grid; gap: 9px; align-content: start; -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); }
.nl-head { display: flex; justify-content: space-between; align-items: center; font: 500 10.5px/1 var(--mac); color: rgba(255,255,255,.55); }
.pillbtn.sm { height: 22px; padding: 0 10px; font: 500 10.5px/1 var(--mac); display: inline-flex; align-items: center; }
.nl-group { display: grid; gap: 3px; }
.nl-app { display: flex; align-items: center; gap: 6px; font: 600 10.5px/1 var(--mac); color: rgba(255,255,255,.55); }
.nl-app svg { width: 15px; height: 15px; }
.nl-row { position: relative; padding: 6px 9px; border-radius: 10px; background: rgba(255,255,255,.08); }
.nl-row.stacked { margin-bottom: 5px; }
.nl-row.stacked::after { content: ""; position: absolute; left: 7px; right: 7px; bottom: -5px; height: 10px; border-radius: 0 0 10px 10px; background: rgba(255,255,255,.08); z-index: -1; }
.nl-top { display: flex; align-items: center; gap: 6px; font: 600 11.5px/1.25 var(--mac); white-space: nowrap; }
.nl-top time { margin-left: auto; font: 400 10px/1 ui-rounded, var(--mac); color: rgba(255,255,255,.32); font-variant-numeric: tabular-nums; }
.nl-text { font: 400 11px/1.3 var(--mac); color: rgba(255,255,255,.72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* mirror: the viewfinder spans the panel (380 × 162), controls always on it, the newest print in the corner */
.page-mirror { padding: 38px 2px 0; }
.finder { position: relative; width: 380px; height: 162px; border-radius: 16px; overflow: hidden; background: #000; isolation: isolate; }
.finder::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); pointer-events: none; z-index: 6; }
.finder-cv, .finder-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.finder-video { display: none; transform: scaleX(-1); }
.finder.live .finder-video { display: block; }
.finder.live .finder-cv { display: none; }
.finder[data-film="nostalgia"] > :is(canvas, video) { filter: sepia(.38) saturate(1.35) contrast(1.06) brightness(1.06) hue-rotate(-10deg); }
.finder[data-film="bw"] > :is(canvas, video) { filter: grayscale(1) contrast(1.25) brightness(1.05); }
.f-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 999px; font: 600 9.5px/1 var(--mac); color: rgba(255,255,255,.9); background: rgba(0,0,0,.35); }
.f-chip svg { width: 11px; height: 11px; }
.f-chip .dash { stroke-dasharray: 1.6 1.6; }
.f-film { position: absolute; left: 9px; top: 9px; z-index: 2; }
.f-tr { position: absolute; right: 9px; top: 9px; z-index: 2; display: flex; align-items: center; gap: 8px; }
.f-stage.on { background: rgba(255,255,255,.9); color: #000; }
.f-stamp { font: 600 11px/1 ui-monospace, "SF Mono", var(--mono); color: #ff8f29; text-shadow: 0 0 2.5px rgba(255,102,13,.9); }
.f-controls {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 75px; padding: 24px 10px 8px;
  display: grid; place-items: center; background: linear-gradient(transparent, rgba(0,0,0,.55)); transition: opacity .18s;
}
.f-right { position: absolute; right: 10px; bottom: 14.5px; display: flex; gap: 8px; }
.f-right .glass.disc { width: 30px; height: 30px; }
.f-right .glass.disc svg { width: 15px; height: 15px; }
.film-btn svg { display: none; }
.finder[data-film="nostalgia"] .i-nostalgia, .finder[data-film="bw"] .i-bw, .finder[data-film="natural"] .i-natural { display: block; }
.timer-btn .i-bolt { display: none; }
.timer-btn:not(.on) .i-three { display: none; }
.timer-btn:not(.on) .i-bolt { display: block; }
.finder.busy :is(.f-controls, .f-film, .f-stage) { opacity: 0; pointer-events: none; }
.shutter { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 50%; box-shadow: inset 0 0 0 2.5px rgba(255,255,255,.6); }
.shutter i { width: 34px; height: 34px; border-radius: 50%; background: #fff; transition: transform .15s; }
.shutter:active i { transform: scale(.88); }
.count { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; font: 800 58px/1 ui-rounded, var(--mac); color: #fff; text-shadow: 0 3px 16px rgba(0,0,0,.5); opacity: 0; pointer-events: none; }
.count.tick { animation: tick 1s var(--ease-out); }
@keyframes tick { 0% { opacity: 0; transform: scale(.6); } 18% { opacity: 1; transform: scale(1.08); } 80% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
.flash { position: absolute; inset: 0; z-index: 5; background: #fff; opacity: 0; pointer-events: none; }
.flash.go { animation: flash .45s ease-out; }
@keyframes flash { from { opacity: .95; } to { opacity: 0; } }
/* the photo just taken: fills the viewfinder, then shrinks into the corner as its cream frame grows */
.f-fly {
  --pw: 380px; --ph: 162px; --pad: 0px; --padb: 0px;
  position: absolute; left: 0; bottom: 0; z-index: 4; display: none; padding: var(--pad) var(--pad) var(--padb); background: rgba(247,242,230,0);
  border-radius: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0); transform-origin: 0 100%;
  transition: all .55s cubic-bezier(.3, 1.15, .5, 1);
}
.f-fly canvas { display: block; width: var(--pw); height: var(--ph); transition: width .55s cubic-bezier(.3, 1.15, .5, 1), height .55s cubic-bezier(.3, 1.15, .5, 1); }
.f-fly.on { display: block; }
.f-fly.landed { --pw: 60.89px; --ph: 25.96px; --pad: 1.56px; --padb: 7.79px; left: 11px; bottom: 11px; background: rgba(247,242,230,1); border-radius: 2px; transform: rotate(-4deg); box-shadow: 0 2px 8px rgba(0,0,0,.45); }
.f-thumb { position: absolute; left: 11px; bottom: 11px; z-index: 3; width: 64px; transform: rotate(-4deg); transform-origin: 0 100%; border-radius: 2px; box-shadow: 0 2px 8px rgba(0,0,0,.45); transition: transform .3s cubic-bezier(.3, 1.3, .5, 1); }
.f-thumb canvas { display: block; width: 64px; height: auto; border-radius: 2px; }
.f-thumb:hover, .f-thumb:focus-visible { transform: rotate(0deg) scale(1.08); }
.finder.busy .f-thumb { opacity: 0; }

/* the pill of pages under the panel */
.tabbar {
  display: flex; align-items: center; gap: 2px; height: 36px; margin-top: 8px; padding: 0 5px; border-radius: 18px;
  background: rgba(20,19,28,.94); box-shadow: 0 8px 20px -10px rgba(0,0,0,.8), inset 0 0 0 .75px rgba(255,255,255,.07);
  opacity: var(--content, 0); transform: translateY(calc((1 - var(--content, 0)) * -10px));
  transition: opacity .25s, scale .4s var(--ease-out), filter .25s;
}
.panel-wrap.no-pill .tabbar { opacity: 0; scale: .86; filter: blur(4px); }
.tabbar span { position: relative; display: grid; place-items: center; width: 34px; height: 28px; border-radius: 14px; color: rgba(255,255,255,.62); transition: background .3s, color .3s; }
.tabbar svg { width: 16px; height: 16px; }
.tabbar span.on { background: rgba(255,255,255,.13); color: #fff; }
.tabbar span.dot::after { content: ""; position: absolute; top: 4px; right: 7px; width: 5px; height: 5px; border-radius: 50%; }
.tabbar span.white::after { background: #fff; }
.tabbar span.amber::after { background: var(--amber); }
.tabbar i { width: 1px; height: 16px; background: rgba(255,255,255,.18); margin: 0 5px; }
.tabbar span.pin { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; }

.chapters { position: relative; z-index: 2; }
.js .chapters { position: absolute; inset: auto 0 0 0; height: 0; }
.chapter {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 2.2fr) minmax(0, 4.4fr); align-items: end;
  padding: 0 var(--gutter) clamp(28px, 6vh, 64px); max-width: 1480px; margin: 0 auto;
}
.js .chapter {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto;
  opacity: 0; visibility: hidden; transform: translateY(22px);
  transition: opacity .45s, transform .7s var(--ease-out), visibility 0s .45s;
}
.js .chapter.on { opacity: 1; visibility: visible; transform: none; transition-delay: .06s, .06s, 0s; }
/* short windows: the fine print steps aside so the panel above keeps its size */
.tight .ch-points .slip, .tight .ch-points li:nth-child(3):not(:has(.cam-try)) { display: none; }
html:not(.js) .chapter { padding-top: 80px; }
.ch-lead { grid-column: 1; }
.ch-lead h2 { font-size: clamp(2.2rem, 4.2vw, 4rem); line-height: .98; letter-spacing: -.03em; }
.ch-lead p { margin-top: 16px; color: var(--mute); max-width: 46ch; }
.ch-points { grid-column: 3; list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: .98rem; color: var(--mute); }
.ch-points b { color: var(--text); font-weight: 650; }
.ch-points .slip { margin-top: 4px; padding: 12px 14px; border-radius: 12px; border: 1px dashed color-mix(in oklab, var(--pig) 55%, transparent); color: var(--text); font-size: .9rem; background: rgba(255,253,248,.7); }
.chapter[data-chapter="music"] { --pig: var(--deep); }
.chapter[data-chapter="agents"] { --pig: var(--deep); }
.chapter[data-chapter="files"] { --pig: var(--deep); }
.chapter[data-chapter="notif"] { --pig: var(--deep); }
.chapter[data-chapter="mirror"] { --pig: var(--deep); }

/* ——— the droplet ——— */
.mascot { --m-color: var(--agent); overflow: visible; }
.mascot[data-phase="waiting"] { --m-color: var(--amber); }
.mascot[data-phase="idle"] { --m-color: #a9c7f0; }
.mascot .m-drop { fill: var(--m-color); }
.mascot .m-eye, .mascot .m-o, .mascot .m-smile, .mascot .m-happy path { fill: none; stroke: rgba(0,0,0,.78); stroke-width: 4; stroke-linecap: round; }
.mascot .m-eye { fill: rgba(0,0,0,.78); stroke: none; transform-box: fill-box; transform-origin: center; }
.mascot .m-o, .mascot .m-happy, .mascot .m-spark, .mascot .m-hand { display: none; }
.mascot .m-spark { fill: #fff; }
.mascot .m-hand { fill: var(--m-color); stroke: rgba(0,0,0,.35); stroke-width: 1.5; transform-box: fill-box; transform-origin: 50% 100%; }
.mascot .m-body { transform-box: view-box; transform-origin: 50% 98%; }
.mascot[data-phase="waiting"] .m-smile { display: none; }
.mascot[data-phase="waiting"] .m-o, .mascot[data-phase="waiting"] .m-hand { display: inline; }
.mascot[data-phase="waiting"] .m-eye { transform: translateY(-3px) scale(1.3); }
.mascot[data-phase="waiting"] .m-body { animation: sway 1.9s ease-in-out infinite; }
.mascot[data-phase="waiting"] .m-hand { animation: wave .9s ease-in-out infinite alternate; }
.mascot[data-phase="working"] .m-body { animation: hop .6s ease-in-out infinite; }
.mascot[data-phase="working"] .m-eye { animation: blink 3.3s infinite; }
.mascot[data-phase="done"] .m-eyes, .mascot[data-phase="done"] .m-smile { display: none; }
.mascot[data-phase="done"] .m-happy, .mascot[data-phase="done"] .m-spark { display: inline; }
@keyframes hop { 0%, 100% { transform: translateY(0) scale(1.07, .93); } 50% { transform: translateY(-8%) scale(.97, 1.03); } }
@keyframes sway { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@keyframes wave { from { transform: rotate(-4deg); } to { transform: rotate(28deg); } }
@keyframes blink { 0%, 95%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.12); } }

/* ——— the pattern book: pulled sheets ——— */
.book { background: var(--ink); padding: clamp(96px, 16vh, 180px) var(--gutter) clamp(80px, 12vh, 140px); }
.book-head, .swatches, .also { max-width: 1320px; margin-left: auto; margin-right: auto; }
.book-head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 32px 64px; align-items: end; }
.book-head h2 { font-size: clamp(2.4rem, 5vw, 4.6rem); line-height: .96; letter-spacing: -.035em; }
.book-head p { color: var(--mute); max-width: 44ch; }
.swatches { list-style: none; padding: 0; margin-top: clamp(56px, 9vh, 104px); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(56px, 9vh, 96px) clamp(24px, 3vw, 48px); align-items: start; }
.swatches li { grid-column: var(--c); margin-top: var(--y, 0); }
.swatches canvas {
  display: block; width: 100%; height: auto; aspect-ratio: var(--ar); background: var(--ink-3); border-radius: 2px;
  box-shadow: 0 0 0 clamp(6px, .75vw, 11px) var(--edge), 0 30px 46px -30px rgba(60,48,26,.55), 0 0 0 calc(clamp(6px, .75vw, 11px) + 1px) rgba(60,48,26,.08);
  transform: rotate(var(--r, 0deg)); transition: transform .6s var(--ease-out);
}
.swatches li:hover canvas { transform: rotate(0deg) translateY(-4px); }
.swatches .sheet::after { content: ""; position: absolute; inset: 0; border-radius: 2px; background: rgba(242, 238, 230, .12); pointer-events: none; }
.swatches .vig { z-index: 1; }
.swatches .sheet { position: relative; transform: rotate(var(--r, 0deg)); transition: transform .6s var(--ease-out); }
.swatches .sheet canvas { transform: none; }
.swatches li:hover .sheet { transform: rotate(0deg) translateY(-4px); }
.swatches li:hover canvas { transform: none; }
/* each sheet carries the feature itself, drawn at the app's size and scaled like the panel */
.vig {
  --vs: 1; position: absolute; left: 50%; top: 50%; width: calc(var(--w) * 1px);
  transform: translate(-50%, -50%) scale(var(--vs)); transform-origin: 50% 50%;
  display: grid; justify-items: center; gap: 14px; font-family: var(--mac); color: #fff; -webkit-font-smoothing: antialiased;
}
.vig svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.vig svg .fill { fill: currentColor; stroke: none; }
.v-card { width: 100%; padding: 14px; border-radius: 20px; background: linear-gradient(180deg, #050507, #1a1419); box-shadow: 0 22px 40px -18px rgba(0,0,0,.9), inset 0 0 0 .75px rgba(255,255,255,.08); }
.v-perms { display: grid; gap: 5px; padding: 16px 16px 14px; background: linear-gradient(180deg, #000 0, #000 30%, #12151c 100%); }
.v-perms-t { font: 600 15px/1.2 var(--mac); margin-bottom: 4px; }
.v-perm { display: grid; grid-template-columns: 16px 1fr auto; gap: 8px; align-items: center; min-height: 26px; }
.v-perm > svg { width: 14px; height: 14px; color: rgba(255,255,255,.55); justify-self: center; }
.v-perm b { display: block; font: 600 11px/1.2 var(--mac); }
.v-perm small { display: block; font: 400 9.5px/1.2 var(--mac); color: rgba(255,255,255,.32); white-space: nowrap; }
.v-perm em { font-style: normal; }
.v-perm em.ok { width: 14px; height: 14px; border-radius: 50%; background: #34c759 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='m4 7.3 2 2 4-4.4' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.v-perm em.ask { padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 .75px rgba(255,255,255,.18); font: 500 10px/1 var(--mac); }
.v-tour-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.v-dots { display: flex; gap: 5px; margin-right: auto; }
.v-dots i { width: 5px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.16); }
.v-dots i.on { width: 14px; background: #fff; }
.v-skip { font: 500 10.5px/1 var(--mac); color: rgba(255,255,255,.32); }
.v-next { padding: 6px 11px; border-radius: 999px; background: #fff; color: #000; font: 600 11px/1 var(--mac); }
.v-sound { display: grid; gap: 4px; }
.v-head { font: 700 13px/1 var(--mac); margin-bottom: 4px; }
.v-head.v-gap { margin-top: 8px; }
.v-out { display: grid; grid-template-columns: 17px 1fr auto; column-gap: 10px; align-items: center; min-height: 27px; padding: 5px 10px; border-radius: 8px; background: rgba(255,255,255,.06); font: 600 12px/1.2 var(--mac); color: rgba(255,255,255,.88); }
.v-out.on { background: rgba(255,255,255,.13); }
.v-out > svg { width: 16px; height: 16px; color: rgba(255,255,255,.7); }
.v-out .check { width: 13px; height: 13px; color: #fff; stroke-width: 2.2; }
.v-out small { display: block; font: 500 10px/1.2 var(--mac); color: rgba(255,255,255,.5); margin-top: 1px; }
.v-mix { display: grid; grid-template-columns: 16px 58px 1fr 24px; align-items: center; gap: 8px; min-height: 22px; font: 600 12px/1 var(--mac); }
.v-mix > svg { width: 15px; height: 15px; color: rgba(255,255,255,.75); }
.v-mix i { height: 3px; border-radius: 2px; background: linear-gradient(to right, var(--coral) var(--v), rgba(255,255,255,.16) var(--v)); }
.v-mix em { font: 600 10.5px/1 var(--mac); font-style: normal; color: rgba(255,255,255,.45); text-align: right; font-variant-numeric: tabular-nums; }
/* the Settings window's Pages list (a native form, not the panel) */
.v-form { width: 100%; padding: 14px; border-radius: 14px; background: #1e1e20; box-shadow: 0 22px 40px -18px rgba(0,0,0,.9), inset 0 0 0 .75px rgba(255,255,255,.1); }
.v-form-head { font: 600 12px/1 var(--mac); color: rgba(255,255,255,.85); margin: 0 0 8px 4px; }
.v-form-box { border-radius: 9px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.08); padding: 2px 10px; }
.v-form-row { position: relative; display: grid; grid-template-columns: 12px 16px 1fr auto; gap: 10px; align-items: center; height: 32px; font: 400 12.5px/1 var(--mac); color: rgba(255,255,255,.88); }
.v-form-row + .v-form-row { box-shadow: 0 -.5px 0 rgba(255,255,255,.1); }
.v-form-row > svg { width: 14px; height: 14px; color: rgba(255,255,255,.85); }
.v-form-row .grip { height: 7px; border-block: 1.5px solid rgba(255,255,255,.28); position: relative; }
.v-form-row .grip::after { content: ""; position: absolute; left: 0; right: 0; top: 1.25px; border-top: 1.5px solid rgba(255,255,255,.28); }
.v-form-row .sw { width: 26px; height: 15px; border-radius: 8px; background: rgba(255,255,255,.18); position: relative; }
.v-form-row .sw::after { content: ""; position: absolute; top: 1.5px; left: 1.5px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.4); }
.v-form-row .sw.on { background: rgba(255,255,255,.42); }
.v-form-row .sw.on::after { left: 12.5px; }
.v-form-row.lifted { margin: 0 -8px; padding: 0 8px; border-radius: 8px; background: #3a3a3e; box-shadow: 0 8px 18px -6px rgba(0,0,0,.8), 0 0 0 1.5px rgba(255,255,255,.55); transform: translateY(-3px) rotate(-1.2deg); z-index: 1; }
.v-form-foot { margin: 7px 0 0 4px; font: 400 10.5px/1 var(--mac); color: rgba(255,255,255,.45); }
.v-notch, .v-hud {
  position: relative; display: flex; align-items: center; gap: 8px; width: 100%; height: 30px; padding: 0 12px 0 8px;
  background: #000; border-radius: 0 0 14px 14px; box-shadow: 0 14px 24px -12px rgba(0,0,0,.9);
}
.v-notch::before, .v-notch::after, .v-hud::before, .v-hud::after { content: ""; position: absolute; top: 0; width: 8px; height: 8px; }
.v-notch::before, .v-hud::before { left: -8px; background: radial-gradient(circle at 0 100%, transparent 7.5px, #000 8px); }
.v-notch::after, .v-hud::after { right: -8px; background: radial-gradient(circle at 100% 100%, transparent 7.5px, #000 8px); }
.v-glyph { display: grid; place-items: center; width: 22px; height: 22px; color: rgba(255,255,255,.9); }
.v-glyph svg { width: 14px; height: 14px; }
.v-glyph.amber { color: var(--amber); }
.v-glyph.red { color: #ff7878; }
.v-dotsgap { flex: 1; }
.v-rt { font: 600 11px/1 var(--mac); color: rgba(255,255,255,.55); }
.v-hud b { font: 700 12px/1 var(--mac); white-space: nowrap; }
.v-hud em { white-space: nowrap; }
.v-hud em { margin-left: auto; font: 700 10.5px/1 var(--mac); font-style: normal; }
.v-hud em.red { color: #ff7878; }
.v-hud em.green { color: #58d68d; }
.v-focus { display: grid; grid-template-columns: 116px 1fr; gap: 16px; align-items: center; }
.v-dial { position: relative; width: 116px; height: 116px; display: grid; place-items: center; }
.v-dial svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.v-dial .track { stroke: rgba(255,255,255,.12); stroke-width: 3; }
.v-dial .arc { stroke: var(--coral); stroke-width: 3; stroke-dasharray: 136 327; transform: rotate(-90deg); transform-origin: 60px 60px; }
.v-dial .knob { fill: #fff; stroke: none; transform: rotate(150deg); transform-origin: 60px 60px; }
.v-dial b { font: 300 25px/1 var(--mac); font-variant-numeric: tabular-nums; }
.v-chips { display: flex; gap: 5px; }
.v-chips span { padding: 5px 8px; border-radius: 999px; background: rgba(255,255,255,.1); font: 700 10.5px/1 var(--mac); }
.v-chips span.on { background: var(--coral); color: #000; }
.v-btns { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.v-list { display: grid; gap: 5px; }
.v-hint { font: 500 10.5px/1.35 var(--mac); color: rgba(255,255,255,.5); margin-bottom: 3px; }
.v-hint.strong { font: 700 12px/1 var(--mac); color: rgba(255,255,255,.8); }
.v-row { display: grid; grid-template-columns: 14px 1fr 14px; gap: 9px; align-items: center; height: 30px; padding: 0 10px; border-radius: 9px; background: rgba(255,255,255,.07); font: 600 12px/1 var(--mac); }
.v-row svg { width: 13px; height: 13px; color: rgba(255,255,255,.55); }
.v-row .v-pin.on { color: #fff; }
.v-srv { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 4px; padding: 6px 8px 6px 0; border-radius: 10px; background: rgba(255,255,255,.07); }
.v-srv.hover { background: rgba(255,255,255,.13); }
.v-srv > svg { width: 12px; height: 12px; justify-self: center; color: rgba(255,255,255,.55); }
.v-srv > svg.globe { color: var(--agent); }
.v-srv b { display: block; font: 500 11px/1.2 var(--mac); }
.v-srv code { font: 600 11.5px/1 var(--mono); margin-right: 3px; }
.v-srv small { display: block; font: 400 9.5px/1.2 var(--mac); color: rgba(255,255,255,.4); }
.v-srv em { padding: 5px 8px; border-radius: 999px; background: rgba(255,255,255,.1); font: 600 10px/1 var(--mac); font-style: normal; color: rgba(255,255,255,.7); }
.v-search { display: flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px; border-radius: 13px; background: rgba(255,255,255,.08); font: 500 11.5px/1 var(--mac); color: rgba(255,255,255,.4); }
.v-search svg { width: 12px; height: 12px; }
.v-clips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 9px; }
.v-clips p { display: flex; flex-direction: column; justify-content: space-between; height: 92px; padding: 8px; border-radius: 10px; background: rgba(255,255,255,.07); font: 600 10.5px/1.3 var(--mac); overflow: hidden; }
.v-clips p > span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.v-clips small { display: flex; align-items: center; gap: 4px; font: 500 9.5px/1 var(--mac); color: rgba(255,255,255,.5); }
.v-clips small svg { width: 10px; height: 10px; }
.v-clips small i { font-style: normal; }
.v-clips p.color { background: #153aa4; }
.v-clips p.color > span { font-weight: 700; align-self: center; margin-top: 22px; }
.v-swipe { width: 90px; color: #fff; filter: drop-shadow(0 6px 10px rgba(0,0,0,.6)); animation: swipe 2.6s var(--ease-out) infinite; }
.v-swipe .arrow { stroke: #fff; opacity: .9; }
@keyframes swipe { 0%, 100% { transform: translateX(-18px); } 50% { transform: translateX(18px); } }
.v-pill { position: relative; display: flex; gap: 2px; padding: 4px; border-radius: 18px; background: rgba(20,19,28,.96); box-shadow: 0 14px 26px -12px rgba(0,0,0,.9), inset 0 0 0 .75px rgba(255,255,255,.08); }
.v-pill span { position: relative; display: grid; place-items: center; width: 33px; height: 28px; color: rgba(255,255,255,.62); }
.v-pill span svg { width: 16px; height: 16px; }
.v-pill .hl { position: absolute; left: 4px; top: 4px; border-radius: 14px; background: rgba(255,255,255,.14); animation: pages 5.2s var(--ease-out) infinite; }
@keyframes pages { 0%, 18% { transform: translateX(0); } 25%, 43% { transform: translateX(35px); } 50%, 68% { transform: translateX(70px); } 75%, 93% { transform: translateX(35px); } 100% { transform: translateX(0); } }
.swatches li > div:not(.sheet) { margin-top: clamp(26px, 3.4vh, 34px); max-width: 44ch; }
.swatches h3 { font-size: 1.35rem; letter-spacing: -.015em; line-height: 1.15; }
.swatches p { margin-top: 8px; }
.swatches li > div:not(.sheet) p { color: var(--mute); font-size: .98rem; }
.swatches li > div > small { display: block; margin-top: 10px; font-size: .8rem; font-style: italic; color: var(--faint); }
.swatches li > div > small::before { content: "ebru · "; font-style: normal; }
.also { margin-top: clamp(64px, 10vh, 112px); color: var(--mute); font-size: .98rem; }
.also b { color: var(--text); }

/* ——— privacy ——— */
.privacy { background: var(--ink-2); padding: clamp(96px, 16vh, 180px) var(--gutter); border-top: 1px solid var(--line); }
.privacy > * { max-width: 1320px; margin-left: auto; margin-right: auto; }
.big-lines { font-size: clamp(2.8rem, 7.4vw, 6rem); line-height: 1; letter-spacing: -.03em; font-weight: 900; }
.big-lines span { display: block; }
.big-lines span:nth-child(2) { padding-left: .9em; }
.big-lines span:nth-child(3) { padding-left: 1.8em; color: var(--mint); }
.pv-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px clamp(40px, 7vw, 120px); margin-top: clamp(48px, 8vh, 96px); }
.pv-text { display: grid; gap: 18px; align-content: start; color: var(--mute); max-width: 46ch; font-size: 1.05rem; }
.pv-text code { font-size: .82em; color: var(--text); overflow-wrap: anywhere; }
.pv-perms h3 { font-size: 1.3rem; margin-bottom: 14px; }
.pv-perms dl { margin: 0; }
.pv-perms dl div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.pv-perms dl div:last-child { border-bottom: 1px solid var(--line); }
.pv-perms dt { font-weight: 650; }
.pv-perms dd { margin: 0; color: var(--mute); }

/* ——— finale: pull the paper ——— */
.finale { background: var(--ink); padding: clamp(96px, 16vh, 180px) var(--gutter) clamp(64px, 10vh, 120px); overflow: clip; }
.finale-grid { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.sheet { margin: 0; }
.sheet-paper {
  padding: clamp(10px, 1.4vw, 18px); background: var(--edge); border-radius: 3px;
  box-shadow: 0 40px 70px -34px rgba(60,48,26,.6), 0 0 0 1px rgba(60,48,26,.06);
  transform: rotate(-2deg);
}
.sheet-paper canvas { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; background: var(--ink-3); }
.sheet figcaption { margin-top: 20px; font-size: .88rem; color: var(--faint); font-style: italic; }
@supports (animation-timeline: view()) {
  .sheet-paper { animation: pull linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
  @keyframes pull { from { transform: translateY(18%) rotate(-7deg); } to { transform: translateY(0) rotate(-2deg); } }
}
.finale-copy h2 { font-size: clamp(2.2rem, 4.4vw, 4rem); line-height: .98; letter-spacing: -.03em; }
.fin-lede { margin-top: 16px; color: var(--mute); max-width: 44ch; }
.finale-copy .button.quiet { margin-top: 28px; }
.finale-copy .install-block { margin-top: clamp(32px, 6vh, 56px); justify-self: start; }
.keys { margin-top: 32px; display: grid; gap: 10px; color: var(--mute); font-size: .95rem; }
.keys p { display: grid; grid-template-columns: 5.5em 1fr; gap: 12px; }
.keys b { color: var(--text); font-weight: 650; }
.keys kbd { margin-top: -2px; }

.foot { background: var(--ink); border-top: 1px solid var(--line); padding: 40px var(--gutter) 48px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 40px; font-size: .9rem; color: var(--mute); }
.foot-brand { display: flex; align-items: center; gap: 10px; font: 850 1.05rem/1 var(--display); color: var(--text); }
.foot-brand .version { font: 400 .85rem var(--sans); color: var(--faint); }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--text); text-decoration: underline; }
.foot-note { flex-basis: 100%; color: var(--faint); font-size: .84rem; }

/* falling drops, from the notch to the water */
.falling { position: fixed; z-index: 4; width: 14px; height: 18px; margin: -9px 0 0 -7px; pointer-events: none; }
.falling svg { width: 100%; height: 100%; }

/* ——— sizes ——— */
@media (max-width: 1100px) {
  .chapter { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
  .ch-points { grid-column: 2; }
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .install-block { justify-self: start; }
  .book-head, .pv-grid, .finale-grid { grid-template-columns: 1fr; }
  .sheet { max-width: 560px; }
}
@media (max-width: 720px) {
  body { font-size: 1rem; }
  .js .stage { height: 900svh; }
  .chapter { grid-template-columns: 1fr; gap: 16px; padding-bottom: 24px; }
  .ch-points { grid-column: 1; gap: 8px; font-size: .92rem; }
  .ch-points li:nth-child(n+3):not(.slip) { display: none; }
  .ch-lead h2 { font-size: 2rem; }
  .ch-lead p { margin-top: 10px; font-size: .95rem; }
  .js .stage-pin::after { background: linear-gradient(to top, rgba(242,238,230,.97) 0%, rgba(242,238,230,.92) 44%, rgba(242,238,230,0) 66%); }
  .swatches { gap: 56px 0; }
  .swatches li { grid-column: 1 / -1; margin-top: 0; }
  .swatches li:nth-child(odd) .sheet { width: 92%; }
  .swatches li:nth-child(even) .sheet { width: 84%; margin-left: auto; }
  .big-lines span:nth-child(2) { padding-left: .5em; }
  .big-lines span:nth-child(3) { padding-left: 1em; }
  .pv-perms dl div { grid-template-columns: 1fr; gap: 4px; }
  .notch-menu ul { grid-template-columns: 1fr 1fr; }
  .keys p { grid-template-columns: 4.6em 1fr; }

}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .sheet-paper { animation: none; }
}

