:root {
  color-scheme: dark;
  --bg: #04070d;
  --bg-deep: #07111b;
  --bg-soft: #111c2b;
  --panel: rgba(8, 15, 26, 0.84);
  --panel-strong: rgba(9, 18, 31, 0.96);
  --panel-soft: rgba(94, 242, 255, 0.04);
  --text: #f1fbff;
  --muted: #91a3bc;
  --line: rgba(126, 213, 235, 0.12);
  --line-strong: rgba(197, 247, 255, 0.22);
  --accent: #6fe8ff;
  --accent-strong: #efffff;
  --accent-soft: rgba(111, 232, 255, 0.16);
  --accent-soft-2: rgba(111, 232, 255, 0.08);
  --accent-amber: #dbe7ff;
  --accent-amber-soft: rgba(219, 231, 255, 0.12);
  --accent-iris: #7f95ff;
  --accent-iris-soft: rgba(127, 149, 255, 0.14);
  --accent-rose: #b7e9ff;
  --accent-rose-soft: rgba(183, 233, 255, 0.12);
  --alert: #ff8fb5;
  --success: #9de7ff;
  --success-soft: rgba(157, 231, 255, 0.16);
  --shadow: 0 32px 90px rgba(0, 0, 0, 0.5);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 15px;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --spot-x: 76%;
  --spot-y: 18%;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --deck-shift: 0px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
}

body {
  position: relative;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(111, 232, 255, 0.2), transparent 18rem),
    radial-gradient(circle at 84% 10%, rgba(127, 149, 255, 0.18), transparent 18rem),
    radial-gradient(circle at 58% 106%, rgba(107, 130, 255, 0.12), transparent 28rem),
    radial-gradient(circle at 50% 42%, rgba(111, 232, 255, 0.06), transparent 42rem),
    radial-gradient(circle at 50% 120%, rgba(111, 232, 255, 0.09), transparent 38rem),
    conic-gradient(from 210deg at 50% 50%, rgba(111, 232, 255, 0.06), transparent 18%, rgba(127, 149, 255, 0.055) 38%, transparent 61%, rgba(157, 215, 255, 0.04) 76%, rgba(111, 232, 255, 0.04)),
    linear-gradient(180deg, #05080f 0%, #04070d 28%, #091321 70%, #02040a 100%);
  background-size: 100% 100%, 100% 100%, 100% 100%, 120% 120%, 100% 100%, 150% 150%, 100% 100%;
  animation: background-drift 30s ease-in-out infinite alternate;
  touch-action: pan-y pinch-zoom;
  padding:
    calc(env(safe-area-inset-top, 0px) + 12px)
    12px
    calc(env(safe-area-inset-bottom, 0px) + 22px);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    linear-gradient(rgba(111, 232, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 232, 255, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 50% 18%, rgba(111, 232, 255, 0.12), transparent 24rem),
    repeating-linear-gradient(90deg, transparent 0 68px, rgba(111, 232, 255, 0.022) 68px 69px, transparent 69px 138px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.86) 14%, rgba(0, 0, 0, 0.86) 88%, transparent);
  transform-origin: center bottom;
  transform: perspective(1100px) rotateX(77deg) scale(1.35) translateY(44%);
  opacity: 0.24;
  animation: grid-tilt 20s ease-in-out infinite alternate;
}

body::after {
  background:
    radial-gradient(circle at 50% 18%, rgba(111, 232, 255, 0.12), transparent 20rem),
    radial-gradient(circle at 74% 24%, rgba(127, 149, 255, 0.1), transparent 16rem),
    linear-gradient(90deg, transparent 0%, rgba(111, 232, 255, 0.04) 24%, transparent 44%, rgba(127, 149, 255, 0.035) 62%, transparent 100%),
    linear-gradient(
      180deg,
      transparent 0%,
      rgba(111, 232, 255, 0.055) 30%,
      rgba(127, 149, 255, 0.045) 48%,
      rgba(157, 215, 255, 0.035) 62%,
      transparent 100%
    );
  transform: translateY(-100%);
  mix-blend-mode: screen;
  animation:
    scan-shift 11s linear infinite,
    signal-bloom 18s ease-in-out infinite alternate;
  opacity: 0.44;
}

body.tg-dark {
  --bg: #04070d;
  --bg-deep: #07111b;
  --bg-soft: #101a29;
  --panel: rgba(7, 16, 24, 0.84);
  --panel-strong: rgba(8, 18, 27, 0.95);
  --panel-soft: rgba(94, 242, 255, 0.035);
  --text: #f1fbff;
  --muted: #91a3bc;
  --line: rgba(126, 213, 235, 0.12);
  --line-strong: rgba(197, 247, 255, 0.22);
  --accent: #6fe8ff;
  --accent-strong: #efffff;
  --accent-soft: rgba(111, 232, 255, 0.16);
  --accent-soft-2: rgba(111, 232, 255, 0.08);
  --accent-amber: #dbe7ff;
  --accent-amber-soft: rgba(219, 231, 255, 0.12);
  --accent-rose: #b7e9ff;
  --accent-rose-soft: rgba(183, 233, 255, 0.12);
  --alert: #ff8fb5;
  --success: #9de7ff;
  --success-soft: rgba(157, 231, 255, 0.16);
}

body.packages-open {
  overflow: hidden;
}

.app-shell {
  position: relative;
  width: min(980px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.app-shell::before,
.app-shell::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.app-shell::before {
  inset: 1rem auto auto -6rem;
  width: 26rem;
  height: 26rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(111, 232, 255, 0.12), transparent 46%),
    conic-gradient(from 0deg, rgba(111, 232, 255, 0.16), transparent 22%, rgba(127, 149, 255, 0.12) 40%, transparent 62%, rgba(111, 232, 255, 0.15));
  filter: blur(22px);
  opacity: 0.68;
  animation:
    orbit-halo 18s linear infinite,
    ambient-pulse 10s ease-in-out infinite;
}

.app-shell::after {
  top: 6.5rem;
  right: -2rem;
  width: 20rem;
  height: 20rem;
  border-radius: 50%;
  border: 1px solid rgba(94, 242, 255, 0.16);
  box-shadow:
    inset 0 0 0 1px rgba(94, 242, 255, 0.05),
    0 0 38px rgba(94, 242, 255, 0.08),
    0 0 82px rgba(127, 149, 255, 0.09);
  mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 1));
  animation:
    orbit-ring 16s linear infinite,
    ambient-pulse 12s ease-in-out infinite reverse;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.command-deck,
