@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/variable/pretendardvariable-dynamic-subset.css");

:root {
  color-scheme: light;
  --text: #151821;
  --muted: #6f7480;
  --line: #e6e8ee;
  --panel: rgba(255, 255, 255, 0.76);
  --shadow: 0 24px 90px rgba(18, 24, 38, 0.12);
  --hue: 202;
  --side-panel-width: 320px;
  --side-panel-right: 24px;
}

* {
  box-sizing: border-box;
}

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

body {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  font-family: "Pretendard Variable", "Pretendard", "Noto Sans KR", "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 46%, rgba(225, 245, 255, 0.98), transparent 30rem),
    radial-gradient(circle at 13% 18%, rgba(202, 235, 255, 0.9), transparent 24rem),
    radial-gradient(circle at 86% 82%, rgba(236, 248, 255, 0.9), transparent 24rem),
    linear-gradient(180deg, #f4fbff 0%, #e8f6ff 100%);
  transition: background 420ms ease;
}

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

body::before {
  z-index: 0;
  opacity: 0.58;
  background:
    radial-gradient(circle at 18% 24%, hsla(var(--hue), 88%, 78%, 0.22), transparent 24rem),
    radial-gradient(circle at 78% 74%, hsla(calc(var(--hue) + 118), 76%, 78%, 0.18), transparent 25rem),
    radial-gradient(circle at 48% 42%, rgba(255, 255, 255, 0.32), transparent 28rem),
    linear-gradient(115deg, transparent 0 38%, rgba(255, 255, 255, 0.26) 48%, transparent 58%),
    linear-gradient(rgba(88, 165, 218, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 165, 218, 0.07) 1px, transparent 1px);
  background-size: 115% 115%, 118% 118%, 100% 100%, 160% 160%, 72px 72px, 72px 72px;
  background-position: 0 0, 100% 100%, 50% 40%, -30% 0, 0 0, 0 0;
  mask-image: linear-gradient(180deg, transparent 0%, black 18%, black 82%, transparent 100%);
  animation: ambientSweep 20s ease-in-out infinite alternate;
}

body::after {
  z-index: 0;
  opacity: 0.5;
  background:
    repeating-linear-gradient(128deg, transparent 0 38px, rgba(255, 255, 255, 0.18) 39px, transparent 42px),
    linear-gradient(90deg, hsla(var(--hue), 90%, 82%, 0.16), transparent 32%, rgba(255, 255, 255, 0.18) 50%, transparent 68%, hsla(calc(var(--hue) + 120), 82%, 82%, 0.12));
  background-size: 220px 220px, 140% 100%;
  mix-blend-mode: soft-light;
  animation: ambientFlow 26s linear infinite;
}

@keyframes ambientSweep {
  0% {
    background-position: 0 0, 100% 100%, 48% 42%, -40% 0, 0 0, 0 0;
  }
  100% {
    background-position: 10% 5%, 88% 92%, 54% 36%, 72% 0, 18px 24px, 18px 24px;
  }
}

@keyframes ambientFlow {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 220px 0, 140% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after,
  .advisor-card,
  .siri-orb,
  .orb-shape,
  .is-speaking .siri-orb,
  .is-listening .siri-orb {
    animation: none;
  }
}

body.is-connected {
  background:
    radial-gradient(circle at 50% 46%, hsla(var(--hue), 92%, 78%, 0.56), transparent 31rem),
    radial-gradient(circle at 12% 18%, hsla(calc(var(--hue) + 34), 88%, 70%, 0.34), transparent 24rem),
    radial-gradient(circle at 88% 82%, hsla(calc(var(--hue) + 124), 82%, 76%, 0.32), transparent 24rem),
    linear-gradient(180deg, hsla(var(--hue), 92%, 97%, 0.98) 0%, hsla(var(--hue), 78%, 92%, 0.9) 100%);
}

button {
  font: inherit;
}

.voice-app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  padding: 26px clamp(18px, 3vw, 40px);
}

