/* casama.ai "See it at work": three live scenes on a desktop, a tablet and a phone (docs/SHOWCASE-PLAN.md).
   Each one is Casama's screens rebuilt in HTML, played by showcase.js. Without JavaScript, or with reduced
   motion or Save-Data, each shows its finished frame. Layouts reflow with container queries rather than
   shrinking, so the text stays readable on a phone. Only transform and opacity animate. */

.showcase {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 64px 40px; margin-top: 56px; align-items: end;
  --dev-bezel: #0e0e10; --dev-edge: #2c2c30;
  --map-land: #eef0ea; --map-park: #d5e6cc; --map-river: #b7d3ea; --map-street: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .showcase { --dev-edge: #45454b; --map-land: #2b2d2c; --map-park: #2f3d31; --map-river: #2b4256; --map-street: #3a3c3b; }
}
:root[data-theme="dark"] .showcase { --dev-edge: #45454b; --map-land: #2b2d2c; --map-park: #2f3d31; --map-river: #2b4256; --map-street: #3a3c3b; }
.scene { margin: 0; min-width: 0; }
.scene-desk { grid-column: 1 / -1; }
.scene figcaption { margin-top: 18px; color: var(--ink-2); max-width: 52ch; }
.scene figcaption strong { color: var(--ink); font-weight: 600; }
.scene-phone figcaption { margin-inline: auto; max-width: 300px; }
.scene-stage { position: relative; display: flex; justify-content: center; align-items: flex-end; container-type: inline-size; }
@media (max-width: 960px) {
  .showcase { grid-template-columns: minmax(0, 1fr); gap: 56px; }
}

/* the pause button every scene (and the hero chat) carries */
.scene-toggle {
  position: absolute; right: 0; bottom: -50px; z-index: 3; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: color-mix(in oklab, var(--bg) 86%, transparent); color: var(--ink);
  display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: .72; transition: opacity .2s;
}
.scene-toggle[hidden] { display: none; }
.scene-toggle:hover, .scene-toggle:focus-visible { opacity: 1; }
.scene-toggle-icon { width: 10px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.scene-toggle[aria-pressed="true"] .scene-toggle-icon { width: 0; height: 0; border: 0; border-left: 10px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 3px; }
.scene-phone .scene-toggle { right: max(0px, calc(50% - 150px)); }
.scene figcaption { padding-right: 48px; }
.chat .scene-toggle { right: 12px; bottom: 12px; width: 30px; height: 30px; }
.chat { position: relative; }
.is-paused *, .is-paused *::before, .is-paused *::after { animation-play-state: paused !important; }

/* ------------------------------------------------------------------ device frames */
.dev-window {
  width: 100%; height: clamp(540px, 52vw, 620px); display: flex; flex-direction: column; overflow: hidden;
  border-radius: 14px; border: 1px solid var(--line); background: var(--bg);
  box-shadow: 0 40px 90px -50px rgba(30, 10, 50, .5), 0 2px 6px rgba(0, 0, 0, .05);
}
.win-bar { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; background: var(--bg-2); border-bottom: 1px solid var(--line); flex: none; }
.win-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.win-bar i:nth-child(2) { background: #febc2e; }
.win-bar i:nth-child(3) { background: #28c840; }
.win-bar span { margin-left: 10px; font-size: 12px; color: var(--ink-2); }
.win-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 228px minmax(0, 1fr); }

.dev-phone {
  width: 300px; max-width: 100%; height: 624px; padding: 10px; border-radius: 48px; background: var(--dev-bezel);
  box-shadow: 0 0 0 1px var(--dev-edge), 0 40px 80px -40px rgba(30, 10, 50, .55); flex: none;
}
.phone-screen { position: relative; height: 100%; border-radius: 38px; overflow: hidden; background: var(--bg); display: flex; flex-direction: column; }
.phone-status { display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 6px 26px 0; font: 600 13px/1 var(--font-sans); flex: none; }
.phone-island { width: 84px; height: 24px; border-radius: 14px; background: #000; }
.phone-sig { display: flex; align-items: flex-end; gap: 2px; height: 11px; }
.phone-sig i { width: 3px; background: currentColor; border-radius: 1px; height: 5px; }
.phone-sig i:nth-child(2) { height: 8px; }
.phone-sig i:nth-child(3) { height: 11px; }
.phone-home { position: absolute; left: 50%; bottom: 6px; width: 100px; height: 4px; margin-left: -50px; border-radius: 3px; background: var(--ink); opacity: .55; }

.dev-tablet {
  width: 100%; max-width: 760px; aspect-ratio: 1.42; padding: 13px; border-radius: 30px; background: var(--dev-bezel);
  box-shadow: 0 0 0 1px var(--dev-edge), 0 40px 90px -50px rgba(30, 10, 50, .55);
}
.tab-screen { height: 100%; border-radius: 18px; overflow: hidden; background: var(--bg); display: grid; grid-template-columns: minmax(0, 38fr) minmax(0, 62fr); }

/* ------------------------------------------------------------------ the app inside */
.app-side { display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; background: var(--bg-2); border-right: 1px solid var(--line); font-size: 13px; overflow: hidden; }
.side-space { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; }
.side-item { padding: 6px 8px; border-radius: 8px; color: var(--ink-2); }
.side-label { margin: 12px 8px 4px; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.side-bot { position: relative; display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 10px; }
.side-bot span { display: grid; min-width: 0; }
.side-bot b { font-weight: 600; font-size: 13px; }
.side-bot small { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-bot.active { background: color-mix(in oklab, var(--accent) 14%, transparent); }
.side-grp { width: 22px; height: 22px; border-radius: 7px; background: var(--accent-soft); border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent); flex: none; }
.side-dot { position: absolute; right: 8px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--good); opacity: 0; transition: opacity .3s; }
.side-bot.working .side-dot { opacity: 1; animation: sc-pulse 1.4s ease-in-out infinite; }
.side-bot.working small { color: var(--good); }
.side-foot { margin-top: auto; display: grid; gap: 4px; padding: 8px; color: var(--ink-2); }

.app-chat { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--bg); }
.app-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); flex: none; }
.app-head-who { display: grid; min-width: 0; flex: 1; }
.app-head-who b { font-size: 14px; font-weight: 600; }
.app-head-who small { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-ico svg, .c-ico svg, .c-send svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: block; }
.h-ico { color: var(--ink-2); }
.ava-stack { display: flex; }
.ava-ring { display: grid; place-items: center; width: 28px; height: 28px; margin-right: -7px; border-radius: 50%; background: var(--bg); border: 2px solid var(--bg); transition: box-shadow .3s; }
.ava-ring.working { box-shadow: 0 0 0 2px var(--good); animation: sc-ring 1.4s ease-in-out infinite; }
.ava-stack + .app-head-who { margin-left: 10px; }

.msgs {
  flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; padding: 14px 16px 10px;
  -webkit-mask-image: linear-gradient(transparent, #000 28px); mask-image: linear-gradient(transparent, #000 28px);
}
.msgs { position: relative; }
.msgs > [hidden] { display: none !important; }
.m { flex: none; font-size: 13.5px; line-height: 1.45; }
.m p { margin: 0; }
.m.you { align-self: flex-end; max-width: 78%; padding: 9px 13px; border-radius: 16px 16px 5px 16px; background: var(--accent); color: var(--on-accent); }
.m.you .at { font-weight: 700; }
.m.bot { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; align-items: start; max-width: 88%; }
.m.bot > img { margin-top: 1px; }
.m-col { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.m-name { font-size: 12px; font-weight: 600; }
.m-col > p { padding: 8px 12px; border-radius: 5px 16px 16px 16px; background: var(--card); border: 1px solid var(--line); }
.m .at { color: var(--accent); font-weight: 600; }
.m.you .at { color: inherit; }
.m-usage { font: 400 10.5px/1.2 var(--font-mono); color: var(--ink-2); }
.m.sys { align-self: center; font-size: 11.5px; color: var(--ink-2); padding: 3px 10px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); }
.m-typing .m-col > p.dots { display: flex; gap: 4px; padding: 11px 13px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-2); animation: sc-dot 1s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }

.m-card { width: 100%; max-width: 360px; padding: 12px 14px; border-radius: 5px 16px 16px 16px; background: var(--card); border: 1px solid var(--line); display: grid; gap: 6px; }
.m-card > small { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; }
.m-card > b { font-weight: 600; font-size: 13.5px; line-height: 1.35; }
.m-card > p { color: var(--ink-2); }
.m-card.list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.m-card.list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.m-card.list li span { display: grid; min-width: 0; }
.m-card.list li b { font-weight: 600; font-size: 13px; }
.m-card.list li small { font-size: 11px; color: var(--ink-2); }
.m-card.list li em { font: 400 10.5px/1.2 var(--font-mono); font-style: normal; color: var(--good); white-space: nowrap; }
.m-card.page { padding: 0; overflow: hidden; gap: 0; }
.page-bar { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--line); font: 400 10.5px/1 var(--font-mono); color: var(--ink-2); }
.page-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.page-body { display: grid; gap: 4px; padding: 14px 14px 12px; text-align: center; justify-items: center;
  background: radial-gradient(120% 90% at 50% 0%, color-mix(in oklab, var(--accent) 16%, var(--bg)), var(--bg)); }