.result-card,
.modal-sheet {
  position: relative;
  overflow: hidden;
  border: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 20%),
    linear-gradient(160deg, rgba(9, 20, 30, 0.96), rgba(3, 8, 12, 0.985));
  box-shadow: var(--shadow);
}

.command-deck::before,
.modal-sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--spot-x) var(--spot-y), rgba(111, 232, 255, 0.18), transparent 18rem),
    radial-gradient(circle at 18% 14%, rgba(127, 149, 255, 0.08), transparent 16rem),
    linear-gradient(120deg, transparent 0%, rgba(127, 149, 255, 0.055) 38%, transparent 62%),
    repeating-linear-gradient(115deg, rgba(111, 232, 255, 0.028) 0 1px, transparent 1px 18px),
    conic-gradient(from 180deg at 50% 0%, rgba(111, 232, 255, 0.06), transparent 34%, rgba(127, 149, 255, 0.05) 52%, transparent 76%, rgba(157, 215, 255, 0.03));
  opacity: 0.96;
}

.command-deck::after {
  content: "";
  position: absolute;
  right: -7rem;
  top: -7rem;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(111, 232, 255, 0.18), transparent 52%),
    radial-gradient(circle at 34% 36%, rgba(127, 149, 255, 0.12), transparent 24%),
    conic-gradient(from 180deg, rgba(127, 149, 255, 0.08), transparent 55%, rgba(111, 232, 255, 0.09));
  filter: blur(16px);
  pointer-events: none;
  animation:
    drift-orb 12s ease-in-out infinite alternate,
    orbit-halo 22s linear infinite;
}

.command-deck {
  isolation: isolate;
  padding: 12px;
  border-radius: var(--radius-xl);
  touch-action: pan-y pinch-zoom;
  box-shadow: 0 32px 96px rgba(0, 0, 0, 0.48);
}

.command-deck > * {
  position: relative;
  z-index: 1;
}

.deck-topbar {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}

.identity-panel,
.signal-panel {
  position: relative;
  min-width: 0;
}

.identity-panel {
  display: grid;
  gap: 9px;
  padding: 12px 12px 11px;
  border-radius: 22px;
  border: 1px solid rgba(126, 213, 235, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 34%),
    linear-gradient(135deg, rgba(111, 232, 255, 0.12), transparent 48%),
    radial-gradient(circle at 92% 18%, rgba(127, 149, 255, 0.12), transparent 20%),
    radial-gradient(circle at 14% 100%, rgba(157, 215, 255, 0.08), transparent 20%),
    rgba(255, 255, 255, 0.02);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 0 0 1px rgba(94, 242, 255, 0.04),
    0 22px 48px rgba(0, 0, 0, 0.22);
}

.identity-panel::before,
.signal-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.07), transparent 24%, transparent 72%, rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at top right, rgba(94, 242, 255, 0.12), transparent 14rem);
  opacity: 0.9;
}

.identity-panel::after,
.signal-panel::after,
.result-card::after,
.example-card::after,
.package-card::after {
  content: none;
}

.identity-head {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.brand-copy {
  min-width: 0;
}

.eyebrow,
.meter-label,
.section-kicker,
.result-kicker,
.input-label,
.package-kicker,
.goal-caption,
.role-label,
.signal-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
}

.eyebrow,
.meter-label,
.input-label,
.package-kicker,
.signal-label {
  color: var(--muted);
}

h1 {
  margin-top: 4px;
  font-size: clamp(1.56rem, 4.2vw, 2.08rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.brand-summary {
  position: relative;
  max-width: 34rem;
  color: var(--muted);
  line-height: 1.3;
  font-size: 0.79rem;
}

.status-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(165, 182, 203, 0.16);
  background:
    linear-gradient(135deg, rgba(126, 216, 255, 0.16), rgba(127, 149, 255, 0.08)),
    rgba(255, 255, 255, 0.02);
  color: var(--accent-strong);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(238, 246, 255, 0.92);
  box-shadow:
    0 0 0 4px rgba(126, 216, 255, 0.08),
    0 0 16px rgba(126, 216, 255, 0.28);
  animation: live-pulse 1.9s ease-in-out infinite;
}

.signal-card,
.signal-item,
.capture-live {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(165, 182, 203, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 42%),
    rgba(255, 255, 255, 0.018);
}

.signal-card {
  min-height: 126px;
  padding: 12px;
}

.signal-card::after,
.signal-item::after,
.capture-live::after {
  content: "";
  position: absolute;
  right: -2rem;
  bottom: -2rem;
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(126, 216, 255, 0.12), transparent 66%);
  filter: blur(16px);
  opacity: 0.8;
}

.signal-card-live {
  display: grid;
  align-content: start;
  gap: 6px;
  border-color: rgba(159, 200, 255, 0.22);
  background:
    linear-gradient(135deg, rgba(126, 216, 255, 0.16), rgba(127, 149, 255, 0.05)),
    rgba(255, 255, 255, 0.024);
  box-shadow:
    inset 0 0 0 1px rgba(159, 200, 255, 0.04),
    0 14px 26px rgba(0, 0, 0, 0.16);
}

.signal-card-live[data-ui-state="busy"],
.signal-card-live[data-ui-state="ocr"] {
  border-color: rgba(127, 149, 255, 0.28);
  background:
    linear-gradient(135deg, rgba(127, 149, 255, 0.2), rgba(126, 216, 255, 0.05)),
    rgba(255, 255, 255, 0.03);
}

