:root {
  color-scheme: dark;
  --bg-start: #07111d;
  --bg-mid: #09111c;
  --bg-end: #030813;
  --panel: rgba(8, 16, 28, 0.82);
  --panel-strong: rgba(7, 14, 24, 0.94);
  --panel-soft: rgba(8, 17, 28, 0.68);
  --line: rgba(143, 223, 255, 0.14);
  --line-strong: rgba(143, 223, 255, 0.26);
  --text: #edf4fb;
  --muted: rgba(183, 205, 223, 0.78);
  --accent: #67e38d;
  --accent-cool: #66bbff;
  --accent-cool-strong: #7be2ff;
  --danger: #fb7185;
  --shadow: 0 30px 100px rgba(0, 0, 0, 0.46);
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/poppins-400-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/poppins-600-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/poppins-700-latin.woff2") format("woff2");
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
}

body {
  width: 336px;
  max-width: 100vw;
  min-height: 100vh;
  font-family: "Poppins", "Avenir Next", "SF Pro Display", "Segoe UI",
    sans-serif;
  color: var(--text);
  background: transparent;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  padding: 0;
  background: none;
}

button,
select,
input {
  -webkit-appearance: none;
  appearance: none;
}

select,
input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

select option {
  color: var(--text);
  background: #09111b;
}

.overlay-shell {
  position: relative;
  z-index: 0;
  min-height: 100vh;
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 14%, rgba(89, 188, 255, 0.16), transparent 30%),
    radial-gradient(circle at 84% 18%, rgba(103, 227, 141, 0.12), transparent 28%),
    radial-gradient(circle at 78% 82%, rgba(102, 187, 255, 0.08), transparent 26%),
    linear-gradient(165deg, var(--bg-start) 0%, var(--bg-mid) 48%, var(--bg-end) 100%);
  border: 1px solid rgba(143, 223, 255, 0.12);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

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

.overlay-shell::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 14%);
}