.page-body b { font: 700 19px/1.2 var(--font-serif); }
.page-body small { font-size: 11.5px; color: var(--ink-2); }
.page-btns { display: flex; gap: 6px; margin-top: 6px; }
.page-btns span { padding: 5px 12px; border-radius: 99px; font-size: 11.5px; font-weight: 600; border: 1px solid var(--line); background: var(--bg); }
.page-btns span:first-child { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.page-body em { font: 400 11px/1.2 var(--font-mono); font-style: normal; color: var(--good); margin-top: 4px; }
.page-body em.bump { animation: sc-bump .5s var(--ease-out); }
.m-card.ask { border: 1.5px solid color-mix(in oklab, var(--accent) 50%, var(--line)); }
.m-card.ask > b { color: var(--accent); }
.m-card.ask > p { color: var(--ink); }
.m-card.ask.asking { animation: sc-glow 1.8s ease-in-out infinite; }
.m-card.ask.answered .ask-btns { opacity: .45; }
.ask-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; transition: opacity .3s; }
.m-btn { display: inline-flex; align-items: center; padding: 6px 13px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--bg); border: 1px solid var(--line); color: var(--ink); white-space: nowrap; transition: transform .15s, filter .15s, background-color .3s, color .3s; }
.m-btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.m-btn.sm { padding: 4px 10px; font-size: 11px; }
.m-btn.tapped { transform: scale(.92); filter: brightness(1.15); box-shadow: 0 0 0 5px color-mix(in oklab, var(--accent) 25%, transparent); }