.signal-card-live[data-ui-state="ready"],
.signal-card-live[data-ui-state="done"] {
  border-color: rgba(157, 231, 255, 0.24);
  background:
    linear-gradient(135deg, rgba(157, 231, 255, 0.15), rgba(126, 216, 255, 0.05)),
    rgba(255, 255, 255, 0.028);
}

.signal-card-live[data-ui-state="error"] {
  border-color: rgba(255, 127, 150, 0.26);
  background:
    linear-gradient(135deg, rgba(255, 127, 150, 0.14), rgba(127, 149, 255, 0.04)),
    rgba(255, 255, 255, 0.026);
}

.signal-card-live strong {
  display: block;
  margin-top: 2px;
  font-size: clamp(1.06rem, 3vw, 1.26rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.signal-card-live p {
  margin-top: 0;
  color: var(--muted);
  line-height: 1.42;
  font-size: 0.84rem;
}

.signal-ticker {
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(165, 182, 203, 0.12);
  background:
    linear-gradient(135deg, rgba(159, 200, 255, 0.08), transparent 62%),
    linear-gradient(90deg, rgba(127, 149, 255, 0.05), transparent 18%, transparent 82%, rgba(111, 232, 255, 0.05)),
    rgba(255, 255, 255, 0.014);
  box-shadow: inset 0 0 0 1px rgba(94, 242, 255, 0.035);
}

.signal-ticker::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 5, 6, 0.98), transparent 12%, transparent 88%, rgba(4, 5, 6, 0.98));
  pointer-events: none;
}

.signal-ticker-track {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: max-content;
  min-height: 32px;
  padding: 0 16px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: ticker-slide 18s linear infinite;
}

.signal-ticker-track span {
  position: relative;
  white-space: nowrap;
}

.signal-ticker-track span::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 10px;
  border-radius: 50%;
  background: rgba(238, 246, 255, 0.8);
  box-shadow: 0 0 12px rgba(159, 200, 255, 0.24);
}