.overlay-shell::after {
  opacity: 0.12;
  background-image:
    linear-gradient(to right, rgba(181, 206, 224, 0.12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(181, 206, 224, 0.09) 1px, transparent 1px),
    linear-gradient(122deg, rgba(96, 194, 245, 0.08) 0%, transparent 34%);
  background-size:
    56px 56px,
    56px 56px,
    100% 100%;
  mask-image: radial-gradient(circle at 50% 42%, black 0%, transparent 82%);
}

.topbar,
.hero-surface,
.drawer {
  position: relative;
  z-index: 1;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 16px;
  border: 1px solid rgba(143, 223, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(10, 19, 32, 0.9), rgba(7, 13, 24, 0.88)),
    rgba(8, 16, 28, 0.82);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
}

.topbar-brand,
.dialog-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-brand {
  flex: 1;
}

.topbar-emblem {
  width: 34px;
  height: 34px;
  padding: 3px;
  border-radius: 12px;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

.brand-emblem {
  width: 46px;
  height: 46px;
  padding: 5px;
  flex-shrink: 0;
  border-radius: 18px;
  border: 1px solid rgba(143, 223, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(13, 24, 41, 0.86), rgba(7, 13, 23, 0.82)),
    rgba(7, 13, 23, 0.72);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

.dialog-emblem {
  width: 54px;
  height: 54px;
  border-radius: 20px;
}

.brand-mark {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-stack,
.dialog-brand-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.eyebrow,
.status-label,
.log-role,
.surface-label {
  margin: 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.eyebrow,
.surface-label {
  color: rgba(126, 209, 255, 0.88);
}

.brand-mini {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
  flex-shrink: 0;
}

.topbar-metrics {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.header-credit {
  margin: 0;
  font-size: 0.67rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  color: rgba(214, 232, 245, 0.78);
}

.status-pill {
  max-width: 102px;
  margin: 0;
  padding: 4px 7px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(143, 223, 255, 0.18);
  background: rgba(9, 17, 30, 0.64);
  font-size: 0.62rem;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #e6f6ff;
}

.icon-button.topbar-settings-button {
  width: 36px;
  height: 36px;
  border-radius: 13px;
  font-size: 1.02rem;
}

.topbar-settings-button span {
  line-height: 1;
}

.icon-button,
.primary-button,
.secondary-button,
.danger-button {
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    opacity 160ms ease,
    box-shadow 160ms ease;
}

.icon-button:hover:not(:disabled),
.primary-button:hover:not(:disabled),
.secondary-button:hover:not(:disabled),
.danger-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.icon-button:disabled,
.primary-button:disabled,
.secondary-button:disabled,
.danger-button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.icon-button {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border-color: var(--line);
  background: rgba(8, 17, 29, 0.72);
  color: var(--text);
}

.icon-button.icon-danger {
  border-color: rgba(251, 113, 133, 0.22);
  background: rgba(63, 14, 23, 0.62);
}

.hero-surface {
  position: relative;
  z-index: 0;
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(8, 15, 26, 0.94), rgba(7, 12, 22, 0.96)),
    rgba(8, 15, 26, 0.92);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

.top-credit-banner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 5px 7px;
  border-radius: 11px;
  border: 1px solid rgba(251, 113, 133, 0.18);
  background:
    radial-gradient(circle at top right, rgba(251, 113, 133, 0.12), transparent 40%),
    linear-gradient(180deg, rgba(30, 11, 18, 0.82), rgba(20, 10, 18, 0.88)),
    rgba(33, 11, 18, 0.8);
}

.notice-banner {
  position: relative;
  z-index: 1;
  padding: 6px 9px;
  border-radius: 11px;
  border: 1px solid rgba(103, 227, 141, 0.18);
  background:
    radial-gradient(circle at top right, rgba(103, 227, 141, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(10, 24, 18, 0.82), rgba(8, 18, 16, 0.9)),
    rgba(11, 22, 18, 0.82);
  font-size: 0.73rem;
  font-weight: 600;
  line-height: 1.36;
  color: rgba(236, 255, 242, 0.94);
}

.top-credit-banner-message {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  font-size: 0.73rem;
  font-weight: 600;
  line-height: 1.28;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: rgba(255, 232, 236, 0.94);
}

.secondary-button.top-credit-banner-button {
  min-height: 28px;
  padding: 0 10px;
  flex-shrink: 0;
  border-radius: 10px;
  font-size: 0.7rem;
}

.top-credit-banner-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.icon-button.top-credit-banner-dismiss {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 210, 218, 0.18);
  border-radius: 8px;
  background: rgba(56, 18, 27, 0.44);
  color: rgba(255, 232, 236, 0.9);
  flex-shrink: 0;
  font-size: 0.84rem;
  line-height: 1;
}

.page-summary {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(143, 223, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(10, 18, 31, 0.76), rgba(7, 13, 24, 0.8)),
    rgba(8, 16, 28, 0.72);
  text-align: left;
}

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

.hero-surface::before {
  z-index: -2;
  background:
    radial-gradient(circle at 50% 16%, rgba(102, 187, 255, 0.12), transparent 30%),
    radial-gradient(circle at 18% 84%, rgba(103, 227, 141, 0.08), transparent 30%),
    radial-gradient(circle at 88% 26%, rgba(102, 187, 255, 0.08), transparent 26%);
}

.hero-surface::after {
  z-index: -1;
  opacity: 0.12;
  background-image:
    linear-gradient(to right, rgba(181, 206, 224, 0.12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(181, 206, 224, 0.09) 1px, transparent 1px),
    linear-gradient(120deg, transparent 24%, rgba(102, 187, 255, 0.08) 54%, transparent 76%);
  background-size:
    48px 48px,
    48px 48px,
    100% 100%;
  mask-image: radial-gradient(circle at 50% 38%, black 0%, transparent 82%);
}

.hero-copy {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.hero-wordmark {
  width: min(100%, 238px);
  height: auto;
  filter: drop-shadow(0 0 18px rgba(96, 194, 245, 0.12));
}

.page-title {
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: clamp(0.92rem, 3.2vw, 1.1rem);
  font-weight: 780;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--text);
  text-wrap: balance;
}

.surface-status {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.48;
  color: var(--muted);
}

.hero-stage {
  display: grid;
  justify-items: center;
}

.hero-emblem {
  position: relative;
  width: min(100%, 224px);
  height: 164px;
  display: grid;
  place-items: center;
}

.hero-mark,
.voice-ring,
.voice-orb,
.voice-eq,
.voice-orb-core {
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease,
    filter 180ms ease,
    border-color 180ms ease;
}

.hero-mark {
  position: absolute;
  width: 160px;
  height: 160px;
  opacity: 0.96;
  filter: drop-shadow(0 22px 52px rgba(0, 0, 0, 0.24));
}

.voice-orb-shell {
  position: relative;
  width: 114px;
  height: 114px;
  display: grid;
  place-items: center;
  z-index: 1;
  margin-top: 4px;
}

.voice-orb-shell::before {
  content: "";
  position: absolute;
  inset: 18% 14% 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(102, 187, 255, 0.18), transparent 64%);
  filter: blur(16px);
}

.voice-ring,
.voice-orb,
.voice-orb-core {
  border-radius: 50%;
}

.voice-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(143, 223, 255, 0.12);
  background:
    radial-gradient(circle at 34% 32%, rgba(102, 187, 255, 0.08), transparent 42%),
    rgba(7, 13, 23, 0.18);
  animation: ringDrift 11s linear infinite;
}

.voice-ring-two {
  inset: 14%;
  animation-direction: reverse;
  animation-duration: 12.5s;
}

.voice-orb {
  position: relative;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.26), transparent 28%),
    linear-gradient(160deg, rgba(102, 187, 255, 0.42), rgba(123, 226, 255, 0.2) 50%, rgba(103, 227, 141, 0.12));
  box-shadow:
    0 0 0 1px rgba(143, 223, 255, 0.16),
    0 0 34px rgba(102, 187, 255, 0.14);
  animation: orbFloat 6.5s ease-in-out infinite;
}

.voice-orb::before,
.voice-orb::after {
  content: "";
  position: absolute;
  border-radius: inherit;
}

.voice-orb::before {
  inset: 8%;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.42), transparent 26%),
    radial-gradient(circle at 70% 72%, rgba(103, 227, 141, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(10, 18, 30, 0.16), rgba(6, 12, 22, 0.36));
}

.voice-orb::after {
  inset: -20%;
  z-index: -1;
  background: radial-gradient(circle, rgba(102, 187, 255, 0.22), transparent 64%);
  filter: blur(10px);
}

.voice-eq {
  position: absolute;
  bottom: 15px;
  left: 50%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 20px;
  transform: translateX(-50%) scale(0.82);
  opacity: 0;
}

.voice-eq span {
  width: 4px;
  min-height: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(240, 250, 255, 0.96), rgba(123, 226, 255, 0.56));
  box-shadow: 0 0 10px rgba(102, 187, 255, 0.18);
}

