:root {
  color-scheme: dark;
  --ink: #f4f2ec;
  --muted: rgba(240, 240, 231, .66);
  --line: rgba(255, 255, 255, .18);
  --mint: #c2f278;
  --dark: #101314;
  font-family: 'DM Sans', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html, body, button { -webkit-user-select: none; user-select: none; }
html, body { width: 100%; height: 100%; min-height: 0; margin: 0; overflow: hidden; overscroll-behavior: none; background: var(--dark); touch-action: auto; }
body { color: var(--ink); }
button { color: inherit; font: inherit; }
.app-shell {
  position: fixed; inset: 0; isolation: isolate; width: 100%; height: 100vh; height: 100dvh; overflow: hidden;
  background: radial-gradient(ellipse at 48% 39%, #27302c 0%, #1a201f 36%, #101314 75%); touch-action: auto;
}
.camera { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform-origin: center; transition: transform .08s linear; touch-action: none; }
.app-shell.camera-on .camera { opacity: 1; }
.camera { filter: var(--camera-filter, none); }
.frozen-frame { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: 0; touch-action: none; }
.app-shell.is-frozen .camera { opacity: 0; }
.app-shell.is-frozen .frozen-frame { opacity: 1; }
.app-shell.is-frozen.is-listening::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: #fff;
  opacity: 0;
  animation: shutter-flash 240ms ease-out;
}
@keyframes shutter-flash {
  from { opacity: .45; }
  to { opacity: 0; }
}
.camera-wash { display: none; }
.topbar { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.cost-pill { position: absolute; bottom: max(18px, calc(env(safe-area-inset-bottom) + 8px)); left: 50%; translate: -50% 0; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 99px; background: rgba(17,21,20,.52); padding: 9px 13px; backdrop-filter: blur(16px); font-size: 11px; cursor: pointer; pointer-events: auto; }
.cost-pill:focus-visible, .dialog-actions button:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
.cost-dialog { width: min(88vw, 340px); margin: auto; padding: 22px; border: 1px solid rgba(255,255,255,.2); border-radius: 20px; color: var(--ink); background: rgba(22,28,27,.94); box-shadow: 0 24px 90px rgba(0,0,0,.48), inset 0 1px rgba(255,255,255,.08); backdrop-filter: blur(24px); }
.cost-dialog::backdrop { background: rgba(5,8,8,.56); backdrop-filter: blur(5px); }
.cost-dialog h2 { margin: 0 0 9px; font: 600 18px/1.3 Manrope, sans-serif; letter-spacing: -.35px; }
.cost-dialog p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.dialog-actions button { min-height: 39px; padding: 0 14px; border: 1px solid rgba(255,255,255,.17); border-radius: 999px; cursor: pointer; font-size: 12px; }
.dialog-cancel { background: rgba(255,255,255,.06); }
.dialog-reset { border-color: rgba(194,242,120,.38) !important; color: #1a2116; background: var(--mint); font-weight: 700; }
.cost-currency { color: var(--mint); font-size: 11px; font-weight: 700; line-height: 1; }
.cost-pill strong { color: var(--mint); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stage { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.answer-viewport { position: absolute; z-index: 2; top: max(22px, calc(env(safe-area-inset-top) + 14px)); right: clamp(18px, 6vw, 80px); bottom: calc(max(68px, env(safe-area-inset-bottom) + 54px) + 108px); left: clamp(18px, 6vw, 80px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: clamp(18px, 5vw, 30px); border: 1px solid rgba(194,242,120,.8); border-radius: 22px; color: var(--ink); background: rgba(17,21,20,.78); box-shadow: 0 0 0 1px rgba(194,242,120,.12), 0 0 24px rgba(194,242,120,.25), 0 18px 70px rgba(0,0,0,.25); backdrop-filter: blur(18px); pointer-events: auto; touch-action: pan-y; }
.answer-viewport[hidden] { display: none; }
.answer-viewport p { width: 100%; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.answer-question { margin-bottom: 14px !important; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.1); color: var(--muted); font-size: 13px; line-height: 1.45; }
.answer-text { font-size: clamp(18px, 4.5vw, 24px); line-height: 1.55; letter-spacing: -.2px; }
.answer-viewport.is-thinking p { color: var(--muted); animation: thinking-pulse 1.4s ease-in-out infinite; }
.hold-button { position: absolute; left: 50%; bottom: max(68px, calc(env(safe-area-inset-bottom) + 54px)); translate: -50% 0; display: grid; place-items: center; width: 92px; height: 92px; margin: 0; padding: 0; pointer-events: auto; isolation: isolate; overflow: visible; border: 1px solid rgba(232,245,255,.48); border-radius: 50%; background: linear-gradient(145deg, rgba(240,255,225,.2), rgba(194,242,120,.07) 52%, rgba(103,235,214,.06)); box-shadow: inset 0 1px 1px rgba(255,255,255,.4), inset 0 -10px 20px rgba(114,155,194,.08), 0 12px 42px rgba(0,0,0,.18); backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%); cursor: pointer; touch-action: none; -webkit-tap-highlight-color: transparent; transform: scale(1); transition: transform .34s cubic-bezier(.2,.8,.2,1), background .35s ease, border-color .35s ease, box-shadow .35s ease; animation: idle-bloom 3.2s ease-in-out infinite; }
.hold-button::before { content: ''; position: absolute; z-index: -1; inset: 9px; border-radius: inherit; background: radial-gradient(ellipse at 28% 26%, rgba(240,255,205,.94), transparent 36%), radial-gradient(ellipse at 68% 62%, rgba(194,242,120,.98), transparent 49%), radial-gradient(ellipse at 61% 27%, rgba(178,159,255,.46), transparent 54%), radial-gradient(ellipse at 38% 72%, rgba(103,235,214,.48), transparent 50%), radial-gradient(ellipse at 80% 25%, rgba(255,224,163,.18), transparent 52%); filter: blur(10px) saturate(1.3); opacity: .92; animation: plasma-drift 7s ease-in-out infinite alternate; transition: inset .38s ease, opacity .32s ease, filter .32s ease; }
.hold-button::after { content: ''; position: absolute; inset: 2px; border: 1px solid rgba(255,255,255,.24); border-radius: inherit; background: linear-gradient(135deg, rgba(247,255,235,.26), rgba(140,255,224,.04) 27%, rgba(203,183,255,.1) 52%, rgba(255,222,168,.045) 75%, rgba(255,255,255,.04)); background-size: 220% 220%; animation: iris-sheen 9s ease-in-out infinite; pointer-events: none; }
.hold-button.is-held::before { opacity: .98; filter: blur(9px) saturate(1.55); animation-duration: 3.4s; }
.hold-button.is-held::after { animation-duration: 4.5s; }
.hold-button:hover { border-color: rgba(230,246,255,.72); }
.hold-button:active, .hold-button.is-held { transform: scale(1.09); border-color: rgba(232,255,197,.92); background: linear-gradient(145deg, rgba(240,255,225,.24), rgba(194,242,120,.14) 54%, rgba(103,235,214,.12)); box-shadow: inset 0 1px 1px rgba(255,255,255,.62), 0 0 38px rgba(194,242,120,.34), 0 14px 50px rgba(0,0,0,.24); animation: held-bloom 1.7s ease-in-out infinite; }
.hold-ripple { position: absolute; z-index: -2; inset: -9px; border: 1px solid rgba(221,242,255,.28); border-radius: 50%; box-shadow: 0 0 24px rgba(163,210,232,.08); transition: inset .35s ease, border-color .35s ease, box-shadow .35s ease; }
.is-held .hold-ripple { inset: -15px; border-color: rgba(210,255,166,.62); box-shadow: 0 0 32px rgba(194,242,120,.28); animation: held-ring 1.7s ease-in-out infinite; }
.hold-core { position: relative; display: block; width: 61px; height: 61px; overflow: hidden; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; background: radial-gradient(circle at 30% 24%, rgba(246,255,225,.78), rgba(135,238,205,.3) 42%, rgba(183,170,255,.18) 76%, rgba(255,222,168,.12)); box-shadow: inset 0 1px 2px rgba(255,255,255,.55), 0 0 28px rgba(194,242,120,.38); backdrop-filter: blur(7px); transition: background .3s ease, box-shadow .3s ease; }
.hold-core::before { content: ''; position: absolute; inset: -34%; border-radius: 50%; background: conic-gradient(from 0deg, rgba(194,242,120,.98), rgba(93,229,203,.5) 23%, rgba(194,242,120,.9) 42%, rgba(178,159,255,.42) 58%, rgba(194,242,120,.92) 78%, rgba(255,218,153,.2) 90%, rgba(194,242,120,.98)); filter: blur(8px); opacity: .88; animation: core-swirl 6s linear infinite; }
.hold-core::after { content: ''; position: absolute; inset: 1px; border-radius: inherit; background: radial-gradient(ellipse at 28% 18%, rgba(255,255,255,.48), transparent 50%); pointer-events: none; }
.is-held .hold-core { background: radial-gradient(circle at 30% 24%, rgba(245,255,225,.76), rgba(108,238,202,.4) 42%, rgba(181,158,255,.24) 76%, rgba(255,219,155,.14)); box-shadow: inset 0 1px 2px rgba(255,255,255,.65), 0 0 32px rgba(194,242,120,.52), 0 0 24px rgba(103,235,214,.2); }
@keyframes idle-bloom { 0%,100% { transform: scale(.97); box-shadow: inset 0 1px 1px rgba(255,255,255,.4), inset 0 -10px 20px rgba(194,242,120,.1), 0 9px 34px rgba(0,0,0,.17); } 50% { transform: scale(1.025); box-shadow: inset 0 1px 1px rgba(255,255,255,.52), 0 0 34px rgba(194,242,120,.24), 0 12px 42px rgba(0,0,0,.2); } }
@keyframes held-bloom { 0%,100% { box-shadow: inset 0 1px 1px rgba(255,255,255,.62), 0 0 34px rgba(194,242,120,.3), 0 14px 50px rgba(0,0,0,.24); } 50% { box-shadow: inset 0 1px 1px rgba(255,255,255,.72), 0 0 46px rgba(194,242,120,.48), 0 14px 50px rgba(0,0,0,.24); } }
@keyframes held-ring { 0%,100% { opacity: .45; transform: scale(.98); } 50% { opacity: .95; transform: scale(1.05); } }
@keyframes plasma-drift { from { transform: rotate(-14deg) scale(.92) translate(-2px, 1px); } to { transform: rotate(16deg) scale(1.1) translate(3px, -2px); } }
@keyframes iris-sheen { 0%,100% { background-position: 0% 0%; } 50% { background-position: 100% 100%; } }
@keyframes core-swirl { to { transform: rotate(360deg) scale(1.08); } }
@keyframes thinking-pulse { 50% { opacity: .48; } }
@media (max-height: 660px) {
  .hold-button { width: 76px; height: 76px; }
  .hold-core { width: 53px; height: 53px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
