:root {
  --bg: #0b0620;
  --bg-2: #140a33;
  --panel: rgba(32, 18, 72, 0.62);
  --panel-line: rgba(160, 120, 255, 0.28);
  --text: #f2eeff;
  --muted: #b8acd9;
  --red: #ff4050;
  --blue: #40a0ff;
  --green: #50ff70;
  --yellow: #ffd933;
  --purple: #cc59ff;
  --radius: 22px;
  --max: 1120px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 60% at 70% 0%, rgba(120, 50, 220, 0.35), transparent 70%),
    radial-gradient(ellipse 70% 50% at 0% 40%, rgba(40, 90, 220, 0.25), transparent 70%),
    radial-gradient(ellipse 80% 60% at 100% 90%, rgba(200, 60, 200, 0.18), transparent 70%);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  line-height: 1.65;
  word-break: keep-all;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #9fd0ff; }

#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  background: rgba(11, 6, 32, 0.55);
  border-bottom: 1px solid rgba(160, 120, 255, 0.12);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: -0.02em; }
.brand img { width: 34px; height: 34px; filter: drop-shadow(0 0 8px rgba(204, 89, 255, 0.7)); }
.site-head nav { display: flex; gap: 18px; }
.site-head nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 600; }
.site-head nav a:hover { color: var(--text); }
@media (max-width: 640px) { .site-head nav { display: none; } }

/* ---------- hero ---------- */
.hero { padding: 48px 0 40px; }
.hero .wrap { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .hero { padding: 72px 0 64px; }
  .hero .wrap { grid-template-columns: 1.1fr 0.9fr; }
}
.eyebrow {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: rgba(204, 89, 255, 0.14); border: 1px solid rgba(204, 89, 255, 0.4);
  color: #e6c2ff; font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
}
.title {
  display: block; width: fit-content;
  margin: 18px 0 12px;
  font-size: clamp(48px, 12vw, 96px); line-height: 1.02; font-weight: 900; letter-spacing: -0.04em;
  background: linear-gradient(100deg, #ff7aa8 0%, #ffd933 30%, #50ff70 55%, #40a0ff 78%, #cc59ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px rgba(204, 89, 255, 0.45));
}
.title small { display: block; font-size: 0.3em; letter-spacing: 0.3em; color: var(--muted); -webkit-text-fill-color: var(--muted); filter: none; margin-top: 6px; font-weight: 700; }
.tagline { text-wrap: balance; font-size: clamp(18px, 4.6vw, 22px); color: var(--text); margin: 0 0 8px; font-weight: 600; }
.lede { color: var(--muted); margin: 0 0 28px; max-width: 34em; }

.store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 22px 12px 16px; border-radius: 16px;
  background: #000; color: #fff; text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 4px rgba(64, 160, 255, 0.12), 0 10px 30px rgba(64, 160, 255, 0.25);
  transition: transform 0.15s, box-shadow 0.15s;
}
.store-btn:hover { transform: translateY(-2px); box-shadow: 0 0 0 4px rgba(80, 255, 112, 0.18), 0 14px 36px rgba(80, 255, 112, 0.25); }
.store-btn svg { width: 30px; height: 30px; flex: none; }
.store-btn span { display: flex; flex-direction: column; line-height: 1.2; }
.store-btn small { font-size: 11px; color: #cfcfcf; letter-spacing: 0.04em; }
.store-btn b { font-size: 18px; font-weight: 700; }
.soon-note { margin: 12px 0 0; font-size: 13px; color: var(--muted); }

.hero-art { position: relative; display: flex; justify-content: center; }
.hero-art .phone { width: min(300px, 72vw); }
.hero-art .floaty { position: absolute; width: clamp(64px, 16vw, 110px); animation: bob 4s ease-in-out infinite; filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.25)); }
.hero-art .f1 { left: 0; top: 8%; animation-delay: -1s; }
.hero-art .f2 { right: 0; top: 30%; animation-delay: -2.4s; }
.hero-art .f3 { left: 4%; bottom: 6%; animation-delay: -0.4s; }
@media (min-width: 900px) { .hero-art .f1 { left: 2%; } .hero-art .f2 { right: 2%; } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-14px) rotate(4deg); } }
@media (prefers-reduced-motion: reduce) { .hero-art .floaty { animation: none; } }