.voice-eq span:nth-child(1) {
  animation-delay: -0.36s;
}

.voice-eq span:nth-child(2) {
  animation-delay: -0.18s;
}

.voice-eq span:nth-child(3) {
  animation-delay: -0.48s;
}

.voice-eq span:nth-child(4) {
  animation-delay: -0.12s;
}

.voice-eq span:nth-child(5) {
  animation-delay: -0.28s;
}

.voice-orb-core {
  width: 22px;
  height: 22px;
  background: linear-gradient(160deg, rgba(240, 250, 255, 0.96), rgba(123, 226, 255, 0.38));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.34),
    0 0 14px rgba(102, 187, 255, 0.28);
}

.control-row,
.button-row {
  display: grid;
  gap: 6px;
}

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

.control-pill {
  position: relative;
  display: grid;
  gap: 5px;
  padding: 9px 28px 9px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(10, 19, 32, 0.86), rgba(7, 13, 24, 0.84)),
    rgba(8, 16, 28, 0.74);
  text-align: left;
}

.control-pill::after,
.field-select::after {
  content: "";
  position: absolute;
  right: 13px;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid rgba(208, 232, 245, 0.68);
  border-bottom: 1.5px solid rgba(208, 232, 245, 0.68);
  transform: rotate(45deg);
  pointer-events: none;
}

