:root {
  color-scheme: light;
  --ink: #07090d;
  --muted: #6b7280;
  --line: #e9ebef;
  --surface: #f6f7f9;
  --blue: #075cff;
  --cyan: #29d6ff;
  --orb-a: #0b70ff;
  --orb-b: #0a31bd;
  --orb-c: #03194f;
  --orb-light: #61e7ff;
  --orb-accent: #09e2ff;
  --listen-color: #147dff;
  --work-color: #ff6a00;
  --ready-color: #147dff;
  --speak-color: #7357ff;
  --offline-color: #7d8793;
  --error-color: #d92d20;
  --voice-level: 0;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --safe-top: max(20px, env(safe-area-inset-top));
  --safe-bottom: max(14px, env(safe-area-inset-bottom));
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html,
body {
  min-height: 100%;
  margin: 0;
  background: #fff;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

.login-gate {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(28px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
  background: #fff;
}

.login-gate[hidden], .app-shell[hidden] { display: none !important; }

.login-card {
  width: min(100%, 390px);
  display: grid;
  gap: 20px;
}

.login-card__logo {
  width: 88px;
  height: auto;
  object-fit: contain;
  object-position: left center;
}

.login-card__copy { display: grid; gap: 7px; margin: 10px 0 4px; }
.login-card__copy h1 { margin: 0; font-size: 30px; line-height: 1.08; letter-spacing: -.035em; font-weight: 620; }
.login-card__copy p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.45; }
.login-card__error { margin: -4px 0 0; color: #b42318; font-size: 14px; line-height: 1.4; }
.login-card .primary-button { margin-top: 4px; }
.password-input { position: relative; display: block; }
.field .password-input input { padding-right: 52px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #6b7280;
  transform: translateY(-50%);
  cursor: pointer;
}
.password-toggle:hover { background: var(--surface); color: var(--ink); }
.password-toggle:focus-visible { outline: 2px solid #8db9ff; outline-offset: 1px; }
.password-toggle svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.password-toggle__slash { display: none; }
.password-toggle.is-visible .password-toggle__slash { display: block; }
.face-id-login { display: grid; gap: 14px; }
.face-id-login[hidden] { display: none !important; }
.login-divider { display: flex; align-items: center; gap: 12px; color: #a0a4ab; font-size: 12px; }
.login-divider::before,
.login-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.face-id-button {
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #cfd4dc;
  border-radius: 26px;
  background: #fff;
  color: var(--ink);
  font-weight: 620;
}
.face-id-button svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }

.secondary-button {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: #5f6368;
  background: #fff;
  font-size: 16px;
  font-weight: 560;
}

body {
  min-height: 100dvh;
}

button,
input,
select { font: inherit; }

button { -webkit-tap-highlight-color: transparent; }

.app-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: var(--safe-top) var(--space-3) var(--safe-bottom);
  background: #fff;
  overflow: hidden;
}

.topbar {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar__actions { display: flex; align-items: center; gap: 2px; }

.brand-logo {
  display: block;
  width: 96px;
  height: 29px;
  object-fit: contain;
  object-position: left center;
}

.icon-button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #8d929a;
  background: transparent;
  cursor: pointer;
}

.icon-button:active { background: var(--surface); }
.icon-button svg,
.send-button svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.assistant-view {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(290px, 1fr) auto;
  align-items: start;
  padding-top: clamp(24px, 4.5vh, 40px);
}

.intro { text-align: center; }
h1,
h2 { margin: 0; font-weight: 500; letter-spacing: -.035em; }
h1 { font-size: clamp(30px, 8vw, 42px); line-height: 1.06; }
h2 { font-size: 29px; }
.prompt { margin: var(--space-1) 0 0; color: var(--muted); font-size: 17px; }

.voice-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-height: 0;
  padding-top: 0;
}

.orb {
  position: relative;
  width: clamp(185px, 50vw, 205px);
  aspect-ratio: 1;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  isolation: isolate;
  transform: translateZ(0);
  contain: paint;
}

.orb__surface,
.orb__liquid,
.orb__shine,
.orb__core,
.orb__data,
.orb__aurora { position: absolute; inset: 0; border-radius: 50%; }

.orb__surface {
  overflow: hidden;
  background:
    radial-gradient(circle at 68% 22%, var(--orb-light), transparent 24%),
    radial-gradient(circle at 23% 72%, rgba(6, 40, 173, .95), transparent 44%),
    radial-gradient(circle at 58% 70%, var(--orb-a) 0, var(--orb-b) 43%, var(--orb-c) 78%, #020817 100%);
  box-shadow:
    inset 0 0 38px rgba(136, 236, 255, .42),
    inset 18px -26px 44px rgba(0, 7, 42, .48),
    inset -12px 16px 26px rgba(170, 246, 255, .12);
  transform: translateZ(0);
}

.orb__liquid { inset: -20%; filter: blur(13px); mix-blend-mode: screen; opacity: .72; }
.orb__liquid--one {
  background: conic-gradient(from 40deg, transparent 0 10%, var(--orb-accent) 20%, transparent 37% 55%, var(--orb-a) 68%, transparent 82%);
  animation: liquid-spin 9s linear infinite;
}
.orb__liquid--two {
  inset: 4%;
  background: radial-gradient(ellipse at 28% 27%, rgba(148, 247, 255, .9), transparent 18%), radial-gradient(ellipse at 72% 69%, rgba(22, 179, 255, .95), transparent 29%);
  animation: liquid-drift 5.5s ease-in-out infinite alternate;
}

.orb__shine {
  inset: 7% 18% 54% 19%;
  border-radius: 55% 48% 58% 42%;
  background: linear-gradient(135deg, rgba(255,255,255,.82), rgba(188,245,255,.08) 65%);
  filter: blur(7px);
  opacity: .7;
  transform: rotate(-17deg);
}

.orb__core {
  inset: 27%;
  background: radial-gradient(circle, rgba(57, 218, 255, .5), rgba(13, 74, 255, .08) 52%, transparent 72%);
  filter: blur(4px);
  animation: core-breathe 3.8s ease-in-out infinite;
}

.orb__data {
  z-index: 3;
  inset: 8%;
  opacity: .12;
  overflow: hidden;
  mix-blend-mode: screen;
  background:
    repeating-linear-gradient(90deg, transparent 0 8px, rgba(255,255,255,.2) 8px 9px, transparent 9px 15px),
    linear-gradient(180deg, transparent 4%, rgba(222,250,255,.18) 48%, transparent 96%);
  -webkit-mask-image: radial-gradient(circle, #000 0 61%, transparent 86%);
  mask-image: radial-gradient(circle, #000 0 61%, transparent 86%);
  animation: data-stream 7s linear infinite;
  pointer-events: none;
}
.orb__data::before {
  content: "";
  position: absolute;
  inset: 12% 4%;
  border-radius: 50%;
  background: repeating-linear-gradient(90deg, transparent 0 13px, rgba(255,255,255,.3) 13px 14px, transparent 14px 23px);
  filter: blur(1.5px);
  animation: data-pulse 2.6s ease-in-out infinite alternate;
}

.orb__aurora {
  z-index: 4;
  width: 100%;
  height: 100%;
  overflow: hidden;
  opacity: calc(.62 + var(--voice-level) * .36);
  mix-blend-mode: screen;
  animation: aurora-drift 10s ease-in-out infinite alternate;
  pointer-events: none;
}

.aurora path {
  fill: none;
  stroke: url(#auroraLight);
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.aurora--glow path { stroke-width: 4.6; opacity: .5; }
.aurora--trail { opacity: .42; }
.aurora--trail path {
  stroke-width: 3.1;
  stroke-dasharray: 62 138;
  stroke-dashoffset: 0;
  animation: aurora-flow 5.2s linear infinite;
}
.aurora--trail path:last-child { animation-delay: -2.45s; }
.aurora--core path {
  stroke-width: .85;
  opacity: .98;
  stroke-dasharray: 25 175;
  animation: aurora-flow 5.2s linear infinite;
}
.aurora--core path:last-child { stroke-width: .62; opacity: .86; animation-delay: -2.45s; }
.aurora--glow { animation: aurora-breathe 4.4s ease-in-out infinite; transform-origin: 50% 50%; }

body[data-state="listening"] .orb__aurora,
body[data-state="speaking"] .orb__aurora {
  opacity: 1;
  animation-duration: 3.2s;
}

.orb__name {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20%;
  color: #fff;
  font-size: clamp(13px, 4vw, 18px);
  font-weight: 600;
  letter-spacing: .04em;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 12, 58, .75);
  transform: translateZ(26px);
  opacity: 1;
  visibility: visible;
  filter: blur(0);
  transition: opacity .24s ease, transform .32s ease, filter .24s ease;
  pointer-events: none;
}

body[data-orb-color="aqua"] {
  --orb-a: #03b8d4; --orb-b: #08749d; --orb-c: #07334c; --orb-light: #a4fff5; --orb-accent: #5fffe8;
}
body[data-orb-color="violet"] {
  --orb-a: #6e4dff; --orb-b: #4322b8; --orb-c: #1c0e54; --orb-light: #f0a7ff; --orb-accent: #bb66ff;
}
body[data-orb-color="graphite"] {
  --orb-a: #5c6675; --orb-b: #29313d; --orb-c: #0d1118; --orb-light: #dce7f4; --orb-accent: #aebdce;
}

body[data-connected="false"] {
  --orb-a: #7d8793;
  --orb-b: #4b5561;
  --orb-c: #1c222a;
  --orb-light: #d8dde3;
  --orb-accent: #aeb7c1;
}
body[data-connected="false"] .orb__surface {
  background:
    radial-gradient(circle at 68% 22%, #e0e5ea, transparent 24%),
    radial-gradient(circle at 23% 72%, rgba(58,66,75,.92), transparent 44%),
    radial-gradient(circle at 58% 70%, #7d8793 0, #4b5561 43%, #1c222a 78%, #0b0e12 100%);
  box-shadow: inset -14px -18px 30px rgba(0,0,0,.28), inset 12px 10px 28px rgba(255,255,255,.1), inset -8px 12px 22px rgba(235,240,245,.06);
}
body[data-connected="false"] .orb__liquid--two { background: radial-gradient(ellipse at 28% 27%, rgba(230,235,240,.72), transparent 18%), radial-gradient(ellipse at 72% 69%, rgba(137,149,161,.72), transparent 29%); }
body[data-connected="false"] .orb__core { background: radial-gradient(circle, rgba(211,218,225,.38), rgba(91,102,114,.08) 52%, transparent 72%); }
body[data-connected="false"] .aurora path { stroke: rgba(244,247,249,.72); }

body[data-connected="true"] {
  --orb-a: #0b70ff;
  --orb-b: #0a31bd;
  --orb-c: #03194f;
  --orb-light: #61e7ff;
  --orb-accent: #09e2ff;
}

.voice-equalizer {
  height: 15px;
  margin-top: var(--space-2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  opacity: 0;
  transition: opacity .24s ease;
}

.voice-equalizer__bar {
  width: 2px;
  height: 12px;
  border-radius: 2px;
  background: #7f9cbc;
  transform-origin: center;
  transform: scaleY(calc(.18 + var(--voice-level) * 1.05));
  transition: transform 80ms linear, background .25s ease;
}
.voice-equalizer__bar--1 { height: 7px; }
.voice-equalizer__bar--2 { height: 11px; }
.voice-equalizer__bar--3 { height: 15px; }
.voice-equalizer__bar--4 { height: 11px; }
.voice-equalizer__bar--5 { height: 7px; }

.quick-actions {
  width: min(100%, 344px);
  height: 48px;
  margin: 0 auto var(--space-1);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 3px;
  border: 1px solid #e3e6ea;
  border-radius: 24px;
  background: rgba(249, 250, 252, .9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.quick-action {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 5px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: #6b7280;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -.01em;
  cursor: pointer;
}
.quick-action + .quick-action { border-left: 1px solid #e7e9ed; border-radius: 0; }
.quick-action:active { background: rgba(18, 24, 33, .045); }
.quick-action svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.scan-native-input {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  opacity: 0;
  pointer-events: none;
}

body[data-state="listening"] .voice-equalizer,
body[data-state="speaking"] .voice-equalizer { opacity: .88; }
.voice-equalizer--viewer { margin: 0; opacity: .18; }
body[data-state="listening"] .voice-equalizer__bar { background: #6598cb; }
body[data-state="speaking"] .voice-equalizer__bar { animation: equalizer-pulse .78s ease-in-out infinite alternate; }
body[data-state="speaking"] .voice-equalizer__bar--2 { animation-delay: -.31s; }
body[data-state="speaking"] .voice-equalizer__bar--3 { animation-delay: -.58s; }
body[data-state="speaking"] .voice-equalizer__bar--4 { animation-delay: -.16s; }
body[data-state="speaking"] .voice-equalizer__bar--5 { animation-delay: -.46s; }

.voice-hint { margin: var(--space-1) 0 0; color: #a0a4aa; font-size: 12px; }

body[data-state="listening"] .orb__surface { animation: listen-pulse 1.25s ease-in-out infinite, orb-float 4s ease-in-out infinite; }
body[data-connected="true"][data-state="listening"] .orb__surface {
  background:
    radial-gradient(circle at 70% 19%, color-mix(in srgb, var(--listen-color), white 72%), transparent 23%),
    radial-gradient(circle at 22% 73%, color-mix(in srgb, var(--listen-color), black 52%), transparent 44%),
    radial-gradient(circle at 72% 72%, color-mix(in srgb, var(--listen-color), white 34%), transparent 36%),
    radial-gradient(circle at 52% 56%, var(--listen-color) 0, color-mix(in srgb, var(--listen-color), black 58%) 48%, #020408 100%);
  box-shadow:
    inset 0 0 40px color-mix(in srgb, var(--listen-color), white 52%),
    inset 18px -26px 44px color-mix(in srgb, var(--listen-color), black 72%),
    inset -12px 16px 28px rgba(190,250,255,.16);
}
body[data-connected="true"][data-state="listening"] .orb__liquid--one {
  background: conic-gradient(from 40deg, transparent 0 10%, color-mix(in srgb, var(--listen-color), white 52%) 20%, transparent 37% 55%, var(--listen-color) 68%, transparent 82%);
}
body[data-connected="true"][data-state="listening"] .orb__liquid--two {
  background: radial-gradient(ellipse at 28% 27%, rgba(255,255,255,.94), transparent 18%), radial-gradient(ellipse at 72% 69%, color-mix(in srgb, var(--listen-color), white 42%), transparent 29%);
}
body[data-connected="true"][data-state="listening"] .orb__data {
  opacity: .48;
  filter: drop-shadow(0 0 3px var(--listen-color));
  animation-duration: 2.8s;
}

body[data-state="thinking"] .orb__name {
  opacity: 0;
  visibility: hidden;
  filter: blur(5px);
  transform: translateZ(26px) scale(.78);
}
body[data-state="thinking"] .orb {
  animation: thinking-float 1.65s cubic-bezier(.45,0,.35,1) infinite;
}
body[data-connected="true"][data-state="thinking"] .orb__surface {
  background:
    radial-gradient(circle at 72% 18%, color-mix(in srgb, var(--work-color), white 38%), transparent 20%),
    radial-gradient(circle at 19% 72%, color-mix(in srgb, var(--work-color), black 58%), transparent 43%),
    radial-gradient(circle at 76% 75%, color-mix(in srgb, var(--work-color), white 16%), transparent 35%),
    radial-gradient(circle at 48% 52%, var(--work-color) 0, color-mix(in srgb, var(--work-color), black 65%) 46%, color-mix(in srgb, var(--work-color), black 86%) 82%, #030100 100%);
  box-shadow:
    inset 0 0 38px color-mix(in srgb, var(--work-color), white 34%),
    inset 18px -25px 44px color-mix(in srgb, var(--work-color), black 82%),
    inset -12px 16px 30px rgba(255, 231, 169, .08);
  animation: thinking-color 3.2s ease-in-out infinite alternate;
}
body[data-state="thinking"] .orb__surface { border-radius: 50%; }
body[data-connected="true"][data-state="thinking"] .orb__liquid--one {
  opacity: .96;
  filter: blur(10px) saturate(1.3);
  background: conic-gradient(from 25deg, transparent 0 8%, #ffffff 19%, transparent 34% 48%, color-mix(in srgb, var(--work-color), white 34%) 61%, transparent 76% 86%, #ffffff 96%);
  animation: liquid-spin 1.85s linear infinite;
}
body[data-connected="true"][data-state="thinking"] .orb__liquid--two {
  opacity: .9;
  filter: blur(10px) saturate(1.35);
  background: radial-gradient(ellipse at 25% 29%, rgba(255,255,255,.7), transparent 14%), radial-gradient(ellipse at 72% 67%, color-mix(in srgb, var(--work-color), white 24%), transparent 30%), radial-gradient(ellipse at 58% 32%, var(--work-color), transparent 25%);
  animation: thinking-current 1.15s ease-in-out infinite alternate;
}
body[data-connected="false"][data-state="thinking"] .orb__liquid--one { animation: liquid-spin 1.85s linear infinite; }
body[data-connected="false"][data-state="thinking"] .orb__liquid--two { animation: thinking-current 1.15s ease-in-out infinite alternate; }
body[data-state="thinking"] .orb__core {
  animation: thinking-core 1.15s ease-in-out infinite;
}
body[data-connected="true"][data-state="thinking"] .orb__core,
body[data-connected="true"][data-state="speaking"] .orb__core {
  background: radial-gradient(circle, color-mix(in srgb, var(--work-color), white 46%), color-mix(in srgb, var(--work-color), transparent 70%) 52%, transparent 72%);
}
body[data-connected="true"][data-state="thinking"] .orb__shine,
body[data-connected="true"][data-state="speaking"] .orb__shine { opacity: .3; }
body[data-connected="true"][data-state="thinking"] .orb__data,
body[data-connected="true"][data-state="speaking"] .orb__data {
  opacity: .5;
  filter: drop-shadow(0 0 4px var(--work-color));
  animation-duration: 1.7s;
}
body[data-state="thinking"] .orb__aurora {
  opacity: 1;
  animation: thinking-aurora-drift 1.9s cubic-bezier(.45,0,.3,1) infinite alternate;
}
body[data-state="thinking"] .aurora path { stroke: rgba(255,255,255,.98); }
body[data-state="thinking"] .aurora--glow path { stroke-width: 4.8; opacity: .52; }
body[data-state="thinking"] .aurora--trail {
  opacity: .95;
  animation: aurora-trail-breathe 1.2s ease-in-out infinite alternate;
}
body[data-state="thinking"] .aurora--trail path {
  stroke-dasharray: 68 132;
  animation: aurora-flow 1.55s linear infinite;
}
body[data-state="thinking"] .aurora--trail path:last-child { animation-delay: -.62s; }
body[data-state="thinking"] .aurora--core path {
  stroke-width: 1.05;
  opacity: 1;
  stroke-dasharray: 24 176;
  animation: aurora-flow 1.55s linear infinite;
}

body[data-connected="true"][data-state="speaking"] .orb__surface {
  background:
    radial-gradient(circle at 72% 18%, color-mix(in srgb, var(--work-color), white 38%), transparent 20%),
    radial-gradient(circle at 20% 72%, color-mix(in srgb, var(--work-color), black 60%), transparent 43%),
    radial-gradient(circle at 74% 73%, color-mix(in srgb, var(--work-color), white 16%), transparent 35%),
    radial-gradient(circle at 50% 54%, var(--work-color) 0, color-mix(in srgb, var(--work-color), black 65%) 46%, color-mix(in srgb, var(--work-color), black 86%) 82%, #030100 100%);
  box-shadow:
    inset 0 0 38px color-mix(in srgb, var(--work-color), white 32%),
    inset 18px -25px 44px color-mix(in srgb, var(--work-color), black 82%),
    inset -12px 16px 30px rgba(255,231,169,.08);
  animation: speak 1.05s ease-in-out infinite;
}
body[data-connected="true"][data-state="speaking"] .orb__liquid--one {
  background: conic-gradient(from 25deg, transparent 0 8%, #ffffff 19%, transparent 34% 48%, color-mix(in srgb, var(--work-color), white 34%) 61%, transparent 76% 86%, #ffffff 96%);
}
body[data-connected="true"][data-state="speaking"] .orb__liquid--two {
  background: radial-gradient(ellipse at 25% 29%, rgba(255,255,255,.7), transparent 14%), radial-gradient(ellipse at 72% 67%, color-mix(in srgb, var(--work-color), white 24%), transparent 30%);
}

/* Fixed 3D sphere: the shell never moves; only the energy inside changes. */
body[data-connected="false"] { --sphere-color: var(--offline-color); }
body[data-connected="true"] { --sphere-color: var(--ready-color); }
body[data-connected="true"][data-state="listening"] { --sphere-color: var(--listen-color); }
body[data-connected="true"][data-state="thinking"] { --sphere-color: var(--work-color); }
body[data-connected="true"][data-state="speaking"] { --sphere-color: var(--speak-color); }
body[data-state="error"] { --sphere-color: var(--error-color); }

.orb,
body[data-state="listening"] .orb,
body[data-state="thinking"] .orb,
body[data-state="speaking"] .orb {
  animation: none !important;
  transform: translateZ(0) !important;
}

.orb__surface,
body[data-state="listening"] .orb__surface,
body[data-state="thinking"] .orb__surface,
body[data-state="speaking"] .orb__surface,
body[data-connected="false"] .orb__surface,
body[data-connected="true"] .orb__surface,
body[data-connected="true"][data-state="listening"] .orb__surface,
body[data-connected="true"][data-state="thinking"] .orb__surface,
body[data-connected="true"][data-state="speaking"] .orb__surface {
  border-radius: 50%;
  transform: translateZ(0) !important;
  animation: none !important;
  filter: saturate(1.12);
  background:
    radial-gradient(circle at 31% 21%, rgba(255,255,255,.96) 0 3%, rgba(255,255,255,.48) 7%, transparent 18%),
    radial-gradient(circle at 38% 34%, color-mix(in srgb, var(--sphere-color), white 76%) 0, color-mix(in srgb, var(--sphere-color), white 44%) 21%, color-mix(in srgb, var(--sphere-color), white 16%) 49%, var(--sphere-color) 76%, color-mix(in srgb, var(--sphere-color), white 5%) 100%);
  box-shadow:
    inset 13px 12px 24px rgba(255,255,255,.34),
    inset -18px -22px 30px color-mix(in srgb, var(--sphere-color), transparent 24%),
    inset 0 0 12px color-mix(in srgb, var(--sphere-color), white 18%);
}

.orb__surface::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, transparent 0 40%, color-mix(in srgb, var(--sphere-color), transparent 42%) 69%, var(--sphere-color) 100%);
  mix-blend-mode: multiply;
  opacity: .62;
  pointer-events: none;
}

.orb__surface::before {
  content: "";
  position: absolute;
  z-index: 7;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 35% 22%, rgba(255,255,255,.92) 0, rgba(255,255,255,.34) 9%, transparent 22%),
    radial-gradient(circle at 50% 50%, transparent 0 68%, rgba(255,255,255,.17) 73%, transparent 78%);
  pointer-events: none;
}

.orb__liquid { z-index: 1; }
.orb__core { z-index: 3; }
.orb__data { z-index: 4; }
.orb__aurora { z-index: 5; }
.orb__shine { z-index: 6; opacity: .34; }
.orb__name { z-index: 8; }

body[data-connected="true"] .orb__liquid--one,
body[data-connected="true"][data-state="listening"] .orb__liquid--one,
body[data-connected="true"][data-state="thinking"] .orb__liquid--one,
body[data-connected="true"][data-state="speaking"] .orb__liquid--one {
  background: conic-gradient(from 34deg, transparent 0 12%, color-mix(in srgb, var(--sphere-color), white 62%) 23%, transparent 39% 56%, var(--sphere-color) 70%, transparent 84%);
}
body[data-connected="true"] .orb__liquid--two,
body[data-connected="true"][data-state="listening"] .orb__liquid--two,
body[data-connected="true"][data-state="thinking"] .orb__liquid--two,
body[data-connected="true"][data-state="speaking"] .orb__liquid--two {
  background: radial-gradient(ellipse at 28% 27%, rgba(255,255,255,.66), transparent 16%), radial-gradient(ellipse at 72% 69%, color-mix(in srgb, var(--sphere-color), white 30%), transparent 29%);
}

.orb__data { opacity: 0; }
body[data-connected="true"][data-state="thinking"] .orb__data,
body[data-connected="true"][data-state="speaking"] .orb__data {
  inset: 14%;
  opacity: .9;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 12%, rgba(255,255,255,.92) 18%, color-mix(in srgb, var(--sphere-color), white 45%) 26%, transparent 36% 60%, rgba(255,255,255,.54) 68%, transparent 78% 100%);
  -webkit-mask-image: radial-gradient(ellipse at center, transparent 0 31%, #000 37% 58%, transparent 65%);
  mask-image: radial-gradient(ellipse at center, transparent 0 31%, #000 37% 58%, transparent 65%);
  mix-blend-mode: screen;
  filter: blur(.6px) brightness(1.22);
  animation: energy-orbit 3.4s linear infinite;
}
body[data-connected="true"][data-state="thinking"] .orb__data::before,
body[data-connected="true"][data-state="speaking"] .orb__data::before {
  inset: 13%;
  border-radius: 50%;
  background: radial-gradient(circle at 22% 48%, rgba(255,255,255,.95) 0 3%, transparent 10%), radial-gradient(circle at 78% 52%, color-mix(in srgb, var(--sphere-color), white 66%) 0 4%, transparent 11%);
  filter: blur(1px);
  animation: energy-points 1.8s ease-in-out infinite alternate;
}
body[data-connected="true"][data-state="thinking"] .orb__data::after,
body[data-connected="true"][data-state="speaking"] .orb__data::after {
  content: "";
  position: absolute;
  inset: 15%;
  border: 1.4px solid rgba(255,255,255,.72);
  border-radius: 50%;
  box-shadow: 0 0 7px color-mix(in srgb, var(--sphere-color), white 42%), inset 0 0 5px rgba(255,255,255,.28);
  animation: energy-ring-glow 1.5s ease-in-out infinite alternate;
}

body[data-state="thinking"] .orb__aurora,
body[data-state="speaking"] .orb__aurora { opacity: 0 !important; }

.status {
  min-height: 34px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #6b7280;
  font-size: 12px;
  text-align: center;
}
.status__cancel { min-height: 30px; padding: 0 11px; border: 1px solid #dfe3e8; border-radius: 15px; background: #fff; color: #676d75; font-size: 11px; }
body[data-state="error"] .status { color: var(--error-color); }
body[data-voice-display="orb"] .voice-stage > .voice-equalizer { display: none; }
body[data-voice-display="equalizer"] .voice-stage > .orb { display: none; }
body[data-voice-display="equalizer"] .voice-stage > .voice-equalizer { height: 72px; margin-top: 0; opacity: .75; gap: 7px; }
body[data-voice-display="equalizer"] .voice-stage > .voice-equalizer .voice-equalizer__bar { width: 5px; height: 44px; border-radius: 4px; }

.conversation {
  margin: 0 auto var(--space-2);
  width: min(100%, 520px);
  max-height: min(36vh, 330px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}
.conversation__label { margin: 0 0 7px; color: #969ba3; font-size: 9px; font-weight: 700; letter-spacing: .18em; }
.conversation__head { display: flex; align-items: center; justify-content: space-between; min-height: 24px; }
.conversation__head .conversation__label { margin: 0; }
.conversation__close {
  width: 32px;
  height: 32px;
  margin: -6px -7px -2px 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #9499a1;
}
.conversation__close:active { background: #f1f2f4; }
.conversation__close svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; }
.conversation__text { margin: 0; color: #20242b; font-size: 14px; line-height: 1.45; }
.conversation__text:empty { display: none; }
.response-media:empty { display: none; }
.response-media { display: grid; gap: 10px; margin-top: 12px; }
.response-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.response-gallery__item {
  display: block;
  aspect-ratio: 1.25;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}
.response-gallery__item:only-child { grid-column: 1 / -1; aspect-ratio: auto; }
.response-gallery__item img { width: 100%; height: 100%; display: block; object-fit: cover; }
.response-gallery__item:only-child img { height: auto; object-fit: contain; }
.response-files { display: grid; gap: 7px; }
.response-file {
  min-height: 48px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
}
.response-file__icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: #eef4ff; color: var(--blue); font-size: 9px; font-weight: 750; letter-spacing: .04em; }
.response-file__copy { min-width: 0; }
.response-file__name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 650; }
.response-file__meta { display: block; margin-top: 2px; color: #969ba3; font-size: 9px; }
.response-file__arrow { color: #9aa0a8; font-size: 17px; }

body.has-conversation .intro { display: none; }
body.has-conversation:not(.has-media) .assistant-view {
  grid-template-rows: minmax(0, 1fr) auto;
  padding-top: 0;
}

.result-view { display: grid; gap: 16px; color: var(--ink); }
.result-view__header { display: grid; gap: 5px; }
.result-view__header span { color: var(--muted); font-size: .72rem; font-weight: 650; letter-spacing: .13em; }
.result-view__header h2 { font-size: clamp(1.45rem, 7vw, 2rem); font-weight: 620; line-height: 1.08; overflow-wrap: anywhere; }
.result-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.result-list li,
.result-copy p { margin: 0; padding: 13px 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); font-size: 1rem; line-height: 1.45; }
.result-copy { display: grid; gap: 10px; }
.result-table { min-width: 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.result-table__row { min-width: 280px; display: grid; grid-template-columns: minmax(110px, 1fr) minmax(120px, 1.2fr); gap: 14px; padding: 13px 14px; border-bottom: 1px solid var(--line); align-items: start; }
.result-table__row:last-child { border-bottom: 0; }
.result-table__row span { color: var(--muted); font-size: .9rem; }
.result-table__row strong { font-size: .98rem; font-weight: 620; text-align: right; overflow-wrap: anywhere; }

.mail-list { display: grid; gap: 8px; }
.mail-row { width: 100%; min-width: 0; display: grid; gap: 5px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); text-align: left; }
.mail-row:active { transform: scale(.99); }
.mail-row__meta { min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.mail-row__meta strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; font-weight: 620; }
.mail-row__meta time { flex: 0 0 auto; max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .72rem; }
.mail-row__subject { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; font-weight: 560; }
.mail-row__summary { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: .86rem; line-height: 1.35; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.mail-detail__meta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px 12px; margin: 0; padding: 13px 14px; border-radius: 15px; background: var(--surface); }
.mail-detail__meta dt { color: var(--muted); font-size: .8rem; }
.mail-detail__meta dd { margin: 0; font-size: .88rem; overflow-wrap: anywhere; }
.mail-detail__body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1rem; line-height: 1.55; }
.calendar-list { display: grid; gap: 8px; }
.calendar-item { display: grid; grid-template-columns: minmax(92px, auto) minmax(0, 1fr); gap: 4px 14px; align-items: baseline; padding: 13px 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.calendar-item time { grid-row: 1 / span 2; color: var(--muted); font-size: .82rem; font-weight: 560; }
.calendar-item strong { min-width: 0; font-size: 1rem; font-weight: 620; overflow-wrap: anywhere; }
.calendar-item span { min-width: 0; color: var(--muted); font-size: .84rem; overflow-wrap: anywhere; }
.task-list { display: grid; gap: 9px; }
.task-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.task-item > div { min-width: 0; display: grid; gap: 4px; }
.task-item strong { overflow-wrap: anywhere; font-size: 1rem; font-weight: 620; }
.task-item > div span { color: var(--muted); font-size: .82rem; }
.task-item__badge { flex: 0 0 auto; max-width: 42%; padding: 6px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .72rem; font-weight: 700; text-align: center; }
.task-item__badge.is-approval { background: rgba(205,125,26,.14); color: #a85d00; }
.result-connect { min-height: 46px; padding: 0 18px; border: 0; border-radius: 23px; background: var(--ink); color: var(--surface); font-size: .95rem; font-weight: 650; }

body.has-media .assistant-view {
  grid-template-rows: 48px minmax(0, 1fr);
  gap: 8px;
  padding-top: 0;
}
body.has-media .intro,
body.has-media .orb,
body.has-media .status,
body.has-media .voice-hint { display: none; }
body.has-media .voice-stage { min-height: 48px; padding: 0; justify-content: center; }
body.has-media .voice-equalizer { margin: 0; opacity: .28; }
body.has-media .conversation {
  width: 100%;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 10px 2px 2px;
  border: 0;
  border-radius: 0;
}
body.has-media .conversation__head {
  position: sticky;
  top: -10px;
  z-index: 2;
  padding: 8px 5px;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
body.has-media .conversation__label { display: none; }
body.has-media .conversation__head { justify-content: flex-end; min-height: 32px; }
body.has-media .conversation__text { padding: 0 5px 10px; }
body.has-media .response-media { margin-top: 0; }

.media-viewer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #f4f5f7;
  color: var(--ink);
  z-index: 10000;
}
.media-open .app-shell { visibility: hidden; }
.media-viewer::backdrop { background: #f4f5f7; }
.media-viewer__shell { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.media-viewer__bar {
  min-height: 58px;
  padding: max(8px, env(safe-area-inset-top)) 16px 8px;
  display: grid;
  grid-template-columns: 108px 1fr 88px;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-bottom: 1px solid #eceef1;
}
.media-viewer__logo { width: 102px; height: 31px; display: block; object-fit: contain; object-position: left center; }
.media-viewer__actions { display: flex; justify-content: flex-end; gap: 2px; }
.viewer-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #848991;
}
.viewer-button:active { background: #f0f2f5; }
.viewer-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.media-viewer__content { min-height: 0; display: grid; place-items: center; overflow: auto; padding: 12px; }
.media-viewer__image { width: 100%; height: 100%; display: block; object-fit: contain; }
.media-viewer__frame { width: 100%; height: 100%; border: 0; border-radius: 10px; background: #fff; }
.media-viewer__file {
  width: min(100%, 420px);
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 28px 22px;
  border-radius: 20px;
  background: #fff;
  text-align: center;
  box-shadow: 0 10px 34px rgba(0,0,0,.05);
}
.media-viewer__file-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 16px; background: #eef4ff; color: var(--blue); font-size: 12px; font-weight: 750; }
.media-viewer__file-name { max-width: 100%; overflow-wrap: anywhere; font-size: 15px; font-weight: 650; }
.media-viewer__open { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 0 20px; border-radius: 22px; background: var(--ink); color: #fff; text-decoration: none; font-size: 13px; font-weight: 650; }

.composer-wrap { padding-top: var(--space-1); }
.composer {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(100%, 600px);
  margin: 0 auto;
  min-height: 56px;
  padding: 6px 6px 6px 18px;
  border: 1px solid #dedfe3;
  border-radius: 28px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 8px 30px rgba(0,0,0,.05);
}
.composer input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; }
.composer input::placeholder { color: #a1a5ac; }
.dictation-meta { flex: 0 0 auto; color: var(--listen-color); font-size: 10px; font-variant-numeric: tabular-nums; }
.dictation-button {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #858b93;
  transition: color .2s ease, background .2s ease;
}
.dictation-button:active { background: #f0f2f5; }
.dictation-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
body[data-dictation="true"] .dictation-button { color: var(--blue); background: #edf3ff; }
.send-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
}
.privacy-note { margin: 8px 0 0; text-align: center; color: #a4a7ad; font-size: 9px; letter-spacing: .035em; }

.settings {
  width: 100%;
  max-width: 520px;
  margin: auto 0 0;
  padding: 0;
  border: 0;
  border-radius: 26px 26px 0 0;
  background: #fff;
  color: var(--ink);
}
.settings::backdrop { background: rgba(7,9,13,.28); backdrop-filter: blur(8px); }
.settings__panel { max-height: min(92dvh, 880px); padding: 26px 22px max(28px, env(safe-area-inset-bottom)); overflow: auto; }
.settings__head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 26px; }
.settings-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 20px;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface);
}
.settings-tab {
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 620;
}
.settings-tab.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 9px rgba(10,16,28,.07);
}
.field { display: grid; gap: 8px; margin-top: 18px; color: #575c64; font-size: 12px; font-weight: 600; }
.field input,
.field select { width: 100%; height: 52px; border: 1px solid var(--line); border-radius: 15px; padding: 0 15px; background: #fff; color: var(--ink); outline: none; font-size: 16px; }
.field input:focus,
.field select:focus { border-color: #8db9ff; box-shadow: 0 0 0 4px rgba(7,92,255,.08); }
.color-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.color-settings .field { min-width: 0; }
.color-control {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 7px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}
.color-control input[type="color"] {
  width: 40px;
  height: 38px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: transparent;
  overflow: hidden;
}
.color-control input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-control input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 10px; }
.color-control output { min-width: 0; color: #777d86; font-size: 11px; font-weight: 650; letter-spacing: .02em; }
.install-card { margin: 22px 0; padding: 16px; border-radius: 16px; background: var(--surface); }
.install-card p { margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.install-card span { color: var(--muted); font-size: 12px; }
.applications-panel { display: grid; gap: 14px; }
.applications-panel[hidden] { display: none; }
.applications-intro { margin: 2px 2px 6px; }
.applications-intro h3 { margin: 5px 0 8px; font-size: 23px; letter-spacing: -.025em; }
.applications-intro p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.connections-card { display: grid; gap: 4px; padding: 17px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.connections-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.connections-card__head h4 { margin: 3px 0 0; font-size: 17px; }
.connections-refresh { min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 17px; background: #fff; color: var(--ink); font-size: 11px; font-weight: 650; }
.connections-refresh:disabled { opacity: .45; }
.connection-row { min-width: 0; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.connection-row > div { min-width: 0; }
.connection-row strong, .connection-row small { display: block; overflow-wrap: anywhere; }
.connection-row strong { font-size: 12px; }
.connection-row small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.connection-state { color: var(--muted); font-size: 10px; font-weight: 650; text-align: right; }
.connection-tail { display: grid; justify-items: end; gap: 5px; }
.connection-action { min-height: 27px; padding: 0 9px; border: 1px solid #b8cdf8; border-radius: 14px; background: #edf3ff; color: #075cff; font-size: 9px; font-weight: 700; }
.connection-action[hidden] { display: none; }
.connection-dot { width: 9px; height: 9px; border-radius: 50%; background: #a5abb4; box-shadow: 0 0 0 3px rgba(165,171,180,.13); }
.connection-row.is-connected .connection-dot { background: #22a35a; box-shadow: 0 0 0 3px rgba(34,163,90,.13); }
.connection-row.is-connected .connection-state { color: #168347; }
.connection-row.is-missing .connection-dot { background: #e38a17; box-shadow: 0 0 0 3px rgba(227,138,23,.13); }
.connection-row.is-missing .connection-state { color: #a8600c; }
.connection-row.is-error .connection-dot { background: #d64545; box-shadow: 0 0 0 3px rgba(214,69,69,.13); }
.connection-row.is-error .connection-state { color: #b42318; }
.connections-note { margin: 10px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.application-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 9px 28px rgba(18,25,38,.045);
}
.application-card__head { display: flex; align-items: center; gap: 12px; }
.application-card__head h4 { margin: 0 0 3px; font-size: 15px; }
.application-card__head p { margin: 0; color: var(--muted); font-size: 12px; }
.application-card__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 13px;
  background: #edf3ff;
  color: var(--blue);
  font-size: 24px;
  font-weight: 620;
}
.application-card__qr {
  width: 172px;
  height: 172px;
  justify-self: center;
  display: block;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  object-fit: contain;
  image-rendering: pixelated;
}
.application-card__address {
  display: block;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}
.application-card__actions { display: grid; grid-template-columns: 1.15fr 1fr; gap: 8px; }
.application-card__open,
.application-card__copy {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border-radius: 22px;
  font-size: 12px;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
}
.application-card__open { border: 0; background: var(--ink); color: #fff; }
.application-card__copy { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.shared-foundation-note { padding: 16px; border-radius: 16px; background: var(--surface); }
.shared-foundation-note strong { font-size: 13px; }
.shared-foundation-note p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.copy-status { min-height: 18px; margin: 0 2px; color: var(--muted); font-size: 11px; }
.microphone-note { margin: 12px 2px 0; color: #92969e; font-size: 11px; line-height: 1.45; }
.passkey-card {
  margin-top: 20px;
  padding: 15px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 16px;
  background: var(--surface);
}
.passkey-card p { margin: 0 0 4px; font-size: 14px; font-weight: 650; }
.passkey-card span { display: block; color: var(--muted); font-size: 12px; }
.passkey-card button { border: 0; padding: 8px 0; background: transparent; color: #075cff; font-weight: 620; }
.face-id-dialog {
  width: calc(100% - 48px);
  max-width: 390px;
  padding: 0;
  border: 0;
  border-radius: 26px;
  background: #fff;
  color: var(--ink);
}
.face-id-dialog::backdrop { background: rgba(7,9,13,.3); backdrop-filter: blur(9px); }
.face-id-dialog__panel { display: grid; gap: 18px; padding: 28px 24px 24px; }
.face-id-dialog__panel h2 { margin: 5px 0 8px; font-size: 26px; line-height: 1.05; letter-spacing: -.025em; }
.face-id-dialog__panel p:not(.eyebrow):not(.login-card__error) { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.face-id-dialog__icon { width: 38px; height: 38px; fill: none; stroke: #075cff; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.connection-dialog {
  width: calc(100% - 40px);
  max-width: 430px;
  padding: 0;
  border: 0;
  border-radius: 26px;
  background: #fff;
  color: var(--ink);
}
.connection-dialog::backdrop { background: rgba(7,9,13,.32); backdrop-filter: blur(9px); }
.connection-dialog__panel { display: grid; gap: 16px; padding: 26px 22px 22px; }
.connection-dialog__panel h2 { margin: 5px 0 8px; font-size: 25px; line-height: 1.05; letter-spacing: -.025em; }
.connection-dialog__panel p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.connection-dialog__link { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.connection-dialog__apple-link { color: #075cff; font-size: 12px; font-weight: 650; text-decoration: none; }
.connection-dialog__status { min-height: 20px; }
.device-code { padding: 14px 16px; border-radius: 15px; background: #f2f5fb; text-align: center; }
.device-code span, .device-code strong { display: block; }
.device-code span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.device-code strong { margin-top: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 23px; letter-spacing: .1em; }
.primary-button { width: 100%; height: 52px; border: 0; border-radius: 26px; background: var(--ink); color: #fff; font-weight: 600; }

.scanner,
.dashboard {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #f5f6f8;
  color: var(--ink);
}
.scanner::backdrop,
.dashboard::backdrop { background: #f5f6f8; }
.scanner__panel,
.dashboard__panel { min-height: 100%; padding: max(18px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); overflow: auto; }
.scanner__head { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 10px; }
.scanner__head .viewer-button { justify-self: start; }
.scanner__head h2 { font-size: 24px; }
.scanner__count { color: var(--muted); font-size: 12px; }
.scanner__help { margin: 20px 0 14px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.scanner__pages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.scan-page { min-width: 0; padding: 8px; border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(18,25,38,.05); }
.scan-page img { width: 100%; aspect-ratio: .72; display: block; object-fit: cover; border-radius: 10px; background: #e9ebef; }
.scan-page strong { display: block; margin: 8px 2px 6px; font-size: 12px; }
.scan-page__actions { display: flex; gap: 4px; }
.scan-page__actions button { min-height: 32px; flex: 1; border: 0; border-radius: 9px; background: #f0f2f5; color: #636a74; font-size: 10px; }
.scanner__capture { min-height: 50px; margin-top: 14px; display: grid; place-items: center; border: 1px dashed #b6bdc8; border-radius: 15px; background: #fff; color: #075cff; font-weight: 620; font-size: 14px; }
.scanner__capture input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.scanner__status { min-height: 34px; margin: 14px 2px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.scanner__actions { display: grid; grid-template-columns: 1fr 1fr 1.15fr; gap: 8px; }
.scanner__actions button:disabled { opacity: .4; }
.pending-scans:empty { display: none; }
.pending-scans { display: grid; gap: 8px; margin: 12px 0; }
.pending-scan { min-height: 46px; padding: 8px 10px 8px 13px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid #f0c36b; border-radius: 14px; background: #fff9ed; color: #7a4e05; font-size: 11px; }
.pending-scan button { min-height: 30px; flex: 0 0 auto; border: 0; border-radius: 15px; padding: 0 10px; background: #fff; color: #875b10; font-size: 10px; }

/* Automatic document scanner (Scancat core, ARI interface) */
.scanner { background: #090b0f; color: #f7f8fa; }
.scanner::backdrop { background: #090b0f; }
.scanner__panel { min-height: 100dvh; padding: max(12px, env(safe-area-inset-top)) 14px max(16px, env(safe-area-inset-bottom)); background: #090b0f; overflow: auto; }
.scanner__head { min-height: 54px; grid-template-columns: 42px 1fr auto; position: relative; z-index: 4; }
.scanner__head .eyebrow { color: #8d949f; }
.scanner__head h2 { margin: 2px 0 0; color: #fff; font-size: 20px; }
.scanner__head .viewer-button { color: #d7dbe1; background: #171a20; }
.scanner__done { min-height: 38px; padding: 0 13px; border: 0; border-radius: 19px; background: #f4f5f7; color: #0b0d10; font-size: 12px; font-weight: 700; }
.scanner__done:disabled { opacity: .42; }
.scanner-camera[hidden], .scanner-review[hidden], .scanner-editor[hidden] { display: none !important; }
.scanner-camera { min-height: calc(100dvh - 82px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); display: grid; grid-template-rows: minmax(300px, 1fr) auto auto; gap: 13px; }
.scanner-viewfinder { position: relative; min-height: 300px; overflow: hidden; border-radius: 24px; background: #020305; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.scanner-viewfinder video,
.scanner-viewfinder canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.scanner-viewfinder canvas { pointer-events: none; }
.scanner-flash { position: absolute; inset: 0; z-index: 3; background: #fff; opacity: 0; pointer-events: none; }
.scanner-flash.is-active { animation: scanner-flash .28s ease-out; }
@keyframes scanner-flash { 0% { opacity: .88; } 100% { opacity: 0; } }
.scanner-detection { min-height: 22px; margin: 0; color: #c6cbd2; text-align: center; font-size: 13px; font-weight: 620; }
.scanner-detection[data-tone="ready"] { color: #79dca5; }
.scanner-detection[data-tone="captured"] { color: #82c8ff; }
.scanner-detection[data-tone="warning"] { color: #ffc15a; }
.scanner-capture-controls { display: grid; grid-template-columns: 72px 1fr 76px 1fr; align-items: center; gap: 10px; padding: 0 8px; }
.scanner-gallery,
.scanner-finish,
.scanner-auto-toggle { min-height: 44px; display: grid; place-items: center; border: 0; border-radius: 22px; background: #171a20; color: #e2e5ea; font-size: 12px; font-weight: 650; }
.scanner-auto-toggle[aria-pressed="true"] { background: #e9f8ef; color: #17633c; }
.scanner-gallery { position: relative; overflow: hidden; }
.scanner-gallery input { position: absolute; inset: 0; width: 100%; opacity: 0; }
.scanner-shutter { width: 72px; height: 72px; display: grid; place-items: center; padding: 0; border: 3px solid #f5f6f8; border-radius: 50%; background: transparent; }
.scanner-shutter span { width: 58px; height: 58px; border-radius: 50%; background: #f5f6f8; transition: transform .12s ease; }
.scanner-shutter:active span { transform: scale(.91); }
.scanner-review { margin: 12px -14px -16px; padding: 22px 18px max(26px, env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; background: #f5f6f8; color: var(--ink); }
.scanner-review__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.scanner-review__head h3, .scanner-editor__head h3 { margin: 3px 0 0; font-size: 23px; }
.scanner-more { width: auto; min-width: 116px; min-height: 42px; padding: 0 14px; font-size: 12px; }
.scanner-review .scanner__pages { margin-top: 18px; }
.scanner-review .scan-page { border: 1px solid #e6e8ec; }
.scan-page.needs-review { border-color: #e4a13d; box-shadow: 0 0 0 3px rgba(228,161,61,.11); }
.scan-page img { aspect-ratio: .72; object-fit: contain; cursor: pointer; }
.scan-page__filter { width: 100%; height: 34px; margin-bottom: 7px; border: 1px solid #e2e5e9; border-radius: 10px; padding: 0 8px; background: #f7f8fa; color: #343941; font-size: 10px; }
.scan-page__actions { margin-top: 5px; }
.scan-page__actions button { min-width: 0; padding: 0 4px; }
.scanner-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.scanner-review .field { margin-top: 14px; }
.scanner-review .scanner__status { color: #6f757e; }
.scanner-editor { min-height: calc(100dvh - 72px); display: grid; grid-template-rows: auto minmax(440px, 1fr); gap: 14px; }
.scanner-editor__head { display: flex; align-items: center; justify-content: space-between; }
.scanner-editor__head .viewer-button { color: #fff; background: #171a20; }
.scanner-editor__host { position: relative; min-height: 440px; overflow: hidden; border-radius: 22px; background: #020305; }
.scanner-corner-canvas { display: block; max-width: 100%; height: auto; margin: 0 auto; touch-action: none; cursor: crosshair; }
.scanner-corner-toolbar { display: flex; justify-content: center; gap: 10px; padding: 14px; background: #11151b; }
.scanner-corner-toolbar button { min-height: 38px; padding: 0 16px; border: 1px solid #303842; border-radius: 20px; background: #1d232b; color: #f2f5f7; font-size: 12px; }
.scanner-corner-toolbar button:last-child { border-color: #79dca5; background: #e9f8ef; color: #17633c; }
.scan-library { margin-top: 24px; padding-top: 20px; border-top: 1px solid #e1e4e8; }
.scan-library__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.scan-library__head h3 { margin: 0; font-size: 17px; }
.scan-library__head button { min-height: 34px; border: 0; background: transparent; color: #075cff; font-size: 11px; font-weight: 650; }
.scan-library__list { display: grid; gap: 8px; margin-top: 12px; }
.scan-library__list > p { margin: 0; color: var(--muted); font-size: 12px; }
.scan-library__row { padding: 11px 12px; display: grid; gap: 10px; border: 1px solid #e3e6ea; border-radius: 14px; background: #fff; }
.scan-library__row strong, .scan-library__row small { display: block; overflow-wrap: anywhere; }
.scan-library__row strong { font-size: 12px; }
.scan-library__row small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.scan-library__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.scan-library__actions button { min-height: 30px; padding: 0 10px; border: 0; border-radius: 15px; background: #f0f2f5; color: #525963; font-size: 9px; }
.scan-library details { margin-top: 14px; }
.scan-library summary { color: #6e747d; font-size: 12px; font-weight: 650; cursor: pointer; }

@media (min-width: 760px) {
  .scanner__panel { max-width: 760px; margin: 0 auto; }
  .scanner-camera { min-height: calc(100dvh - 92px); }
  .scanner-viewfinder { min-height: 520px; }
  .scanner__pages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.dashboard__panel { background: #111317; color: #fff; }
.dashboard__panel .eyebrow { color: #8f959e; }
.dashboard__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 24px 0 16px; }
.dashboard-tile { min-height: 126px; padding: 16px; display: flex; flex-direction: column; border: 1px solid #2b2f36; border-radius: 22px; background: #1a1d22; color: #fff; transition: transform .18s ease, border-color .18s ease, opacity .18s ease; }
.dashboard-tile.is-dragging { z-index: 2; transform: scale(1.025); border-color: #6f9cff; opacity: .86; }
.dashboard-tile--wide { grid-column: 1 / -1; min-height: 112px; }
.dashboard-tile > strong { font-size: 13px; font-weight: 620; }
.dashboard-tile > p { margin: 10px 0 auto; color: #aeb3bb; font-size: 12px; line-height: 1.4; }
.dashboard-tile__tools { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.dashboard-tile__tools button,
.tile-catalog button { min-height: 32px; padding: 0 10px; border: 1px solid #353a43; border-radius: 16px; background: #23272e; color: #c7cbd1; font-size: 10px; }
.dashboard-tile__tools button:disabled { opacity: .3; }
.dashboard__panel > .secondary-button { border-color: #363a42; background: #1a1d22; color: #e5e7eb; }
.tile-catalog { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.tile-catalog[hidden] { display: none; }
.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; }

.field--check { grid-template-columns: auto 1fr; align-items: center; }
.field--check input { width: 20px; height: 20px; margin: 0; }
.settings-sync { margin: 14px 0 4px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.settings-sync[data-tone="saved"] { color: #18794e; }
.settings-sync[data-tone="warning"] { color: #9a6700; }
.settings-sync[data-tone="error"] { color: #b42318; }

body[data-theme="dark"] { color-scheme: dark; background: #0f1115; color: #f5f5f5; --ink: #f5f5f5; --muted: #aeb4bd; --line: #30353d; --surface: #20242a; }
body[data-theme="dark"] .app-shell,
body[data-theme="dark"] .login-gate { background: #0f1115; }
body[data-theme="dark"] .settings { background: #15181d; color: #f5f5f5; }
body[data-theme="dark"] .settings .field input,
body[data-theme="dark"] .settings .field select,
body[data-theme="dark"] .settings .color-control { background: #191d22; color: #f5f5f5; }
body[data-theme="dark"] .settings .field,
body[data-theme="dark"] .settings .color-control output,
body[data-theme="dark"] .settings .microphone-note,
body[data-theme="dark"] .settings .connection-row small,
body[data-theme="dark"] .settings .connection-state { color: #d1d5db; }
body[data-theme="dark"] .conversation,
body[data-theme="dark"] .response-file,
body[data-theme="dark"] .composer,
body[data-theme="dark"] .quick-actions { background: #171a1f; color: #f5f5f5; }
body[data-theme="dark"] .conversation__text { color: #f5f5f5; }
body[data-theme="dark"] .conversation__head { background: rgba(15,17,21,.94); }
body[data-theme="dark"] .mail-row,
body[data-theme="dark"] .calendar-item,
body[data-theme="dark"] .result-list li,
body[data-theme="dark"] .result-copy p,
body[data-theme="dark"] .result-table,
body[data-theme="dark"] .mail-detail__meta { background: #191d22; }
body[data-theme="dark"] .composer input { color: #f5f5f5; }

@media (prefers-color-scheme: dark) {
  body[data-theme="system"] { color-scheme: dark; background: #0f1115; color: #f5f5f5; --ink: #f5f5f5; --muted: #aeb4bd; --line: #30353d; --surface: #191d22; }
  body[data-theme="system"] .app-shell,
  body[data-theme="system"] .login-gate { background: #0f1115; }
  body[data-theme="system"] .conversation,
  body[data-theme="system"] .response-file,
  body[data-theme="system"] .composer,
  body[data-theme="system"] .quick-actions { background: #171a1f; color: #f5f5f5; }
  body[data-theme="system"] .conversation__text { color: #f5f5f5; }
  body[data-theme="system"] .conversation__head { background: rgba(15,17,21,.94); }
  body[data-theme="system"] .composer input { color: #f5f5f5; }
  body[data-theme="system"] .calendar-item { background: #191d22; }
}

@media (max-width: 430px) {
  .app-shell { padding-left: 16px; padding-right: 16px; }
  .topbar { height: 42px; }
  .brand-logo { width: 82px; height: 25px; }
  #dashboardButton { display: none; }
  .assistant-view { padding-top: 18px; }
  .conversation { max-height: min(43vh, 390px); }
  body.has-media .assistant-view { grid-template-rows: minmax(0, 1fr); }
  body.has-media .voice-stage { display: none; }
  body.has-media .conversation { padding-top: 4px; }
  .calendar-item { grid-template-columns: 1fr; gap: 5px; }
  .calendar-item time { grid-row: auto; }
  .quick-actions { margin-bottom: 7px; }
  .privacy-note { margin-top: 7px; }
  .scanner-capture-controls { grid-template-columns: 64px 1fr 68px 1fr; gap: 7px; }
}

@keyframes liquid-spin { to { transform: rotate(360deg) scale(1.04); } }
@keyframes liquid-drift { from { transform: translate(-4%, 3%) rotate(-8deg) scale(1); } to { transform: translate(7%, -4%) rotate(13deg) scale(1.13); } }
@keyframes data-stream { from { background-position: 0 0, 0 0; } to { background-position: 44px 0, 0 24px; } }
@keyframes data-pulse { from { opacity: .32; transform: translateY(4%) scaleY(.86); } to { opacity: .9; transform: translateY(-4%) scaleY(1.08); } }
@keyframes energy-orbit {
  from { transform: perspective(180px) rotateX(62deg) rotateZ(0deg) scale(.92); }
  to { transform: perspective(180px) rotateX(62deg) rotateZ(360deg) scale(.92); }
}
@keyframes energy-points {
  from { opacity: .45; transform: rotate(-18deg) scale(.88); }
  to { opacity: 1; transform: rotate(24deg) scale(1.08); }
}
@keyframes energy-ring-glow {
  from { opacity: .42; transform: scale(.9); }
  to { opacity: .9; transform: scale(1.08); }
}
@keyframes core-breathe { 0%,100% { transform: scale(.86); opacity: .45; } 50% { transform: scale(1.22); opacity: .9; } }
@keyframes aurora-drift {
  from { transform: rotate(-8deg) scale(.92) translate(-1%, 1%); }
  to { transform: rotate(12deg) scale(1.08) translate(2%, -2%); }
}
@keyframes aurora-breathe {
  0%,100% { opacity: .38; transform: scale(.96); }
  50% { opacity: .78; transform: scale(1.05); }
}
@keyframes aurora-flow { to { stroke-dashoffset: -200; } }
@keyframes aurora-trail-breathe {
  from { opacity: .48; transform: scale(.97); }
  to { opacity: 1; transform: scale(1.06); }
}
@keyframes orb-float { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-5px) scale(1.012); } }
@keyframes listen-pulse { 0%,100% { transform: scale(.98); } 50% { transform: scale(1.055); } }
@keyframes thinking-float {
  0%,100% { transform: translateY(0); }
  35% { transform: translateY(-5px); }
  68% { transform: translateY(2px); }
}
@keyframes thinking-color {
  from { filter: hue-rotate(-9deg) saturate(1.05); }
  to { filter: hue-rotate(20deg) saturate(1.28); }
}
@keyframes thinking-current {
  from { transform: translate(-8%, 5%) rotate(-16deg) scale(.96); }
  to { transform: translate(10%, -7%) rotate(22deg) scale(1.2); }
}
@keyframes thinking-core {
  0%,100% { transform: scale(.72); opacity: .36; }
  50% { transform: scale(1.38); opacity: 1; }
}
@keyframes thinking-aurora-drift {
  0% { transform: rotate(-18deg) scale(.9) translate(-5%, 4%); }
  48% { transform: rotate(8deg) scale(1.11) translate(5%, -3%); }
  100% { transform: rotate(23deg) scale(1.03) translate(-2%, 2%); }
}
@keyframes speak { 0%,100% { transform: scale(.985); } 42% { transform: scale(1.045); } 68% { transform: scale(1.01); } }
@keyframes equalizer-pulse { from { transform: scaleY(.2); } to { transform: scaleY(1); } }

@media (min-width: 700px) {
  .app-shell { padding-left: 42px; padding-right: 42px; }
  .settings { margin-left: auto; margin-right: auto; border-radius: 26px; margin-bottom: 22px; }
}

@media (prefers-color-scheme: dark) {
  .settings {
    color-scheme: dark;
    background: #15181d;
    color: #f5f5f5;
    --ink: #f5f5f5;
    --muted: #aeb4bd;
    --line: #30353d;
    --surface: #20242a;
  }
  .settings .settings-tab.is-active,
  .settings .field input,
  .settings .field select,
  .settings .color-control,
  .settings .application-card { background: #191d22; color: #f5f5f5; }
  .settings .field,
  .settings .color-control output,
  .settings .microphone-note,
  .settings .connection-row small,
  .settings .connection-state { color: #d1d5db; }
  .settings .settings-tab.is-active { box-shadow: 0 2px 10px rgba(0,0,0,.28); }
  .settings .application-card { box-shadow: 0 9px 28px rgba(0,0,0,.14); }
  .settings .application-card__icon { background: rgba(76,141,255,.16); }
  .settings .application-card__open { background: #f5f5f5; color: #0b0d10; }
  .settings .application-card__copy { background: #20242a; color: #f5f5f5; }
  .settings .application-card__qr { border-color: #39404a; background: #fff; }
  .settings .connections-refresh { background: #20242a; color: #f5f5f5; }
  .settings .primary-button { background: #f5f5f5; color: #0b0d10; }
  .settings .secondary-button { border-color: #30353d; background: #20242a; color: #d8dce2; }
}

html[data-preview-theme="dark"] .settings {
  color-scheme: dark;
  background: #15181d;
  color: #f5f5f5;
  --ink: #f5f5f5;
  --muted: #aeb4bd;
  --line: #30353d;
  --surface: #20242a;
}
html[data-preview-theme="dark"] .settings .settings-tab.is-active,
html[data-preview-theme="dark"] .settings .field input,
html[data-preview-theme="dark"] .settings .field select,
html[data-preview-theme="dark"] .settings .color-control,
html[data-preview-theme="dark"] .settings .application-card { background: #191d22; color: #f5f5f5; }
html[data-preview-theme="dark"] .settings .field,
html[data-preview-theme="dark"] .settings .color-control output,
html[data-preview-theme="dark"] .settings .microphone-note,
html[data-preview-theme="dark"] .settings .connection-row small,
html[data-preview-theme="dark"] .settings .connection-state { color: #d1d5db; }
html[data-preview-theme="dark"] .settings .settings-tab.is-active { box-shadow: 0 2px 10px rgba(0,0,0,.28); }
html[data-preview-theme="dark"] .settings .application-card { box-shadow: 0 9px 28px rgba(0,0,0,.14); }
html[data-preview-theme="dark"] .settings .application-card__icon { background: rgba(76,141,255,.16); }
html[data-preview-theme="dark"] .settings .application-card__open { background: #f5f5f5; color: #0b0d10; }
html[data-preview-theme="dark"] .settings .application-card__copy { background: #20242a; color: #f5f5f5; }
html[data-preview-theme="dark"] .settings .application-card__qr { border-color: #39404a; background: #fff; }
html[data-preview-theme="dark"] .settings .connections-refresh { background: #20242a; color: #f5f5f5; }
html[data-preview-theme="dark"] .settings .primary-button { background: #f5f5f5; color: #0b0d10; }
html[data-preview-theme="dark"] .settings .secondary-button { border-color: #30353d; background: #20242a; color: #d8dce2; }

@media (width: 393px) and (min-height: 820px) {
  .app-shell { padding-left: 24px; padding-right: 24px; }
  .assistant-view { padding-top: 24px; grid-template-rows: auto minmax(368px, 1fr) auto; }
  .voice-stage { padding-top: 0; transform: none; }
  body.has-media .voice-stage { transform: none; }
  .orb { width: 198px; }
}

@media (max-height: 720px) {
  .assistant-view { padding-top: 10px; grid-template-rows: auto minmax(250px, 1fr) auto; }
  .voice-stage { padding-top: 34px; }
  .orb { width: clamp(165px, 45vw, 188px); }
  .status { margin-top: 20px; }
  .voice-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