.app-header {
  position: relative;
  z-index: 20;
  grid-column: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.title-block {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.title-block span,
.advisor-copy p,
.status-line,
.advisor-trigger small {
  color: var(--muted);
}

.title-block strong {
  width: fit-content;
  padding-left: 10px;
  border-left: 2px solid hsla(var(--hue), 78%, 52%, 0.42);
  color: rgba(31, 42, 56, 0.62);
  font-size: 14px;
  font-weight: 720;
  letter-spacing: 0;
  line-height: 1.25;
}

.advisor-select-screen {
  position: relative;
  z-index: 10;
  grid-column: 1;
  display: grid;
  align-content: center;
  gap: clamp(22px, 4vh, 36px);
  min-height: calc(100vh - 120px);
  padding: clamp(24px, 4vw, 54px) 0 20px;
}

.auth-page,
.not-found-page {
  overflow: hidden;
}

.auth-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.auth-card {
  width: min(420px, 100%);
  display: grid;
  gap: 24px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.3)),
    linear-gradient(180deg, rgba(228, 247, 255, 0.5), rgba(255, 255, 255, 0.22));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 30px 96px rgba(25, 38, 62, 0.14);
  backdrop-filter: blur(28px) saturate(1.18);
}

.auth-title {
  gap: 7px;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: rgba(31, 42, 56, 0.66);
  font-size: 13px;
  font-weight: 720;
}

.login-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 15px;
  outline: none;
  background: rgba(255, 255, 255, 0.5);
  color: var(--text);
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(14px);
}

.login-form input:focus {
  border-color: hsla(var(--hue), 86%, 56%, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 0 0 4px hsla(var(--hue), 86%, 64%, 0.12);
}

.auth-action {
  width: 100%;
  display: grid;
  place-items: center;
  margin-top: 4px;
  text-decoration: none;
}

.auth-message {
  min-height: 20px;
  margin: 0;
  color: #a23a44;
  font-size: 13px;
  text-align: center;
}

.not-found-card {
  justify-items: start;
}

.not-found-card h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.08;
}

.not-found-card p {
  margin: -10px 0 2px;
  color: rgba(42, 50, 64, 0.56);
}

.auth-link {
  color: white;
}

body.has-advisor .advisor-select-screen {
  display: none;
}

body:not(.has-advisor) .voice-stage,
body:not(.has-advisor) .side-panel,
body:not(.has-advisor) .panel-toggle {
  display: none;
}

.select-copy {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.select-copy span {
  color: #697280;
  font-size: 13px;
  font-weight: 740;
}

.advisor-card-grid {
  width: min(1040px, 100%);
  justify-self: center;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.select-loading,
.select-error {
  grid-column: 1 / -1;
  justify-self: center;
  margin: 0;
  padding: 18px 22px;
  border: 1px solid rgba(210, 222, 236, 0.72);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.56);
  color: #657180;
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
  box-shadow: 0 18px 52px rgba(31, 42, 66, 0.08);
  backdrop-filter: blur(18px);
}

.select-error {
  color: #a23a44;
}

.advisor-card {
  min-height: 168px;
  display: grid;
  grid-template-rows: auto 1fr;
  justify-items: center;
  gap: 12px;
  padding: 18px 14px 16px;
  border: 1px solid rgba(222, 228, 236, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--text);
  box-shadow: 0 18px 58px rgba(31, 42, 66, 0.08);
  backdrop-filter: blur(20px);
  cursor: pointer;
  animation: cardFloat 9s ease-in-out infinite;
  animation-delay: calc(var(--card-index, 0) * -0.45s);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.advisor-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.86);
  border-color: hsla(var(--card-hue), 78%, 52%, 0.36);
  box-shadow: 0 24px 70px rgba(31, 42, 66, 0.13);
}

.advisor-card-copy {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
  text-align: center;
}

.advisor-card-copy strong {
  font-size: 18px;
  font-weight: 760;
  line-height: 1.2;
}

.advisor-card-copy span {
  max-width: 100%;
  overflow: hidden;
  color: #656d7a;
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-orb {
  position: relative;
  width: 74px;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.98) 0 12%, rgba(255, 255, 255, 0.56) 13%, transparent 28%),
    radial-gradient(circle at 64% 35%, hsla(calc(var(--card-hue) + 42), 70%, 48%, 0.86), transparent 44%),
    radial-gradient(circle at 34% 30%, hsla(var(--card-hue), 88%, 48%, 0.92), transparent 44%),
    radial-gradient(circle at 40% 78%, hsla(calc(var(--card-hue) + 142), 88%, 54%, 0.86), transparent 46%),
    linear-gradient(145deg, hsl(var(--card-hue), 78%, 20%) 0%, #252b64 48%, #7f123a 100%);
  box-shadow:
    inset 0 10px 22px rgba(255, 255, 255, 0.18),
    inset 0 -18px 34px rgba(12, 12, 34, 0.38),
    0 14px 34px rgba(33, 45, 80, 0.14);
}