/* ---------- phone frame ---------- */
.phone {
  position: relative; aspect-ratio: 1080 / 2340;
  border-radius: 38px; padding: 9px;
  background: linear-gradient(160deg, #3a2a6e, #150c33 50%, #2a1b5c);
  box-shadow: 0 0 0 1px rgba(200, 170, 255, 0.35), 0 0 40px rgba(140, 80, 255, 0.35), 0 30px 60px rgba(0, 0, 0, 0.5);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 30px; background: #0b0620; }
.phone::before {
  content: ""; position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 12px; height: 12px; border-radius: 50%; background: #05020f; z-index: 2;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06);
}

/* ---------- sections ---------- */
section { padding: 56px 0; }
@media (min-width: 900px) { section { padding: 84px 0; } }
.sec-title { text-align: center; margin: 0 0 10px; font-size: clamp(28px, 7vw, 42px); font-weight: 900; letter-spacing: -0.03em; }
.sec-sub { text-wrap: balance; text-align: center; color: var(--muted); margin: 0 auto 36px; max-width: 36em; }

/* how-to steps */
.steps { display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  position: relative; padding: 26px 22px 24px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--panel-line);
}
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 18px; right: 20px; font-size: 44px; font-weight: 900; line-height: 1;
  color: rgba(255, 255, 255, 0.07);
}
.step img { width: 84px; height: 84px; object-fit: contain; margin-bottom: 14px; }
.step h3 { margin: 0 0 6px; font-size: 20px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* features */
.features { display: grid; gap: 18px; }
@media (min-width: 760px) { .features { grid-template-columns: repeat(2, 1fr); } }
.feature {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 24px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--panel-line);
  box-shadow: inset 0 0 40px rgba(var(--glow), 0.08);
}
.feature .ico {
  flex: none; width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center;
  background: rgba(var(--glow), 0.12); border: 1px solid rgba(var(--glow), 0.4);
  box-shadow: 0 0 24px rgba(var(--glow), 0.25);
}
.feature .ico img { width: 58px; height: 58px; object-fit: contain; }
.feature h3 { margin: 2px 0 6px; font-size: 20px; color: rgb(var(--glow)); }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }
.g-red { --glow: 255, 64, 80; }
.g-blue { --glow: 64, 160, 255; }
.g-green { --glow: 80, 255, 112; }
.g-yellow { --glow: 255, 217, 51; }
.g-purple { --glow: 204, 89, 255; }

/* screenshots carousel */
.carousel {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 10px 16px 26px; margin: 0 -16px;
  scrollbar-width: thin; scrollbar-color: rgba(204, 89, 255, 0.5) transparent;
  -webkit-overflow-scrolling: touch;
}
.carousel figure { flex: none; width: min(230px, 62vw); margin: 0; scroll-snap-align: center; }
.carousel figcaption { text-align: center; margin-top: 12px; font-size: 14px; color: var(--muted); font-weight: 600; }
@media (min-width: 1100px) { .carousel { justify-content: safe center; } .carousel figure { width: 196px; } }
.car-ctrl { display: flex; justify-content: center; gap: 12px; }
.car-ctrl button {
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  background: var(--panel); border: 1px solid var(--panel-line); color: var(--text); font-size: 20px;
}
.car-ctrl button:hover { border-color: var(--purple); }
@media (min-width: 1100px) { .car-ctrl { display: none; } }