.control-pill::after {
  bottom: 14px;
}

.control-pill span,
.field span {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(170, 214, 238, 0.86);
}

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

.button-row-ready {
  grid-template-columns: minmax(118px, auto) minmax(0, 1fr);
}

.primary-button,
.secondary-button,
.danger-button {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 14px;
  font-size: 0.8rem;
  font-weight: 800;
}

.primary-button {
  color: #031117;
  border-color: rgba(103, 227, 141, 0.7);
  background: linear-gradient(135deg, rgba(123, 226, 255, 0.96), rgba(103, 227, 141, 0.98));
  box-shadow: 0 18px 40px rgba(103, 227, 141, 0.18);
}

.secondary-button {
  color: var(--text);
  border-color: rgba(143, 223, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(10, 18, 31, 0.8), rgba(7, 13, 24, 0.8)),
    rgba(9, 17, 30, 0.72);
}

.danger-button {
  color: #ffe8ee;
  border-color: rgba(251, 113, 133, 0.32);
  background: rgba(63, 14, 23, 0.7);
  box-shadow: 0 12px 30px rgba(251, 113, 133, 0.1);
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.button-chip {
  min-height: 40px;
}

.button-live {
  box-shadow: 0 18px 42px rgba(251, 113, 133, 0.14);
}

.button-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.button-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.drawer {
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(8, 16, 28, 0.72);
  overflow: hidden;
}

.drawer summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--text);
}

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