.deck-actions {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: stretch;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.deck-grid {
  position: relative;
  margin-top: 8px;
  display: grid;
  gap: 10px;
}

.upload-panel,
.control-panel {
  position: relative;
  padding: 11px;
  border-radius: 18px;
  border: 1px solid rgba(165, 182, 203, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 42%),
    radial-gradient(circle at 100% 0%, rgba(126, 216, 255, 0.06), transparent 22%),
    rgba(255, 255, 255, 0.012);
  backdrop-filter: blur(10px);
}

.control-panel {
  display: grid;
  gap: 9px;
}

.capture-console {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.capture-live {
  min-height: 84px;
  padding: 10px 11px;
}

.capture-live-line {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.capture-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(238, 246, 255, 0.92);
  box-shadow:
    0 0 0 4px rgba(159, 200, 255, 0.08),
    0 0 16px rgba(159, 200, 255, 0.24);
  animation: dot-breathe 1.7s ease-in-out infinite;
}

.upload-panel[data-ui-state="ocr"],
.upload-panel[data-ui-state="ready"],
.upload-panel[data-ui-state="busy"],
.upload-panel[data-ui-state="done"],
.upload-panel[data-ui-state="error"],
.control-panel[data-ui-state="ocr"],
.control-panel[data-ui-state="ready"],
.control-panel[data-ui-state="busy"],
.control-panel[data-ui-state="done"],
.control-panel[data-ui-state="error"] {
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.upload-panel[data-ui-state="ocr"],
.control-panel[data-ui-state="ocr"] {
  border-color: rgba(159, 200, 255, 0.22);
  box-shadow:
    inset 0 0 0 1px rgba(159, 200, 255, 0.04),
    0 0 0 1px rgba(159, 200, 255, 0.03);
}

.upload-panel[data-ui-state="ready"],
.control-panel[data-ui-state="ready"] {
  border-color: rgba(198, 222, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(198, 222, 255, 0.03);
}

.upload-panel[data-ui-state="busy"],
.control-panel[data-ui-state="busy"] {
  border-color: rgba(226, 239, 255, 0.22);
  box-shadow:
    inset 0 0 0 1px rgba(226, 239, 255, 0.04),
    0 14px 24px rgba(0, 0, 0, 0.14);
}

.upload-panel[data-ui-state="done"],
.control-panel[data-ui-state="done"] {
  border-color: rgba(214, 231, 255, 0.2);
  box-shadow:
    inset 0 0 0 1px rgba(214, 231, 255, 0.04),
    0 12px 22px rgba(0, 0, 0, 0.12);
}

.upload-panel[data-ui-state="error"],
.control-panel[data-ui-state="error"] {
  border-color: rgba(217, 230, 245, 0.28);
  box-shadow: inset 0 0 0 1px rgba(217, 230, 245, 0.06);
}

.control-panel::before {
  display: none;
}

.section-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.section-head h2 {
  margin-top: 2px;
  font-size: 0.96rem;
  letter-spacing: -0.02em;
}

.section-head-compact {
  margin-bottom: 8px;
}

.section-head-flow {
  margin-bottom: 2px;
}

.section-copy {
  margin-top: 6px;
  max-width: 26rem;
  color: var(--muted);
  line-height: 1.36;
  font-size: 0.82rem;
}

.section-copy-compact {
  max-width: 24rem;
}

.section-kicker,
.result-kicker,
.goal-caption,
.role-label {
  color: var(--accent-strong);
}

.flow-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.flow-step {
  position: relative;
  min-height: 70px;
  padding: 10px 11px;
  border-radius: 15px;
  border: 1px solid rgba(196, 205, 219, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 55%),
    rgba(255, 255, 255, 0.014);
  opacity: 0.68;
  transform: translateY(0);
  transition:
    transform 180ms var(--ease-out),
    opacity 180ms var(--ease-out),
    border-color 180ms var(--ease-out),
    box-shadow 180ms var(--ease-out),
    background 180ms var(--ease-out);
}

.flow-step::before,
.flow-step::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.flow-step::before {
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(112deg, transparent 18%, rgba(255, 255, 255, 0.12) 50%, transparent 82%);
  transform: translateX(-150%);
  opacity: 0;
}

.flow-step::after {
  top: 12px;
  right: 12px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(240, 251, 255, 0.88);
  box-shadow: 0 0 0 5px rgba(94, 242, 255, 0.06), 0 0 18px rgba(94, 242, 255, 0.26);
  opacity: 0;
}

.flow-step strong {
  display: block;
  margin-top: 8px;
  font-size: 0.84rem;
}

.flow-step p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.35;
}

.flow-step-index {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

body[data-ui-state="idle"] .flow-step-capture,
body[data-ui-state="ocr"] .flow-step-capture,
body[data-ui-state="ready"] .flow-step-capture,
body[data-ui-state="busy"] .flow-step-capture,
body[data-ui-state="done"] .flow-step-capture,
body[data-ui-state="error"] .flow-step-capture,
body[data-ui-state="ocr"] .flow-step-ocr,
body[data-ui-state="ready"] .flow-step-ocr,
body[data-ui-state="busy"] .flow-step-ocr,
body[data-ui-state="done"] .flow-step-ocr,
body[data-ui-state="error"] .flow-step-ocr,
body[data-ui-state="busy"] .flow-step-verdict,
body[data-ui-state="done"] .flow-step-verdict,
body[data-ui-state="error"] .flow-step-verdict {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

body[data-ui-state="idle"] .flow-step-capture::before,
body[data-ui-state="ocr"] .flow-step-ocr::before,
body[data-ui-state="busy"] .flow-step-verdict::before,
body[data-ui-state="done"] .flow-step-verdict::before {
  opacity: 0.7;
  animation: step-scan 3.6s var(--ease-out) infinite;
}

body[data-ui-state="idle"] .flow-step-capture::after,
body[data-ui-state="ocr"] .flow-step-ocr::after,
body[data-ui-state="busy"] .flow-step-verdict::after,
body[data-ui-state="done"] .flow-step-verdict::after {
  opacity: 1;
  animation: beacon-pulse 2.2s ease-in-out infinite;
}

body[data-ui-state="idle"] .flow-step-capture,
body[data-ui-state="ready"] .flow-step-capture {
  border-color: rgba(126, 216, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(126, 216, 255, 0.12), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.018);
}

body[data-ui-state="ocr"] .flow-step-ocr,
body[data-ui-state="busy"] .flow-step-verdict {
  border-color: rgba(127, 149, 255, 0.24);
  background:
    linear-gradient(135deg, rgba(127, 149, 255, 0.16), rgba(126, 216, 255, 0.05)),
    rgba(255, 255, 255, 0.02);
}

body[data-ui-state="done"] .flow-step-verdict,
body[data-ui-state="ready"] .flow-step-ocr {
  border-color: rgba(184, 255, 226, 0.22);
  background:
    linear-gradient(135deg, rgba(184, 255, 226, 0.12), rgba(126, 216, 255, 0.03)),
    rgba(255, 255, 255, 0.02);
}

body[data-ui-state="error"] .flow-step-ocr,
body[data-ui-state="error"] .flow-step-verdict {
  border-color: rgba(255, 127, 150, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 127, 150, 0.14), rgba(127, 149, 255, 0.05)),
    rgba(255, 255, 255, 0.02);
}

.ghost-button,
.primary-button,
.reply-option,
.upload-dropzone,
.modal-backdrop {
  font: inherit;
}

.ghost-button,
.primary-button {
  border-radius: 14px;
  padding: 10px 13px;
  cursor: pointer;
  transition:
    transform 140ms var(--ease-out),
    border-color 160ms var(--ease-out),
    background-color 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out),
    opacity 160ms var(--ease-out),
    filter 160ms var(--ease-out);
}

.ghost-button {
  border: 1px solid rgba(165, 182, 203, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    linear-gradient(135deg, rgba(126, 216, 255, 0.04), transparent 62%);
  color: var(--text);
  backdrop-filter: blur(10px);
}

.spotlight-button {
  position: relative;
  border-color: rgba(159, 200, 255, 0.24);
  background:
    linear-gradient(135deg, rgba(127, 149, 255, 0.16), rgba(126, 216, 255, 0.08)),
    rgba(255, 255, 255, 0.03);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 10px 24px rgba(0, 0, 0, 0.22),
    0 0 28px rgba(111, 232, 255, 0.08);
  overflow: hidden;
  animation: cta-breathe 5.6s ease-in-out infinite;
}

.spotlight-button::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 0% 50%, rgba(111, 232, 255, 0.14), transparent 26%),
    radial-gradient(circle at 100% 50%, rgba(127, 149, 255, 0.16), transparent 28%);
  opacity: 0.72;
  pointer-events: none;
}

.spotlight-button::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-115%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  animation: chip-sheen 4s ease-in-out infinite;
}

.ghost-button-small {
  padding: 10px 12px;
  border-radius: 13px;
  white-space: nowrap;
}

.primary-button {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(126, 216, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(205, 219, 255, 0.92), rgba(127, 149, 255, 0.92) 46%, rgba(111, 232, 255, 0.94)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 55%);
  color: #071019;
  font-weight: 700;
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.26),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 42px rgba(94, 242, 255, 0.18);
  animation: cta-breathe 4.8s ease-in-out infinite;
}

.primary-button::before,
.primary-button::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.primary-button::before {
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.38), transparent 18%),
    radial-gradient(circle at 84% 74%, rgba(255, 255, 255, 0.22), transparent 24%),
    linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.08) 48%, transparent 100%);
  mix-blend-mode: screen;
  opacity: 0.9;
}

.primary-button::after {
  transform: translateX(-125%) skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  animation: button-scan 3.8s var(--ease-out) infinite;
}

.primary-button:disabled,
.ghost-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}

.primary-button:not(:disabled):hover,
.ghost-button:not(:disabled):hover,
.reply-option:hover,
.upload-dropzone:hover,
.option-chip:hover {
  transform: translateY(-1px);
  filter: saturate(1.06);
}

