:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --text-main: #0f1115;
  --text-sub: #5f6775;
  --text-muted: #97a0af;
  --border: #e5e8ef;
  --black: #050507;

  --radius-xl: 2rem;
  --radius-lg: 1.5rem;
  --radius-md: 1rem;

  --fs-display: clamp(1.95rem, 7.2vw, 2.6rem);
  --fs-headline: clamp(1.35rem, 5.2vw, 1.9rem);
  --fs-title: clamp(1rem, 3.6vw, 1.25rem);
  --fs-body-lg: clamp(0.95rem, 3.4vw, 1rem);
  --fs-body-md: clamp(0.86rem, 3vw, 0.94rem);
  --fs-body-sm: clamp(0.74rem, 2.6vw, 0.82rem);

  --lh-tight: 1.2;
  --lh-normal: 1.5;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

body {
  font-family: "Manrope", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 88% -4%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 45%),
    radial-gradient(circle at 2% 40%, rgba(16, 18, 24, 0.045) 0%, rgba(16, 18, 24, 0) 40%),
    var(--bg);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0.75rem;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

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

.phone-shell {
  width: min(100%, 430px);
  min-height: calc(100dvh - 1.5rem);
  max-height: calc(100dvh - 1.5rem);
  display: flex;
  flex-direction: column;
  border-radius: 2.2rem;
  border: 1px solid #e8ecf2;
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(11, 13, 19, 0.09);
  overflow: hidden;
  position: relative;
}

.page {
  flex: 1;
  overflow-y: auto;
  padding: max(1rem, env(safe-area-inset-top)) 1.25rem calc(1.4rem + env(safe-area-inset-bottom));
  position: relative;
}

.dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(12, 14, 19, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.35;
  pointer-events: none;
}

.icon-btn {
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-main);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.icon-btn:hover {
  background: #eceff4;
}

#homeMenuBtn {
  border-color: #111827;
  background: #111827;
  color: #f8fafc;
}

#homeMenuBtn:hover {
  background: #1f2937;
  border-color: #1f2937;
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.72rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: #2f3a4b;
  font-size: var(--fs-body-sm);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dot-live {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: #ef8288;
  box-shadow: 0 0 0 4px rgba(239, 130, 136, 0.2);
}

.home-logo-wrap {
  text-align: center;
  margin-top: 2.5rem;
}

