* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  background: #070b14;
  color: #e8efff;
}

.dna-app {
  min-height: 100vh;
}

.dna-top-nav {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.65rem 0 0;
}

.btn--nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
  text-decoration: none;
}

a.btn--nav {
  color: inherit;
}

.screen {
  display: none;
  min-height: 100vh;
  padding: 1.2rem;
}

.screen--active {
  display: block;
}

.mesh-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(31, 135, 255, 0.2), transparent 35%),
    radial-gradient(circle at 80% 30%, rgba(112, 60, 255, 0.2), transparent 35%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 14px);
  pointer-events: none;
}

.landing-content {
  position: relative;
  max-width: 640px;
  margin: 12vh auto 0;
  text-align: center;
}

.eyebrow {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8fc7ff;
  font-size: 0.75rem;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin: 0.4rem 0 0.9rem;
}

.sub {
  color: #b9cae8;
  line-height: 1.5;
  margin-bottom: 1.3rem;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  font-weight: 700;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn--primary {
  background: linear-gradient(135deg, #2196f3, #7853ff);
  color: #fff;
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.07);
  color: #d7e3ff;
}

.disclaimer {
  font-size: 0.82rem;
  color: #9eb1d4;
  margin-top: 1rem;
}

.privacy-callout {
  font-size: 0.89rem;
  line-height: 1.45;
  color: #cfe0ff;
  background: rgba(33, 150, 243, 0.12);
  border: 1px solid rgba(121, 187, 255, 0.35);
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  margin: 0 0 1.2rem;
  text-align: left;
}

.privacy-callout strong {
  color: #8fd8ff;
}

.scan-privacy-banner {
  font-size: 0.82rem;
  line-height: 1.45;
  color: #aec8eb;
  max-width: 760px;
  margin: 0 auto 0.65rem;
  padding: 0.55rem 0.85rem;
  border-radius: 0.65rem;
  background: rgba(16, 40, 80, 0.45);
  border: 1px solid rgba(120, 180, 255, 0.22);
}

.freeze-review {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(3, 6, 12, 0.82);
  backdrop-filter: blur(6px);
}

.freeze-review.hidden {
  display: none !important;
}

.freeze-review__panel {
  max-width: min(420px, 100%);
  background: rgba(14, 22, 42, 0.98);
  border: 1px solid rgba(130, 200, 255, 0.35);
  border-radius: 1rem;
  padding: 1.1rem 1.15rem 1.25rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.freeze-review__title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: #dbe9ff;
}

.freeze-review__privacy {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  line-height: 1.47;
  color: #aabfe0;
}

.freeze-review__canvas-wrap {
  width: 100%;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #02050b;
  margin-bottom: 1rem;
  border: 1px solid rgba(100, 170, 255, 0.25);
}

#freeze-review-canvas {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

#freeze-review-ok {
  width: 100%;
}

.scan-header,
.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.scan-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.result-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dob-fieldset {
  margin: 0.8rem 0 1rem;
  padding: 0;
  border: 0;
  min-width: 0;
}

.dob-legend {
  padding: 0;
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #dfe9ff;
}

.dob-gate-row .dob-dropdown-row,
.dob-gate-row .tarot-dob-dropdown-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
  flex: 1 1 100%;
  width: 100%;
  min-width: min(100%, 22rem);
}

.dob-dropdown-part {
  flex: 1 1 calc(33.33% - 6px);
  min-width: 6.5rem;
  width: auto;
  max-width: 100%;
  min-height: 48px;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(143, 199, 255, 0.35);
  background: rgba(8, 14, 28, 0.85);
  color: #e8efff;
  font-size: 0.95rem;
  box-sizing: border-box;
  cursor: pointer;
  display: block;
  -webkit-appearance: menulist;
  appearance: auto;
}

.dob-dropdown-part:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.dob-gate-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.6rem;
  max-width: 100%;
  width: 100%;
}

.dob-slots-group {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.35rem;
}

.btn--compact {
  padding-left: 1rem;
  padding-right: 1rem;
  white-space: nowrap;
}

.dob-slot-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  margin: 0;
}

.dob-slot-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8eb4e8;
}

