:root {
  --c2-bg: #160a11;
  --c2-panel: #1c1017;
  --c2-accent: #de0d79;
  --c2-accent-text: #f43e9c;
  --c2-accent-soft: rgba(222, 13, 121, .22);
  --c2-accent-glow: rgba(222, 13, 121, .55);
  --c2-violet: #8a3ffb;
  --c2-text: #fff;
  --c2-dim: rgba(255, 255, 255, .72);
  --c2-dim2: rgba(255, 255, 255, .5);
  --c2-line: rgba(255, 255, 255, .12);
  --c2-e: cubic-bezier(.22, .61, .36, 1);
  --c2-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

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

.c2-shell {
  position: fixed; inset: 0; z-index: 1;
  height: 100dvh;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  isolation: isolate; overflow: hidden;
  background:
    radial-gradient(680px 680px at 4% -12%, rgba(255, 45, 126, .42), transparent 60%),
    radial-gradient(720px 720px at 106% 0%, rgba(138, 63, 251, .40), transparent 60%),
    radial-gradient(620px 620px at 52% 118%, rgba(255, 111, 174, .26), transparent 60%),
    var(--c2-bg);
}

.c2-top {
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  align-items: center; gap: 18px;
  padding: calc(14px + env(safe-area-inset-top)) clamp(16px, 3.5vw, 44px) 6px;
  z-index: 20;
}
.c2-logo { display: flex; align-items: center; }
.c2-logo img { height: 30px; width: auto; display: block; }

.c2-progress {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
  max-width: 620px; width: 100%; justify-self: end;
}
.c2-stage { display: grid; gap: 8px; justify-items: center; }
.c2-stage-label { font-size: .86rem; font-weight: 500; color: var(--c2-dim2); transition: .25s; }
.c2-stage.is-active .c2-stage-label { color: var(--c2-text); font-weight: 700; }
.c2-stage.is-done .c2-stage-label { color: var(--c2-dim); }
.c2-track { height: 4px; width: 100%; background: var(--c2-line); border-radius: 99px; overflow: hidden; }
.c2-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--c2-violet), var(--c2-accent) 60%, var(--c2-accent-text));
  box-shadow: 0 0 12px var(--c2-accent-glow);
  transition: width .48s var(--c2-e);
}

.c2-screen {
  min-height: 0; position: relative;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; align-content: center;
}
.c2-head { text-align: center; padding: 4px 18px 0; z-index: 10; }
.c2-count { font-size: .88rem; font-weight: 600; color: var(--c2-accent-text); font-variant-numeric: tabular-nums; }
.c2-head h1 {
  font-weight: 700; font-size: clamp(1.7rem, 4vw, 2.6rem);
  letter-spacing: -.01em; margin: .2em 0 0; line-height: 1.05; text-wrap: balance;
}
.c2-head p { margin: 8px 0 0; color: var(--c2-dim); font-size: .88rem; min-height: 1.1em; }

.c2-area {
  position: relative; width: 100%; height: min(64vh, 600px);
  display: grid; place-items: center; overflow: hidden; touch-action: pan-y;
}
.c2-floor {
  position: absolute; left: 0; right: 0; bottom: 0; height: 34%; pointer-events: none; z-index: 0;
  background: linear-gradient(180deg, transparent, rgba(222, 13, 121, .12) 30%, rgba(60, 10, 40, .4) 62%, transparent);
}
.c2-carousel {
  position: relative; height: min(56vh, 520px); aspect-ratio: 3 / 4;
  perspective: 1600px; transform-style: preserve-3d; outline: none; z-index: 1;
  transform: translateY(-4%);
}
.c2-carousel.is-tall { aspect-ratio: 9 / 16; }

