@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Serif+JP:wght@400;500;600&display=swap');
:root { color-scheme: dark; --cream:#f6eddb; --cyan:#a5f3f5; --gold:#e8cc8c; --muted:#a6b6cb; --line:#c5d9e334; }
* { box-sizing:border-box; }
html { min-width:320px; }
body { margin:0; background:#070719; color:var(--cream); font-family:'DM Sans',sans-serif; }
.sky { position:fixed; inset:0; pointer-events:none; background:radial-gradient(ellipse at 72% 40%,#192c61 0,transparent 43%),radial-gradient(ellipse at 15% 80%,#2b174b 0,transparent 38%),radial-gradient(circle at 12% 30%,#e6fdff 0 1px,transparent 1.5px),radial-gradient(circle at 72% 15%,#e6fdff 0 1px,transparent 1.5px),radial-gradient(circle at 88% 75%,#e6fdff 0 1px,transparent 1.5px); background-size:auto,auto,163px 181px,251px 223px,307px 279px; }
.sky:after { content:''; position:absolute; width:90vw; height:90vw; border:1px solid #80f7ff20; border-radius:50%; bottom:-83vw; left:-30vw; box-shadow:0 -4px 80px #744cfb55; }
.page { position:relative; max-width:1700px; margin:auto; padding:0 5%; }
.header { height:94px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); }
.brand { display:flex; gap:12px; align-items:center; color:var(--cream); text-decoration:none; font-size:10px; font-weight:700; letter-spacing:.15em; line-height:1.3; }
.brand-star { width:32px; height:32px; flex:none; color:var(--cyan); filter:drop-shadow(0 0 9px #64faff); }
.header-right { display:flex; align-items:center; gap:35px; }
.header-center,.header-caption,.visual-label,.eyebrow,.card-top,.card-label,.luck span,.card-bottom,footer small { font-size:9px; letter-spacing:.19em; font-weight:600; }
.header-center { color:#d1b979; } .header-caption { color:#9ab7ca; }
.language select { border:0; border-bottom:1px solid #718997; border-radius:0; background:transparent; color:var(--cream); padding:9px 20px 9px 0; font-size:10px; letter-spacing:.12em; cursor:pointer; }
.language option { background:#101a29; }
.hero { position:relative; min-height:660px; height:calc(100svh - 165px); max-height:900px; display:grid; grid-template-columns:45% 55%; align-items:center; }
.hero-copy { z-index:3; padding-bottom:20px; }
.eyebrow { color:var(--cyan); display:flex; align-items:center; gap:12px; }
.dot { width:6px; height:6px; border-radius:50%; background:#b9ffff; box-shadow:0 0 14px #79ffff; }
.eyebrow-line { width:40px; height:1px; background:#84dfe0; }
.kicker { margin:65px 0 20px; font-family:'Noto Serif JP',serif; font-size:13px; letter-spacing:.2em; color:var(--gold); }
h1,h2,h3,.intro,.note,.message,.step p { font-family:'Noto Serif JP',serif; }
h1 { font-size:clamp(42px,4.3vw,68px); font-weight:500; line-height:1.55; letter-spacing:.08em; margin:0; text-shadow:0 0 35px #77bfff44; }
.intro { font-size:14px; line-height:2.4; letter-spacing:.1em; color:#c7d4df; margin:25px 0 35px; }
.primary,.outline { min-height:58px; padding:0 25px; border:1px solid var(--cyan); font-size:12px; letter-spacing:.1em; cursor:pointer; transition:transform .2s,box-shadow .2s; }
.primary { background:linear-gradient(100deg,#e8f9ed,#a5f2f5); color:#101b31; display:inline-flex; align-items:center; justify-content:space-between; gap:35px; box-shadow:0 0 28px #68e8f43b; }
.primary:hover,.outline:hover { transform:translateY(-2px); box-shadow:0 0 30px #80f5fa77; }
.button-star { width:19px; height:19px; flex:none; } .note { font-size:10px; letter-spacing:.08em; color:#a6b9c9; margin-top:17px; }
.visual { position:relative; width:120%; aspect-ratio:1.12; justify-self:center; display:grid; place-items:center; isolation:isolate; }
.shrine-scene { position:absolute; inset:-5%; z-index:-1; background:url('../assets/cosmic/shrine-space.webp') center/contain no-repeat; mask-image:radial-gradient(ellipse 67% 62% at 50% 50%,#000 58%,transparent 100%); }
.sacred-ring { position:absolute; border:1px solid #b8eeef50; border-radius:50%; pointer-events:none; }
.ring-one { inset:5% 10%; transform:rotate(-12deg); box-shadow:0 0 36px #61cfea26,inset 0 0 36px #9576f321; }
.ring-two { inset:11% 16%; border:1px dashed #ebce8c66; transform:rotate(14deg); }
.character { position:absolute; z-index:2; width:22%; height:27%; object-fit:contain; bottom:12%; left:47%; filter:drop-shadow(0 0 14px #94fcffb0) drop-shadow(0 14px 14px #05061d); animation:float 6s ease-in-out infinite; }
.plaque { position:absolute; left:12%; top:29%; border:1px solid #d8c0819e; background:#101328b8; padding:12px 9px; color:#f4dca3; font-family:'Noto Serif JP',serif; font-size:18px; line-height:1.4; box-shadow:0 0 18px #e7bc5c33; }
.alien-glyphs { position:absolute; top:14%; left:19%; color:#98faff; letter-spacing:.2em; font-size:14px; text-shadow:0 0 14px #7af8ff; }
.visual-label { position:absolute; color:#c1edf1; text-shadow:0 0 12px #83faff; } .label-top { top:7%; right:9%; } .label-bottom { bottom:4%; left:17%; }
.state { min-height:650px; padding:90px 0; text-align:center; } .centered { justify-content:center; }
.state h2 { font-weight:500; font-size:clamp(28px,3vw,40px); letter-spacing:.1em; margin:22px 0; }
.state>p,.result-heading>p:last-child { font-family:'Noto Serif JP',serif; color:#b2c4d5; font-size:13px; letter-spacing:.08em; line-height:2; }
.receiving-orbit { width:200px; height:200px; border:1px solid #9af7f6a0; border-radius:50%; display:grid; place-items:center; margin:0 auto 45px; position:relative; box-shadow:0 0 50px #6af8fb4d,inset 0 0 55px #7954fa70; background:radial-gradient(circle,#6b4d9d88,#101938); }
.receiving-orbit:before,.receiving-orbit:after { content:''; position:absolute; border:1px dashed #ebd19a9e; border-radius:50%; animation:spin 12s linear infinite; }
.receiving-orbit:before { inset:-15px; } .receiving-orbit:after { inset:15px; animation-direction:reverse; }
.receiving-orbit span { font-family:'Noto Serif JP',serif; font-size:36px; color:#fff0c5; letter-spacing:.15em; text-shadow:0 0 20px #aeffff; }
.progress { height:1px; width:180px; background:#ffffff25; margin:40px auto 25px; } .progress span { display:block; height:100%; background:var(--cyan); animation:progress 1.6s linear forwards; }
.text-button { border:0; background:none; color:#d0e8e7; padding:15px; cursor:pointer; text-decoration:underline; text-underline-offset:6px; font-size:12px; letter-spacing:.08em; }
.fortune-card { max-width:800px; margin:55px auto 0; text-align:left; background:radial-gradient(ellipse at 80% 35%,#343e7f 0,transparent 50%),linear-gradient(135deg,#17163b,#0a1730); color:#f8f1df; border:1px solid #ceb783; outline:1px solid #72d9e03f; outline-offset:-8px; padding:30px 38px 25px; box-shadow:0 0 60px #7052cf45,0 20px 90px #0009; }
.card-top,.card-bottom { display:flex; justify-content:space-between; gap:15px; color:#b9d8dc; } .card-brand { display:inline-flex; align-items:center; gap:8px; } .card-star { width:12px; height:12px; flex:none; } .card-top { padding-bottom:22px; border-bottom:1px solid #c9d9d349; }
.card-main { display:grid; grid-template-columns:1.35fr .8fr; min-height:300px; align-items:center; } .card-copy { padding:35px 0; } .card-label { color:#b7e5e4; }
.rank { font-family:'Noto Serif JP',serif; color:#f6d995; letter-spacing:.2em; font-size:17px; margin:24px 0 10px; text-shadow:0 0 20px #ffdc94; }
.fortune-card h3 { font-size:clamp(25px,3vw,35px); font-weight:500; letter-spacing:.1em; margin:0; } .message { font-size:13px; line-height:2.2; margin:20px 0 26px; }
.step { border-left:1px solid #b8e4dc; padding-left:15px; } .step span { font-size:10px; color:#a0ebed; letter-spacing:.1em; } .step p { font-size:12px; line-height:1.8; margin:7px 0 0; }
.card-art { position:relative; display:grid; place-items:center; min-width:0; } .card-orbit { position:absolute; width:90%; aspect-ratio:1; border:1px solid #a8f4ec80; border-radius:50%; box-shadow:0 0 28px #a68dff55; }
.card-art img { position:relative; width:100%; height:250px; object-fit:contain; filter:drop-shadow(0 0 20px #a2faff88); }
.luck { display:grid; grid-template-columns:repeat(3,1fr); border-top:1px solid #b6d5da55; border-bottom:1px solid #b6d5da55; padding:20px 0; gap:10px; } .luck div { display:flex; flex-direction:column; gap:10px; } .luck span { color:#a8e8e9; } .luck strong { font-family:'Noto Serif JP',serif; font-size:13px; font-weight:500; }
.card-bottom { padding-top:22px; } .actions { display:flex; justify-content:center; align-items:center; gap:12px; flex-wrap:wrap; margin-top:30px; } .secondary { gap:25px; } .outline { background:transparent; color:var(--cream); }
.feedback { min-height:25px; color:#c1e3e8; font-size:12px; }
footer { min-height:100px; border-top:1px solid var(--line); display:flex; align-items:center; gap:16px; color:#a4c1ce; } .footer-star { width:23px; height:23px; flex:none; color:var(--cyan); filter:drop-shadow(0 0 9px #64faff); } footer p { font-family:'Noto Serif JP',serif; font-size:11px; letter-spacing:.12em; } footer small { margin-left:auto; color:#91a7b9; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); } :focus-visible { outline:2px solid #bceaff; outline-offset:4px; } [hidden] { display:none!important; }
#export-dialog { width:min(92vw,520px); max-height:90dvh; overflow:auto; background:#10142e; color:var(--cream); border:1px solid #b8e5e1; padding:24px; } #export-dialog::backdrop { background:#030711dd; } .export-head { display:flex; align-items:center; justify-content:space-between; gap:20px; } .export-head h2 { font-family:'Noto Serif JP',serif; font-size:19px; font-weight:500; } .export-close { background:none; color:var(--cream); border:0; font-size:30px; cursor:pointer; } #export-dialog p { font-size:12px; line-height:1.8; color:#c2cdd0; } #export-preview { display:block; width:100%; height:auto; margin:20px 0; } #export-download { width:100%; justify-content:center; text-decoration:none; } #save:disabled { opacity:.55; cursor:wait; }
@keyframes float { 50% { transform:translateY(-10px); } } @keyframes spin { to { transform:rotate(360deg); } } @keyframes progress { to { width:100%; } }
@media(max-width:700px) {
  .page { padding:0 5%; } .header { height:65px; } .header-caption,.header-center { display:none; }
  .hero { height:auto; min-height:0; display:flex; flex-direction:column; padding:22px 0 25px; text-align:center; }
  .hero-copy { display:contents; } .hero .eyebrow { order:0; justify-content:center; margin:5px 0; font-size:8px; }
  .kicker { order:1; margin:16px 0 6px; font-size:11px; } h1 { order:2; font-size:clamp(31px,8vw,43px); line-height:1.38; }
  .intro { order:3; margin:10px 0 0; font-size:11px; line-height:1.8; }
  .visual { order:4; width:min(112%,390px); height:min(34svh,290px); aspect-ratio:auto; margin:-4px auto; }
  .shrine-scene { inset:-8%; background-size:contain; } .character { width:22%; height:27%; bottom:12%; left:47%; }
  .plaque { left:10%; top:29%; font-size:13px; padding:6px; } .alien-glyphs { font-size:10px; top:12%; }
  .visual-label { font-size:7px; } .label-top { top:5%; right:4%; } .label-bottom { bottom:1%; left:12%; }
  .hero .primary { order:5; min-height:50px; } .hero #draw-feedback { order:6; min-height:0; margin:0; } .hero #draw-feedback:not(:empty) { margin:8px; } .note { order:7; margin-top:10px; }
  .state { padding:65px 0; min-height:600px; } .fortune-card { padding:23px 22px; margin-top:35px; } .card-main { grid-template-columns:1fr; min-height:0; } .card-copy { padding:10px 0 28px; } .card-art { grid-row:1; grid-column:1; width:180px; max-width:70%; justify-self:center; margin-top:15px; } .card-art img { height:190px; } .message { font-size:12px; } .card-top,.card-bottom,.luck span { font-size:8px; letter-spacing:.1em; } .luck strong { font-size:11px; }
  .actions { flex-direction:column; } .actions .primary,.actions .outline { width:min(100%,300px); justify-content:center; } .actions .text-button { margin-top:5px; } footer small { font-size:8px; }
}
@media(max-width:390px) { .fortune-card h3 { font-size:23px; } .card-bottom { font-size:7px; } }
@media(prefers-reduced-motion:reduce) { *,*:before,*:after { animation-duration:.001ms!important; animation-iteration-count:1!important; transition:none!important; } }
/* The artwork and overlays share the same 3:2 coordinate system. */
.sky {
  background:
    linear-gradient(90deg,rgba(3,5,20,.68),rgba(3,5,20,.24)),
    url('../assets/cosmic/nebula-space.webp') center / cover no-repeat,
    #070719;
}
.sky:after { display:none; }
.sky:before {
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(0deg,rgba(5,6,23,.72),transparent 55%);
}
.visual { aspect-ratio:3 / 2; }
.shrine-scene {
  inset:0;
  background-size:100% 100%;
  mask-image:
    linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent),
    linear-gradient(0deg,transparent,#000 8%,#000 92%,transparent);
  mask-composite:intersect;
}
.character { width:22%; height:auto; left:44%; top:32%; bottom:auto; }
.plaque { left:54.5%; top:25.5%; transform:translate(-50%,-50%); padding:0; border:0; background:none; box-shadow:none; font-size:clamp(8px,1vw,14px); line-height:1.1; }
@media(max-width:700px) {
  .visual { width:min(111.111%,620px); height:auto; aspect-ratio:3 / 2; margin:-4px -5.5556%; }
  .shrine-scene { inset:0; }
  .character { width:48%; height:auto; left:31%; top:22%; bottom:auto; }
  .plaque { left:54.5%; top:25.5%; padding:0; font-size:8px; }
}

/* Keep Korean phrases readable while allowing narrow cards to wrap. */
html:lang(ko) { word-break: keep-all; overflow-wrap: anywhere; }

.product-set { border-top:1px solid var(--line); padding:clamp(80px,10vw,150px) 0; display:grid; grid-template-columns:minmax(0, .9fr) minmax(0, 1fr); gap:clamp(45px,8vw,130px); align-items:center; max-width:1100px; margin:auto; }
.product-set figure { margin:0; }
.product-card { text-align:center; }
.product-card img { display:block; width:min(100%,380px); height:auto; margin:auto; border:1px solid #dfc78c88; box-shadow:0 20px 70px #0009,0 0 45px #708bce30; }
.product-set figcaption { color:#a6b6cb; font-size:10px; letter-spacing:.1em; margin-top:12px; line-height:1.7; }
.product-copy h2 { margin:25px 0; font-size:clamp(28px,3vw,42px); font-weight:500; line-height:1.6; letter-spacing:.06em; text-wrap:balance; }
.product-copy > p:not(.eyebrow) { font-family:'Noto Serif JP',serif; color:#c7d4df; font-size:14px; line-height:2.2; letter-spacing:.05em; }
.product-gallery { grid-column:1 / -1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:clamp(32px,6vw,80px); align-items:start; padding-top:20px; }
.product-gallery figure { width:min(100%,460px); margin:0 auto; }
.product-gallery img { display:block; width:100%; height:auto; border:1px solid #dfc78c66; box-shadow:0 20px 60px #0008,0 0 35px #708bce25; }
.product-gallery figcaption { margin-top:20px; }
.product-gallery figcaption strong,.product-gallery figcaption span { display:block; }
.product-gallery figcaption strong { color:var(--cream); font-family:'Noto Serif JP',serif; font-size:16px; font-weight:500; letter-spacing:.08em; }
.product-gallery figcaption span { margin-top:8px; font-size:12px; line-height:1.9; }
@media(max-width:700px) {
  .product-set { grid-template-columns:minmax(0,1fr); gap:42px; padding:75px 0 90px; }
  .product-card img { width:min(260px,100%); }
  .product-gallery { grid-template-columns:minmax(0,1fr); gap:48px; padding-top:12px; }
  .product-copy h2 { font-size:clamp(25px,7vw,34px); }
  .product-copy > p:not(.eyebrow) { font-size:13px; }
}
/* Keep the fortune and navigation quiet and easy to scan. */
.fortune-card { outline:0; margin-top:35px; }
.card-bottom { justify-content:flex-end; }
footer a { color:#c7e2e4; font-size:11px; text-underline-offset:4px; }
footer small { margin-left:auto; }
@media(max-width:700px) { footer { flex-wrap:wrap; padding:20px 0; gap:12px; } .state { padding:45px 0; } }