.dob-slot {
  appearance: none;
  display: block;
  box-sizing: border-box;
  min-height: 2.75rem;
  margin: 0;
  padding: 0.45rem 0.35rem;
  text-align: center;
  background: #0f1626;
  color: #e8efff;
  border: 1px solid rgba(143, 199, 255, 0.35);
  border-radius: 0.65rem;
  font-size: 1.12rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.dob-slot:focus {
  outline: 2px solid rgba(84, 229, 255, 0.55);
  outline-offset: 1px;
  border-color: rgba(143, 199, 255, 0.65);
}

.dob-slot:hover {
  border-color: rgba(143, 199, 255, 0.5);
}

.dob-slot::placeholder {
  color: rgba(158, 189, 226, 0.45);
  font-weight: 500;
}

.dob-slot--2 {
  width: 3rem;
}

.dob-slot--year {
  width: 5.25rem;
}

.dob-separator {
  align-self: center;
  padding: 1.35rem 0.05rem 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: rgba(143, 199, 255, 0.55);
}

.dob-hint {
  margin: 0;
  margin-top: 0.45rem;
  font-size: 0.8rem;
  color: #9db6dd;
  line-height: 1.35;
}

.hidden {
  display: none !important;
}

.scanner-wrap {
  position: relative;
  width: min(100%, 760px);
  margin: 0 auto;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  overflow: hidden;
  background: #02050b;
}

#camera-video,
#overlay-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner-wrap.fit-contain #camera-video,
.scanner-wrap.fit-contain #overlay-canvas {
  object-fit: contain;
}

.scanner-wrap.fit-contain #camera-video {
  background: #02050b;
}

#overlay-canvas {
  pointer-events: none;
}

.scanner-wrap.fit-contain .scanner-oval {
  width: min(64.4vw, 420px);
  height: min(86.8vw, 546px);
}

.scanner-oval {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(86.8vw, 462px);
  height: min(109.2vw, 588px);
  --guide-eye-y: 34%;
  --guide-eye-width: 72%;
  --guide-nose-y: 44%;
  --guide-nose-height: 24%;
  --guide-chin-y: 89%;
  --guide-chin-width: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(121, 213, 255, 0.85);
  border-radius: 50% / 48%;
  box-shadow: 0 0 24px rgba(36, 160, 255, 0.3);
}

.guide {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(123, 228, 255, 0.68);
}

.guide--eyes {
  top: var(--guide-eye-y);
  width: var(--guide-eye-width);
  height: 2px;
}

.guide--nose {
  top: var(--guide-nose-y);
  width: 2px;
  height: var(--guide-nose-height);
}

.guide--chin {
  top: var(--guide-chin-y);
  width: var(--guide-chin-width);
  height: 2px;
}

.scan-laser {
  position: absolute;
  inset: 8% 12%;
  border-radius: 50% / 47%;
  overflow: hidden;
  pointer-events: none;
}

.scan-laser::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.85), transparent);
  animation: scanline 2s linear infinite;
}

@keyframes scanline {
  from {
    top: 6%;
  }
  to {
    top: 92%;
  }
}

.scan-status {
  max-width: 760px;
  margin: 0.9rem auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.card {
  background: rgba(18, 29, 52, 0.7);
  border: 1px solid rgba(138, 188, 255, 0.25);
  border-radius: 0.9rem;
  padding: 0.95rem;
}

.cuteness-rubric {
  border-color: rgba(255, 180, 220, 0.4);
  background: linear-gradient(180deg, rgba(38, 22, 56, 0.78), rgba(20, 14, 40, 0.78));
}

.cuteness-rubric h3 {
  color: #ffd6ec;
}

.cuteness-rubric-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.45rem 0.85rem;
}

.cuteness-rubric-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.45rem 0.7rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 180, 220, 0.18);
  border-radius: 0.6rem;
}

.cuteness-rubric-range {
  font-family: "Cinzel", "Times New Roman", serif;
  font-weight: 700;
  color: #ffe1f1;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.cuteness-rubric-label {
  font-size: 0.9rem;
  color: #f1e3ff;
  text-align: right;
}

.bar-row {
  margin-bottom: 0.6rem;
}

.bar-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  margin-bottom: 0.3rem;
  color: #c8daf7;
}

.bar-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #21b4ff, #7c4dff);
}

.pseudo-dna-cuteness-index {
  margin: 0.1rem 0 0.45rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(200, 218, 247, 0.92);
}

.gauge-wrap {
  display: grid;
  place-items: center;
}

.gauge {
  width: 140px;
  height: 140px;
}

.gauge-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 10;
}

.gauge-fill {
  fill: none;
  stroke: #24ccff;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 302;
  stroke-dashoffset: 302;
  transform: rotate(-90deg);
  transform-origin: 60px 60px;
  transition: stroke-dashoffset 0.5s ease;
}

.gauge-label {
  margin-top: -86px;
  font-size: 1.4rem;
  font-weight: 800;
}

.result-actions {
  margin-top: 0.9rem;
}