.mini-orb .orb-shape {
  animation-duration: 8.5s;
}

.mini-orb .orb-core {
  filter: blur(3px);
  box-shadow: 0 0 22px 12px rgba(255, 255, 255, 0.62);
}

.side-panel {
  position: fixed;
  top: 82px;
  right: var(--side-panel-right);
  z-index: 80;
  display: grid;
  gap: 0;
  width: var(--side-panel-width);
  padding: 19px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.28)),
    linear-gradient(180deg, hsla(var(--hue), 86%, 91%, 0.28), rgba(255, 255, 255, 0.18));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 28px 90px rgba(25, 38, 62, 0.14),
    0 8px 28px rgba(25, 38, 62, 0.08);
  backdrop-filter: blur(26px) saturate(1.18);
  transition: transform 260ms ease, opacity 220ms ease;
}

.side-panel::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 23px;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.58), transparent 38%),
    radial-gradient(circle at 82% 0%, hsla(var(--hue), 90%, 72%, 0.22), transparent 34%);
  opacity: 0.72;
}

.side-panel.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(100% + 36px));
}

.panel-toggle {
  position: fixed;
  top: 104px;
  right: calc(var(--side-panel-right) + var(--side-panel-width) + 10px);
  z-index: 100;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(34, 43, 56, 0.46);
  font-size: 36px;
  font-weight: 720;
  line-height: 1;
  box-shadow: none;
  text-shadow: 0 3px 16px rgba(18, 24, 38, 0.14);
  cursor: pointer;
  transition: color 160ms ease, right 260ms ease, opacity 160ms ease, transform 160ms ease;
}

.panel-toggle:hover {
  color: rgba(18, 24, 38, 0.72);
  transform: translateX(-2px);
}

.panel-toggle.is-panel-hidden {
  right: 12px;
}

.panel-section,
.transcript-section {
  position: relative;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.panel-section {
  position: relative;
  z-index: 90;
}

.panel-section {
  padding: 0 0 16px;
}

.panel-label {
  display: block;
  margin: 0 0 10px;
  color: #6f7885;
  font-size: 12px;
  font-weight: 720;
}

.advisor-menu {
  position: relative;
  width: 100%;
}

.advisor-trigger {
  width: 100%;
  min-height: 58px;
  padding: 11px 42px 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.34)),
    hsla(var(--hue), 80%, 96%, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 12px 28px rgba(31, 42, 66, 0.08);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(18px) saturate(1.08);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, transform 160ms ease;
}

.advisor-trigger:hover {
  border-color: hsla(var(--hue), 86%, 66%, 0.44);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 16px 34px rgba(31, 42, 66, 0.11);
  transform: translateY(-1px);
}

.advisor-menu.is-locked .advisor-trigger {
  cursor: not-allowed;
  background: rgba(244, 247, 250, 0.42);
}

.advisor-menu.is-locked .advisor-trigger::after {
  opacity: 0.22;
}

.advisor-trigger::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 24px;
  width: 10px;
  height: 10px;
  border-right: 2px solid #20242d;
  border-bottom: 2px solid #20242d;
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.advisor-menu.is-open .advisor-trigger::after {
  transform: rotate(225deg) translate(-3px, -3px);
}

.advisor-trigger span,
.advisor-trigger small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.advisor-trigger span {
  font-weight: 760;
  font-size: 15px;
}

.advisor-trigger small {
  margin-top: 4px;
  font-size: 13px;
}

.advisor-list {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  display: none;
  max-height: min(430px, calc(100vh - 180px));
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  z-index: 120;
}

.advisor-menu.is-open .advisor-list {
  display: grid;
  gap: 4px;
}