/* character gallery */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 560px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.char {
  text-align: center; padding: 18px 10px 14px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--panel-line);
  transition: transform 0.2s, border-color 0.2s;
}
.char:hover { transform: translateY(-4px) rotate(-1deg); border-color: rgba(var(--glow), 0.7); }
.char img { width: 100%; max-width: 120px; margin: 0 auto 8px; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 0 12px rgba(var(--glow), 0.55)); }
.char b { display: block; font-size: 16px; }
.char span { font-size: 13px; color: var(--muted); }

.aliens { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 18px; }
@media (min-width: 560px) { .aliens { grid-template-columns: repeat(4, 1fr); } }
.aliens .char img { max-width: 130px; }

.sub-head { text-align: center; font-size: 22px; margin: 44px 0 6px; }

/* CTA */
.cta {
  text-align: center; padding: 44px 22px; border-radius: 30px;
  background: linear-gradient(135deg, rgba(204, 89, 255, 0.22), rgba(64, 160, 255, 0.18));
  border: 1px solid rgba(204, 89, 255, 0.4);
  box-shadow: 0 0 60px rgba(140, 80, 255, 0.25);
}
.cta h2 { margin: 0 0 10px; font-size: clamp(26px, 6vw, 38px); letter-spacing: -0.03em; }
.cta p { color: var(--muted); margin: 0 0 24px; }
.cta .jellies { display: flex; justify-content: center; gap: 6px; margin-bottom: 18px; }
.cta .jellies img { width: 44px; height: 44px; }

/* footer */
.site-foot { padding: 40px 0 48px; border-top: 1px solid rgba(160, 120, 255, 0.15); color: var(--muted); font-size: 14px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; justify-content: space-between; align-items: center; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--text); text-decoration: underline; }