.composer { display: flex; align-items: center; gap: 10px; margin: 0 12px 12px; padding: 8px 8px 8px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font-size: 13px; flex: none; }
.c-ph { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-send { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--line); color: var(--ink-2); }
.c-send svg { width: 15px; height: 15px; }
.phone-screen .composer { margin-bottom: 18px; }

/* pictures the bots put in their cards (generated art, visuals/round-8) */
.card-art { display: block; width: calc(100% + 28px); max-width: none; height: auto; aspect-ratio: 600 / 220; object-fit: cover; margin: -12px -14px 4px; border-radius: 5px 16px 0 0; background: var(--line); }
.m-card.list li { justify-content: flex-start; }
.m-card.list li em { margin-left: auto; }
.li-pic { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; flex: none; background: var(--line); }
.page-hero { display: block; width: 100%; height: auto; aspect-ratio: 600 / 240; object-fit: cover; background: var(--line); }
.page-body { margin-top: -26px; position: relative; padding-top: 0; background: none; }
.page-body b { padding: 8px 18px 2px; border-radius: 12px 12px 0 0; background: var(--card); }
.day-pics { position: relative; aspect-ratio: 480 / 200; border-radius: 10px; overflow: hidden; background: var(--line); }
.day-pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s ease; }
.day-pic.on { opacity: 1; }
.mapcard .map { aspect-ratio: 280 / 170; }