.advisor-option {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 11px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.advisor-option:hover,
.advisor-option.is-active {
  background: #f1f4f8;
}

.advisor-option strong {
  font-size: 15px;
}

.advisor-option span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.voice-stage {
  position: relative;
  grid-column: 1;
  display: grid;
  place-items: center;
  align-content: start;
  gap: 0;
  min-height: 0;
  padding-top: clamp(150px, 22vh, 245px);
  transform: none;
}

.wave-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.siri-orb {
  position: relative;
  z-index: 2;
  width: clamp(220px, 31vw, 380px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.98) 0 11%, rgba(255, 255, 255, 0.62) 12%, transparent 27%),
    radial-gradient(circle at 65% 35%, rgba(62, 83, 180, 0.86), transparent 44%),
    radial-gradient(circle at 34% 30%, rgba(0, 190, 202, 0.92), transparent 44%),
    radial-gradient(circle at 40% 78%, rgba(230, 0, 86, 0.88), transparent 46%),
    linear-gradient(145deg, #073f4b 0%, #27265d 48%, #7f0e32 100%);
  box-shadow:
    inset 0 16px 38px rgba(255, 255, 255, 0.2),
    inset 0 -28px 52px rgba(12, 12, 34, 0.4),
    0 32px 90px rgba(33, 45, 80, 0.18);
  animation: orbIdleFloat 8s ease-in-out infinite;
}

.orb-shape,
.orb-core {
  position: absolute;
  pointer-events: none;
  mix-blend-mode: screen;
}

.orb-shape {
  left: 50%;
  top: 50%;
  width: 64%;
  height: 30%;
  border-radius: 999px 60% 999px 60%;
  filter: blur(0.2px);
  opacity: 0.78;
  transform-origin: 50% 50%;
  animation: drift 7s ease-in-out infinite;
}

.shape-cyan {
  background: #00f2ff;
  transform: translate(-50%, -50%) rotate(24deg);
}

.shape-blue {
  background: #18a4ff;
  animation-delay: -1.8s;
  transform: translate(-50%, -50%) rotate(134deg);
}

.shape-pink {
  background: #ff2c75;
  animation-delay: -3.1s;
  transform: translate(-50%, -50%) rotate(-18deg);
}

.shape-violet {
  width: 45%;
  height: 45%;
  border-radius: 50%;
  background: #9c69ff;
  opacity: 0.36;
  animation-delay: -4.2s;
  transform: translate(-22%, -42%);
}

.orb-core {
  inset: 35%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.98);
  filter: blur(5px);
  box-shadow: 0 0 44px 26px rgba(255, 255, 255, 0.72);
}

.is-speaking .siri-orb,
.is-listening .siri-orb {
  animation: breathe 1.9s ease-in-out infinite;
}

@keyframes cardFloat {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -4px;
  }
}

@keyframes orbIdleFloat {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -6px;
  }
}

@keyframes drift {
  0%,
  100% {
    scale: 1;
  }
  50% {
    scale: 1.12 0.86;
    translate: 3% -2%;
  }
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.035);
  }
}

.advisor-copy {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 9px;
  text-align: center;
}

.conversation-panel {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: clamp(15px, 2.2vh, 22px);
  margin-top: clamp(92px, 14vh, 170px);
}

.advisor-copy h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 760;
  line-height: 1;
  letter-spacing: 0;
}

.advisor-copy span {
  width: fit-content;
  max-width: min(82vw, 560px);
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: rgba(42, 50, 64, 0.52);
  font-size: clamp(14px, 1.3vw, 17px);
  font-weight: 560;
  line-height: 1.35;
  backdrop-filter: blur(12px);
}

.voice-controls {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    0 18px 52px rgba(24, 38, 61, 0.1);
  backdrop-filter: blur(18px) saturate(1.08);
}

.primary-action,
.ghost-action {
  position: relative;
  min-width: 118px;
  min-height: 48px;
  padding: 0 22px 0 42px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease, opacity 180ms ease;
}

.primary-action::before,
.ghost-action::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transform: translateY(-50%);
}

.primary-action {
  color: white;
  font-weight: 760;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.34), transparent 24%),
    linear-gradient(135deg, #132439 0%, hsl(var(--hue), 72%, 40%) 55%, hsl(calc(var(--hue) + 32), 76%, 48%) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 18px 44px hsla(var(--hue), 64%, 40%, 0.3),
    0 6px 18px rgba(17, 24, 39, 0.16);
}

.primary-action::before {
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 0 0 5px rgba(255, 255, 255, 0.16),
    0 0 18px rgba(255, 255, 255, 0.62);
}

.ghost-action {
  color: #70313c;
  font-weight: 720;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.28)),
    rgba(255, 235, 238, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.64),
    0 12px 30px rgba(118, 52, 65, 0.1);
}

.ghost-action::before {
  background: #d85668;
  box-shadow: 0 0 0 5px rgba(216, 86, 104, 0.12);
}