.drawer-hint {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.drawer-body {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
}

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

.meta-card,
.log-item {
  padding: 11px 12px;
  border-radius: 16px;
  border: 1px solid rgba(143, 223, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(10, 18, 31, 0.72), rgba(7, 13, 24, 0.76)),
    rgba(8, 16, 28, 0.72);
}

.meta-card-wide {
  grid-column: 1 / -1;
}

.status-label {
  color: rgba(186, 221, 243, 0.72);
}

.status-value,
.detail-line,
.log-text {
  margin: 7px 0 0;
  line-height: 1.58;
}

.status-value {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
  overflow-wrap: anywhere;
}

.detail-line,
.log-text {
  font-size: 0.79rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.conversation-log {
  display: grid;
  gap: 8px;
  max-height: 176px;
  overflow: auto;
  padding-right: 2px;
}

.log-role {
  color: rgba(103, 227, 141, 0.76);
}

.log-image {
  width: 100%;
  margin-top: 10px;
  border-radius: 14px;
  border: 1px solid rgba(143, 223, 255, 0.12);
}

.registration-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  place-items: safe center;
  overflow-y: auto;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: rgba(2, 8, 16, 0.58);
  backdrop-filter: blur(14px);
}

.registration-overlay.is-hidden {
  display: none;
}

.registration-dialog {
  width: min(100%, 404px);
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 28px;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at 12% 14%, rgba(102, 187, 255, 0.14), transparent 26%),
    radial-gradient(circle at 86% 18%, rgba(103, 227, 141, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(8, 16, 28, 0.96), rgba(5, 10, 18, 0.98));
  box-shadow: var(--shadow);
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dialog-wordmark {
  width: min(100%, 232px);
  height: auto;
}

.dialog-close-button {
  flex-shrink: 0;
}

.secondary-button.dialog-back-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  flex-shrink: 0;
  font-size: 0.76rem;
}

.registration-copy,
.registration-status {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.dialog-actions {
  display: grid;
  gap: 8px;
}

.voice-field {
  display: grid;
  gap: 8px;
}

.field {
  position: relative;
  display: grid;
  gap: 7px;
  padding: 11px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(10, 19, 32, 0.84), rgba(7, 13, 24, 0.82)),
    rgba(8, 16, 28, 0.74);
}

.field-select {
  padding-right: 30px;
}

.field-select::after {
  bottom: 18px;
}

.preview-button {
  min-height: 42px;
  font-size: 0.79rem;
}

.voice-warning {
  margin: 0;
  color: rgba(251, 113, 133, 0.92);
}

.settings-credit-banner {
  border-color: rgba(143, 223, 255, 0.12);
  background:
    radial-gradient(circle at top right, rgba(103, 227, 141, 0.1), transparent 38%),
    linear-gradient(180deg, rgba(10, 18, 31, 0.78), rgba(7, 13, 24, 0.84)),
    rgba(10, 18, 31, 0.74);
}

.settings-credit-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.settings-credit-label {
  flex-shrink: 0;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(186, 221, 243, 0.72);
}

.settings-credit-value {
  min-width: 0;
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.settings-credit-caption {
  display: none;
}

.loading-shell {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

body[data-loading="true"] .loading-shell {
  opacity: 1;
  pointer-events: auto;
}

body[data-loading="true"] .overlay-shell > :not(.loading-shell) {
  visibility: hidden;
}

.loading-topbar,
.loading-surface,
.loading-drawer {
  border-radius: 28px;
  border: 1px solid rgba(143, 223, 255, 0.1);
  background: rgba(7, 13, 24, 0.26);
}

.loading-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 0;
  border: 0;
  background: transparent;
}

.loading-brand {
  display: flex;
  align-items: center;
  flex: 1;
}

.loading-stack {
  display: grid;
  gap: 8px;
  flex: 1;
}

.loading-topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.loading-surface {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 18px;
}

.loading-control-row,
.loading-page-summary,
.loading-button-row,
.loading-meta-grid {
  display: grid;
  gap: 10px;
  width: 100%;
}

.loading-control-row {
  grid-template-columns: 1fr;
}

.loading-page-summary {
  padding: 12px 14px;
  border-radius: 20px;
  border: 1px solid rgba(143, 223, 255, 0.1);
  background: rgba(7, 13, 24, 0.2);
}

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

.loading-drawer {
  display: grid;
  gap: 10px;
  padding: 14px;
}

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

.loading-log {
  display: grid;
  gap: 8px;
}

.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(143, 223, 255, 0.08);
}

.skeleton::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: translateX(-100%);
  animation: skeletonShimmer 1.55s ease-in-out infinite;
}

.skeleton-mark {
  width: 46px;
  height: 46px;
  border-radius: 18px;
}

.skeleton-eyebrow {
  width: 112px;
  height: 10px;
  border-radius: 999px;
}

.skeleton-title {
  width: 148px;
  height: 18px;
}

.skeleton-pill {
  width: 82px;
  height: 32px;
  border-radius: 999px;
}

.skeleton-icon {
  width: 36px;
  height: 36px;
  border-radius: 14px;
}

.skeleton-wordmark {
  width: 174px;
  height: 34px;
  border-radius: 12px;
}

.skeleton-page-label {
  width: 92px;
  height: 10px;
  border-radius: 999px;
}

.skeleton-orb {
  width: 146px;
  height: 146px;
  border-radius: 50%;
}

.skeleton-line {
  height: 12px;
}

.skeleton-hero-title {
  width: 228px;
  height: 22px;
}

.skeleton-surface-status {
  width: 196px;
}

.skeleton-control {
  height: 54px;
}

.skeleton-button {
  height: 48px;
}

.skeleton-button-primary,
.skeleton-button-secondary {
  width: 100%;
}

.skeleton-card {
  height: 68px;
}

.skeleton-card-wide {
  grid-column: 1 / -1;
  height: 76px;
}

.skeleton-log {
  height: 54px;
}

body[data-voice-mode="ready"] .hero-mark,
body[data-voice-mode="armed"] .hero-mark {
  filter: drop-shadow(0 0 26px rgba(102, 187, 255, 0.12))
    drop-shadow(0 0 22px rgba(103, 227, 141, 0.08));
}