.c2-card {
  position: absolute; inset: 0; padding: 0; border-radius: 22px;
  border: 2px solid transparent; overflow: visible;
  will-change: transform, filter, opacity;
  transition: transform .55s var(--c2-e), opacity .45s var(--c2-e), filter .45s var(--c2-e), box-shadow .45s var(--c2-e), border-color .3s;
  -webkit-box-reflect: below 10px linear-gradient(transparent 74%, rgba(255, 255, 255, .15));
}
.c2-card.is-hidden { pointer-events: none; }
.c2-card-inner {
  position: absolute; inset: 0; border-radius: 20px; overflow: hidden;
  box-shadow: 0 34px 70px -28px rgba(0, 0, 0, .95);
  background: var(--c2-panel);
}
.c2-card-art { position: absolute; inset: 0; overflow: hidden; filter: saturate(.85); transition: filter .45s var(--c2-e); }
.c2-card.is-center .c2-card-art { filter: saturate(1); }
.c2-card-art video, .c2-card-art img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  background: var(--c2-panel);
}
.c2-card-inner::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, transparent 52%, rgba(10, 6, 9, .92) 100%);
}
.c2-card-inner::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, .07), transparent 42%, rgba(222, 13, 121, .06));
}
.c2-card-label {
  position: absolute; z-index: 4; left: 14px; right: 14px; bottom: 20px; text-align: center;
  font-size: 1.05rem; font-weight: 600; color: var(--c2-text);
  text-shadow: 0 2px 14px rgba(0, 0, 0, .9);
  transition: font-size .3s var(--c2-e);
}
.c2-card.is-center .c2-card-label { font-size: 1.4rem; font-weight: 700; }
.c2-card-sub {
  display: block; margin-top: 5px; font-size: .68rem; font-weight: 500;
  color: var(--c2-accent-text); letter-spacing: .08em; text-transform: uppercase;
}
.c2-card.is-selected { border-color: var(--c2-accent); box-shadow: 0 0 0 1px var(--c2-accent-soft), 0 0 38px var(--c2-accent-soft), 0 0 90px rgba(222, 13, 121, .16); }
.c2-card-check {
  position: absolute; z-index: 5; top: 16px; right: 16px; width: 38px; height: 38px; border-radius: 50%;
  background: var(--c2-accent); color: #fff;
  display: none; place-items: center; font-size: 19px; font-weight: 900;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
.c2-card.is-selected .c2-card-check { display: grid; }

.c2-text-art {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 12%;
  background:
    radial-gradient(70% 55% at 50% 25%, var(--c2-accent-soft), transparent 70%),
    linear-gradient(160deg, #2a1220, #150a12);
}
.c2-text-art span {
  font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -.02em;
  text-align: center; line-height: 1.05; text-wrap: balance;
  background: linear-gradient(90deg, #fff, var(--c2-accent-text));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.c2-arrow {
  position: absolute; top: 46%; transform: translateY(-50%);
  width: 50px; height: 50px; border-radius: 50%;
  border: 1px solid var(--c2-line); background: rgba(22, 10, 17, .7);
  color: var(--c2-text); font-size: 26px; line-height: 1;
  display: grid; place-items: center; z-index: 140; transition: .22s var(--c2-e);
}
.c2-arrow:hover { border-color: var(--c2-accent); background: var(--c2-accent-soft); }
.c2-arrow:disabled { opacity: .25; cursor: default; }
.c2-prev { left: clamp(10px, 3vw, 44px); }
.c2-next { right: clamp(10px, 3vw, 44px); }

.c2-dots {
  display: flex; justify-content: center; align-items: center; gap: 8px;
  padding: 14px 16px 0; min-height: 30px; z-index: 10; flex-wrap: wrap;
}
.c2-dot { width: 7px; height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .25); transition: width .3s var(--c2-e), background .3s; }
.c2-dot.is-active { width: 26px; background: var(--c2-accent); box-shadow: 0 0 12px var(--c2-accent-glow); }

.c2-age { align-self: center; justify-self: center; width: min(620px, 88vw); text-align: center; padding: 20px; }
.c2-age-number { font-size: clamp(4.5rem, 13vw, 9rem); font-weight: 800; line-height: .9; letter-spacing: -.03em; }
.c2-age-unit { text-transform: uppercase; letter-spacing: .26em; color: var(--c2-dim); font-size: .76rem; margin-top: 12px; }
.c2-range {
  width: 100%; margin-top: 46px; appearance: none; -webkit-appearance: none;
  height: 4px; border-radius: 999px; outline: none;
  background: linear-gradient(90deg, var(--c2-accent) var(--c2-pct, 0%), var(--c2-line) var(--c2-pct, 0%));
}
.c2-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--c2-accent); border: 5px solid #24111c;
  box-shadow: 0 0 0 1px var(--c2-accent-soft), 0 0 18px var(--c2-accent-glow); cursor: pointer;
}
.c2-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--c2-accent); border: 5px solid #24111c; cursor: pointer; }
.c2-range-labels { display: flex; justify-content: space-between; color: var(--c2-dim); font-size: .76rem; margin-top: 12px; font-variant-numeric: tabular-nums; }

.c2-final { align-self: stretch; justify-self: center; width: min(780px, 92vw); overflow: auto; padding: 8px 20px 20px; max-height: min(60vh, 620px); }
.c2-name {
  display: block; width: min(560px, 92%); margin: 6px auto 30px;
  border: 0; border-bottom: 1px solid var(--c2-accent); background: transparent;
  color: var(--c2-text); text-align: center; font-weight: 700;
  font-size: clamp(1.9rem, 5vw, 3rem); padding: 10px 4px 14px; outline: none;
}
.c2-name::placeholder { color: rgba(255, 255, 255, .3); }
.c2-name:focus { border-bottom-color: var(--c2-accent-text); box-shadow: 0 8px 24px -18px var(--c2-accent); }
.c2-name.is-invalid { border-bottom-color: #ff4d6d; }
.c2-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; border-top: 1px solid var(--c2-line); }
.c2-row { display: grid; grid-template-columns: minmax(110px, .85fr) 1.15fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--c2-line); font-size: .9rem; }
.c2-key { color: var(--c2-dim); }
.c2-value { color: var(--c2-text); font-weight: 600; text-align: right; }