/* ------------------------------------------------------------------ the map (phone) */
.m.bot:has(.mapcard) { max-width: 100%; }
.mapcard { max-width: 100%; padding: 10px; }
.mapcard > b { font-size: 12.5px; }
.mapcard > small { font-size: 10.5px; color: var(--ink-2); text-transform: none; letter-spacing: 0; font-weight: 400; }
.map-tabs { display: flex; gap: 4px; overflow: hidden; }
.map-tabs span i { font-style: normal; display: none; }
.map-tabs span.on i { display: inline; }
.map-tabs span { padding: 3px 8px; border-radius: 99px; font-size: 10px; white-space: nowrap; color: var(--ink-2); border: 1px solid var(--line); transition: background-color .3s, color .3s; }
.map-tabs span.on { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.map { display: block; width: 100%; height: auto; aspect-ratio: 280 / 200; border-radius: 10px; }
.map-land { fill: var(--map-land); }
.map-park { fill: var(--map-park); }
.map-river { fill: none; stroke: var(--map-river); stroke-width: 6; stroke-linecap: round; }
.map-street { stroke: var(--map-street); stroke-width: 1.6; }
.map-day { opacity: 0; transition: opacity .35s; }
.map-day.on { opacity: 1; }
.route { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.pin circle { fill: var(--accent); stroke: var(--bg); stroke-width: 2; }
.pin-n { fill: var(--on-accent); font: 700 9px/1 var(--font-sans); text-anchor: middle; }
.pin-l { fill: var(--ink); font: 600 10.5px/1 var(--font-sans); paint-order: stroke; stroke: var(--map-land); stroke-width: 3px; stroke-linejoin: round; }
.is-live .map-day .pin { opacity: 0; transform: translateY(-8px); transform-box: fill-box; transition: opacity .3s, transform .45s cubic-bezier(.3, 1.6, .5, 1); transition-delay: calc(var(--i) * .22s); }
.is-live .map-day.on .pin { opacity: 1; transform: none; }
.is-live .map-day .route { stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s ease-in-out .25s; }
.is-live .map-day.on .route { stroke-dashoffset: 0; }

/* ------------------------------------------------------------------ the bot's computer (tablet) */
.tab-chat { border-right: 1px solid var(--line); }
.tab-chat .msgs { padding: 12px 12px 8px; gap: 10px; }
.tab-chat .m { font-size: 12.5px; }
.tab-chat .m.bot { max-width: 100%; }
.vm { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--bg-2); position: relative; }
.vm::after { content: ""; position: absolute; inset: 0; pointer-events: none; border: 2.5px solid var(--accent); opacity: 0; transition: opacity .3s; }
.vm.taken::after { opacity: 1; }
.vm-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 12.5px; flex: none; }
.vm-bar b { font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); animation: sc-pulse 1.6s ease-in-out infinite; flex: none; }
.vm.taken .vm-dot { background: var(--accent); }
.vm-who { font: 400 10.5px/1 var(--font-mono); color: var(--ink-2); white-space: nowrap; }
.vm.taken .vm-who { color: var(--accent); }
.vm-view { position: relative; flex: 1; min-height: 0; margin: 0 12px; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.vm-page { position: absolute; left: 0; top: 0; width: 460px; height: 380px; transform-origin: 0 0; transform: scale(var(--vm-s, .7)); color: #1d1b20; background: #fff; font-size: 14px; }
.vm-foot { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px 10px; font: 400 10.5px/1 var(--font-mono); color: var(--ink-2); flex: none; }
.br-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; background: #f1f1f4; border-bottom: 1px solid #e3e2e7; }
.br-bar i { width: 9px; height: 9px; border-radius: 50%; background: #d4d3d9; }
.br-bar span { margin-left: 10px; flex: 1; padding: 5px 10px; border-radius: 6px; background: #fff; font: 400 11.5px/1 var(--font-mono); color: #5d5a63; }
.pg { padding: 16px 22px; display: grid; gap: 11px; }
.pg-head { display: flex; align-items: center; gap: 10px; }
.pg-head span { display: grid; }
.pg-head b { font-size: 16px; }
.pg-head small { font-size: 12px; color: #5d5a63; }
.pg-logo { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, #1f6fb2, #3aa0a0); }
.pg-steps { display: flex; gap: 16px; font-size: 11.5px; color: #9a97a0; border-bottom: 1px solid #ecebf0; padding-bottom: 8px; }
.pg-steps .on { color: #1f6fb2; font-weight: 600; }
.pg-field { display: grid; gap: 4px; }
.pg-field small { font-size: 11px; color: #5d5a63; font-weight: 600; }
.pg-input { display: block; height: 32px; padding: 0 10px; border-radius: 7px; border: 1px solid #d9d8de; font: 400 13.5px/30px var(--font-sans); transition: border-color .2s, box-shadow .2s; }
.pg-input.focus { border-color: #1f6fb2; box-shadow: 0 0 0 3px rgba(31, 111, 178, .18); }
.pg-input.sel::after { content: "▾"; float: right; color: #9a97a0; }
.pg-radios { display: flex; gap: 8px; }
.pg-radio { flex: 1; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 7px; border: 1px solid #d9d8de; font-size: 13px; transition: border-color .2s, background-color .2s; }
.pg-radio::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid #b9b7bf; flex: none; transition: border .2s; }
.pg-radio b { margin-left: auto; font-weight: 600; }
.pg-radio.on { border-color: #1f6fb2; background: #eef5fb; }
.pg-radio.on::before { border: 4px solid #1f6fb2; }
.pg-pay { justify-self: start; padding: 9px 20px; border-radius: 8px; background: #1f6fb2; color: #fff; font-weight: 600; font-size: 13.5px; transition: filter .15s, transform .15s; }
.pg-pay.press { transform: scale(.95); filter: brightness(1.2); }
.pg-done { position: absolute; inset: 34px 0 0; display: grid; place-content: center; justify-items: center; gap: 6px; background: #fff; opacity: 0; transition: opacity .4s; text-align: center; }
.pg-done.on { opacity: 1; }
.pg-done b { font-size: 20px; }
.pg-done small { font-size: 13px; color: #5d5a63; }
.pg-check { width: 54px; height: 54px; border-radius: 50%; background: #1f7a4d; position: relative; margin-bottom: 6px; }
.pg-check::after { content: ""; position: absolute; left: 19px; top: 13px; width: 12px; height: 22px; border: solid #fff; border-width: 0 4px 4px 0; transform: rotate(45deg); }
.cur { position: absolute; left: 0; top: 0; z-index: 2; display: flex; align-items: flex-start; gap: 2px; pointer-events: none; opacity: 0;
  transition: transform .8s cubic-bezier(.45, 0, .2, 1), opacity .3s; }
.cur svg { width: 20px; height: 20px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .3)); }
.cur svg path { stroke: #fff; stroke-width: 1.2; stroke-linejoin: round; }
.cur.kai svg path { fill: #7a3fa8; }
.cur.you svg path { fill: #1d1b20; }
.cur em { margin-top: 14px; padding: 2px 7px; border-radius: 99px; font: 600 11px/1.3 var(--font-sans); font-style: normal; color: #fff; background: #7a3fa8; }
.cur.you em { background: #1d1b20; }
.cur.show { opacity: 1; }
.cur.press svg { transform: scale(.82); transform-origin: 2px 1px; }

/* ------------------------------------------------------------------ arrivals */
.is-live .m.arrive { animation: sc-in .45s var(--ease-out) both; }
.is-live .m.you.arrive { transform-origin: 100% 100%; }
.is-live .msgs.fading, .is-live .vm-view.fading { opacity: 0; transition: opacity .45s ease; }
.is-live .msgs, .is-live .vm-view { transition: opacity .45s ease; }
@keyframes sc-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes sc-dot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes sc-pulse { 50% { box-shadow: 0 0 0 4px color-mix(in oklab, var(--good) 25%, transparent); } }
@keyframes sc-ring { 50% { box-shadow: 0 0 0 4px color-mix(in oklab, var(--good) 35%, transparent); } }
@keyframes sc-glow { 50% { box-shadow: 0 0 0 5px color-mix(in oklab, var(--accent) 22%, transparent); } }
@keyframes sc-bump { 40% { transform: scale(1.18); } }

/* ------------------------------------------------------------------ small screens: reflow, don't shrink */
@container (max-width: 700px) {
  .win-body { grid-template-columns: minmax(0, 1fr); }
  .app-side { display: none; }
  .dev-window { height: 600px; }
}
@container (max-width: 420px) {
  .dev-window { height: 580px; border-radius: 12px; }
  .msgs { padding: 12px 12px 8px; gap: 10px; }
  .m { font-size: 13px; }
  .m.bot { max-width: 96%; }
  .m.you { max-width: 88%; }
  .app-head { padding: 9px 12px; }
}
/* the tablet stands upright on narrow screens: its computer on top, the chat below */
@container (max-width: 600px) {
  .dev-tablet { aspect-ratio: auto; height: 640px; max-width: 420px; padding: 11px; border-radius: 28px; }
  .tab-screen { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 44fr) minmax(0, 56fr); }
  .vm { order: -1; border-bottom: 1px solid var(--line); }
  .tab-chat { border-right: 0; }
}

/* ------------------------------------------------------------------ the bot's computer beside the group chat (desktop) */
.win-body:has(.desk-vm) { grid-template-columns: 228px minmax(0, 1fr) 300px; }
.side-grp { display: grid; place-items: center; font-size: 13px; line-height: 1; }
.desk-vm { border-left: 1px solid var(--line); }
.desk-vm .vm-bar { padding: 12px 12px 10px; }
.term-view { background: #16151a; box-shadow: 0 0 0 1px var(--line); }
.term { position: absolute; inset: 0; padding: 12px; display: flex; flex-direction: column; gap: 7px; font: 400 11px/1.45 var(--font-mono); color: #ece9f1; overflow: hidden; }
.term p { margin: 0; overflow-wrap: anywhere; }
.term .t-p { color: #b98be0; }
.term .t-dim { color: #a19dab; }
.term .t-ok { color: #6fd39b; }
.term p.t-new { animation: sc-in .35s var(--ease-out) both; }
.term [hidden] { display: none; }
.vm-sleep { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 20px; text-align: center;
  background: var(--bg-2); color: var(--ink-2); opacity: 0; pointer-events: none; transition: opacity .5s; }
.vm-sleep b { color: var(--ink); font-weight: 600; font-size: 13px; }
.vm-sleep small { font-size: 11.5px; line-height: 1.4; max-width: 22ch; }
.vm-moon { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset -8px -3px 0 0 var(--ink-2); transform: rotate(-20deg); margin-bottom: 4px; opacity: .7; }
.desk-vm.asleep .vm-sleep, .desk-vm.waking .vm-sleep { opacity: 1; }
.desk-vm.waking .vm-moon { animation: sc-wake 1s ease-in-out infinite; }
@keyframes sc-wake { 50% { opacity: .25; } }
.desk-vm.asleep .vm-dot, .desk-vm.idle .vm-dot { background: var(--ink-2); animation: none; opacity: .5; }
.desk-vm.waking .vm-dot { background: #febc2e; }
@container (max-width: 1040px) {
  .win-body:has(.desk-vm) { grid-template-columns: 200px minmax(0, 1fr) 260px; }
}
@container (max-width: 900px) {
  .win-body:has(.desk-vm) { grid-template-columns: 228px minmax(0, 1fr); }
  .desk-vm { display: none; }
}
@container (max-width: 700px) {
  .win-body:has(.desk-vm) { grid-template-columns: minmax(0, 1fr); }
}