body[data-voice-mode="ready"] .voice-orb,
body[data-voice-mode="armed"] .voice-orb {
  box-shadow:
    0 0 0 1px rgba(143, 223, 255, 0.2),
    0 0 36px rgba(102, 187, 255, 0.16);
}

body[data-voice-mode="listening"] .hero-mark {
  transform: translateY(-2px) scale(1.02);
  filter: drop-shadow(0 0 28px rgba(103, 227, 141, 0.16));
}

body[data-voice-mode="listening"] .voice-ring {
  border-color: rgba(103, 227, 141, 0.3);
  animation: listeningSweep 1.4s linear infinite;
}

body[data-voice-mode="listening"] .voice-ring-two {
  animation-duration: 1.8s;
}

body[data-voice-mode="listening"] .voice-orb {
  animation: listeningPulse 1.05s ease-in-out infinite;
  box-shadow:
    0 0 0 1px rgba(103, 227, 141, 0.34),
    0 0 46px rgba(103, 227, 141, 0.2);
}

body[data-voice-mode="listening"] .voice-eq {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

body[data-voice-mode="listening"] .voice-eq span {
  animation: eqBounce 780ms ease-in-out infinite;
}

body[data-voice-mode="speaking"] .hero-mark {
  transform: translateY(-1px) scale(1.015);
  filter: drop-shadow(0 0 28px rgba(102, 187, 255, 0.16));
}

body[data-voice-mode="speaking"] .voice-ring {
  border-color: rgba(102, 187, 255, 0.32);
  animation: listeningSweep 1.3s linear infinite reverse;
}

body[data-voice-mode="speaking"] .voice-ring-two {
  animation-duration: 1.7s;
}

body[data-voice-mode="speaking"] .voice-orb {
  animation: speakingPulse 1.15s ease-in-out infinite;
  box-shadow:
    0 0 0 1px rgba(102, 187, 255, 0.36),
    0 0 48px rgba(102, 187, 255, 0.2);
}

body[data-voice-mode="speaking"] .voice-eq {
  opacity: 1;
  transform: translateX(-50%) scale(1, -1);
}

body[data-voice-mode="speaking"] .voice-eq span {
  animation: eqBounce 720ms ease-in-out infinite;
}

body[data-voice-mode="speaking"] .voice-eq span:nth-child(1) {
  animation-delay: -0.14s;
}

body[data-voice-mode="speaking"] .voice-eq span:nth-child(2) {
  animation-delay: -0.32s;
}

body[data-voice-mode="speaking"] .voice-eq span:nth-child(3) {
  animation-delay: -0.08s;
}

body[data-voice-mode="speaking"] .voice-eq span:nth-child(4) {
  animation-delay: -0.4s;
}

body[data-voice-mode="speaking"] .voice-eq span:nth-child(5) {
  animation-delay: -0.24s;
}

body[data-voice-mode="thinking"] .hero-mark,
body[data-voice-mode="analyzing"] .hero-mark,
body[data-voice-mode="connecting"] .hero-mark {
  filter: drop-shadow(0 0 30px rgba(102, 187, 255, 0.16));
}

body[data-voice-mode="thinking"] .voice-ring,
body[data-voice-mode="analyzing"] .voice-ring,
body[data-voice-mode="connecting"] .voice-ring {
  animation: thinkingSpin 1.35s linear infinite;
}

body[data-voice-mode="thinking"] .voice-ring-two,
body[data-voice-mode="analyzing"] .voice-ring-two,
body[data-voice-mode="connecting"] .voice-ring-two {
  animation-duration: 2.1s;
}

body[data-voice-mode="thinking"] .voice-orb,
body[data-voice-mode="analyzing"] .voice-orb,
body[data-voice-mode="connecting"] .voice-orb {
  animation: orbAxisSpin 2.6s linear infinite;
}

body[data-voice-mode="thinking"] .voice-orb {
  box-shadow:
    0 0 0 1px rgba(102, 187, 255, 0.28),
    0 0 42px rgba(102, 187, 255, 0.16);
}

body[data-voice-mode="analyzing"] .voice-orb {
  box-shadow:
    0 0 0 1px rgba(103, 227, 141, 0.28),
    0 0 42px rgba(103, 227, 141, 0.16);
}

body[data-voice-mode="loading"] .voice-ring {
  border-color: rgba(143, 223, 255, 0.16);
}

body[data-voice-mode="loading"] .voice-orb {
  animation-duration: 4.8s;
  opacity: 0.9;
}

body[data-voice-mode="error"] .hero-mark,
body[data-voice-mode="offline"] .hero-mark {
  filter: drop-shadow(0 0 30px rgba(251, 113, 133, 0.12));
}

body[data-voice-mode="error"] .voice-ring,
body[data-voice-mode="offline"] .voice-ring {
  border-color: rgba(251, 113, 133, 0.28);
}

body[data-voice-mode="error"] .voice-orb,
body[data-voice-mode="offline"] .voice-orb {
  box-shadow:
    0 0 0 1px rgba(251, 113, 133, 0.28),
    0 0 38px rgba(251, 113, 133, 0.14);
}

@keyframes orbFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-2px) scale(1.016);
  }
}