.primary-button:not(:disabled):active,
.ghost-button:not(:disabled):active,
.reply-option:active,
.upload-dropzone:active,
.option-chip:active {
  transform: translateY(1px) scale(0.99);
}

.upload-dropzone {
  width: 100%;
  margin-top: 2px;
  position: relative;
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
  padding: 11px;
  border: 1px dashed rgba(159, 200, 255, 0.24);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 42%),
    linear-gradient(135deg, rgba(127, 149, 255, 0.05), rgba(126, 216, 255, 0.04)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.014), rgba(255, 255, 255, 0.01)),
    rgba(255, 255, 255, 0.012);
  color: var(--text);
  cursor: pointer;
  box-shadow:
    inset 0 0 0 1px rgba(159, 200, 255, 0.025),
    0 0 0 1px rgba(255, 255, 255, 0.01);
}

.upload-dropzone::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-105%);
  background: linear-gradient(100deg, transparent 26%, rgba(159, 200, 255, 0.11), transparent 72%);
  animation: dropzone-sweep 5.8s linear infinite;
  pointer-events: none;
}

.upload-icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background:
    radial-gradient(circle at center, rgba(159, 200, 255, 0.16), rgba(159, 200, 255, 0.05));
  color: var(--accent-strong);
  font-size: 1.4rem;
  line-height: 1;
}

.upload-copy {
  display: grid;
  gap: 3px;
}

.upload-dropzone-title {
  font-size: 0.9rem;
}

.upload-dropzone-copy,
.status-line,
.disclaimer-line,
.forecast-text,
.upload-file-name,
.ocr-status,
.package-card p,
.packages-subtitle,
.packages-note,
.role-card p,
.result-copy {
  color: var(--muted);
  line-height: 1.5;
}

.image-input {
  display: none;
}

.upload-meta {
  margin-top: 8px;
  display: grid;
  gap: 4px;
}

.privacy-note {
  margin-top: 10px;
  padding: 12px 13px;
  border-radius: 16px;
  border: 1px solid rgba(184, 255, 226, 0.16);
  background:
    linear-gradient(135deg, rgba(184, 255, 226, 0.1), rgba(126, 216, 255, 0.04)),
    rgba(255, 255, 255, 0.014);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.privacy-note-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.privacy-note-title {
  font-size: 0.82rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.privacy-note p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.48;
  font-size: 0.8rem;
}

.privacy-note-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(8, 16, 18, 0.48);
  color: var(--success);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.privacy-note[data-privacy-mode="remote-ai"] {
  border-color: rgba(127, 149, 255, 0.22);
  background:
    linear-gradient(135deg, rgba(127, 149, 255, 0.11), rgba(126, 216, 255, 0.04)),
    rgba(255, 255, 255, 0.014);
}

.privacy-note[data-privacy-mode="remote-ai"] .privacy-note-badge {
  color: var(--accent-amber);
}

.ocr-status {
  min-height: 1.35em;
}

.ocr-status-error,
.queue-line,
.queue-line-error {
  color: var(--alert);
}

.image-preview {
  margin-top: 10px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(165, 182, 203, 0.12);
  background: rgba(255, 255, 255, 0.012);
  min-height: 110px;
}

.image-preview img {
  display: block;
  width: 100%;
  max-height: 136px;
  object-fit: cover;
}

.recognized-panel {
  margin-top: 10px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(165, 182, 203, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 38%),
    rgba(255, 255, 255, 0.015);
}

.recognized-panel summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 11px 14px;
  color: var(--text);
  font-weight: 500;
}

.recognized-panel summary::-webkit-details-marker {
  display: none;
}

.recognized-panel summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-strong);
  font-size: 1rem;
}

.recognized-panel[open] summary::after {
  content: "−";
}

.recognized-panel[open] summary {
  border-bottom: 1px solid rgba(165, 182, 203, 0.12);
}

.chat-input {
  display: block;
  width: calc(100% - 24px);
  min-height: 96px;
  margin: 10px;
  padding: 12px 13px;
  resize: vertical;
  border-radius: var(--radius-md);
  border: 1px solid rgba(165, 182, 203, 0.14);
  background:
    linear-gradient(180deg, rgba(7, 10, 14, 0.98), rgba(10, 13, 17, 0.98));
  color: var(--text);
  line-height: 1.55;
}

.selection-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.selection-pod {
  position: relative;
  min-height: 64px;
  padding: 10px 11px;
  border-radius: 15px;
  border: 1px solid rgba(165, 182, 203, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.022), transparent 44%),
    linear-gradient(135deg, rgba(126, 216, 255, 0.08), transparent 54%),
    radial-gradient(circle at 84% 22%, rgba(122, 167, 255, 0.1), transparent 18%),
    rgba(255, 255, 255, 0.015);
  overflow: hidden;
}

.selection-pod::after {
  content: "";
  position: absolute;
  right: -2rem;
  bottom: -2rem;
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(159, 200, 255, 0.12), transparent 68%);
  filter: blur(16px);
  opacity: 0.82;
}

.selection-pod strong {
  position: relative;
  display: block;
  margin-top: 7px;
  font-size: 0.88rem;
  letter-spacing: -0.02em;
}

.selection-note {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  min-height: 32px;
  padding: 8px 10px;
  border-radius: 13px;
  border: 1px solid rgba(165, 182, 203, 0.1);
  background: rgba(255, 255, 255, 0.014);
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.35;
}

.selection-note span {
  flex: 1 1 220px;
}

.selection-note-separator {
  flex: 0 0 auto !important;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(159, 200, 255, 0.34);
  box-shadow: 0 0 10px rgba(159, 200, 255, 0.18);
}

.settings-grid {
  margin-top: 14px;
  display: grid;
  gap: 14px;
}

.settings-sheet {
  width: min(760px, 100%);
}