/* legal pages */
.legal { padding: 40px 0 64px; }
.legal .doc {
  max-width: 820px; margin: 0 auto; padding: 28px 20px;
  background: rgba(20, 10, 51, 0.82); border: 1px solid var(--panel-line); border-radius: var(--radius);
}
@media (min-width: 700px) { .legal .doc { padding: 44px 52px; } }
.legal h1 { margin: 0 0 6px; font-size: clamp(28px, 6vw, 36px); letter-spacing: -0.03em; }
.legal .meta { color: var(--muted); margin: 0 0 28px; font-size: 14px; }
.legal h2 { font-size: 19px; margin: 34px 0 10px; padding-top: 14px; border-top: 1px solid rgba(160, 120, 255, 0.15); }
.legal p, .legal li { color: #ddd5f5; font-size: 15.5px; }
.legal ul, .legal ol { padding-left: 1.3em; }
.legal li { margin: 4px 0; }
.legal table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 14.5px; display: block; overflow-x: auto; }
.legal th, .legal td { border: 1px solid rgba(160, 120, 255, 0.25); padding: 8px 10px; text-align: left; vertical-align: top; }
.legal th { background: rgba(204, 89, 255, 0.12); white-space: nowrap; }
.ph { background: rgba(255, 217, 51, 0.18); color: var(--yellow); padding: 0 4px; border-radius: 4px; font-weight: 700; }
.toc { background: rgba(255, 255, 255, 0.04); border-radius: 14px; padding: 14px 18px; margin-bottom: 8px; }
.toc ol { margin: 0; columns: 1; }
@media (min-width: 700px) { .toc ol { columns: 2; } }
.toc a { color: #c9b8ff; text-decoration: none; font-size: 14.5px; }

/* 404 */
.nf { min-height: 72vh; display: grid; place-items: center; text-align: center; padding: 40px 16px; }
.nf img { width: 140px; margin: 0 auto 10px; filter: drop-shadow(0 0 18px rgba(64, 160, 255, 0.6)); animation: bob 4s ease-in-out infinite; }
.nf h1 { font-size: 72px; margin: 0; font-weight: 900; color: var(--blue); text-shadow: 0 0 24px rgba(64, 160, 255, 0.7); }
.nf p { color: var(--muted); }
.btn {
  display: inline-block; margin-top: 12px; padding: 12px 24px; border-radius: 14px;
  background: linear-gradient(135deg, var(--purple), var(--blue)); color: #fff; text-decoration: none; font-weight: 700;
}

/* ---------- language switch + suggestion banner ---------- */
.site-head .wrap { gap: 16px; }
.site-head nav { margin-left: auto; }
.lang { flex: none; position: relative; font-size: 14px; font-weight: 700; }
.lang summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px; color: var(--text);
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--panel-line);
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { width: 16px; height: 16px; flex: none; }
.lang summary::after { content: ""; width: 6px; height: 6px; margin-left: 2px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg); }
.lang[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.lang summary:hover, .lang[open] summary { border-color: rgba(204, 89, 255, 0.6); }
.lang ul {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; margin: 0; padding: 6px; list-style: none; min-width: 156px;
  background: rgba(20, 10, 51, 0.97); border: 1px solid rgba(204, 89, 255, 0.45); border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
}
.lang li a { display: block; padding: 9px 12px; border-radius: 9px; color: var(--muted); text-decoration: none; font-weight: 600; }
.lang li a:hover, .lang li a:focus-visible { background: rgba(204, 89, 255, 0.16); color: var(--text); }
.lang li a[aria-current="page"] { color: var(--text); font-weight: 800; }
.lang li a[aria-current="page"]::after { content: " \2713"; color: var(--green); }
.brand { min-width: 0; }
.lang-banner {
  position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30;
  max-width: 460px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 10px 12px 16px; border-radius: 16px;
  background: rgba(20, 10, 51, 0.94); border: 1px solid rgba(204, 89, 255, 0.45);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(140, 80, 255, 0.25);
  font-size: 14px; color: var(--text);
}
.lang-banner p { margin: 0; flex: 1; line-height: 1.4; }
.lang-banner a { color: var(--text); font-weight: 700; white-space: nowrap; }
.lang-banner button {
  flex: none; width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  background: transparent; border: 1px solid var(--panel-line); color: var(--muted); font-size: 18px; line-height: 1;
}
.lang-banner button:hover { color: var(--text); border-color: var(--purple); }

/* "new" tag on a feature title */
.tag {
  display: inline-block; vertical-align: 2px; margin-left: 6px; padding: 1px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em;
  background: rgba(80, 255, 112, 0.16); border: 1px solid rgba(80, 255, 112, 0.5); color: var(--green);
}

/* CJK pages: system CJK fonts after Pretendard (no web font needed: Apple Hiragino/PingFang,
   Android Noto Sans CJK picked by the html lang, Windows Yu Gothic/Microsoft JhengHei/YaHei).
   keep-all would stop Japanese and Chinese (no spaces) from wrapping, so use normal breaking. */
body:lang(ja) {
  font-family: "Pretendard", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic", "YuGothic", Meiryo, sans-serif;
}
body:lang(zh-Hant) {
  font-family: "Pretendard", "PingFang TC", "Noto Sans TC", "Noto Sans CJK TC", "Microsoft JhengHei", sans-serif;
}
body:lang(zh-Hans) {
  font-family: "Pretendard", "PingFang SC", "Noto Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}
body:lang(ja), body:lang(zh) { word-break: normal; line-break: strict; overflow-wrap: anywhere; }
.legal .gov { margin: -16px 0 24px; padding: 10px 14px; border-radius: 12px; font-size: 14px; color: var(--muted); background: rgba(255, 255, 255, 0.04); border-left: 3px solid var(--purple); }
.nf .alt { font-size: 14px; line-height: 1.7; }
.nf .alt a { color: #c9b8ff; }
body:lang(ja) { word-break: auto-phrase; } /* Chrome: break Japanese at phrase boundaries; others fall back to normal */
.nw { white-space: nowrap; }
