:root {
  --bg: #07101d;
  --fg: #f5f7fb;
  --accent: #f0c674;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Sora", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }

.screen { position: relative; height: 100dvh; width: 100%; overflow: hidden; background: #07101d; color: #fff; }
#pano { position: absolute; inset: 0; }
.scene-fade { animation: scene-fade-in 0.55s ease-out; }
@keyframes scene-fade-in {
  from { opacity: 0.35; transform: scale(1.02); }
  to { opacity: 1; transform: scale(1); }
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #07101d;
  padding: 24px;
}
.gate-card {
  width: min(22rem, 100%);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(13, 21, 38, 0.95);
  padding: 28px 24px;
  text-align: center;
}
.gate-card h2 {
  font-family: var(--font-display);
  margin: 8px 0 8px;
  font-weight: 500;
  font-size: 1.75rem;
}
.gate-card p { margin: 0; font-size: 14px; color: rgba(255,255,255,0.65); line-height: 1.5; }
.gate-card input {
  width: 100%;
  margin: 18px 0 12px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px;
  background: rgba(0,0,0,0.35);
  color: #fff;
  padding: 12px 16px;
  outline: none;
  text-align: center;
}
.gate-card button {
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: #fbbf24;
  color: #0b1220;
  font-weight: 600;
  padding: 12px;
}

.header {
  pointer-events: none;
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 16px 16px;
}
@media (min-width: 768px) {
  .header { padding: 24px; }
}
.kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(253, 230, 138, 0.9);
}
.header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 4px 0 0;
  font-weight: 500;
}
.header p { margin: 8px 0 0; font-size: 14px; color: rgba(255,255,255,0.6); max-width: 36rem; }
.voice-toggle {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(0,0,0,0.45);
  color: rgba(255,255,255,0.8);
  padding: 8px 12px;
  font-size: 12px;
  backdrop-filter: blur(8px);
}

.scene-card {
  display: none;
  pointer-events: none;
  position: absolute;
  left: 16px;
  top: 7.5rem;
  z-index: 20;
  width: min(22rem, calc(100vw - 2rem));
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.5);
  padding: 16px;
  backdrop-filter: blur(12px);
}
@media (min-width: 768px) { .scene-card { display: block; top: 9rem; left: 24px; } }
.scene-card h2 { font-family: var(--font-display); font-size: 1.25rem; margin: 4px 0 8px; font-weight: 500; }
.scene-card p { margin: 0; font-size: 14px; line-height: 1.5; color: rgba(255,255,255,0.75); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.chips li {
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  padding: 4px 10px;
  font-size: 11px;
  color: rgba(255,255,255,0.7);
}

.assistant {
  position: absolute;
  left: 8px; right: 8px; top: 4.75rem;
  z-index: 30;
  max-height: 28vh;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(251,191,36,0.25);
  background: rgba(18,26,43,0.92);
  padding: 10px;
  backdrop-filter: blur(12px);
}
@media (min-width: 640px) {
  .assistant {
    left: auto; right: 16px; top: 7rem; width: min(18rem, calc(100vw - 2rem));
    max-height: none; border-radius: 16px; padding: 12px;
  }
}
.assistant-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; color: #fde68a; }
.assistant-head p { margin: 0; font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.assistant button { background: none; border: 0; color: rgba(255,255,255,0.5); padding: 2px; }
.assistant .body { margin: 8px 0 0; font-size: 13px; line-height: 1.55; color: rgba(255,255,255,0.85); }

.wizard {
  pointer-events: none;
  position: absolute;
  left: 0; right: 0;
  bottom: 8.75rem;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding: 0 8px;
}
@media (min-width: 640px) { .wizard { bottom: 9.5rem; } }
.wizard-panel {
  pointer-events: auto;
  width: 100%;
  max-width: 36rem;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(12px);
}
.wizard-bar { height: 3px; background: rgba(255,255,255,0.1); }
.wizard-bar > span { display: block; height: 100%; background: linear-gradient(90deg, #fcd34d, #fbbf24); transition: width 0.45s ease; }
.wizard-row { display: flex; align-items: center; gap: 8px; padding: 6px; }
.steps { display: flex; flex: 1; justify-content: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.steps::-webkit-scrollbar { display: none; }
.step {
  position: relative;
  height: 32px; width: 32px;
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background-size: cover;
  background-position: center;
  opacity: 0.65;
}
.step.active { border-color: #fcd34d; opacity: 1; box-shadow: 0 0 0 2px rgba(251,191,36,0.35); }
.step.done { border-color: rgba(52,211,153,0.6); opacity: 0.85; }
.step .check {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.4);
  color: #6ee7b7;
  font-size: 12px;
}
.wizard-next {
  height: 32px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 600;
  background: #fbbf24;
  color: #0b1220;
}
.wizard-next:disabled { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.4); }

.dock {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 20;
  width: min(28rem, 92vw);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.mic-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.mic {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  width: 64px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: #fff;
  transition: all 0.3s ease;
}
.mic:hover:not(:disabled) { background: rgba(255,255,255,0.15); }
.mic.active {
  background: #fbbf24;
  color: #0b1220;
  border-color: rgba(252, 211, 77, 0.5);
  box-shadow: 0 0 0 8px rgba(251,191,36,0.15);
}
.mic:disabled {
  cursor: not-allowed;
  border-color: rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.35);
}
.mic-svg { width: 24px; height: 24px; position: relative; z-index: 1; }
.mic-ring {
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: 999px;
  display: none;
}
.mic.listening .mic-ring,
.mic.processing .mic-ring { display: block; }
.mic.listening .mic-ring { animation: mic-pulse 1.6s ease-out infinite; }
.mic.processing .mic-ring { animation: mic-pulse 0.9s ease-out infinite; }
.mic-label { font-size: 12px; font-weight: 500; letter-spacing: 0.02em; color: rgba(255,255,255,0.8); }
.spin { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes mic-pulse {
  0% { transform: scale(1); opacity: 0.7; box-shadow: 0 0 0 0 rgba(251,191,36,0.45); }
  70% { transform: scale(1.35); opacity: 0; box-shadow: 0 0 0 18px transparent; }
  100% { transform: scale(1.35); opacity: 0; }
}
.ask {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(0,0,0,0.55);
  padding: 6px;
  backdrop-filter: blur(8px);
}
.ask input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #fff;
  outline: none;
  padding: 8px 12px;
}
.ask input::placeholder { color: rgba(255,255,255,0.35); }
.ask button {
  height: 36px; width: 36px;
  border: 0;
  border-radius: 999px;
  background: #fbbf24;
  color: #0b1220;
  font-weight: 700;
}
.you, .err {
  max-width: 100%;
  font-size: 12px;
  margin: 0;
}
.you { background: rgba(0,0,0,0.45); border-radius: 999px; padding: 4px 12px; color: rgba(255,255,255,0.65); }
.err { color: #fda4af; text-align: center; }

.toast {
  position: fixed;
  left: 50%;
  top: 24px;
  z-index: 50;
  transform: translateX(-50%);
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(0,0,0,0.7);
  padding: 10px 20px;
  font-size: 14px;
  backdrop-filter: blur(12px);
  animation: toast-in 0.35s ease-out;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.hint {
  pointer-events: none;
  position: absolute;
  left: 50%;
  bottom: 10.5rem;
  z-index: 10;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(0,0,0,0.4);
  padding: 4px 12px;
  font-size: 11px;
  color: rgba(255,255,255,0.55);
}

.hidden { display: none !important; }