.controls-strip {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.option-group {
  display: grid;
  align-content: start;
  gap: 10px;
}

.option-grid {
  display: grid;
  gap: 8px;
}

.option-grid-inline {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.option-grid-goal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.option-chip {
  width: 100%;
  min-height: 78px;
  padding: 11px 12px;
  border-radius: 15px;
  border: 1px solid rgba(165, 182, 203, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 40%),
    rgba(255, 255, 255, 0.015);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.option-chip strong,
.option-chip span {
  display: block;
}

.option-chip strong {
  font-size: 0.9rem;
  line-height: 1.25;
}

.option-chip span {
  margin-top: 4px;
  font-size: 0.8rem;
  line-height: 1.34;
  color: var(--muted);
}

.option-chip-active {
  border-color: rgba(159, 200, 255, 0.28);
  background:
    linear-gradient(135deg, rgba(159, 200, 255, 0.16), rgba(159, 200, 255, 0.04)),
    rgba(255, 255, 255, 0.03);
  box-shadow:
    inset 0 0 0 1px rgba(159, 200, 255, 0.06),
    0 10px 22px rgba(0, 0, 0, 0.18);
}

.actions-row {
  margin-top: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 0.9fr));
  gap: 8px;
}

.actions-row .primary-button,
.actions-row .ghost-button,
.deck-actions .ghost-button {
  min-height: 46px;
}

.deck-actions .ghost-button {
  font-size: 0.9rem;
}

.status-line,
.queue-line,
.disclaimer-line {
  margin-top: 8px;
}

.status-line,
.queue-line {
  padding: 9px 11px;
  border-radius: 13px;
  border: 1px solid rgba(165, 182, 203, 0.1);
  background: rgba(255, 255, 255, 0.018);
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.surface-pulse {
  animation: status-bump 260ms var(--ease-out);
}

.queue-line {
  min-height: 1.35em;
}

.status-line[data-status-tone="neutral"] {
  color: var(--muted);
}

.status-line[data-status-tone="progress"] {
  color: var(--accent-strong);
  border-color: rgba(159, 200, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(159, 200, 255, 0.08), transparent 72%),
    linear-gradient(90deg, rgba(127, 149, 255, 0.03), transparent 32%, transparent 68%, rgba(111, 232, 255, 0.03)),
    rgba(255, 255, 255, 0.02);
}

.status-line[data-status-tone="success"] {
  color: var(--success);
  border-color: rgba(214, 231, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(214, 231, 255, 0.07), transparent 72%),
    rgba(255, 255, 255, 0.02);
}

.status-line[data-status-tone="error"] {
  color: var(--alert);
  border-color: rgba(217, 230, 245, 0.22);
  background:
    linear-gradient(135deg, rgba(217, 230, 245, 0.08), transparent 72%),
    rgba(255, 255, 255, 0.02);
}

.disclaimer-line {
  font-size: 0.78rem;
  line-height: 1.38;
}

.results-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms var(--ease-out);
}

.results-grid.results-visible {
  opacity: 1;
  pointer-events: auto;
}

.result-card {
  grid-column: span 12;
  padding: 16px;
  border-radius: var(--radius-lg);
  opacity: 1;
  transition:
    border-color 220ms ease,
    box-shadow 220ms ease,
    background-color 220ms ease;
}

.results-grid.results-visible .result-card {
  animation: none;
}

.result-card-score,
.result-card-verdict {
  background:
    linear-gradient(135deg, rgba(111, 232, 255, 0.16), rgba(127, 149, 255, 0.06) 52%, transparent 78%),
    linear-gradient(180deg, rgba(9, 20, 30, 0.98), rgba(4, 9, 14, 0.98));
}

.score-wrap {
  margin-top: 8px;
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}

.score-wrap strong {
  font-size: clamp(1.9rem, 7vw, 2.8rem);
  line-height: 0.95;
}

.score-wrap span,
.goal-caption,
.role-label,
.reply-option strong {
  color: var(--success);
}

.result-copy,
.verdict-text,
.flag-list {
  margin-top: 10px;
}

.verdict-text {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.5;
}

.flag-list {
  padding-left: 18px;
  line-height: 1.55;
}

.flag-list li + li {
  margin-top: 7px;
}

.pill-list,
.role-grid,
.reply-options {
  margin-top: 10px;
  display: grid;
  gap: 9px;
}

.pill-item,
.role-card,
.reply-option,
.forecast-text {
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid rgba(126, 213, 235, 0.14);
  background:
    linear-gradient(135deg, rgba(111, 232, 255, 0.1), rgba(127, 149, 255, 0.05) 56%, transparent 78%),
    rgba(255, 255, 255, 0.02);
  box-shadow: inset 0 0 0 1px rgba(94, 242, 255, 0.03);
}

.pill-item {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.pill-item span {
  color: var(--muted);
  white-space: nowrap;
}

.pill-item-muted {
  justify-content: flex-start;
  color: var(--muted);
}

.role-label,
.reply-option strong {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.role-card strong,
.role-card p {
  display: block;
}

.role-card p {
  margin-top: 7px;
}

.reply-option {
  width: 100%;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  transition:
    transform 220ms var(--ease-out),
    border-color 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease;
}

.reply-option span {
  line-height: 1.52;
}

.result-card:hover,
.example-card:hover,
.package-card:hover,
.reply-option:hover {
  border-color: rgba(197, 247, 255, 0.26);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(94, 242, 255, 0.05);
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms var(--ease-out);
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(4, 6, 8, 0.8);
  backdrop-filter: blur(10px);
  cursor: pointer;
  opacity: 0;
  transition: opacity 180ms var(--ease-out);
}

.modal-sheet {
  position: relative;
  width: min(720px, 100%);
  max-height: min(82vh, 760px);
  overflow: auto;
  padding: 16px;
  border-radius: 24px;
  opacity: 0;
  transition: opacity 220ms var(--ease-out);
  box-shadow:
    0 32px 96px rgba(0, 0, 0, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.modal-shell.modal-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-shell.modal-open .modal-backdrop {
  opacity: 1;
}

.modal-shell.modal-open .modal-sheet {
  opacity: 1;
}

.modal-head,
.packages-footer {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.packages-grid {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.example-grid {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.example-card {
  padding: 15px;
  border-radius: 18px;
  position: relative;
  border: 1px solid rgba(126, 213, 235, 0.14);
  background:
    linear-gradient(135deg, rgba(94, 242, 255, 0.1), transparent 54%),
    rgba(255, 255, 255, 0.02);
  transition:
    transform 220ms var(--ease-out),
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.example-card p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.56;
}

.example-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.1rem;
}

.example-card-highlight {
  border-color: rgba(197, 247, 255, 0.24);
  box-shadow: inset 0 0 0 1px rgba(94, 242, 255, 0.05);
}

.example-card-media {
  background:
    linear-gradient(135deg, rgba(127, 149, 255, 0.08), rgba(111, 232, 255, 0.08)),
    rgba(255, 255, 255, 0.02);
}

.example-card-media-main {
  padding-bottom: 14px;
}

.example-shot {
  display: block;
  width: 100%;
  margin-top: 10px;
  border-radius: 18px;
  border: 1px solid rgba(196, 205, 219, 0.12);
  background: rgba(255, 255, 255, 0.018);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.2);
}

.package-card {
  padding: 15px;
  border-radius: 18px;
  position: relative;
  border: 1px solid rgba(126, 213, 235, 0.14);
  background:
    linear-gradient(135deg, rgba(94, 242, 255, 0.1), transparent 52%),
    rgba(255, 255, 255, 0.02);
  transition:
    transform 220ms var(--ease-out),
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.package-card-main {
  border-color: rgba(197, 247, 255, 0.28);
  box-shadow: inset 0 0 0 1px rgba(94, 242, 255, 0.05);
}

.package-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.12rem;
}

.packages-subtitle {
  margin-top: 6px;
  max-width: 30rem;
}

.packages-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(165, 182, 203, 0.12);
  align-items: center;
}

.packages-note {
  flex: 1 1 auto;
}

.chat-input:focus,
.upload-dropzone:focus-visible,
.primary-button:focus-visible,
.ghost-button:focus-visible,
.reply-option:focus-visible,
.option-chip:focus-visible,
.recognized-panel summary:focus-visible {
  outline: 2px solid rgba(159, 200, 255, 0.28);
  outline-offset: 2px;
}

.is-hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.surface-reveal {
  animation: reveal-chip 320ms var(--ease-out);
}

.results-skeleton-grid .result-card {
  opacity: 1;
  transform: none;
}

.skeleton-card {
  min-height: 148px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)),
    rgba(255, 255, 255, 0.018);
}

.skeleton-stack,
.skeleton-pills {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.skeleton-pills {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.skeleton-line,
.skeleton-pill {
  position: relative;
  overflow: hidden;
  display: block;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.skeleton-line::after,
.skeleton-pill::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
  animation: skeleton-sweep 1.3s linear infinite;
}

.skeleton-line {
  height: 12px;
}

.skeleton-line-short {
  width: 34%;
}

.skeleton-line-mid {
  width: 68%;
}

.skeleton-line-long {
  width: 88%;
}

.skeleton-line-score {
  width: 48%;
  height: 36px;
}

.skeleton-pill {
  min-height: 44px;
}

body.app-flash-success::before,
body.app-flash-error::before {
  opacity: 0.3;
  animation: flash-halo 720ms var(--ease-out);
}

body.app-flash-success::after {
  background:
    linear-gradient(180deg, transparent 0%, rgba(157, 231, 255, 0.09) 46%, transparent 100%);
}

body.app-flash-error::after {
  background:
    linear-gradient(180deg, transparent 0%, rgba(255, 154, 172, 0.08) 46%, transparent 100%);
}

@keyframes chip-sheen {
  0%,
  100% {
    transform: translateX(-120%);
  }
  55% {
    transform: translateX(120%);
  }
}

@keyframes button-scan {
  0%,
  100% {
    transform: translateX(-125%) skewX(-18deg);
    opacity: 0;
  }
  18% {
    opacity: 0.12;
  }
  46% {
    transform: translateX(125%) skewX(-18deg);
    opacity: 0.56;
  }
  60% {
    opacity: 0;
  }
}

@keyframes scene-enter {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ticker-slide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes dropzone-sweep {
  0% {
    transform: translateX(-105%);
  }
  50%,
  100% {
    transform: translateX(110%);
  }
}

@keyframes scan-shift {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100%);
  }
}

@keyframes background-drift {
  0% {
    background-position: 0% 0%, 100% 0%, 50% 100%, 0% 0%, 0 0;
  }
  100% {
    background-position: 6% 3%, 94% 8%, 54% 96%, 100% 100%, 0 0;
  }
}

@keyframes drift-orb {
  0% {
    transform: translate3d(0, 0, 0) scale(0.95);
    opacity: 0.14;
  }
  50% {
    transform: translate3d(-1rem, -1.2rem, 0) scale(1.04);
    opacity: 0.22;
  }
  100% {
    transform: translate3d(1.2rem, 0.6rem, 0) scale(0.98);
    opacity: 0.16;
  }
}

@keyframes step-scan {
  0%,
  100% {
    transform: translateX(-150%);
    opacity: 0;
  }
  24% {
    opacity: 0.4;
  }
  62% {
    transform: translateX(145%);
    opacity: 0.7;
  }
  74% {
    opacity: 0;
  }
}

@keyframes beacon-pulse {
  0%,
  100% {
    transform: scale(0.88);
    opacity: 0.62;
  }
  48% {
    transform: scale(1.12);
    opacity: 1;
  }
}

@keyframes grid-tilt {
  0% {
    transform: perspective(1100px) rotateX(77deg) scale(1.35) translateY(44%);
    opacity: 0.2;
  }
  100% {
    transform: perspective(1100px) rotateX(74deg) scale(1.4) translateY(42%);
    opacity: 0.28;
  }
}

@keyframes signal-bloom {
  0% {
    opacity: 0.28;
    filter: saturate(0.96);
  }
  100% {
    opacity: 0.48;
    filter: saturate(1.12);
  }
}

@keyframes orbit-halo {
  0% {
    transform: rotate(0deg) scale(0.96);
  }
  100% {
    transform: rotate(360deg) scale(1.06);
  }
}

@keyframes orbit-ring {
  0% {
    transform: rotate(0deg) scale(0.98);
    opacity: 0.36;
  }
  100% {
    transform: rotate(360deg) scale(1.04);
    opacity: 0.18;
  }
}

@keyframes panel-sweep {
  0%,
  72% {
    transform: translateX(-135%);
    opacity: 0;
  }
  78% {
    opacity: 0.55;
  }
  100% {
    transform: translateX(135%);
    opacity: 0;
  }
}

@keyframes result-card-in {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.97) rotateX(8deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0deg);
  }
}

@keyframes live-pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: translateY(-50%) scale(0.92);
  }
  50% {
    opacity: 1;
    transform: translateY(-50%) scale(1.08);
  }
}

