@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500&display=swap');

:root {
  --ink: #212038;
  --muted: #69687a;
  --paper: #f8f4ef;
  --paper-strong: #fffdfa;
  --lilac: #dcd5ec;
  --lilac-deep: #756a9d;
  --line: rgba(41, 37, 64, .12);
  --shadow: 0 18px 60px rgba(49, 42, 83, .10);
  --radius: 26px;
  font-family: Manrope, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body { margin: 0; min-width: 320px; min-height: 100%; overflow-x: hidden; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #806cc5; outline-offset: 3px; }
a { color: inherit; }

.page {
  width: min(100%, 760px); min-height: 100svh; margin: 0 auto; padding: max(22px, env(safe-area-inset-top)) clamp(18px, 5vw, 42px) max(30px, env(safe-area-inset-bottom));
  position: relative; isolation: isolate;
}
.page::before { content: ""; position: fixed; inset: 0; z-index: -2; background: radial-gradient(circle at 80% 10%, rgba(202,191,238,.45), transparent 32rem), radial-gradient(circle at 5% 90%, rgba(236,211,183,.45), transparent 24rem), var(--paper); }
.theme-air::before { background: radial-gradient(circle at 72% 10%, #d8edf3, transparent 32rem), radial-gradient(circle at 2% 92%, #e9e4f4, transparent 30rem), var(--paper); }
.theme-water::before { background: radial-gradient(circle at 72% 10%, #bad5de, transparent 32rem), radial-gradient(circle at 2% 92%, #dce5ed, transparent 30rem), var(--paper); }
.theme-fire::before { background: radial-gradient(circle at 72% 10%, #f2d1b4, transparent 32rem), radial-gradient(circle at 2% 92%, #ecd3dd, transparent 30rem), var(--paper); }
.theme-earth::before { background: radial-gradient(circle at 72% 10%, #dce1bf, transparent 32rem), radial-gradient(circle at 2% 92%, #ebdcc5, transparent 30rem), var(--paper); }

.brand-row { display: flex; justify-content: space-between; align-items: center; min-height: 33px; margin-bottom: clamp(36px, 8vh, 70px); }
.brand { color: #34304d; font: 500 11px/1 "DM Mono", monospace; letter-spacing: .13em; text-transform: uppercase; text-decoration: none; }
.brand-mark { color: var(--lilac-deep); font-size: 16px; vertical-align: -1px; }
.quiet-button, .icon-button { border: 0; background: transparent; color: var(--muted); font-size: 12px; padding: 8px 0; }
.icon-button { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.65); border: 1px solid var(--line); }

.hero { padding: clamp(24px, 7vh, 86px) 0 30px; }
.eyebrow { color: var(--lilac-deep); font: 500 10px/1.5 "DM Mono", monospace; letter-spacing: .13em; text-transform: uppercase; margin: 0 0 14px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: "Playfair Display", Georgia, serif; font-weight: 600; letter-spacing: -.045em; }
h1 { max-width: 650px; font-size: clamp(45px, 13vw, 84px); line-height: .93; margin-bottom: 23px; }
h2 { font-size: clamp(32px, 8.8vw, 54px); line-height: 1.02; margin-bottom: 19px; }
h3 { font-size: 17px; line-height: 1.35; margin-bottom: 7px; }
.lead { max-width: 630px; font-family: "Playfair Display", Georgia, serif; font-size: clamp(22px, 5vw, 29px); line-height: 1.18; letter-spacing: -.025em; margin-bottom: 35px; }
.body-copy { color: #4e4c62; font-size: 15px; line-height: 1.7; max-width: 630px; }
.body-copy + .body-copy { margin-top: 15px; }
.body-copy strong { color: var(--ink); }
.display-copy { color: #4e4c62; font-family: "Playfair Display", Georgia, serif; font-size: 20px; line-height: 1.34; max-width: 600px; }

.statement { margin: 48px 0 37px; padding: 23px 0 0 21px; border-left: 1px solid #aa9ed1; font: italic 500 21px/1.28 "Playfair Display", Georgia, serif; max-width: 580px; }
.fine-print { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 19px 0 0; }
.footer-note { color: #807d8d; font-size: 11px; line-height: 1.5; text-align: center; padding: 42px 10px 8px; }

.button { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: 54px; padding: 14px 20px; border: 1px solid transparent; border-radius: 999px; background: #2c2945; color: white; font-size: 14px; font-weight: 700; line-height: 1.1; text-decoration: none; box-shadow: 0 8px 20px rgba(39,35,67,.16); transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.button:hover { transform: translateY(-2px); background: #403a65; box-shadow: 0 12px 27px rgba(39,35,67,.19); }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.button.full { width: 100%; }
.button.secondary { color: #3f3a5d; border-color: #b9b0d0; background: rgba(255,255,255,.68); box-shadow: none; }
.button.text { color: #4c456c; background: none; border: 0; min-height: auto; padding: 9px 0; box-shadow: none; border-radius: 0; text-decoration: underline; text-underline-offset: 3px; }
.button.small { min-height: 43px; font-size: 12px; padding: 11px 15px; }
.action-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 31px; }

.field-row { display: grid; grid-template-columns: 1fr 1.25fr; gap: 11px; max-width: 410px; margin: 31px 0 9px; }
.input-label { color: #555269; font-size: 12px; font-weight: 700; margin-bottom: 6px; display: block; }
.input { width: 100%; height: 59px; padding: 0 16px; color: var(--ink); border: 1px solid rgba(75,69,103,.2); border-radius: 16px; background: rgba(255,255,255,.75); font-size: 17px; transition: border .2s, box-shadow .2s; }
.input:focus { border-color: #887bb7; box-shadow: 0 0 0 4px rgba(136,123,183,.14); outline: none; }
.form-error { color: #a3314d; font-size: 12px; margin-top: 10px; }

.sign-stage { min-height: 64svh; display: flex; flex-direction: column; justify-content: center; padding-bottom: 20px; }
.sign-symbol { color: #695b92; font: 500 clamp(72px, 20vw, 120px)/.9 Georgia, serif; margin: 0 0 22px; }
.sign-chip { display: inline-flex; align-items: center; width: fit-content; padding: 8px 11px; border: 1px solid rgba(109,94,155,.25); background: rgba(255,255,255,.6); border-radius: 99px; color: #655780; font: 500 10px/1 "DM Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }

.progress-wrap { margin-bottom: 28px; }
.progress-meta { display: flex; justify-content: space-between; color: #6b687b; font: 500 10px/1 "DM Mono", monospace; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 9px; }
.progress { overflow: hidden; height: 3px; border-radius: 9px; background: rgba(57,50,86,.12); }
.progress > span { display: block; height: 100%; background: #7b6eaa; border-radius: inherit; transition: width .45s cubic-bezier(.16,1,.3,1); }
.question-heading { margin-bottom: 28px; }
.question-heading h2 { max-width: 610px; margin-bottom: 11px; }
.question-subtitle { color: #5c596e; font-size: 14px; line-height: 1.55; margin-bottom: 0; }
.ranking-hint { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 15px; padding: 8px 11px; border-radius: 10px; color: #615884; background: rgba(218,211,237,.58); font-size: 11px; font-weight: 700; }

.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.choice { position: relative; overflow: hidden; min-height: 215px; padding: 0; text-align: left; border: 1px solid rgba(45,40,69,.13); border-radius: 18px; background: var(--paper-strong); color: var(--ink); box-shadow: 0 5px 16px rgba(45,40,69,.04); transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease; }
.choice:hover { box-shadow: var(--shadow); border-color: rgba(102,87,158,.4); }
.choice.selected { border-color: #7767a6; box-shadow: 0 0 0 3px rgba(119,103,166,.13), var(--shadow); }
.choice.selected-other { opacity: .64; }
.choice-media { height: 142px; position: relative; overflow: hidden; background: #dbd5d0; }
.choice-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.choice-info { padding: 13px 12px 14px; }
.choice-name { display: block; font-size: 13px; line-height: 1.22; font-weight: 700; }
.choice-note { display: block; color: #797689; font-size: 10px; line-height: 1.4; margin-top: 4px; }
.choice-rank { position: absolute; z-index: 1; top: 9px; right: 9px; padding: 6px 8px; color: white; border-radius: 8px; background: #6e5c9c; font: 500 10px/1 "DM Mono", monospace; box-shadow: 0 3px 10px rgba(38,29,66,.2); }

.palette-art { display: grid; grid-template-columns: repeat(4, 1fr); height: 100%; }
.palette-art span { min-width: 0; }
.palette-art span:nth-child(1) { border-radius: 18px 0 0 0; }
.palette-art span:nth-child(4) { border-radius: 0 18px 0 0; }
.macbook-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.macbook-choices .choice { min-height: 0; }
.macbook-choices .choice-media { height: auto; aspect-ratio: 92 / 75; }
.macbook-media { background-image: url('/images/macbook/apple-m5-15-finishes.jpg'); background-repeat: no-repeat; background-size: 400% 100%; background-color: #e5e3e0; }
.macbook-source { color: #6f6c7e; font-size: 10px; line-height: 1.45; margin: 12px 0 0; }

.back-row { margin-top: 23px; }
.back-button { color: #686478; border: 0; background: transparent; padding: 7px 0; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.insert { min-height: 69svh; display: flex; flex-direction: column; justify-content: center; max-width: 600px; }
.insert::before { content: ""; width: 46px; height: 2px; background: #aa9fd0; margin-bottom: 34px; }

.surface { padding: clamp(22px, 5vw, 32px); border: 1px solid rgba(58,51,84,.12); border-radius: var(--radius); background: rgba(255,253,250,.74); box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.surface + .surface { margin-top: 14px; }
.surface h3 { font-family: "Playfair Display", Georgia, serif; font-size: 27px; letter-spacing: -.035em; }
.share-url { width: 100%; min-height: 52px; padding: 13px; color: #55516b; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.6); font: 11px/1.4 "DM Mono", monospace; overflow-wrap: anywhere; }
.share-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 10px; }
.share-message { color: #696477; font-size: 12px; line-height: 1.6; margin-top: 17px; }
.disabled-note { color: #777386; font-size: 12px; line-height: 1.55; margin: 0; }

.invitation { min-height: 72svh; display: flex; flex-direction: column; justify-content: center; }
.invitation-card { padding: 30px; border: 1px solid rgba(79,67,122,.14); border-radius: 30px; background: rgba(255,255,255,.54); box-shadow: 0 22px 70px rgba(46,55,91,.1); }
.invitation-card .element-orb { float: right; width: 75px; height: 75px; margin: -15px -12px 8px 15px; border-radius: 50%; background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.9), rgba(177,194,224,.65) 35%, rgba(111,120,170,.75)); }
.theme-fire .element-orb { background: radial-gradient(circle at 30% 25%, #fff5d9, #e9ae85 38%, #b85e58); }.theme-earth .element-orb { background: radial-gradient(circle at 30% 25%, #fbf5d9, #b9c090 38%, #728563); }.theme-water .element-orb { background: radial-gradient(circle at 30% 25%, #ebfbfd, #8dc5d1 38%, #5c779b); }

.loading { min-height: 68svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.loading-orbit { width: 74px; height: 74px; margin-bottom: 28px; border: 1px solid rgba(87,75,130,.26); border-radius: 50%; position: relative; animation: spin 2.4s linear infinite; }
.loading-orbit::after { content: ""; width: 13px; height: 13px; border-radius: 50%; background: #887bb7; position: absolute; top: -7px; left: calc(50% - 7px); box-shadow: 0 0 0 8px rgba(136,123,183,.12); }
.loading p { color: #6e697e; font: 19px/1.45 "Playfair Display", Georgia, serif; min-height: 29px; }

.result-hero { padding: 20px 0 31px; }
.result-score { display: grid; place-items: center; width: min(67vw, 290px); aspect-ratio: 1; margin: 35px auto 22px; border: 1px solid rgba(102,85,159,.3); border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.83) 0 54%, rgba(207,196,234,.45) 55% 60%, rgba(255,255,255,.22) 61%); box-shadow: 0 16px 50px rgba(89,74,140,.13); }
.result-score strong { font: 600 clamp(51px, 15vw, 76px)/1 "Playfair Display", Georgia, serif; letter-spacing: -.07em; }
.result-score span { display: block; margin-top: 5px; color: #655b80; font: 500 10px/1.3 "DM Mono", monospace; letter-spacing: .08em; text-transform: uppercase; text-align: center; }
.result-intro { text-align: center; }
.result-intro h1 { font-size: clamp(40px, 11vw, 67px); }
.result-section { margin-top: 16px; }
.section-label { color: #787188; font: 500 10px/1.4 "DM Mono", monospace; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 10px; }
.metric { display: flex; align-items: baseline; gap: 14px; padding: 22px 0 3px; }
.metric strong { font: 600 59px/.95 "Playfair Display", Georgia, serif; letter-spacing: -.06em; }
.metric span { color: #676277; font-size: 13px; line-height: 1.35; max-width: 160px; }
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.list-card { min-height: 165px; padding: 18px; border-radius: 19px; background: rgba(255,255,255,.55); border: 1px solid var(--line); }
.list-card h3 { font-size: 14px; }.list-card ul { margin: 12px 0 0; padding: 0; list-style: none; }.list-card li { font-size: 11px; line-height: 1.45; color: #575367; padding: 7px 0; border-top: 1px solid rgba(65,57,90,.08); }.list-card li:first-child { border-top: 0; }
.portrait { padding: 16px 0; border-top: 1px solid var(--line); }.portrait + .portrait { margin-top: 5px; }.portrait h3 { margin-bottom: 5px; }.portrait p { color: #696477; font-size: 13px; line-height: 1.55; margin-bottom: 0; }
.quote { color: #433d5f; font: italic 500 23px/1.25 "Playfair Display", Georgia, serif; }

.modal-backdrop { position: fixed; z-index: 10; inset: 0; display: grid; place-items: end center; padding: 16px; background: rgba(28,25,44,.36); backdrop-filter: blur(5px); }
.modal { width: min(100%, 650px); max-height: min(82svh, 720px); overflow-y: auto; padding: 25px; border-radius: 24px; background: #fffdfa; box-shadow: 0 20px 80px rgba(23,20,37,.35); }
.modal-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; }.modal-head h2 { font-size: 30px; margin-bottom: 8px; }.modal h3 { margin-top: 25px; }.modal p, .modal li { color: #555064; font-size: 13px; line-height: 1.65; }.modal ul { padding-left: 20px; }.modal a { color: #5c4c8c; }

.notice { padding: 12px 14px; margin-bottom: 18px; color: #5f557e; border: 1px solid rgba(103,85,154,.22); border-radius: 14px; background: rgba(230,224,246,.52); font-size: 12px; line-height: 1.5; }
.fatal { min-height: 100svh; display: grid; place-items: center; padding: 28px; text-align: center; }.fatal-inner { max-width: 460px; }.fatal h1 { font-size: 48px; }
.fade-in { animation: rise .5s cubic-bezier(.16,1,.3,1) both; }

@keyframes rise { from { opacity: 0; transform: translateY(13px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(1turn); } }
@media (max-width: 390px) { .page { padding-inline: 15px; }.choices { gap: 9px; }.choice { min-height: 192px; border-radius: 15px; }.choice-media { height: 122px; }.choice-info { padding: 10px; }.choice-name { font-size: 12px; }.field-row { gap: 8px; } }
@media (min-width: 630px) { .choices { grid-template-columns: repeat(4, minmax(0, 1fr)); }.choice { min-height: 250px; }.choice-media { height: 175px; }.macbook-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }.macbook-choices .choice { min-height: 0; }.macbook-choices .choice-media { height: auto; aspect-ratio: 92 / 75; }.page { padding-top: 29px; }.modal-backdrop { place-items: center; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; } }
