/* Pranulis OS: a desktop (macOS-style) and a phone (iOS-style) shell around the same content.
   UI text uses the system font stack, so Apple devices render it in their own system face. */
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url("/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 800; font-display: swap; src: url("/fonts/schibsted-grotesk-latin-800-normal.woff2") format("woff2"); }

:root {
  --ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --brand: "Schibsted Grotesk", var(--ui);
  --accent: #fdb913;
  --blue: #0a84ff;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #a1a1a6;
  --sep: rgba(0,0,0,.1);
  --win: #ffffff;
  --win-2: #f5f5f7;
  --side: rgba(236,236,240,.78);
  --bar: rgba(246,246,248,.62);
  --glass: rgba(255,255,255,.28);
  --glass-line: rgba(255,255,255,.45);
  --menu: rgba(242,242,245,.82);
  --sel: #0a64d6;
  --shadow: 0 22px 70px rgba(0,0,0,.28), 0 0 0 .5px rgba(0,0,0,.18);
  --ios-bg: #f2f2f7;
  --ios-cell: #ffffff;
  --wall: url(/assets/wall-day.svg) center / cover no-repeat, #f3c9b6;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #f5f5f7; --text-2: #a1a1a6; --text-3: #6e6e73; --sep: rgba(255,255,255,.12);
    --win: #1e1e1f; --win-2: #2a2a2c; --side: rgba(40,40,44,.78); --bar: rgba(28,28,30,.55);
    --glass: rgba(40,40,44,.35); --glass-line: rgba(255,255,255,.14); --menu: rgba(44,44,48,.82); --sel: #0a64d6;
    --shadow: 0 22px 70px rgba(0,0,0,.6), 0 0 0 .5px rgba(255,255,255,.12);
    --ios-bg: #000000; --ios-cell: #1c1c1e;
    --wall: url(/assets/wall-night.svg) center / cover no-repeat, #0b0d22;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 13px/1.4 var(--ui); color: var(--text); background: #000; overflow: hidden; -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: default; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
.sel-text { user-select: text; -webkit-user-select: text; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mono { font-family: var(--mono); }

/* Desktop wallpaper: hills at sunset, or at night in dark mode (tools/build_wall.py) */
.wall { position: fixed; inset: 0; background: var(--wall); }

/* ---------------- Boot ---------------- */
.boot { position: fixed; inset: 0; z-index: 9999; background: #000; display: grid; place-items: center; transition: opacity .6s ease; }
.boot.done { opacity: 0; pointer-events: none; }
.boot-in { display: grid; justify-items: center; gap: 46px; }
.boot svg { width: 74px; color: #fff; }
.boot-bar { width: 180px; height: 5px; border-radius: 3px; background: #333; overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 0; background: #e8e8e8; border-radius: 3px; transition: width .2s linear; }

/* ================= DESKTOP ================= */
.desk { position: fixed; inset: 0; }
.menubar {
  position: absolute; inset: 0 0 auto; height: 26px; z-index: 5000; display: flex; align-items: center; gap: 2px; padding: 0 10px;
  background: var(--bar); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  font-size: 13px; font-weight: 500; color: var(--text);
}
.mb-item { height: 22px; padding: 0 9px; border-radius: 5px; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.mb-item.on, .mb-item:hover { background: rgba(127,127,127,.22); }
.mb-logo svg { width: 15px; height: 15px; display: block; }
.mb-app { font-weight: 700; }
.mb-right { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.mb-right svg { width: 17px; height: 17px; display: block; }
.dropdown {
  position: absolute; top: 26px; z-index: 5100; min-width: 220px; padding: 5px; border-radius: 10px;
  background: var(--menu); -webkit-backdrop-filter: blur(40px) saturate(180%); backdrop-filter: blur(40px) saturate(180%);
  box-shadow: 0 10px 40px rgba(0,0,0,.25), 0 0 0 .5px rgba(0,0,0,.2); font-size: 13px;
}
.dropdown button, .dropdown a { display: flex; justify-content: space-between; gap: 30px; width: 100%; padding: 4px 10px; border-radius: 5px; text-align: left; text-decoration: none; }
.dropdown button:hover, .dropdown a:hover { background: var(--blue); color: #fff; }
.dropdown .k { color: var(--text-3); }
.dropdown button:hover .k, .dropdown a:hover .k { color: rgba(255,255,255,.8); }
.dropdown hr { border: 0; border-top: 1px solid var(--sep); margin: 5px 8px; }
.dropdown .dis { color: var(--text-3); pointer-events: none; }

/* desktop icons */
.dicons { position: absolute; top: 40px; right: 14px; display: grid; grid-auto-flow: row; gap: 14px; justify-items: center; z-index: 10; }
.dicon { width: 92px; display: grid; justify-items: center; gap: 4px; padding: 4px; border-radius: 6px; text-align: center; }
.dicon .ic { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 8px; }
.dicon .ic svg { width: 58px; height: 58px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.18)); }
.dicon span { font-size: 12px; font-weight: 500; color: #1d1d1f; text-shadow: 0 0 6px rgba(255,255,255,.7); padding: 1px 5px; border-radius: 4px; line-height: 1.25; }
.dicon.sel .ic { background: rgba(0,0,0,.18); }
.dicon.sel span { background: var(--sel); color: #fff; text-shadow: none; }
@media (prefers-color-scheme: dark) { .dicon span { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.55); } }

/* dock */
.dock-wrap { position: absolute; left: 0; right: 0; bottom: 6px; display: flex; justify-content: center; z-index: 4000; pointer-events: none; }
.dock {
  pointer-events: auto; display: flex; align-items: flex-end; gap: 4px; padding: 5px 6px; height: 68px; border-radius: 20px;
  background: var(--glass); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(30px) saturate(170%); backdrop-filter: blur(30px) saturate(170%);
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.dock-sep { width: 1px; align-self: stretch; margin: 6px 4px; background: rgba(127,127,127,.4); }
.dk { position: relative; width: 56px; height: 56px; display: grid; place-items: end center; transform-origin: 50% 100%; }
.dk .ic { width: 100%; height: 100%; }
.dk .ic svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 3px 4px rgba(0,0,0,.22)); }
.dk::after { content: ""; position: absolute; bottom: -4px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--text); opacity: 0; }
.dk.run::after { opacity: .75; }
.dk .tip {
  position: absolute; bottom: calc(100% + 14px); left: 50%; transform: translateX(-50%); padding: 3px 10px; border-radius: 6px; white-space: nowrap;
  background: var(--menu); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 0 0 .5px rgba(0,0,0,.2), 0 4px 12px rgba(0,0,0,.2);
  font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .12s;
}
.dk:hover .tip { opacity: 1; }
.dk.bounce .ic { animation: bounce .55s ease-in-out 2; }
@keyframes bounce { 0%, 100% { translate: 0 0; } 45% { translate: 0 -18px; } }

/* windows */
.win {
  position: absolute; display: flex; flex-direction: column; min-width: 320px; min-height: 200px;
  background: var(--win); border-radius: 11px; box-shadow: var(--shadow); overflow: hidden;
  transform-origin: 50% 100%; will-change: transform;
}
.win.inactive { box-shadow: 0 10px 34px rgba(0,0,0,.16), 0 0 0 .5px rgba(0,0,0,.14); }
.win.opening { animation: winIn .42s cubic-bezier(.2,.9,.3,1.05); }
@keyframes winIn { from { opacity: 0; transform: translate(var(--fx, 0), var(--fy, 0)) scale(.12); } }
.win.closing { animation: winOut .22s ease-in forwards; }
@keyframes winOut { to { opacity: 0; transform: scale(.94); } }
.win.minimizing { animation: winMin .45s cubic-bezier(.5,0,.7,.4) forwards; }
@keyframes winMin { to { opacity: .2; transform: translate(var(--fx, 0), var(--fy, 0)) scale(.08); } }
.win.max { border-radius: 0; }
.tbar { position: relative; flex: none; height: 30px; display: flex; align-items: center; justify-content: center; background: var(--win-2); border-bottom: 1px solid var(--sep); }
.tbar.tall { height: 52px; justify-content: flex-start; padding-left: 86px; gap: 10px; }
.tbar.clear { background: transparent; border-bottom: 0; }
.tbar .title { font-size: 13px; font-weight: 600; color: var(--text); pointer-events: none; }
.tbar.tall .title { font-size: 15px; font-weight: 700; }
.win.inactive .tbar .title { color: var(--text-3); }
.lights { position: absolute; left: 12px; top: 50%; translate: 0 -50%; display: flex; gap: 8px; z-index: 2; }
.lights button { width: 12px; height: 12px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.2); }
.lights .l-close { background: #ff5f57; } .lights .l-min { background: #febc2e; } .lights .l-max { background: #28c840; }
.win.inactive .lights button { background: #d6d6d8; }
@media (prefers-color-scheme: dark) { .win.inactive .lights button { background: #4a4a4c; } }
.lights svg { width: 8px; height: 8px; opacity: 0; }
.lights:hover svg { opacity: .7; }
.tnav { display: flex; gap: 2px; }
.tnav span { width: 26px; height: 24px; display: grid; place-items: center; border-radius: 5px; color: var(--text-3); }
.wbody { flex: 1; min-height: 0; overflow: auto; user-select: text; -webkit-user-select: text; }
.grip { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; }

/* sidebar layout (Finder, Settings) */
.split { display: grid; grid-template-columns: 190px 1fr; height: 100%; }
.side { background: var(--side); padding: 10px 8px; border-right: 1px solid var(--sep); overflow: auto; -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); }
.side h6 { margin: 10px 8px 4px; font-size: 11px; font-weight: 600; color: var(--text-3); }
.side button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 4px 8px; border-radius: 6px; font-size: 13px; text-align: left; }
.side button.on { background: rgba(127,127,127,.2); }
.side .gl { width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; color: #fff; flex: none; }
.side .gl svg { width: 13px; height: 13px; }
.side .sg { color: var(--blue); width: 18px; display: grid; place-items: center; }
.side .sg svg { width: 16px; height: 16px; }
.side input { width: 100%; height: 26px; border-radius: 7px; border: 0; padding: 0 8px; margin-bottom: 8px; background: rgba(127,127,127,.16); font: inherit; color: var(--text); }
.main { overflow: auto; }

/* Finder */
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 18px 8px; padding: 18px; align-content: start; }
.fitem { display: grid; justify-items: center; gap: 5px; padding: 6px 4px; border-radius: 8px; text-align: center; }
.fitem svg { width: 56px; height: 56px; }
.fitem span { font-size: 12px; padding: 1px 5px; border-radius: 4px; line-height: 1.25; word-break: break-word; }
.fitem.sel { background: rgba(127,127,127,.18); }
.fitem.sel span { background: var(--sel); color: #fff; }
.fstatus { position: sticky; bottom: 0; padding: 5px 12px; font-size: 11px; color: var(--text-2); border-top: 1px solid var(--sep); background: var(--win); text-align: center; }

/* About */
.about { display: grid; justify-items: center; text-align: center; gap: 14px; padding: 8px 28px 26px; }
.about .avatar { width: 108px; height: 108px; border-radius: 26px; background: linear-gradient(160deg, #2b2f2d, #0f1211); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.about .avatar svg { width: 64px; color: #f2f2f2; }
.about h1 { margin: 2px 0 0; font: 800 28px/1 var(--brand); letter-spacing: -.04em; }
.about .sub { color: var(--text-2); font-size: 13px; margin-top: -6px; }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; text-align: left; font-size: 12.5px; margin-top: 4px; }
.specs dt { color: var(--text-2); text-align: right; font-weight: 500; }
.specs dd { margin: 0; }
.about p { margin: 0; max-width: 34em; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.btnrow { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.mbtn { height: 24px; padding: 0 14px; border-radius: 6px; font-size: 13px; background: var(--win-2); box-shadow: 0 0 0 .5px rgba(0,0,0,.22), 0 1px 1px rgba(0,0,0,.08); }
.mbtn.primary { background: linear-gradient(#3b95ff, #0a72f0); color: #fff; box-shadow: none; }
.mbtn:active { filter: brightness(.92); }

/* Document (Preview-like) */
.doc { background: #8e8e93; min-height: 100%; padding: 20px; display: grid; justify-items: center; }
@media (prefers-color-scheme: dark) { .doc { background: #3a3a3c; } }
.page { width: min(100%, 520px); background: #fff; color: #1d1d1f; padding: 40px 44px; box-shadow: 0 4px 18px rgba(0,0,0,.3); display: grid; gap: 14px; align-content: start; }
.page .kick { font: 11px var(--mono); color: #8a5d00; letter-spacing: .04em; }
.page h2 { margin: 0; font: 800 30px/1.02 var(--brand); letter-spacing: -.04em; }
.page p { margin: 0; font-size: 14px; line-height: 1.6; color: #3a3a3c; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-size: 12px; padding: 3px 9px; border-radius: 99px; background: #f2f2f7; color: #1d1d1f; }
.page .tags span { background: #f2f2f7; }

/* Settings (Stack) */
.pane { padding: 18px 22px 26px; display: grid; gap: 14px; align-content: start; }
.pane-head { display: flex; gap: 12px; align-items: center; }
.pane-head .gl { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: #fff; }
.pane-head .gl svg { width: 24px; height: 24px; }
.pane-head h2 { margin: 0; font-size: 20px; font-weight: 700; }
.pane-head p { margin: 2px 0 0; color: var(--text-2); font-size: 12.5px; }
.group { background: var(--win-2); border-radius: 10px; overflow: hidden; }
@media (prefers-color-scheme: dark) { .group { background: #2a2a2c; } }
.row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--sep); }
.row:last-child { border-bottom: 0; }
.row .rt { flex: 1; min-width: 0; }
.row b { font-weight: 500; font-size: 13px; display: block; }
.row small { color: var(--text-2); font-size: 11.5px; }

/* AI Lab */
.ai { padding: 20px 22px 24px; display: grid; gap: 14px; }
.ai h2 { margin: 0; font: 800 26px/1.05 var(--brand); letter-spacing: -.04em; }
.ai > p { margin: 0; color: var(--text-2); font-size: 13.5px; line-height: 1.55; max-width: 46em; }
.mcp2 { display: grid; grid-template-columns: 1fr auto 1fr auto 1.2fr; align-items: center; gap: 10px; }
.mcp2 .nd { border-radius: 10px; padding: 10px 12px; background: var(--win-2); box-shadow: 0 0 0 .5px var(--sep); }
.mcp2 .nd b { display: block; font-size: 13px; }
.mcp2 .nd small { color: var(--text-2); font-size: 11px; }
.mcp2 .nd.srv { background: #1d1d1f; color: #fff; }
.mcp2 .nd.srv small { color: #a1a1a6; }
.mcp2 .arrow { color: var(--text-3); font-family: var(--mono); }
.mcp2 .tl { display: grid; gap: 5px; }
.mcp2 .tl button { text-align: left; padding: 6px 10px; border-radius: 8px; background: var(--win-2); box-shadow: 0 0 0 .5px var(--sep); font-size: 12.5px; }
.mcp2 .tl button.on { background: var(--accent); color: #1d1d1f; box-shadow: 0 0 0 1px #1d1d1f; }
.con { font: 12px/1.7 var(--mono); background: #111; color: #e5e5e5; border-radius: 10px; padding: 12px 14px; min-height: 8.6em; }
.con .y { color: #fdb913; } .con .g { color: #8a8a8e; }
.con span { display: block; opacity: 0; animation: lin .35s ease forwards; }
@keyframes lin { to { opacity: 1; } }


/* Contacts */
.ccard { padding: 22px 26px; display: grid; gap: 16px; align-content: start; }
.chead { display: flex; gap: 16px; align-items: center; }
.chead .avatar { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(160deg, #3a3f3c, #121514); display: grid; place-items: center; flex: none; }
.chead .avatar svg { width: 36px; color: #f2f2f2; }
.chead h2 { margin: 0; font-size: 22px; font-weight: 700; }
.chead p { margin: 2px 0 0; color: var(--text-2); }
.cfields { display: grid; grid-template-columns: 90px 1fr; gap: 10px 14px; align-items: center; font-size: 13px; }
.cfields dt { text-align: right; color: var(--text-2); font-size: 12px; }
.cfields dd { margin: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.linkb { color: var(--blue); }
.cnote { color: var(--text-2); font-size: 12.5px; border-top: 1px solid var(--sep); padding-top: 12px; }

/* notification */
.notif {
  position: absolute; top: 34px; right: 12px; z-index: 6000; width: 340px; display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border-radius: 16px;
  background: var(--menu); -webkit-backdrop-filter: blur(40px) saturate(180%); backdrop-filter: blur(40px) saturate(180%);
  box-shadow: 0 10px 40px rgba(0,0,0,.25), 0 0 0 .5px rgba(0,0,0,.15);
  transform: translateX(120%); transition: transform .5s cubic-bezier(.2,.9,.3,1); cursor: pointer;
}
.notif.on { transform: none; }
.notif svg { width: 36px; height: 36px; flex: none; }
.notif b { display: block; font-size: 13px; }
.notif p { margin: 1px 0 0; font-size: 13px; color: var(--text); }
.notif time { margin-left: auto; font-size: 11px; color: var(--text-2); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 96px; translate: -50% 20px; z-index: 9000; padding: 8px 14px; border-radius: 10px; background: rgba(30,30,30,.9); color: #fff; font-size: 13px; opacity: 0; transition: .3s; pointer-events: none; }
.toast.on { translate: -50% 0; opacity: 1; }

/* ================= PHONE ================= */
.phone { position: fixed; inset: 0; overflow: hidden; overflow: clip; font-size: 15px; }
.lock {
  position: absolute; inset: 0; z-index: 800; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; color: #fff; overflow: hidden;
  padding: calc(env(safe-area-inset-top, 0px) + 40px) 16px calc(env(safe-area-inset-bottom, 0px) + 14px);
  background:
    radial-gradient(70% 45% at 10% 8%, #1b2a8a 0%, rgba(27,42,138,0) 70%),
    radial-gradient(60% 50% at 95% 95%, #2a1f9a 0%, rgba(42,31,154,0) 70%),
    linear-gradient(170deg, #07103a 0%, #0b0c2a 55%, #120a3a 100%);
  transition: transform .5s cubic-bezier(.3,.8,.3,1), opacity .5s; touch-action: none;
}
.lock > * { position: relative; }
.lock .lnotif, .lock .unlock { z-index: 3; }
.lock .lk-moon { position: absolute; z-index: 0; right: -32%; top: 7%; width: 118%; aspect-ratio: .78; border-radius: 50%;
  background: radial-gradient(60% 55% at 40% 45%, #6a5ce0 0%, #4a3ab8 45%, #261c70 100%); box-shadow: 0 0 0 2px rgba(150,140,255,.35), inset -30px -40px 80px rgba(0,0,0,.35); }
.lock .lk-moon::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: repeating-radial-gradient(circle at 30% 40%, rgba(255,255,255,.035) 0 1px, transparent 1px 7px); }
.lock .lk-front { position: absolute; z-index: 2; left: -80%; top: 47%; width: 190%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(50% 50% at 55% 40%, #4053b8 0%, #2f3f9e 55%, #24307e 100%); box-shadow: 0 -10px 40px rgba(0,0,0,.35), inset 0 2px 0 rgba(160,170,255,.35); pointer-events: none; }
.lock .lk-top { position: relative; z-index: 1; display: grid; justify-items: center; gap: 8px; width: 100%; }
.lock .date { font-size: 21px; font-weight: 600; letter-spacing: .1px; text-shadow: 0 1px 8px rgba(0,0,0,.25); }
.lock .time { width: min(90vw, 420px); line-height: 0; }
.lock .time svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 18px 30px rgba(10,6,60,.45)); }
.lock .lnotif {
  align-self: end; width: 100%; max-width: 420px; display: flex; gap: 10px; padding: 12px 14px; border-radius: 20px; color: var(--text); margin-bottom: 24px;
  background: rgba(255,255,255,.55); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
}
@media (prefers-color-scheme: dark) { .lock .lnotif { background: rgba(40,40,44,.6); } }
.lock .lnotif svg { width: 38px; height: 38px; flex: none; }
.lock .lnotif b { font-size: 15px; display: block; }
.lock .lnotif p { margin: 1px 0 0; font-size: 15px; }
.lock .lnotif time { margin-left: auto; font-size: 13px; opacity: .6; }
.lock .unlock { font-size: 15px; font-weight: 500; opacity: .9; display: grid; justify-items: center; gap: 10px; text-shadow: 0 1px 6px rgba(0,0,0,.25); animation: nudge 2.2s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(-6px); } }
.homebar { width: 136px; height: 5px; border-radius: 3px; background: currentColor; opacity: .9; }
.lock.gone { transform: translateY(-100%); opacity: .2; pointer-events: none; }

.home {
  position: absolute; inset: 0; display: grid; grid-template-rows: auto auto 1fr auto auto; gap: 18px;
  padding: calc(env(safe-area-inset-top, 0px) + 22px) 20px calc(env(safe-area-inset-bottom, 0px) + 10px);
  transition: transform .45s cubic-bezier(.3,.8,.3,1), filter .45s;
}
.home.behind { transform: scale(.92); filter: blur(8px); }
.widget {
  /* the home screen wallpaper is always the dark cat photo, so the widget is dark glass with light text in both schemes */
  border-radius: 22px; padding: 16px 18px; color: #fff; display: grid; gap: 6px; text-align: left;
  background: rgba(18,18,24,.55); -webkit-backdrop-filter: blur(30px) saturate(160%); backdrop-filter: blur(30px) saturate(160%);
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.18), 0 6px 20px rgba(0,0,0,.2);
}
.widget .w-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: rgba(255,255,255,.62); }
.widget .w-top svg { width: 18px; color: #fff; }
.widget h2 { margin: 2px 0 0; font: 800 40px/1 var(--brand); letter-spacing: -.05em; }
.widget h2 i { font-style: normal; color: var(--accent); }
.widget p { margin: 0; font-size: 15px; color: rgba(255,255,255,.88); line-height: 1.38; }
.apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px 6px; align-content: start; }
.app { display: grid; justify-items: center; gap: 5px; text-align: center; -webkit-tap-highlight-color: transparent; }
.app .ic { width: min(76px, 20.5vw); aspect-ratio: 1; transition: transform .15s, filter .15s; }
.app .ic svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 4px rgba(0,0,0,.15)); }
.app:active .ic { transform: scale(.9); filter: brightness(.85); }
.app span { font-size: 11.5px; font-weight: 500; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.45); white-space: nowrap; }
.pdots { display: flex; justify-content: center; gap: 7px; }
.pdots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.95); }
.pdots i + i { background: rgba(255,255,255,.4); }
.idock { display: grid; grid-template-columns: repeat(4, 1fr); padding: 12px 8px; border-radius: 30px; background: rgba(255,255,255,.3); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); }
@media (prefers-color-scheme: dark) { .idock { background: rgba(60,60,64,.35); } }
.idock .app > span:not(.ic) { display: none; }

/* app sheet */
.sheet {
  position: absolute; inset: 0; z-index: 600; background: var(--ios-bg); color: var(--text); display: grid; grid-template-rows: 1fr;
  border-radius: 0; overflow: hidden; overflow: clip; transform-origin: 0 0; will-change: transform;
}
.sheet.full { border-radius: 0; }
.nav { position: absolute; z-index: 5; top: 0; left: 0; right: 0; padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 8px; pointer-events: none; }
.nav .back {
  pointer-events: auto; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: var(--text);
  background: rgba(255,255,255,.72); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 2px 10px rgba(0,0,0,.08), 0 0 0 .5px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.8);
}
@media (prefers-color-scheme: dark) { .nav .back { background: rgba(58,58,62,.6); box-shadow: 0 2px 10px rgba(0,0,0,.4), 0 0 0 .5px rgba(255,255,255,.12), inset 0 1px 0 rgba(255,255,255,.12); } }
.nav .back svg { width: 11px; height: 19px; translate: -1px 0; }
.nav .back:active { transform: scale(.92); }
.ihero { background: var(--ios-cell); border-radius: 28px; padding: 18px 20px 20px; display: grid; gap: 10px; justify-items: start; margin: 0 0 22px; }
.ihero .hi { width: 64px; height: 64px; margin: -2px 0 2px -4px; }
.ihero .hi svg { width: 100%; height: 100%; display: block; }
.ihero h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.3px; }
.ihero p { margin: 0; font-size: 17px; line-height: 1.32; color: var(--text-2); }
.scroll { overflow: auto; -webkit-overflow-scrolling: touch; padding: calc(env(safe-area-inset-top, 0px) + 78px) 16px calc(env(safe-area-inset-bottom, 0px) + 50px); user-select: text; -webkit-user-select: text; overscroll-behavior: contain; }
.sheet .homebar { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 8px); translate: -50% 0; color: var(--text); opacity: .85; touch-action: none; }
.sheet .hb-zone { position: absolute; left: 0; right: 0; bottom: 0; height: 40px; touch-action: none; }
.ilist { background: var(--ios-cell); border-radius: 26px; overflow: hidden; margin: 8px 0 22px; }
.ilist .row { position: relative; min-height: 54px; padding: 12px 18px; border-bottom: 0; font-size: 17px; gap: 14px; color: var(--text); }
.ilist .row::after { content: ""; position: absolute; left: 18px; right: 0; bottom: 0; height: .5px; background: var(--sep); }
.ilist .row:has(.gl)::after { left: 70px; }
.ilist .row:last-child::after { display: none; }
.ilist .row b { font-weight: 400; font-size: 17px; }
.ilist .row small { font-size: 14px; }
.ilist .chev { color: var(--text-3); display: grid; place-items: center; flex: none; }
.ilist .chev svg { width: 8px; height: 14px; }
.ilist .gl { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none; }
.ilist .gl svg { width: 22px; height: 22px; }
.ihead { font-size: 13px; color: var(--text-2); text-transform: uppercase; margin: 18px 14px 0; letter-spacing: .02em; }
.ifoot { font-size: 13px; color: var(--text-2); margin: -12px 14px 18px; }
.iabout { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 24px 20px 22px; margin-bottom: 22px; background: var(--ios-cell); border-radius: 28px; }
.iabout .avatar { width: 96px; height: 96px; border-radius: 50%; background: linear-gradient(160deg, #2b2f2d, #0f1211); display: grid; place-items: center; }
.iabout .avatar svg { width: 54px; color: #f2f2f2; }
.iabout h2 { margin: 4px 0 0; font: 800 30px/1 var(--brand); letter-spacing: -.04em; }
.iabout p { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.45; }
.ibtn { display: block; width: 100%; padding: 15px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 17px; font-weight: 600; text-align: center; margin: 4px 0 20px; text-decoration: none; }
.ibtn.sec { background: var(--ios-cell); color: var(--blue); }

/* form switch */
:root[data-form="desk"] .phone, :root[data-form="phone"] .desk { display: none; }

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

/* Services as App Store "Today" cards */
.today { display: grid; gap: 22px; padding-bottom: 10px; }
.tcard { position: relative; display: block; width: 100%; height: min(440px, 62svh); border-radius: 30px; overflow: hidden; text-align: left; color: #fff; background: var(--g); box-shadow: 0 14px 34px -14px rgba(0,0,0,.35); transition: transform .2s ease; -webkit-tap-highlight-color: transparent; }
.tcard:active { transform: scale(.97); }
.tcard .art { position: absolute; inset: 0; width: 100%; height: 100%; }
.tcard .ttxt { position: absolute; left: 0; right: 0; top: 0; padding: 22px 22px 0; display: grid; gap: 4px; }
.tcard .eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; opacity: .78; }
.tcard h3 { margin: 0; font-size: 32px; line-height: 1.02; font-weight: 800; letter-spacing: -.6px; max-width: 11ch; }
.tcard .tfoot { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 22px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; font-weight: 600;
  background: rgba(0,0,0,.16); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); }
.tcard .tfoot span:last-child { padding: 7px 16px; border-radius: 99px; background: rgba(255,255,255,.92); color: #1d1d1f; font-weight: 700; }
.tdetail { position: absolute; inset: 0; z-index: 20; background: var(--ios-bg); overflow: auto; overscroll-behavior: contain; transform-origin: 0 0; user-select: text; -webkit-user-select: text; }
.tdetail .thero { position: relative; height: min(440px, 58svh); color: #fff; background: var(--g); }
.tdetail .thero .art { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 72%; }
.tdetail .thero::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.28)); pointer-events: none; }
.tdetail .thero .ttxt { z-index: 1; }
.tdetail .thero .ttxt { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 22px 22px; display: grid; gap: 4px; }
.tdetail .thero h3 { margin: 0; font-size: 36px; line-height: 1; font-weight: 800; letter-spacing: -.7px; }
.tdetail .tx { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 14px); right: 16px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(0,0,0,.28); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); z-index: 2; }
.tdetail .tx svg { width: 12px; height: 12px; }
.tdetail .tbody { padding: 22px 20px calc(env(safe-area-inset-bottom, 0px) + 40px); display: grid; gap: 18px; }
.tdetail .lead { margin: 0; font-size: 19px; line-height: 1.4; font-weight: 500; }
.tdetail .tbody .tags span { background: var(--ios-cell); color: var(--text); font-size: 14px; padding: 6px 12px; }
.inc { list-style: none; margin: 0; padding: 0; background: var(--ios-cell); border-radius: 22px; overflow: hidden; }
.inc li { display: flex; gap: 12px; align-items: center; padding: 14px 18px; font-size: 16px; position: relative; }
.inc li + li::before { content: ""; position: absolute; left: 50px; right: 0; top: 0; height: .5px; background: var(--sep); }
.inc li i { width: 22px; height: 22px; border-radius: 50%; background: #34c759; display: grid; place-items: center; flex: none; }
.inc li i::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.tdetail h4 { margin: 4px 4px -8px; font-size: 13px; color: var(--text-2); text-transform: uppercase; letter-spacing: .03em; font-weight: 500; }

/* Messages */
.chat { display: grid; grid-template-rows: auto 1fr auto; height: 100%; min-height: 0; background: var(--win); }
.chat-head { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--sep); font-size: 13px; }
.chat-head .muted { color: var(--text-2); }
.ch-av { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(160deg, #3a3f3c, #121514); display: grid; place-items: center; flex: none; }
.ch-av svg { width: 16px; color: #f2f2f2; }
.chat-conv { gap: 10px !important; align-items: center !important; padding: 8px !important; }
.chat-conv span:last-child { display: grid; min-width: 0; }
.chat-conv small { color: var(--text-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-conv.on { background: var(--blue) !important; color: #fff; }
.chat-conv.on small { color: rgba(255,255,255,.8); }
.chat-log { overflow: auto; padding: 14px 14px 8px; display: flex; flex-direction: column; gap: 4px; user-select: text; -webkit-user-select: text; }
.bub { max-width: 76%; padding: 8px 13px; border-radius: 19px; font-size: 14px; line-height: 1.38; word-wrap: break-word; animation: bubIn .3s cubic-bezier(.2,.9,.3,1.2); }
@keyframes bubIn { from { transform: translateY(8px) scale(.96); opacity: 0; } }
.bub.bot { align-self: flex-start; background: #e9e9eb; color: #1d1d1f; border-bottom-left-radius: 6px; }
.bub.me { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 6px; margin-top: 6px; }
@media (prefers-color-scheme: dark) { .bub.bot { background: #2c2c2e; color: #f5f5f7; } }
.bub.typing { display: flex; gap: 4px; padding: 12px 14px; }
.bub.typing i { width: 7px; height: 7px; border-radius: 50%; background: #8e8e93; animation: dot 1s infinite; }
.bub.typing i:nth-child(2) { animation-delay: .15s; } .bub.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }
.bub .sum { display: grid; gap: 4px; margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.65); }
@media (prefers-color-scheme: dark) { .bub .sum { background: rgba(0,0,0,.25); } }
.bub .sum small { color: #6e6e73; }
.delivered { align-self: flex-end; font-size: 11px; color: var(--text-2); margin: 2px 4px 4px; }
.chat-in { padding: 8px 12px 12px; display: grid; gap: 8px; border-top: 1px solid var(--sep); background: var(--win); }
.chat-in .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.chips:empty { display: none; }
.chip { padding: 7px 14px; border-radius: 99px; border: 1.5px solid var(--blue); color: var(--blue); font-size: 14px; font-weight: 500; background: transparent; }
.chip:hover { background: var(--blue); color: #fff; }
.row-in { display: flex; align-items: flex-end; gap: 8px; padding: 4px 4px 4px 14px; border-radius: 20px; border: 1px solid var(--sep); background: var(--win); }
.row-in textarea { flex: 1; min-width: 0; resize: none; border: 0; outline: 0; background: transparent; color: var(--text); font: 14px/1.4 var(--ui); padding: 6px 0; max-height: 140px; }
.row-in textarea:disabled { opacity: .5; }
.send { width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; flex: none; }
.send:disabled { background: rgba(127,127,127,.35); }
.send svg { width: 16px; height: 16px; }
.sheet.s-messages .scroll { padding-bottom: 0; }
.chat-phone { height: auto; min-height: calc(100svh - env(safe-area-inset-top, 0px) - 78px); background: transparent; }
.chat-phone .chat-head { flex-direction: column; gap: 4px; border: 0; padding: 0 0 10px; font-size: 15px; }
.chat-phone .chat-head .ch-av { width: 64px; height: 64px; } .chat-phone .chat-head .ch-av svg { width: 34px; }
.chat-phone .chat-head small { color: var(--text-2); font-size: 13px; }
.chat-phone .chat-log { overflow: visible; padding: 4px 0 8px; }
.chat-phone .bub { font-size: 17px; max-width: 80%; }
.chat-phone .chat-in { position: sticky; bottom: 0; z-index: 2; border: 0; margin: 0 -16px; padding: 14px 16px calc(env(safe-area-inset-bottom, 0px) + 22px); background: linear-gradient(rgba(242,242,247,0), var(--ios-bg) 12px); }
@media (prefers-color-scheme: dark) { .chat-phone .chat-in { background: linear-gradient(rgba(0,0,0,0), var(--ios-bg) 12px); } }
.chat-phone .row-in { background: var(--ios-cell); border: 0; box-shadow: 0 4px 18px rgba(0,0,0,.08); padding: 5px 5px 5px 16px; }
.chat-phone .row-in textarea { font-size: 17px; }
.chat-phone .chip { font-size: 16px; padding: 9px 16px; background: var(--ios-cell); }
.chat-phone .send { width: 34px; height: 34px; }

/* Notes */
.note-list { padding: 8px; }
.note-item { display: grid !important; gap: 2px; padding: 9px 10px !important; border-radius: 8px; border-bottom: 1px solid var(--sep); }
.note-item b { font-size: 13px; }
.note-item span { font-size: 12px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.note-item time { color: var(--text); font-weight: 500; margin-right: 4px; }
.note-item.on { background: #ffd60a !important; }
.note-item.on span, .note-item.on time { color: #3a2d00; } .note-item.on b { color: #1d1d1f; }
.note-pane { background: var(--win); }
.note-art { max-width: 640px; margin: 0 auto; padding: 26px 32px 40px; font-size: 15px; line-height: 1.65; }
.note-art h1 { font: 800 30px/1.05 var(--brand); letter-spacing: -.035em; margin: 6px 0 10px; }
.note-art h2 { font-size: 18px; margin: 24px 0 4px; }
.note-art .note-lead { font-size: 17px; color: var(--text-2); }
.note-art .note-meta { font-size: 12px; color: var(--text-2); }
.note-art a { color: var(--blue); }
.note-art li { margin: 4px 0; }
.note-ph .note-art { padding: 0; font-size: 17px; }
.note-ph .note-art h1 { font-size: 30px; }
.note-card { background: var(--ios-cell); border-radius: 28px; padding: 22px 20px 24px; margin-bottom: 22px; }
.note-card .note-art p { margin: 0 0 14px; color: var(--text); }
.note-card .note-art .note-lead { color: var(--text-2); font-size: 19px; line-height: 1.4; }
.note-card .note-art .note-meta { color: var(--text-2); font-size: 13px; }
.note-back { color: var(--blue); font-size: 17px; margin: 0 0 12px 4px; }
.note-row { width: 100%; text-align: left; }
.note-row small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Weather */
.wx { display: grid; color: #fff; text-align: left; height: 100%; padding: 14px 16px; border-radius: 22px; background: linear-gradient(180deg, #3d8bfd, #2f6fe0); box-shadow: 0 8px 24px rgba(0,0,0,.14); align-content: start; }
@media (prefers-color-scheme: dark) { .wx { background: linear-gradient(180deg, #1c3b74, #0f2148); } }
.wx-top { display: flex; justify-content: space-between; align-items: flex-start; }
.wx-city { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.wx-city svg { width: 10px; height: 10px; }
.wx-t { font-size: 40px; font-weight: 300; line-height: 1; letter-spacing: -1px; }
.wx-ic { width: 26px; height: 26px; margin-top: auto; }
.wx-ic svg, .wx-d svg { width: 100%; height: 100%; display: block; }
.wx-c { font-size: 13px; font-weight: 600; margin-top: 4px; }
.wx-hl { font-size: 13px; opacity: .85; }
.wx-s { grid-template-rows: auto 1fr auto auto; }
.wx-s .wx-top { flex-direction: column; gap: 2px; }
.wx-m { grid-template-columns: 1fr auto; grid-template-rows: auto auto auto; column-gap: 14px; }
.wx-m .wx-top { grid-column: 1; flex-direction: column; }
.wx-m .wx-ic { grid-column: 2; grid-row: 1; width: 34px; height: 34px; margin: 0; }
.wx-m .wx-c, .wx-m .wx-hl { grid-column: 1 / -1; }
.wx-days { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.25); }
.wx-d { display: grid; justify-items: center; gap: 4px; font-size: 12px; }
.wx-d svg { width: 22px; height: 22px; }
.wx-d small { opacity: .8; }
.dwidget { position: absolute; top: 40px; left: 20px; width: 300px; z-index: 5; }
.dwidget .wx { border-radius: 20px; background: linear-gradient(180deg, rgba(61,139,253,.88), rgba(47,111,224,.88)); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.mb-wx svg { width: 16px; height: 16px; }
.mb-wx svg * { fill: currentColor; stroke: currentColor; }
.mb-wx svg circle + g, .mb-wx svg g { fill: none; }
.iwidget { grid-column: span 2; grid-row: span 2; aspect-ratio: 1; width: 100%; padding: 0 4px 4px; }
.iwidget .wx { border-radius: 24px; }
.iwidget .wx-t { font-size: 46px; }
.apps { grid-auto-flow: row dense; }

/* short phones (iPhone SE, mini): everything on the home screen has to fit above the dock */
@media (max-height: 760px) {
  .home { gap: 10px; padding-top: calc(env(safe-area-inset-top, 0px) + 12px); }
  .widget { padding: 11px 15px; gap: 2px; border-radius: 20px; }
  .widget h2 { font-size: 30px; }
  .widget p { font-size: 13px; }
  .widget .w-top { font-size: 11px; }
  .apps { gap: 10px 6px; }
  .app .ic { width: min(56px, 15vw); }
  .app span { font-size: 11px; }
  .idock { padding: 8px 8px; border-radius: 26px; }
  .iwidget .wx { padding: 12px 14px; border-radius: 20px; }
  .iwidget .wx-t { font-size: 38px; }
}
@media (max-height: 760px) {
  .lock .time { width: min(78vw, 360px); }
  .lock .lk-front { top: 58%; }
}

/* phone wallpaper: the black cat (os/cat.js) */
.phone .cat { position: absolute; inset: 0; width: 100%; height: 100%; display: block; background: #07081a; }

/* technology logos in Stack */
.tl { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.12); }
.tl svg { width: 17px; height: 17px; }
.ilist .tl { width: 38px; height: 38px; border-radius: 10px; }
.ilist .tl svg { width: 22px; height: 22px; }
.ilist .row:has(.tl)::after { left: 70px; }

/* AI Lab on the phone */
.ai-chips { display: flex; gap: 8px; overflow-x: auto; margin: 8px -16px 12px; padding: 2px 16px 4px; scroll-padding-inline: 16px; scrollbar-width: none; scroll-snap-type: x proximity; }
.ai-chips::after { content: ""; flex: 0 0 8px; }
.ai-chips::-webkit-scrollbar { display: none; }
.ai-chip { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 99px; background: var(--ios-cell); font-size: 15px; font-weight: 500; color: var(--text); scroll-snap-align: start; transition: box-shadow .2s, transform .2s; }
.ai-chip .gl { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.ai-chip .gl svg { width: 16px; height: 16px; }
.ai-chip.on { box-shadow: inset 0 0 0 2px var(--blue); }
.ai-chip:active { transform: scale(.96); }
.ai-demo { background: var(--ios-cell); border-radius: 28px; padding: 16px; min-height: 290px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.ai-demo .bub { font-size: 16px; max-width: 82%; }
.ai-call { align-self: center; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 99px; background: var(--ios-bg); font-size: 13px; color: var(--text-2); animation: bubIn .3s cubic-bezier(.2,.9,.3,1.2); margin-top: 6px; }
.ai-call .gl { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.ai-call .gl svg { width: 14px; height: 14px; }
.ai-call .spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(127,127,127,.35); border-top-color: var(--blue); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai-call .ok { width: 16px; height: 16px; border-radius: 50%; background: #34c759; color: #fff; display: grid; place-items: center; }
.ai-call .ok svg { width: 10px; height: 10px; }
.ai-res { align-self: center; font-size: 12px; color: var(--text-2); background: var(--ios-bg); border-radius: 12px; padding: 8px 12px; max-width: 100%; overflow-wrap: anywhere; animation: bubIn .3s ease; }
.ai-from { font-size: 12px; color: var(--text-2); margin: 6px 0 -4px 12px; animation: bubIn .3s ease; }
.ai-flow { background: var(--ios-cell); border-radius: 28px; padding: 18px; display: grid; margin: 8px 0 22px; }
.af-step { display: flex; gap: 14px; align-items: center; }
.af-step b { display: block; font-size: 17px; font-weight: 600; }
.af-step small { color: var(--text-2); font-size: 14px; }
.af-ic { width: 46px; height: 46px; flex: none; display: grid; place-items: center; }
.af-ic .tl { width: 46px; height: 46px; border-radius: 12px; }
.af-ic .tl svg { width: 26px; height: 26px; }
.af-p { border-radius: 12px; background: linear-gradient(160deg, #2b2f2d, #0f1211); color: #f2f2f2; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.af-p svg { width: 26px; }
.af-tools { display: grid; grid-template-columns: repeat(3, 14px); grid-auto-rows: 14px; gap: 2px; width: 46px; flex: none; justify-content: center; }
.af-tools .gl { width: 14px; height: 14px; border-radius: 4px; display: grid; place-items: center; color: #fff; }
.af-tools .gl svg { width: 9px; height: 9px; }
.af-line { position: relative; width: 2px; height: 30px; margin: 6px 0 6px 22px; background: rgba(127,127,127,.25); border-radius: 1px; overflow: hidden; }
.af-line i { position: absolute; left: -2px; width: 6px; height: 10px; border-radius: 3px; background: var(--blue); animation: flowDot 1.6s ease-in-out infinite; }
.af-line + .af-step + .af-line i { animation-delay: .8s; }
@keyframes flowDot { from { top: -10px; } to { top: 30px; } }

/* About: one profile, one short story */
.about .meta { font-size: 12px; color: var(--text-3); margin-top: -10px; }
.iabout .ia-meta { color: var(--text-3); font-size: 13px; margin-top: -4px; }
.iabout .ia-text { color: var(--text); font-size: 16px; line-height: 1.45; margin-top: 8px; text-align: left; }
/* Memoji avatar (About, Contacts, Messages) */
.avatar.me, .ch-av { background: linear-gradient(180deg, #e4e7ec, #b9bfc8); overflow: hidden; place-items: end center; }
.about .avatar.me { border-radius: 50%; }
.avatar.me img, .ch-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Desktop: the kitten that chases the cursor (os/kitten.js) */
.kitten { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3900; }