@keyframes dot-breathe {
  0%,
  100% {
    transform: scale(0.9);
    opacity: 0.58;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

@keyframes skeleton-sweep {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes status-bump {
  0% {
    transform: scale(0.992);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes reveal-chip {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes flash-halo {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 0.26;
  }
  100% {
    opacity: 0;
  }
}

@keyframes ambient-pulse {
  0%,
  100% {
    opacity: 0.44;
    filter: blur(22px) saturate(1);
  }
  50% {
    opacity: 0.76;
    filter: blur(26px) saturate(1.14);
  }
}

@keyframes cta-breathe {
  0%,
  100% {
    box-shadow:
      0 16px 34px rgba(0, 0, 0, 0.26),
      0 0 0 1px rgba(255, 255, 255, 0.03) inset,
      0 0 24px rgba(94, 242, 255, 0.12);
  }
  50% {
    box-shadow:
      0 18px 42px rgba(0, 0, 0, 0.3),
      0 0 0 1px rgba(255, 255, 255, 0.04) inset,
      0 0 42px rgba(94, 242, 255, 0.24);
  }
}

@media (min-width: 860px) {
  .deck-grid {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
    align-items: start;
  }

  .control-panel {
    padding-left: 16px;
    border-left: 1px solid rgba(165, 182, 203, 0.12);
  }

  .packages-grid,
  .example-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .example-grid .example-card:first-child,
  .example-grid .example-card:nth-child(2) {
    grid-column: span 3;
  }

  .example-grid .example-card:nth-child(3),
  .example-grid .example-card:nth-child(4),
  .example-grid .example-card:nth-child(5) {
    grid-column: span 1;
  }

  .example-grid .example-card:nth-child(6) {
    grid-column: span 3;
  }

  .result-card-score {
    grid-column: span 4;
  }

  .results-grid .result-card:nth-child(2) {
    grid-column: span 8;
  }

  .results-grid .result-card:nth-child(3),
  .results-grid .result-card:nth-child(4),
  .results-grid .result-card:nth-child(5),
  .results-grid .result-card:nth-child(6),
  .results-grid .result-card:nth-child(7),
  .results-grid .result-card:nth-child(8),
  .results-grid .result-card:nth-child(9),
  .results-grid .result-card:nth-child(10) {
    grid-column: span 6;
  }
}

@media (max-width: 859px) {
  .deck-grid {
    gap: 14px;
  }

  .control-panel {
    padding-top: 14px;
    border-top: 1px solid rgba(165, 182, 203, 0.1);
  }

  .controls-strip {
    grid-template-columns: 1fr;
  }

  .option-grid-inline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  body {
    padding:
      calc(env(safe-area-inset-top, 0px) + 10px)
      10px
      calc(env(safe-area-inset-bottom, 0px) + 18px);
  }

  .command-deck,
  .result-card,
  .modal-sheet {
    border-radius: 20px;
  }

  .command-deck,
  .result-card,
  .modal-sheet {
    padding-left: 11px;
    padding-right: 11px;
  }

  .identity-panel,
  .upload-panel,
  .control-panel {
    padding: 11px;
    border-radius: 18px;
  }

  .identity-head,
  .modal-head,
  .packages-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .deck-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .signal-ticker {
    min-height: 30px;
  }

  .capture-live {
    min-height: 84px;
  }

  .upload-dropzone {
    align-items: flex-start;
    padding: 11px;
  }

  .controls-strip {
    gap: 12px;
  }

  .selection-bar {
    grid-template-columns: 1fr;
  }

  .flow-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .settings-grid {
    gap: 12px;
  }

  .option-grid-inline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .option-grid-goal {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .option-chip {
    min-height: 60px;
    padding: 10px;
  }

  .option-chip span {
    display: block;
    font-size: 0.74rem;
  }

  .option-chip strong {
    font-size: 0.8rem;
  }

  .image-preview img {
    max-height: 118px;
  }

  .chat-input {
    min-height: 82px;
  }

  .actions-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .actions-row .primary-button {
    grid-column: 1 / -1;
  }

  .status-pill {
    min-height: 32px;
    width: fit-content;
  }

  .brand-summary,
  .section-copy,
  .upload-dropzone-copy,
  .status-line,
  .disclaimer-line {
    font-size: 0.82rem;
  }

  .selection-note {
    font-size: 0.74rem;
  }

  .ghost-button,
  .primary-button,
  .actions-row > * {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  body,
  body::before,
  body::after,
  .app-shell::before,
  .app-shell::after,
  .command-deck::before,
  .command-deck::after,
  .flow-step::before,
  .flow-step::after,
  .identity-panel::after,
  .signal-panel::after,
  .result-card::after,
  .example-card::after,
  .package-card::after,
  .spotlight-button::after,
  .primary-button::after,
  .upload-dropzone::after,
  .signal-ticker-track,
  .status-pill::before,
  .capture-live-dot,
  .results-grid,
  .modal-shell,
  .modal-backdrop,
  .modal-sheet,
  .result-card,
  .app-shell,
  .skeleton-line::after,
  .skeleton-pill::after {
    animation: none !important;
    transition: none !important;
  }
}