.primary-action:hover,
.ghost-action:hover:not(:disabled) {
  transform: translateY(-2px);
}

.primary-action:active,
.ghost-action:active:not(:disabled) {
  transform: translateY(0);
}

body.is-connected .primary-action {
  color: rgba(255, 255, 255, 0.9);
  background:
    linear-gradient(135deg, rgba(35, 50, 71, 0.72), hsla(var(--hue), 52%, 38%, 0.74));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 10px 26px rgba(24, 38, 61, 0.12);
}

body.is-connected .primary-action.is-pressed {
  color: #fff;
  transform: translateY(1px) scale(0.99);
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.42), transparent 25%),
    linear-gradient(135deg, hsl(var(--hue), 72%, 34%), hsl(calc(var(--hue) + 24), 78%, 45%));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 18px 42px hsla(var(--hue), 74%, 42%, 0.32);
}

body.is-connected .primary-action.is-pressed::before {
  animation: pttPulse 880ms ease-in-out infinite;
}

@keyframes pttPulse {
  0%, 100% {
    box-shadow:
      0 0 0 5px rgba(255, 255, 255, 0.18),
      0 0 18px rgba(255, 255, 255, 0.62);
  }
  50% {
    box-shadow:
      0 0 0 9px rgba(255, 255, 255, 0.1),
      0 0 28px hsla(var(--hue), 94%, 72%, 0.72);
  }
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.status-line {
  position: relative;
  z-index: 2;
  min-height: 24px;
  margin: 0;
  color: rgba(85, 94, 108, 0.58);
  font-size: 13px;
  font-weight: 560;
  text-align: center;
}

.transcript-section {
  overflow: hidden;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.62);
}

.transcript-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, hsla(var(--hue), 72%, 64%, 0.42), transparent);
}

.transcript-toggle {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.transcript-toggle span {
  font-weight: 760;
  font-size: 15px;
}

.transcript-toggle small {
  color: #7b8390;
  font-size: 12px;
}

.transcript-panel {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 220ms ease;
}

.transcript-section:not(.is-open) .transcript-panel {
  grid-template-rows: 0fr;
}

.transcript-stream {
  min-height: 0;
  max-height: min(52vh, 460px);
  overflow-y: auto;
  padding: 0 0 4px;
}

.transcript-section:not(.is-open) .transcript-stream {
  overflow: hidden;
  padding-bottom: 0;
}

.empty-transcript {
  margin: 0;
  padding: 14px 4px 4px;
  color: #8b93a0;
  font-size: 13px;
  line-height: 1.5;
}

.message {
  display: grid;
  gap: 5px;
  margin: 8px 0;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  background: rgba(255, 255, 255, 0.32);
  color: #232832;
  font-size: 14px;
  line-height: 1.48;
  box-shadow: 0 8px 22px rgba(31, 42, 66, 0.05);
}

.message.assistant {
  background: hsla(var(--hue), 74%, 94%, 0.38);
}

.message.user {
  background: rgba(255, 255, 255, 0.42);
}

.message-label {
  color: #7b8390;
  font-size: 11px;
  font-weight: 720;
}

@media (max-width: 720px) {
  :root {
    --side-panel-width: min(340px, calc(100vw - 28px));
    --side-panel-right: 14px;
  }

  body {
    overflow: auto;
  }

  .voice-app {
    min-height: 100svh;
    grid-template-columns: 1fr;
    padding: 18px 14px 26px;
  }

  .app-header {
    display: grid;
    grid-column: 1;
  }

  .advisor-select-screen {
    min-height: calc(100svh - 96px);
    padding-top: 72px;
  }

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

  .advisor-card {
    min-height: 146px;
    padding: 14px 10px;
  }

  .mini-orb {
    width: 62px;
  }

  .side-panel {
    top: 72px;
    right: var(--side-panel-right);
  }

  .panel-toggle {
    top: 86px;
    right: calc(var(--side-panel-right) + var(--side-panel-width) + 6px);
  }

  .panel-toggle.is-panel-hidden {
    right: 10px;
  }

  .voice-stage {
    grid-column: 1;
    padding-top: clamp(86px, 16vh, 136px);
    transform: none;
  }

  .conversation-panel {
    margin-top: clamp(64px, 10vh, 104px);
  }

  .siri-orb {
    width: min(78vw, 300px);
  }
}