@keyframes ringDrift {
  from {
    transform: rotate(0deg) scale(1);
  }

  50% {
    transform: rotate(180deg) scale(1.008);
  }

  to {
    transform: rotate(360deg) scale(1);
  }
}

@keyframes listeningSweep {
  0% {
    transform: rotate(0deg) scale(0.985);
  }

  50% {
    transform: rotate(180deg) scale(1.02);
  }

  100% {
    transform: rotate(360deg) scale(0.985);
  }
}

@keyframes thinkingSpin {
  from {
    transform: rotate(0deg) scale(1);
  }

  to {
    transform: rotate(360deg) scale(1);
  }
}

@keyframes orbAxisSpin {
  from {
    transform: rotate(0deg) scale(1);
  }

  50% {
    transform: rotate(180deg) scale(1.03);
  }

  to {
    transform: rotate(360deg) scale(1);
  }
}

@keyframes listeningPulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  30% {
    transform: translateY(-1px) scale(1.06, 0.98);
  }

  65% {
    transform: translateY(1px) scale(0.98, 1.05);
  }
}

@keyframes speakingPulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  34% {
    transform: translateY(1px) scale(0.98, 1.06);
  }

  70% {
    transform: translateY(-1px) scale(1.05, 0.99);
  }
}

@keyframes eqBounce {
  0%,
  100% {
    height: 8px;
  }

  35% {
    height: 24px;
  }

  68% {
    height: 14px;
  }
}

@keyframes skeletonShimmer {
  to {
    transform: translateX(100%);
  }
}

@media (max-width: 500px) {
  .overlay-shell,
  .loading-shell {
    padding: 0 10px 10px;
  }

  .overlay-shell {
    border-radius: 22px;
  }

  .topbar {
    padding: 6px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .topbar-metrics {
    gap: 6px;
  }

  .topbar-emblem {
    width: 32px;
    height: 32px;
    border-radius: 11px;
  }

  .header-credit {
    font-size: 0.66rem;
  }

  .status-pill {
    max-width: 92px;
  }

  .hero-surface {
    padding: 10px;
  }

  .registration-dialog {
    padding: 16px;
  }

  .meta-grid,
  .loading-meta-grid {
    grid-template-columns: 1fr;
  }

  .meta-card-wide,
  .skeleton-card-wide {
    grid-column: auto;
  }
}

@media (max-width: 420px) {
  .button-row,
  .button-row-ready,
  .loading-button-row {
    grid-template-columns: 1fr;
  }

  .hero-mark {
    width: 148px;
    height: 148px;
  }

  .voice-orb-shell {
    width: 104px;
    height: 104px;
  }
}

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