@font-face { font-family: "Schibsted Grotesk"; src: url("vendor/schibsted.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("vendor/plex-mono-300.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("vendor/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("vendor/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #efece6;
  --ink: #141414;
  --dim: #595550;
  --line: #14141435;
  --guide: #14141417;
  --backing: rgb(239 236 230 / 91%);
  --accent: #ad3c29;
  --spectrum: conic-gradient(from 200deg, #ffb347, #ff8a3d 18%, #ff5a5f 34%, #ff3d8b 50%, #ff5a5f 66%, #ff8a3d 82%, #ffb347);
  --gradient: linear-gradient(112deg, #ffb347, #ff8a3d 32%, #ff5a5f 67%, #ff3d8b);
  --mono: "IBM Plex Mono", "Microsoft YaHei", "PingFang SC", monospace;
  --sans: "Schibsted Grotesk", "Microsoft YaHei", "PingFang SC", sans-serif;
  --col: 17%;
  --story-width: min(41vw, 650px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  font-family: var(--sans);
  line-height: 1.55;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink); background: var(--paper); }
body:has(#workspace[inert]) { overflow: hidden; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .51; }
button, a, input { -webkit-tap-highlight-color: transparent; scroll-margin: 115px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
a { color: var(--ink); text-underline-offset: .17em; }
p, h1, h2, h3 { margin: 0; }
svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.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; }

.site-rules, .nova-scene { position: fixed; inset: 0; pointer-events: none; }
.site-rules {
  z-index: 0;
  background:
    linear-gradient(var(--guide), var(--guide)) var(--col) 0 / 1px 100% no-repeat,
    linear-gradient(var(--guide), var(--guide)) 50% 0 / 1px 100% no-repeat,
    linear-gradient(var(--guide), var(--guide)) calc(100% - var(--col)) 0 / 1px 100% no-repeat;
}
.nova-scene { z-index: 1; }
#robot-canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity .4s ease; }
.nova-scene[data-ready="true"] #robot-canvas { opacity: 1; }
.nova-scene[data-ready="true"] .robot-fallback { display: none; }
.robot-fallback {
  --shell: #ebe8e1;
  position: absolute;
  left: 51%; top: 49%;
  width: min(26vw, 285px);
  aspect-ratio: 1 / 1.8;
  translate: -50% -50%;
  filter: drop-shadow(16px 20px 21px #1c151e23);
  transition: left .56s var(--ease), top .56s var(--ease);
}
.fallback-pedestal, .fallback-legs, .fallback-body, .fallback-head { position: absolute; }
.fallback-pedestal { inset: 73% 12% 0; background: linear-gradient(110deg, #47433f, #242322 82%); border-radius: 6px 6px 0 0; }
.fallback-legs { inset: 60% 28% 23%; background: linear-gradient(90deg, var(--shell) 37%, transparent 37% 63%, var(--shell) 63%); }
.fallback-body { inset: 34% 22% 37%; border: 1px solid #c1bcb4; border-radius: 25%; background: linear-gradient(132deg, #fbf8f3, #d6d1ca); }
.fallback-body::before, .fallback-body::after { content: ""; position: absolute; top: 27%; width: 30%; height: 74%; border-radius: 25%; background: linear-gradient(120deg, #f6f3ef, #c7c3bb); border: 1px solid #bdb7b0; }
.fallback-body::before { left: -30%; rotate: 14deg; }
.fallback-body::after { right: -30%; rotate: -14deg; }
.fallback-head { inset: 1% 10% 61%; border-radius: 24%; rotate: 9deg; background: linear-gradient(145deg, #f8f5ef, #c9c3bd); border: 1px solid #bcb7b0; box-shadow: inset -9px -3px 0 #a49d932a; }
.fallback-head span {
  position: absolute; inset: 12% 13%;
  border-radius: 19%;
  background: linear-gradient(#161519, #0f0f12) padding-box, var(--spectrum) border-box;
  border: 7px solid transparent;
}
.fallback-head span::before, .fallback-head span::after {
  content: ""; position: absolute; width: 13%; height: 21%; top: 41%; left: 29%;
  background: #fff9ed; border-radius: 50%; box-shadow: 0 0 9px #fff4d980;
}
.fallback-head span::after { left: 60%; top: 39%; }
body[data-scene="results"] .robot-fallback, body[data-scene="reader"] .robot-fallback { left: 76.5%; top: 69%; width: min(38vw, 460px); }
body[data-scene="reader"] .fallback-head span::before { content: "“"; background: none; border-radius: 0; box-shadow: none; color: #fff9ed; font: 700 clamp(42px, 9vw, 132px)/.83 Georgia, serif; left: 26%; top: 21%; }
body[data-scene="reader"] .fallback-head span::after { display: none; }

#workspace { position: relative; z-index: 2; }
#workspace[inert] .main, #workspace[inert] .pet-dock { visibility: hidden; }
.masthead {
  position: sticky;
  z-index: 12;
  top: 0;
  background: rgb(239 236 230 / 86%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.announcement {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: 30px; overflow: hidden;
  border-bottom: 1px solid var(--guide);
  color: var(--dim); font: 400 11px/1.2 var(--mono); letter-spacing: .04em;
  transition: height .5s cubic-bezier(.6,0,.2,1), opacity .3s ease;
}
.announcement p { grid-column: 2; }
.announcement button { justify-self: end; margin-right: 16px; padding: 0 8px; background: none; border: 0; color: var(--ink); font-size: 18px; }
body.scrolled .announcement { height: 0; opacity: 0; visibility: hidden; border-bottom: 0; }
.masthead-inner {
  display: grid;
  grid-template-columns: var(--col) 1fr auto;
  align-items: stretch;
  min-height: 52px;
}
.brand {
  justify-self: center; align-self: stretch;
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 46px; padding: 0 11px;
  border: 0; border-radius: 0; background: transparent;
  color: var(--ink); font-size: 18px; font-weight: 700; white-space: nowrap;
}
.robot-mark {
  flex: none; display: inline-block; position: relative;
  width: 27px; height: 27px;
  border: 2px solid transparent; border-radius: 9px;
  background: linear-gradient(var(--paper), var(--paper)) padding-box, var(--spectrum) border-box;
}
.robot-mark::before {
  content: ""; position: absolute; top: 9px; left: 5px;
  width: 4px; height: 6px; border-radius: 50%; background: var(--ink);
  box-shadow: 9px 0 var(--ink);
}
.robot-mark::after {
  content: ""; position: absolute; right: -3px; top: 7px;
  width: 3px; height: 9px; background: var(--paper);
}
.modes {
  display: flex; align-items: stretch; gap: 0;
  padding: 0 12px;
  border-left: 1px solid var(--guide);
}
.mode, .head-button, .icon-button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; min-width: 44px; padding: 0 14px;
  border: 1px solid transparent; border-radius: 2px;
  background: transparent; color: var(--ink);
  font-weight: 500; text-decoration: none;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.mode { position: relative; color: var(--dim); font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.mode[aria-pressed="true"] { color: var(--ink); background: #f8f4edad; }
.mode[aria-pressed="true"]::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 0;
  height: 2px; background: var(--gradient);
}
.mode:hover, .mode.is-head-target, .icon-button:hover { color: var(--ink); background: #1414140b; }
.header-tools { display: flex; align-items: center; justify-self: end; gap: 9px; padding-right: max(21px, calc(var(--col) / 2 - 16px)); }
.guide-button { font-size: 13px; white-space: nowrap; border-inline-color: var(--guide); border-radius: 0; }
.guide-button svg { width: 16px; height: 16px; }
.head-button {
  position: relative; min-height: 34px; margin-block: 7px;
  border-color: var(--ink); border-radius: 0;
  padding-inline: 13px; white-space: nowrap; font: 500 12px/1.3 var(--mono);
}
.head-button::before {
  content: ""; position: absolute; inset: -1px auto auto -1px; width: 28px; height: 14px;
  border-top: 2px solid #ff8a3d; border-left: 2px solid #ff5a5f;
  pointer-events: none;
}
.head-button[aria-pressed="true"], .head-button:hover, .head-button.is-head-target { background: var(--ink); color: var(--paper); }
.status-dots { flex: none; width: 13px; height: 5px; position: relative; }
.status-dots::before, .status-dots::after { content: ""; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #ec6b39; }
.status-dots::after { right: 0; background: #ed4f7b; }
#pet-toolbar:empty { display: none; }
.icon-button { width: 44px; padding: 0; }
.guide-button { width: auto; padding-inline: 12px; }
.task-controls {
  position: fixed; left: 24px; bottom: 19px; z-index: 12;
  display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 48px);
  padding: 5px 6px 5px 13px;
  background: var(--paper); border: 1px solid var(--ink);
  font: 400 13px/1.4 var(--mono);
}
.task-controls .button { min-height: 43px; }

.main { position: relative; padding-bottom: 92px; }
.intro-layout { position: relative; --prompt-top: clamp(84px, calc(30svh - 82px), 295px); }
.main[data-view="start"] .search-area { min-height: max(540px, calc(100svh - 82px)); }
.welcome {
  position: fixed; inset: 0; z-index: 30;
  --prompt-top: clamp(126px, 30svh, 360px);
  overflow: auto;
}
.intro-controls { position: absolute; top: var(--prompt-top); left: var(--col); width: clamp(285px, 24.4vw, 430px); }
.quote-tab {
  position: absolute; bottom: 100%; left: 0;
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--ink); border-bottom: 0;
  padding-top: 9px; background: var(--paper); font: 700 43px/1 Georgia, serif;
}
.prompt-frame {
  position: relative;
  border: 1px solid var(--ink);
  background: var(--backing);
}
.prompt-frame::before, .prompt-frame::after {
  content: ""; position: absolute; width: 8px; height: 8px;
  border-color: var(--ink); border-style: solid;
  pointer-events: none;
}
.prompt-frame::before { top: -4px; right: -4px; border-width: 1px 1px 0 0; }
.prompt-frame::after { bottom: -4px; left: -4px; border-width: 0 0 1px 1px; }
.welcome-prompt {
  min-height: 61px; padding: 17px 15px;
  font: 400 14px/1.55 var(--mono);
}
.typing-prompt { display: flex; align-items: center; min-height: 25px; }
.typing-prompt span {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
  animation: type-in .65s steps(15, end) both;
}
.typing-prompt::after {
  content: ""; width: 6px; height: 13px; margin-left: 4px; background: var(--ink);
  animation: quote-caret .8s steps(1) 3;
}
.welcome-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 13px; }
.welcome-actions .button { min-height: 45px; font: 500 13px/1.4 var(--mono); }
.outline-title {
  position: absolute; left: var(--col); bottom: 5.4svh;
  display: grid; justify-items: start; gap: 7px;
  color: var(--ink); font-family: var(--sans);
  font-size: clamp(33px, 3.95vw, 57px);
  font-weight: 400; line-height: 1.09; letter-spacing: -.055em;
}
.main .outline-title { bottom: 6svh; }
.outline-title span {
  position: relative; display: block; width: max-content;
  padding: .05em .18em .12em .12em;
}
.outline-title span::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  padding: 2px; background: var(--gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.outline-title span:first-child::before { clip-path: polygon(0 0,100% 0,100% calc(100% - 13px),calc(100% - 13px) 100%,0 100%); }
.outline-title span:first-child::after {
  content: ""; position: absolute; right: 0; bottom: 12px; width: 18px; height: 2px;
  background: #ff4f75; transform: rotate(-45deg); transform-origin: right center;
}
.welcome .outline-title { animation: reveal .75s var(--ease) both; }
.intro-note {
  position: absolute; left: calc(62% + 16px); right: var(--col); bottom: 4%;
  color: var(--dim); font-size: 14.5px;
}
.intro-note::before {
  content: ""; position: absolute; top: -17px; right: 0; left: -16px;
  height: 1px; background: var(--line);
}
.intro-steps {
  position: fixed; z-index: 2;
  right: var(--col); top: clamp(126px, 30svh, 360px);
  width: min(21vw, 340px);
  border-top: 1px solid var(--line);
  font: 400 12px/1.3 var(--mono); color: var(--dim);
}
.intro-steps p {
  display: flex; align-items: center; gap: 10px;
  min-height: 25px; padding: 3px 0 3px 12px;
  border-bottom: 1px solid var(--guide);
}
.intro-steps p::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: var(--ink); }
body:not([data-scene="start"]) .intro-steps { display: none; }
.scene-rail {
  position: fixed; top: 50%; right: 23px; z-index: 3;
  width: 70px; height: 270px; transform: translateY(-43%);
  pointer-events: none;
}
.rail-track {
  position: absolute; top: 0; right: 1px; bottom: 0; width: 4px; opacity: .55;
  background: radial-gradient(circle, var(--ink) 0 1px, transparent 1.5px) center top / 4px 19px repeat-y;
}
#scene-step {
  position: absolute; top: 0; right: 14px; min-width: 51px;
  padding: 3px 7px; text-align: center; border: 1px solid var(--ink);
  background: var(--backing); font: 500 11px/1.45 var(--mono);
  transition: top .7s var(--ease);
}
body[data-scene="results"] #scene-step { top: 31%; }
body[data-scene="reader"] #scene-step { top: 62%; }

.button { font: 500 13px/1.38 var(--mono); }
.button.primary, .button.quieter, .button.compact { border-color: var(--ink); background: var(--backing); }
.button.primary:hover:not(:disabled), .button.primary.is-head-target,
.button.quieter:hover:not(:disabled), .button.quieter.is-head-target { color: var(--paper); background: var(--ink); }
.button.primary span { color: #b64342; }
.button.primary:hover span, .button.primary.is-head-target span { color: #ff9261; }
.button.compact:hover, .button.compact.is-head-target { background: #e1dcd3; }
.search-box {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 4px 5px 4px 13px;
}
.search-box:focus-within { border-color: var(--accent); }
.search-box input {
  flex: 1; width: 100%; min-width: 0; min-height: 44px;
  border: 0; padding: 0; background: transparent; color: var(--ink);
  font: 400 clamp(14px, 1.15vw, 16px)/1.4 var(--sans);
}
.search-box input:focus-visible { outline: none; }
.search-box input::placeholder { color: var(--dim); opacity: 1; }
.search-box .mic-button { position: relative; min-width: 42px; width: 42px; height: 44px; }
.mic-button[aria-pressed="true"] { background: #f8d5bc; }
.search-submit { padding-inline: 10px; white-space: nowrap; min-width: 62px; }
.context-status, .head-status { margin: 8px 0 0; color: var(--dim); font-size: 13px; }
.head-status { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.head-status p { flex: 1; }
.head-status button { white-space: nowrap; }
.paper { border: 1px solid var(--line); background: var(--paper); }
.guide {
  position: fixed; top: 97px; right: max(18px, calc(var(--col) / 2 - 16px)); z-index: 8;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 15px;
  width: min(460px, calc(100% - 36px)); padding: 13px 15px;
  box-shadow: 0 7px 14px #14141412;
}
.guide h2 { font-size: 18px; }
.guide p { margin-top: 6px; color: var(--dim); font-size: 15px; }
.guide .icon-button { font-size: 23px; }
#main:not([data-view="start"]) .search-area { padding: 23px 0 0; min-height: initial; }
#main:not([data-view="start"]) .search-content { position: relative; inset: auto; width: var(--story-width); margin-left: var(--col); }
#main:not([data-view="start"]) .outline-title,
#main:not([data-view="start"]) .quote-tab,
#main:not([data-view="start"]) .intro-note { display: none; }
.search-box.arrival { animation: reveal .46s var(--ease); }
.response, .reader { width: var(--story-width); margin: 27px 0 0 var(--col); }
.response:not([hidden]), .reader:not([hidden]) { animation: reveal .55s var(--ease); }
.result-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 7px 13px; border-bottom: 1px solid var(--ink); padding: 0 0 11px; }
.result-heading h2 { color: var(--ink); font: 500 clamp(24px, 3vw, 36px)/1.21 var(--sans); letter-spacing: -.042em; overflow-wrap: anywhere; }
.result-heading span, .reader-top p, .reader-identity p, .reader-progress { color: var(--dim); font: 400 12px/1.45 var(--mono); }
.response-note { color: var(--dim); padding: 13px 0; font-size: 16px; }
.result-list { list-style: none; margin: 0; padding: 0; }
.result-card {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(to right, var(--backing), #efece6d9);
  padding: 16px 12px 15px 0;
}
.result-card:focus-within { border-bottom-color: var(--accent); }
.result-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
.result-top > div { flex: 1 1 236px; min-width: 0; }
.result-top h3 { font-size: 18px; line-height: 1.4; font-weight: 500; overflow-wrap: anywhere; }
.result-source { margin-top: 5px; color: var(--dim); font: 400 12px/1.45 var(--mono); overflow-wrap: anywhere; }
.result-summary { margin-top: 8px; color: #42403c; white-space: pre-line; overflow-wrap: anywhere; font-size: 15px; }
.result-summary-clipped { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.result-link { display: inline-flex; align-items: center; min-height: 40px; overflow-wrap: anywhere; }
.reader-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--ink); padding-bottom: 7px; }
.back-button { padding-inline: 0 9px; }
.back-button:hover, .back-button.is-head-target { background: #1414140c; }
.reader-card { background: var(--backing); border-bottom: 1px solid var(--line); padding: 17px 12px 18px 0; }
.reader-identity h2 { font-size: clamp(20px, 2.35vw, 32px); font-weight: 500; line-height: 1.3; letter-spacing: -.033em; overflow-wrap: anywhere; }
.reader-identity p { margin-top: 8px; }
.reader-copy {
  white-space: pre-line; overflow-wrap: anywhere;
  margin: 24px 0 16px; padding-left: 16px;
  border-left: 1px solid var(--ink);
  font: 400 clamp(20px, 1.9vw, 28px)/1.55 var(--sans);
}
.reader-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 13px 0 6px; }
.source-link { display: inline-flex; align-items: center; min-height: 44px; font: 400 12px/1.4 var(--mono); }

.pet-dock { position: fixed; z-index: 9; right: 22px; bottom: 20px; display: flex; align-items: end; flex-direction: column; gap: 7px; }
.pet-toggle {
  display: grid; place-items: center;
  border: 1px solid var(--ink); border-radius: 0;
  width: 48px; height: 48px; padding: 0;
  background: var(--paper);
}
.pet-toggle:hover, .pet-toggle.is-head-target { background: #e5dfd5; }
.pet-toggle .robot-mark { width: 26px; height: 26px; }
.pet-menu { order: -1; width: min(215px, calc(100vw - 30px)); padding: 8px; }
.pet-state { padding: 4px 9px 7px; color: var(--dim); font: 400 12px/1.4 var(--mono); }
.pet-menu button { display: block; min-height: 44px; width: 100%; text-align: left; padding: 0 9px; border: 0; background: transparent; }
.pet-menu button:hover, .pet-menu button.is-head-target { background: #ded8cf; }
.pet-dock[data-compact="true"] { position: relative; right: auto; bottom: auto; }
.pet-dock[data-compact="true"] .pet-toggle { min-width: 44px; width: 44px; min-height: 44px; height: 44px; }
.pet-dock[data-compact="true"] .pet-menu { position: absolute; top: calc(100% + 8px); right: 0; }
#pet-toolbar:empty { display: none; }

#camera { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: .01; pointer-events: none; }
.head-pointer {
  position: fixed; z-index: 20; pointer-events: none;
  width: 23px; height: 23px; border-radius: 50%;
  border: 2px solid var(--ink); background: #ffb34773;
  transform: translate(-50%, -50%); box-shadow: 0 0 0 3px #ffffffad;
}
.head-pointer[data-calibrating="true"] { opacity: .47; }
.head-pointer[data-dwell="true"] { background: conic-gradient(#ff724c var(--hold), #fff1df 0); }
.is-head-target { outline: 2px solid var(--accent); outline-offset: 3px; }

@keyframes reveal { from { opacity: .25; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
@keyframes type-in { from { max-width: 0; } to { max-width: 100%; } }
@keyframes quote-caret { 50% { opacity: 0; } }

@media (max-width: 900px) {
  :root { --col: 16px; --story-width: calc(100% - 32px); }
  .site-rules, .intro-steps, .scene-rail { display: none; }
  .masthead-inner { grid-template-columns: minmax(0, 1fr) auto; }
  .brand { justify-self: start; padding-inline: 12px; }
  .header-tools { grid-column: 2; grid-row: 1; padding-right: 8px; gap: 5px; }
  .guide-button span, .status-dots { display: none; }
  .guide-button { padding-inline: 0; border-inline: 0; }
  .modes { grid-column: 1 / -1; grid-row: 2; justify-content: center; border-left: 0; border-top: 1px solid var(--guide); }
  .mode { min-height: 44px; }
  .head-button { min-height: 44px; margin-block: 4px; }
  .intro-layout { --prompt-top: clamp(56px, 8svh, 105px); }
  .welcome { --prompt-top: max(174px, 22svh); }
  .intro-controls { right: 16px; width: auto; }
  .outline-title, .main .outline-title { bottom: 8svh; font-size: clamp(28px, 7.8vw, 43px); }
  .outline-title span { background: rgb(239 236 230 / 87%); }
  .intro-note { left: 16px; right: 16px; bottom: 3%; width: fit-content; padding-inline: 5px; background: var(--backing); }
  .intro-note::before { display: none; }
  .welcome .outline-title { bottom: 9svh; }
  .main[data-view="start"] .search-area { min-height: max(470px, calc(100svh - 126px)); }
  .guide { top: 128px; right: 16px; }
  .robot-fallback { width: min(50vw, 210px); top: 53%; }
  body[data-scene="results"] .nova-scene, body[data-scene="reader"] .nova-scene { opacity: .30; }
  body[data-scene="results"] .robot-fallback, body[data-scene="reader"] .robot-fallback { width: min(70vw, 340px); top: 67%; }
  .result-card, .reader-card { background: var(--backing); }
  .task-controls { left: 12px; bottom: 12px; max-width: calc(100vw - 24px); }
}
@media (max-width: 375px) {
  .brand { font-size: 16px; gap: 6px; padding-inline: 9px; }
  .header-tools { gap: 3px; }
  .head-button { padding-inline: 7px; }
  .header-tools .icon-button { min-width: 37px; width: 37px; }
}
@media (max-height: 660px) and (max-width: 900px) {
  .welcome .outline-title { bottom: 11svh; }
  .search-area .outline-title { bottom: 12svh; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; scroll-behavior: auto !important; }
}

/* Camera diagnostics, assistant and voice controls share the Nova paper palette. */
.assistant-button {
  width: auto;
  padding-inline: 10px;
  font-size: 13px;
  white-space: nowrap;
}
.assistant-button[aria-expanded="true"] { border-color: var(--line); background: #f9f4ec; }
.assistant-button svg { width: 17px; height: 17px; }
.assistant-panel {
  position: fixed; z-index: 13; top: 95px; right: max(17px, 4vw);
  width: min(460px, calc(100vw - 34px));
  max-height: calc(100dvh - 116px);
  overflow: auto;
  box-shadow: 0 12px 28px #21130d20;
}
.panel-title {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 5px 8px 5px 12px;
  border-bottom: 1px solid var(--line);
}
.panel-title h2 { font: 500 17px/1.3 var(--sans); }
.panel-icon {
  display: inline-grid; place-items: center;
  min-width: 32px; min-height: 32px; padding: 0 5px;
  border: 1px solid transparent; background: none; color: var(--ink);
  font: 500 17px/1.1 var(--mono);
}
.panel-icon:hover, .panel-icon.is-head-target { background: #1414140d; border-color: var(--line); }
.assistant-content { padding: 13px; }
.assistant-content > p { min-height: 3.1em; margin-bottom: 12px; color: var(--dim); font-size: 14px; line-height: 1.55; }
.assistant-form { display: flex; flex-wrap: wrap; gap: 6px; }
.assistant-form input, .voice-options select {
  min-width: 0;
  min-height: 44px;
  padding: 0 8px;
  color: var(--ink);
  background: #f8f4ed;
  font: 400 14px/1.4 var(--sans);
  border: 1px solid var(--line);
  border-radius: 0;
}
.assistant-form input { flex: 1 1 153px; }
.assistant-form .button { min-width: 48px; padding-inline: 9px; }
.assistant-form #assistant-mic[aria-pressed="true"] { background: #f8d5bc; border-color: var(--accent); }
.assistant-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.assistant-actions .button, .voice-options .button { padding-inline: 10px; font-size: 13px; }
.voice-options {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px 8px;
  margin-top: 12px; padding-top: 11px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.voice-options label:first-child { grid-column: 1; }
.voice-options #voice-choice { grid-column: 2 / 4; width: 100%; }
.voice-options #voice-speed { width: 100%; }
.vision-panel {
  position: fixed; z-index: 13; left: 15px; bottom: 14px;
  width: min(284px, calc(100vw - 16px));
  background: #f8f4ed;
  box-shadow: 0 9px 26px #21130d24;
}
.vision-panel .panel-title { padding: 3px 4px 3px 8px; }
.panel-buttons { display: flex; gap: 0; align-items: center; }
.vision-handle {
  flex: 1; min-width: 0; min-height: 34px; padding: 1px 4px;
  touch-action: none; cursor: grab; text-align: left; white-space: nowrap;
  border: 0; color: var(--ink); background: none; font: 500 13px/1.2 var(--sans);
}
.vision-handle:active { cursor: grabbing; }
.vision-panel canvas { display: block; width: 100%; height: var(--vision-height, auto); object-fit: contain; background: #25201e; }
.vision-diagnostics { padding: 8px 9px 5px; font-size: 12px; }
#vision-state { min-height: 19px; color: var(--ink); }
.vision-meter { display: flex; align-items: center; gap: 6px; color: var(--dim); }
.vision-meter label, #vision-score { white-space: nowrap; }
.vision-meter meter { min-width: 30px; flex: 1; height: 10px; }
.vision-meter meter::-webkit-meter-optimum-value { background: #d86545; }
.vision-meter meter::-moz-meter-bar { background: #d86545; }
.vision-footer { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-top: 5px; }
.vision-footer .button { min-height: 32px; padding-inline: 9px; font-size: 12px; }
.resize-grip { touch-action: none; cursor: nwse-resize; }
.head-status { flex-wrap: wrap; }
.search-fallback { margin-bottom: 10px; }
.pet-toggle {
  width: 84px; height: 94px; grid-template-rows: minmax(0, 1fr) auto; gap: 0; padding: 3px;
  background: #f8f4ed;
}
.pet-sprite {
  --frame: 0;
  --row: 0;
  display: block;
  width: 69px;
  aspect-ratio: 192 / 208;
  background: url("/s3-static/pet/spritesheet.webp") no-repeat;
  background-size: 800% 900%;
  background-position: calc(var(--frame) * 100% / 7) calc(var(--row) * 100% / 8);
  filter: grayscale(1) sepia(.92) saturate(2.55) hue-rotate(325deg) drop-shadow(0 2px 3px #4f27181c);
  pointer-events: none;
}
.pet-caption { font-size: 11px; line-height: 1.2; pointer-events: none; }
.pet-dock[data-compact="true"] .pet-toggle { display: grid; grid-template-rows: 1fr; }
.pet-dock[data-compact="true"] .pet-sprite { width: 37px; }
.pet-dock[data-compact="true"] .pet-caption { display: none; }
body:has(.vision-panel:not([hidden])) .task-controls { left: max(24px, calc(50% - 95px)); }
@media (max-width: 900px) {
  .assistant-panel { top: 131px; right: 8px; max-height: calc(100dvh - 145px); }
  .assistant-button { padding-inline: 6px; font-size: 12px; }
  .assistant-button svg { display: none; }
  body:has(.vision-panel:not([hidden])) .task-controls { left: auto; right: 9px; bottom: 118px; }
}