.logo-tile {
  width: 5.2rem;
  height: 5.2rem;
  margin: 0 auto;
  border-radius: 1.7rem;
  background: linear-gradient(150deg, #050507 0%, #0d1118 65%, #1c212c 100%);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  color: #f5f8ff;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  padding: 0.55rem;
}

.logo-tile::after {
  content: "";
  position: absolute;
  width: 2.6rem;
  height: 2.6rem;
  right: -1rem;
  top: -1rem;
  background: rgba(255, 255, 255, 0.12);
  transform: rotate(45deg);
}

.logo-mark {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 1rem;
  position: relative;
  z-index: 1;
}

.brand-name {
  margin: 1.45rem 0 0;
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-sub {
  margin: 0.5rem 0 0;
  font-size: var(--fs-body-sm);
  letter-spacing: 0.14em;
  color: var(--text-muted);
  font-weight: 800;
  text-transform: uppercase;
}

.home-copy {
  margin: 1.5rem auto 0;
  max-width: 20rem;
  font-size: clamp(0.92rem, 3vw, 1rem);
  line-height: 1.6;
  color: var(--text-sub);
}

.home-copy strong {
  color: #0d1017;
}

.public-stats {
  margin-top: 1.3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.public-stat {
  border: 1px solid var(--border);
  border-radius: 0.95rem;
  background: #f8f9fc;
  padding: 0.72rem 0.76rem;
  text-align: center;
}

.public-stat-label {
  margin: 0;
  color: #8d97a8;
  font-size: 0.74rem;
  font-weight: 700;
}

.public-stat strong {
  margin-top: 0.12rem;
  display: block;
  color: #10141d;
  font-size: clamp(1rem, 4vw, 1.25rem);
  letter-spacing: -0.02em;
}

.main-cta {
  margin-top: 2rem;
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: var(--black);
  color: white;
  padding: 1rem 1.15rem 1rem 1.45rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(8, 9, 14, 0.28);
  font-size: clamp(0.98rem, 3.8vw, 1.18rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.main-cta .arrow {
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  font-weight: 700;
}

.main-cta:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  box-shadow: none;
}

.guard-badge {
  margin-top: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  padding: 0.45rem 0.7rem;
  color: #687287;
  font-size: var(--fs-body-sm);
  font-weight: 700;
}

.guard-badge i {
  color: #3d83f5;
  font-size: 1rem;
}

.roadmap {
  margin-top: 1.55rem;
  position: relative;
}

.roadmap::before {
  content: "";
  position: absolute;
  left: 1.05rem;
  top: 0.9rem;
  bottom: 0.9rem;
  width: 2px;
  border-radius: 999px;
  background: var(--border);
}

.step {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: 0.8rem;
  margin-bottom: 1.05rem;
  align-items: start;
}

.step-num {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.85rem;
  border: 1px solid var(--border);
  background: #fff;
  color: #9ba5b6;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  position: relative;
  z-index: 2;
}

.step-num.active {
  border-color: var(--black);
  background: var(--black);
  color: white;
}

.step h3 {
  margin: 0.1rem 0 0.18rem;
  font-size: var(--fs-title);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.step p {
  margin: 0;
  font-size: var(--fs-body-md);
  color: #6a7384;
  line-height: 1.45;
}

.legal-bridge {
  margin-top: 1rem;
  text-align: center;
  font-size: var(--fs-body-sm);
  color: #8d97a9;
  line-height: 1.5;
}

.footer-links {
  margin-top: 1.15rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem 1rem;
  color: #9aa3b3;
  font-size: var(--fs-body-sm);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 11, 17, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 30;
}

.overlay.open {
  opacity: 1;
  visibility: visible;
}

.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 102%);
  width: min(100%, 430px);
  max-height: min(92dvh, 52rem);
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 1.7rem 1.7rem 0 0;
  background: #fff;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
  box-shadow: 0 -18px 36px rgba(10, 12, 18, 0.16);
  transition: transform 0.25s ease;
  z-index: 40;
}

.sheet.open {
  transform: translate(-50%, 0);
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.sheet h2 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.015em;
}

.form-grid {
  display: grid;
  gap: 0.7rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.32rem;
  font-size: 0.82rem;
  color: #4c5668;
  font-weight: 700;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: #fafbfd;
  color: var(--text-main);
  border-radius: 0.75rem;
  padding: 0.7rem 0.82rem;
  font-size: max(1rem, 16px);
}

.form-textarea {
  min-height: 6.2rem;
  line-height: 1.45;
  resize: vertical;
}

.form-textarea::placeholder {
  color: #8b95a7;
}

.form-check {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  font-size: 0.84rem;
  color: #4d5769;
  line-height: 1.4;
}

.form-check input {
  margin-top: 0.15rem;
}

.subtle-note {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: #7f8899;
  line-height: 1.45;
}

.error-box {
  display: none;
  border-radius: 0.65rem;
  background: #ffeef0;
  color: #a23445;
  font-size: 0.82rem;
  padding: 0.6rem 0.7rem;
}

.error-box.show {
  display: block;
}

.submit-btn {
  border: 0;
  border-radius: 999px;
  background: var(--black);
  color: white;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  padding: 0.86rem;
  cursor: pointer;
}

.submit-btn[disabled] {
  opacity: 0.6;
  cursor: wait;
}

.result-head {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  min-height: 2.8rem;
}

.settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  min-height: 2.8rem;
  margin-bottom: 1rem;
}

.settings-head-pill {
  flex: 0 1 auto;
}

.result-badge {
  margin: 1.15rem auto 1rem;
  width: fit-content;
  border-radius: 999px;
  background: var(--black);
  color: white;
  padding: 0.5rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.result-profile {
  text-align: center;
  margin-top: 0.25rem;
}

.avatar-shell {
  width: clamp(10.5rem, 54vw, 13rem);
  height: clamp(10.5rem, 54vw, 13rem);
  border-radius: 999px;
  border: 1px solid var(--border);
  margin: 0 auto;
  display: grid;
  place-items: center;
  position: relative;
}

.avatar-shell::before {
  content: "";
  position: absolute;
  inset: 0.55rem;
  border-radius: 999px;
  border: 1px solid #ebedf3;
}

.queue-wave-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.queue-wave-layer span {
  position: absolute;
  width: 70%;
  height: 70%;
  border-radius: 999px;
  border: 2px solid rgba(230, 235, 246, 0.48);
  box-shadow: 0 0 24px rgba(10, 14, 24, 0.08);
  animation: queue-wave-burst 2.4s ease-out infinite;
}

.queue-wave-layer span:nth-child(2) {
  animation-delay: 0.8s;
}

.queue-wave-layer span:nth-child(3) {
  animation-delay: 1.6s;
}

.avatar-shell.is-searching {
  border-color: #d8dde7;
  box-shadow: 0 0 0 6px rgba(82, 90, 108, 0.08);
}

.avatar-shell.is-searching::after {
  content: "";
  position: absolute;
  inset: -0.55rem;
  border-radius: 999px;
  border: 2px dashed rgba(130, 138, 154, 0.36);
  animation: queue-radar-spin 4s linear infinite;
}

.avatar-core {
  width: clamp(8.5rem, 44vw, 10.6rem);
  height: clamp(8.5rem, 44vw, 10.6rem);
  border-radius: 999px;
  background: linear-gradient(165deg, #1a1d25 0%, #667083 55%, #c8ced8 100%);
  display: grid;
  place-items: center;
  color: white;
  font-size: clamp(2rem, 9vw, 3rem);
  font-weight: 900;
  letter-spacing: 0.02em;
}

.avatar-shell.is-searching .avatar-core {
  background: linear-gradient(165deg, #10131a 0%, #3a4250 52%, #8d97a8 100%);
  animation: queue-core-pulse 2s ease-in-out infinite;
}

.avatar-core.queue-avatar-mode {
  position: relative;
  overflow: hidden;
  font-size: initial;
}

.queue-avatar-ripple {
  position: absolute;
  inset: 12%;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.32);
  animation: queue-avatar-ripple 1.8s ease-out infinite;
}

.queue-avatar-icon {
  position: relative;
  z-index: 1;
  font-size: clamp(2.5rem, 12vw, 3.4rem);
  line-height: 1;
  font-variation-settings: "FILL" 1;
}

.queue-avatar-label {
  position: absolute;
  bottom: 1.45rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: rgba(246, 249, 255, 0.92);
  background: rgba(5, 8, 15, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.28rem 0.52rem;
  white-space: nowrap;
}

.match-score {
  position: absolute;
  bottom: -0.95rem;
  border-radius: 999px;
  border: 3px solid #fff;
  background: #050507;
  color: #fff;
  padding: 0.45rem 0.7rem;
  display: flex;
  gap: 0.4rem;
  align-items: baseline;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.24);
}

.match-score span {
  font-size: 0.72rem;
  opacity: 0.8;
}

.match-score b {
  font-size: 1.25rem;
  line-height: 1;
}

.result-user {
  margin: 1.5rem 0 0;
  font-size: clamp(1.45rem, 7vw, 2.05rem);
  letter-spacing: -0.03em;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.result-region {
  margin: 0.4rem 0 0;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 700;
}

.quote-card {
  margin-top: 1.45rem;
  border-radius: 1.55rem;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  padding: 1.2rem 1rem;
  text-align: center;
}

.quote-card p {
  margin: 0.5rem 0 0.9rem;
  font-size: clamp(0.95rem, 3.6vw, 1.08rem);
  line-height: 1.5;
  letter-spacing: -0.015em;
  font-weight: 800;
}

.blind-review {
  margin: 0 0 0.85rem;
  display: grid;
  gap: 0.42rem;
}

.blind-review-line {
  margin: 0;
  border: 1px solid #e3e8f0;
  background: #ffffff;
  border-radius: 0.85rem;
  padding: 0.5rem 0.65rem;
  display: grid;
  gap: 0.2rem;
  text-align: left;
}

.blind-review-line strong {
  font-size: 0.7rem;
  color: #7b8799;
  letter-spacing: 0.02em;
}

.blind-review-line span {
  font-size: 0.82rem;
  color: #212a39;
  font-weight: 700;
  line-height: 1.35;
}

.queue-searching {
  margin: 0.2rem 0 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid #dce1ea;
  background: #ffffff;
  border-radius: 999px;
  padding: 0.42rem 0.68rem;
}

.queue-searching-label {
  font-size: 0.76rem;
  color: #6f7b90;
  font-weight: 700;
}

.queue-searching-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.26rem;
}

.queue-searching-dots span {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 999px;
  background: #8f9aab;
  animation: queue-search-bounce 1.1s infinite ease-in-out;
}

.queue-searching-dots span:nth-child(2) {
  animation-delay: 0.12s;
}

.queue-searching-dots span:nth-child(3) {
  animation-delay: 0.24s;
}

@keyframes queue-search-bounce {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  40% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

@keyframes queue-radar-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes queue-core-pulse {
  0%, 100% {
    transform: scale(1);
    filter: saturate(1);
  }
  50% {
    transform: scale(1.03);
    filter: saturate(1.25);
  }
}

@keyframes queue-avatar-ripple {
  0% {
    transform: scale(0.84);
    opacity: 0.9;
  }
  70% {
    transform: scale(1.12);
    opacity: 0.2;
  }
  100% {
    transform: scale(1.18);
    opacity: 0;
  }
}

@keyframes queue-wave-burst {
  0% {
    transform: scale(0.66);
    opacity: 0.75;
  }
  65% {
    opacity: 0.28;
  }
  100% {
    transform: scale(1.22);
    opacity: 0;
  }
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
}

.tag {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 0.36rem 0.7rem;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.primary-open {
  margin-top: 1.4rem;
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: var(--black);
  color: #fff;
  font-size: clamp(0.98rem, 3.8vw, 1.18rem);
  font-weight: 800;
  padding: 0.95rem;
  cursor: pointer;
}

.primary-open:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.queue-cancel {
  margin-top: 0.7rem;
  width: 100%;
  border: 1px solid #1a2536;
  border-radius: 999px;
  background: linear-gradient(145deg, #1b2434 0%, #111722 100%);
  color: #f4f7ff;
  font-size: 0.94rem;
  font-weight: 800;
  padding: 0.9rem;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(13, 18, 28, 0.28);
}

.queue-cancel:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  box-shadow: none;
}

.result-meta {
  margin-top: 0.75rem;
  text-align: center;
  color: #97a0ae;
  font-size: 0.86rem;
  line-height: 1.5;
}

.inline-actions {
  margin-top: 0.85rem;
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.inline-actions button,
.inline-actions a,
.link-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: #3b4558;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

#viewHistoryBtn {
  position: relative;
}

.history-btn-badge {
  position: absolute;
  top: -0.45rem;
  right: -0.4rem;
  min-width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.67rem;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  padding: 0 0.28rem;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
}

.inline-actions button:disabled,
.inline-actions a[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.flag-btn {
  margin-top: 0.55rem;
  border: 0;
  background: transparent;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  color: #c0c7d2;
  font-size: 0.82rem;
  cursor: pointer;
}

.empty-state {
  margin-top: 1rem;
  border-radius: 1rem;
  background: #f6f8fc;
  border: 1px solid var(--border);
  padding: 1rem;
  text-align: center;
}

.result-vibrant {
  background:
    radial-gradient(circle at 8% 8%, rgba(111, 142, 255, 0.18) 0%, rgba(111, 142, 255, 0) 40%),
    radial-gradient(circle at 95% 12%, rgba(255, 149, 111, 0.22) 0%, rgba(255, 149, 111, 0) 44%),
    linear-gradient(180deg, #f4f7ff 0%, #eff4ff 45%, #f9fbff 100%);
}

.result-vibrant .phone-shell {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-color: #dfe6f7;
  box-shadow: 0 20px 44px rgba(73, 90, 142, 0.16);
}

.result-vibrant .page {
  background:
    radial-gradient(circle at 90% -10%, rgba(138, 162, 255, 0.18) 0%, rgba(138, 162, 255, 0) 36%),
    radial-gradient(circle at 12% 106%, rgba(255, 172, 126, 0.2) 0%, rgba(255, 172, 126, 0) 44%);
}

.result-vibrant .pill {
  border-color: #c8d3f6;
  background: #eef3ff;
  color: #3a4f8d;
}

.result-vibrant .result-badge {
  background: linear-gradient(135deg, #3f63ff 0%, #5f83ff 48%, #7c9bff 100%);
  box-shadow: 0 10px 22px rgba(80, 110, 208, 0.34);
}

.result-vibrant .avatar-core {
  background: linear-gradient(165deg, #2744b8 0%, #4f79ea 54%, #7f9eff 100%);
  box-shadow: inset 0 -16px 28px rgba(12, 28, 90, 0.22);
}

.result-vibrant .avatar-shell.is-searching .avatar-core {
  background: linear-gradient(165deg, #1d3ca5 0%, #4f72dc 50%, #86a6ff 100%);
}

.result-vibrant .match-score {
  background: linear-gradient(135deg, #0d193e 0%, #1e2f67 100%);
}

.result-vibrant .quote-card {
  border-color: #d9e2fb;
  background: linear-gradient(180deg, #f5f8ff 0%, #ffffff 100%);
}

.result-vibrant .tag {
  border-color: #ced8f6;
  color: #395090;
  background: #f6f9ff;
}

.result-vibrant .primary-open {
  background: linear-gradient(135deg, #3f63ff 0%, #5d83ff 50%, #82a4ff 100%);
  box-shadow: 0 14px 26px rgba(65, 94, 188, 0.32);
}

.result-vibrant .queue-cancel {
  border-color: #cfd9fb;
  background: linear-gradient(145deg, #f4f7ff 0%, #e6edff 100%);
  color: #314374;
  box-shadow: 0 10px 20px rgba(59, 85, 146, 0.18);
}

.result-vibrant .result-region {
  color: #5f6f93;
}

.result-vibrant .result-meta {
  color: #6f7f9f;
}

.celebration-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 40;
}

.confetti-piece {
  position: absolute;
  top: -8%;
  width: 0.46rem;
  height: 0.9rem;
  border-radius: 0.2rem;
  background: linear-gradient(180deg, #ff9f69 0%, #ff6f99 100%);
  animation: confetti-fall 1.6s ease-in forwards;
}

.confetti-piece:nth-child(3n) {
  background: linear-gradient(180deg, #58c5ff 0%, #3b6dff 100%);
}

.confetti-piece:nth-child(4n) {
  background: linear-gradient(180deg, #92e36f 0%, #57be6f 100%);
}

@keyframes confetti-fall {
  0% {
    transform: translate3d(0, -4vh, 0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translate3d(-20px, 108vh, 0) rotate(640deg);
    opacity: 0;
  }
}

.dark-page {
  background: #020203;
  color: #f4f6fa;
}

.dark-page .phone-shell {
  background: #050507;
  border-color: #171b23;
}

.dark-page .page {
  background: linear-gradient(180deg, #080a0f 0%, #030406 40%, #000 100%);
}

.dark-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.8rem;
}

.dark-title {
  margin: 0;
  color: var(--text-main);
  font-size: clamp(1.45rem, 5.6vw, 1.85rem);
  letter-spacing: -0.03em;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.dark-card {
  margin-top: 0.9rem;
  border-radius: 1.15rem;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  padding: 0.8rem;
}

.dark-info {
  display: flex;
  gap: 0.5rem;
  color: var(--text-sub);
  font-size: 0.84rem;
  line-height: 1.5;
}

.dark-info strong {
  color: var(--text-main);
}

.section-title {
  margin: 1.15rem 0.25rem 0.6rem;
  color: #667085;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.history-list {
  display: grid;
  gap: 0.78rem;
}

.history-empty-note {
  margin: 0;
  color: var(--text-muted);
}

.waitlist-banner-title {
  margin: 0;
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 800;
}

.waitlist-banner-desc {
  margin: 0.28rem 0 0;
  color: var(--text-sub);
  font-size: 0.8rem;
  line-height: 1.45;
}

.history-card {
  border-radius: 1.15rem;
  border: 1px solid var(--border);
  background: #ffffff;
  padding: 0.8rem;
}

.history-top {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: flex-start;
}

.history-user {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.history-avatar {
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 999px;
  background: linear-gradient(140deg, #e7edf8 0%, #d9e3f3 100%);
  color: #1b2a42;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 900;
}

.history-user h4 {
  margin: 0;
  font-size: 0.98rem;
  letter-spacing: -0.015em;
}

.history-user p {
  margin: 0.2rem 0 0;
  color: var(--text-sub);
  font-size: 0.75rem;
}

.timer-pill {
  border-radius: 999px;
  background: #eef2f8;
  color: #3e4e67;
  padding: 0.33rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.history-bottom {
  margin-top: 0.65rem;
  border-top: 1px solid var(--border);
  padding-top: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-text {
  color: #667085;
  font-size: 0.84rem;
  font-weight: 700;
}

.history-action-row {
  margin-top: 0.55rem;
}

.history-open-btn {
  width: 100%;
  border: 1px solid #d7dfec;
  border-radius: 999px;
  background: #f8fafd;
  color: #30435f;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.52rem 0.78rem;
  cursor: pointer;
}

.history-open-btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.switch {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #667085;
  font-size: 0.84rem;
}

.switch input {
  appearance: none;
  width: 3rem;
  height: 1.72rem;
  border-radius: 999px;
  background: #d7dfec;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}

.switch input::after {
  content: "";
  width: 1.22rem;
  height: 1.22rem;
  border-radius: 999px;
  background: #ffffff;
  position: absolute;
  left: 0.25rem;
  top: 0.25rem;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.2);
}

.switch input:checked {
  background: #9eb1cf;
}

.switch input:checked::after {
  transform: translateX(1.28rem);
  background: #f8fbff;
}

.completed-list .history-card {
  background: #f7f9fc;
  opacity: 1;
}

.completed-pill {
  border-radius: 999px;
  background: #e8eef8;
  color: #556886;
  padding: 0.3rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 800;
}

.bottom-dock {
  position: sticky;
  bottom: -1px;
  margin-top: 1rem;
  padding-top: 0.8rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #ffffff 35%, #ffffff 100%);
}

.bottom-note {
  margin: 0 0 0.55rem;
  text-align: center;
  color: #7a8798;
  font-size: 0.84rem;
}

.find-btn {
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: #f4f5f7;
  color: #090a0d;
  padding: 0.9rem;
  font-size: clamp(1rem, 4.4vw, 1.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  cursor: pointer;
}

.main-cta,
.submit-btn,
.primary-open,
.find-btn {
  min-height: 3rem;
  line-height: 1.2;
}

.hide {
  display: none !important;
}

@media (max-width: 767px) {
  body {
    padding: 0;
    background: var(--surface);
  }

  .phone-shell {
    width: 100%;
    min-height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .page {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (max-width: 360px) {
  .page {
    padding-left: 0.86rem;
    padding-right: 0.86rem;
  }

  .home-copy {
    font-size: 0.92rem;
  }

  .main-cta {
    font-size: 0.95rem;
  }

  .result-user {
    font-size: 1.4rem;
  }

  .quote-card p {
    font-size: 0.92rem;
  }
}