.c2-bottom {
  display: grid; grid-template-columns: 1fr minmax(220px, 460px); align-items: center; gap: 16px;
  padding: 14px clamp(16px, 3.5vw, 44px) calc(20px + env(safe-area-inset-bottom));
  z-index: 20;
}
.c2-bottom-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.c2-ghost-btn {
  display: inline-flex; align-items: center; gap: 11px;
  border: 1px solid var(--c2-line); border-radius: 999px; padding: 13px 24px;
  color: var(--c2-dim); font-weight: 500; transition: .22s var(--c2-e);
}
.c2-ghost-btn:hover { color: var(--c2-text); border-color: var(--c2-accent); }
.c2-ghost-btn[hidden] { display: none; }
.c2-ghost-btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.c2-back-glyph { font-size: 22px; line-height: 1; margin-top: -2px; }
.c2-primary-btn {
  justify-self: end; width: min(100%, 460px); min-height: 60px; border-radius: 999px;
  background: var(--c2-accent); color: #fff; font-weight: 700; font-size: 1.12rem;
  display: grid; place-items: center;
  box-shadow: inset 0 0 16px 1px rgba(222, 13, 121, .5), inset 0 0 4px rgba(222, 13, 121, .65);
  transition: transform .22s var(--c2-e), box-shadow .22s, opacity .22s;
}
.c2-primary-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: inset 0 0 16px 1px rgba(222, 13, 121, .5), inset 0 0 4px rgba(222, 13, 121, .65), 0 0 16px 1px var(--c2-accent-glow);
}
.c2-primary-btn:disabled { opacity: .35; cursor: not-allowed; transform: none; }

.c2-screen.forward .c2-head, .c2-screen.forward .c2-area, .c2-screen.forward .c2-age, .c2-screen.forward .c2-final { animation: c2-in-fwd .5s var(--c2-e); }
.c2-screen.backward .c2-head, .c2-screen.backward .c2-area, .c2-screen.backward .c2-age, .c2-screen.backward .c2-final { animation: c2-in-back .5s var(--c2-e); }
@keyframes c2-in-fwd { 0% { opacity: 0; transform: translateX(46px); } to { opacity: 1; transform: translateX(0); } }
@keyframes c2-in-back { 0% { opacity: 0; transform: translateX(-46px); } to { opacity: 1; transform: translateX(0); } }

.co-overlay {
  position: fixed; inset: 0; z-index: 9999; display: none; flex-direction: column;
  align-items: center; justify-content: center; gap: 22px; padding: 24px;
  background: rgba(10, 8, 18, .82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .25s ease;
}
.co-overlay.co-show { opacity: 1; }
.co-spinner {
  width: 56px; height: 56px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .15); border-top-color: var(--c2-accent); border-right-color: var(--c2-violet);
  animation: co-spin .9s linear infinite;
}
.co-title { margin: 0; font-size: 20px; font-weight: 600; color: #fff; text-align: center; }
.co-msg { margin: 0; min-height: 20px; font-size: 15px; color: var(--c2-dim); text-align: center; transition: opacity .35s ease; }
.co-msg.co-fade { opacity: 0; }
@keyframes co-spin { to { transform: rotate(360deg); } }
.co-toast {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 9998;
  max-width: 88%; margin: 0; padding: 11px 18px; border-radius: 12px;
  background: rgba(40, 12, 20, .94); border: 1px solid rgba(255, 107, 138, .55);
  color: #ff8fa3; font-size: 13px; font-weight: 500; text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
}
.co-toast a { margin-left: 8px; color: #fff; text-decoration: underline; }

@media (max-width: 860px) {
  .c2-top { grid-template-columns: 1fr; gap: 10px 12px; padding: calc(10px + env(safe-area-inset-top)) 12px 4px; }
  .c2-logo img { height: 24px; }
  .c2-progress { grid-column: 1 / -1; max-width: none; justify-self: stretch; gap: 10px; }
  .c2-stage-label { font-size: .74rem; }
  .c2-area { height: min(52vh, 440px); }
  .c2-carousel { height: min(46vh, 400px); }
  .c2-arrow { width: 40px; height: 40px; font-size: 22px; }
  .c2-card.is-center .c2-card-label { font-size: 1.1rem; }
  .c2-bottom { grid-template-columns: 1fr minmax(150px, 52vw); padding: 10px 12px calc(14px + env(safe-area-inset-bottom)); }
  .c2-primary-btn { min-height: 52px; font-size: 1rem; }
  .c2-ghost-btn { padding: 11px 14px; font-size: .9rem; gap: 8px; }
  .c2-btn-text { display: none; }
  .c2-summary { grid-template-columns: 1fr; }
}
@media (max-height: 760px) {
  .c2-area { height: min(48vh, 400px); }
  .c2-carousel { height: min(42vh, 360px); }
  .c2-head h1 { font-size: clamp(1.4rem, 3.4vw, 2rem); }
}
@media (prefers-reduced-motion: reduce) {
  .c2-shell *, .c2-shell *::before, .c2-shell *::after { animation: none !important; transition: none !important; }
}
