:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --blue-soft: #dbeafe;
    --yellow: #facc15;
    --border: #e2e8f0;
    --navy: #101b39;
    --shadow: 0 24px 65px rgba(15, 23, 42, 0.12);
    --radius: 24px;
    --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
.container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 1000; top: 12px; left: 12px; padding: 10px 16px; color: #fff; background: var(--navy); border-radius: 8px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; z-index: 100; top: 0; border-bottom: 1px solid rgba(226, 232, 240, .85); background: rgba(248, 250, 252, .9); backdrop-filter: blur(16px); }
.header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 36px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -.02em; }
.brand-logo { width: 42px; height: 42px; display: block; object-fit: contain; border-radius: 11px; }
.brand-name { font-size: 18px; }
.site-navigation { display: flex; align-items: center; gap: 32px; }
.site-navigation a { position: relative; color: #475569; font-size: 14px; font-weight: 650; transition: color .2s ease; }
.site-navigation a:hover, .site-navigation a:focus-visible, .site-navigation a[aria-current="page"] { color: var(--blue); }
.site-navigation a[aria-current="page"]::after { content: ""; position: absolute; right: 0; bottom: -11px; left: 0; height: 2px; border-radius: 2px; background: var(--blue); }
.menu-toggle { display: none; width: 44px; height: 44px; padding: 11px; border: 1px solid var(--border); border-radius: 12px; background: #fff; cursor: pointer; }
.menu-toggle span:not(.sr-only) { display: block; height: 2px; margin: 4px 0; background: var(--text); transition: .2s ease; }

.hero { position: relative; overflow: hidden; padding: 78px 0 100px; background: radial-gradient(circle at 75% 40%, #e0edff 0, rgba(224,237,255,0) 33%); }
.hero-grid { display: grid; grid-template-columns: .95fr 1.05fr; align-items: center; gap: 62px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--blue); font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.eyebrow > span { width: 22px; height: 2px; background: currentColor; }
.hero h1 { max-width: 650px; margin: 22px 0; font-size: clamp(3rem, 6vw, 5.75rem); line-height: .96; letter-spacing: -.065em; }
.hero h1 em { color: var(--blue); font-style: normal; }
.hero-lead { max-width: 610px; margin: 0; color: var(--muted); font-size: 18px; line-height: 1.8; }
.hero-actions { display: flex; align-items: center; gap: 28px; margin-top: 34px; }
.play-button { min-height: 62px; display: inline-flex; align-items: center; gap: 13px; padding: 10px 22px; color: #fff; background: var(--text); border: 1px solid var(--text); border-radius: 14px; box-shadow: 0 12px 28px rgba(15, 23, 42, .18); transition: transform .2s ease, background .2s ease; }
.play-button:hover { background: var(--blue); border-color: var(--blue); transform: translateY(-2px); }
.play-button > span:last-child { display: flex; flex-direction: column; font-size: 19px; font-weight: 750; line-height: 1.1; }
.play-button small { margin-bottom: 3px; font-size: 10px; font-weight: 500; letter-spacing: .04em; }
.play-icon { width: 0; height: 0; border-top: 13px solid transparent; border-bottom: 13px solid transparent; border-left: 21px solid #fff; filter: drop-shadow(0 0 1px #fff); }
.text-link { color: var(--blue); font-size: 15px; font-weight: 750; border-bottom: 1px solid currentColor; }
.hero-facts { display: flex; gap: 38px; margin: 48px 0 0; padding: 26px 0 0; border-top: 1px solid var(--border); list-style: none; }
.hero-facts li { display: flex; flex-direction: column; }
.hero-facts strong { font-size: 18px; line-height: 1.2; }
.hero-facts span { margin-top: 4px; color: var(--muted); font-size: 13px; }

.puzzle-stage { position: relative; min-height: 605px; display: grid; place-items: center; }
.stage-shape { position: absolute; border-radius: 40px; transform: rotate(8deg); }
.stage-shape-one { width: 82%; height: 76%; background: var(--blue); box-shadow: 0 32px 80px rgba(37, 99, 235, .25); }
.stage-shape-two { width: 66%; height: 60%; border: 2px solid rgba(255,255,255,.28); }
.phone-frame { position: relative; z-index: 2; width: 290px; padding: 10px 14px 22px; overflow: hidden; background: #fff; border: 7px solid var(--navy); border-radius: 37px; box-shadow: 0 28px 70px rgba(15, 23, 42, .35); transform: rotate(-3deg); }
.phone-top { height: 15px; display: flex; justify-content: center; }
.phone-top span { width: 65px; height: 5px; background: var(--navy); border-radius: 20px; }
.game-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 2px 14px; font-size: 12px; }
.game-back { font-size: 27px; line-height: 1; }
.coin { padding: 4px 7px; color: #854d0e; background: #fef9c3; border-radius: 9px; font-size: 10px; }
.puzzle-grid { display: grid; grid-template-columns: repeat(5, 1fr); aspect-ratio: 1; border: 1px solid #94a3b8; }
.puzzle-grid > span { display: grid; place-items: center; min-width: 0; border: 1px solid #94a3b8; color: var(--navy); font-size: 17px; font-weight: 800; }
.puzzle-grid .clue { padding: 2px; color: #1e3a8a; background: var(--blue-soft); font-size: 7px; line-height: 1.1; text-align: center; }
.puzzle-grid .dark { background: var(--navy); }
.game-hint { margin: 13px 0 10px; padding: 10px; background: #eff6ff; border-radius: 10px; text-align: center; }
.game-hint span { display: block; color: var(--blue); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.game-hint strong { display: block; margin-top: 2px; font-size: 9px; line-height: 1.3; }
.letter-row { display: flex; justify-content: center; gap: 5px; }
.letter-row span { width: 27px; height: 32px; display: grid; place-items: center; color: #fff; background: var(--blue); border-radius: 6px; font-size: 12px; font-weight: 800; }
.floating-card { position: absolute; z-index: 3; display: flex; align-items: center; gap: 9px; padding: 13px 16px; background: #fff; border: 1px solid rgba(255,255,255,.6); border-radius: 14px; box-shadow: var(--shadow); font-size: 12px; }
.card-offline { top: 22%; left: 1%; }
.card-offline span { width: 29px; height: 29px; display: grid; place-items: center; color: #fff; background: var(--blue); border-radius: 50%; font-size: 20px; }
.card-level { right: 0; bottom: 20%; flex-direction: column; align-items: flex-start; gap: 0; }
.card-level strong { color: var(--blue); font-size: 21px; line-height: 1.1; }
.card-level span { color: var(--muted); }

.section-space { padding: 105px 0; }
.section-heading { max-width: 650px; margin: 0 auto 48px; text-align: center; }
.section-heading-left { margin: 0; text-align: left; }
.section-heading h2, .download-card h2 { margin: 14px 0; font-size: clamp(2.25rem, 4vw, 3.8rem); line-height: 1.05; letter-spacing: -.05em; }
.section-heading p, .download-card p { margin: 0; color: var(--muted); font-size: 17px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card { min-height: 310px; display: flex; flex-direction: column; justify-content: space-between; padding: 30px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 14px 35px rgba(15, 23, 42, .045); }
.feature-card-primary { color: #fff; background: var(--blue); border-color: var(--blue); }
.feature-number { width: 45px; height: 45px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 12px; font-size: 13px; font-weight: 900; }
.feature-card-primary .feature-number { color: var(--navy); background: var(--yellow); }
.feature-card h3 { margin: 0 0 10px; font-size: 23px; letter-spacing: -.025em; }
.feature-card p { margin: 0; color: var(--muted); }
.feature-card-primary p { color: #dbeafe; }

.how-it-works { color: #fff; background: var(--navy); }
.steps-wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: 100px; align-items: center; }
.eyebrow-light { color: #93c5fd; }
.steps-list { margin: 0; padding: 0; list-style: none; }
.steps-list li { display: grid; grid-template-columns: 52px 1fr; gap: 20px; padding: 25px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.steps-list li:first-child { border-top: 1px solid rgba(255,255,255,.12); }
.steps-list > li > span { width: 42px; height: 42px; display: grid; place-items: center; color: var(--navy); background: var(--yellow); border-radius: 12px; font-weight: 900; }
.steps-list strong { font-size: 19px; }
.steps-list p { margin: 4px 0 0; color: #94a3b8; }

.download-card { display: flex; align-items: center; justify-content: space-between; gap: 60px; padding: 58px 64px; overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: 30px; box-shadow: var(--shadow); }
.download-card > div { max-width: 680px; }
.download-card h2 { font-size: clamp(2rem, 4vw, 3.35rem); }
.download-card .play-button { flex: 0 0 auto; }

.legal-main { min-height: 70vh; padding: 92px 0 120px; background: radial-gradient(circle at 88% 12%, #dbeafe 0, transparent 28%); }
.legal-layout { display: grid; grid-template-columns: 190px minmax(0, 760px); gap: 85px; justify-content: center; }
.legal-aside { padding-top: 12px; }
.legal-aside > span { color: var(--blue); font-size: 48px; font-weight: 850; letter-spacing: -.05em; }
.legal-aside > div { width: 55px; height: 3px; margin: 20px 0; background: var(--yellow); }
.legal-aside p { color: var(--muted); font-size: 13px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; writing-mode: vertical-rl; }
.legal-article { padding: 55px 60px; background: #fff; border: 1px solid var(--border); border-radius: 28px; box-shadow: var(--shadow); }
.legal-article h1 { margin: 14px 0 24px; font-size: clamp(2.6rem, 6vw, 4.7rem); line-height: 1; letter-spacing: -.06em; }
.legal-intro { margin: 0; color: #475569; font-size: 18px; line-height: 1.85; }
.notice-box { display: flex; gap: 16px; margin-top: 38px; padding: 22px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 16px; }
.notice-box > span { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; color: #fff; background: var(--blue); border-radius: 50%; font-weight: 800; }
.notice-box strong { display: block; margin-bottom: 3px; }
.notice-box p { margin: 0; color: #475569; }
.legal-note { margin: 28px 0 0; padding-left: 18px; color: var(--muted); border-left: 3px solid var(--yellow); }
.legal-updated { margin: 42px 0 0; color: #94a3b8; font-size: 13px; }

.site-footer { color: #cbd5e1; background: #0b1227; }
.footer-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; padding-top: 52px; padding-bottom: 42px; }
.footer-brand { display: inline-flex; align-items: center; gap: 11px; color: #fff; font-size: 19px; font-weight: 800; }
.footer-brand img { width: 38px; height: 38px; display: block; object-fit: contain; border-radius: 10px; }
.footer-inner p { margin: 6px 0 0; color: #64748b; font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 28px; }
.footer-links a { font-size: 14px; }
.footer-links a:hover, .footer-links a:focus-visible { color: #fff; }
.footer-bottom { padding-top: 20px; padding-bottom: 20px; border-top: 1px solid rgba(255,255,255,.08); }
.footer-bottom p { margin: 0; color: #64748b; font-size: 13px; }

@media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-copy { max-width: 700px; }
    .puzzle-stage { min-height: 560px; }
    .feature-grid { grid-template-columns: 1fr; }
    .feature-card { min-height: 230px; }
    .steps-wrap { grid-template-columns: 1fr; gap: 50px; }
    .legal-layout { grid-template-columns: 120px minmax(0, 1fr); gap: 35px; }
}

@media (max-width: 820px) {
    .header-inner { min-height: 70px; }
    .menu-toggle { display: block; }
    .site-navigation { position: fixed; inset: 70px 0 auto; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 14px 20px 26px; background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: 0 18px 35px rgba(15,23,42,.1); }
    .site-navigation.is-open { display: flex; }
    .site-navigation a { padding: 14px 4px; border-bottom: 1px solid var(--border); font-size: 16px; }
    .site-navigation a[aria-current="page"]::after { display: none; }
    .menu-toggle[aria-expanded="true"] span:nth-of-type(2) { transform: translateY(6px) rotate(45deg); }
    .menu-toggle[aria-expanded="true"] span:nth-of-type(3) { opacity: 0; }
    .menu-toggle[aria-expanded="true"] span:nth-of-type(4) { transform: translateY(-6px) rotate(-45deg); }
    body.menu-open { overflow: hidden; }
    .download-card { flex-direction: column; align-items: flex-start; padding: 42px; }
}

@media (max-width: 640px) {
    .container { width: min(calc(100% - 28px), var(--container)); }
    .hero { padding: 52px 0 65px; }
    .hero h1 { font-size: clamp(3.2rem, 16vw, 4.5rem); }
    .hero-lead { font-size: 16px; }
    .hero-actions { align-items: flex-start; flex-direction: column; gap: 19px; }
    .hero-facts { gap: 15px; justify-content: space-between; }
    .hero-facts strong { font-size: 15px; }
    .hero-facts span { font-size: 11px; }
    .puzzle-stage { min-height: 520px; margin: 0 -8px; }
    .stage-shape-one { width: 94%; height: 70%; }
    .phone-frame { width: 258px; }
    .card-offline { top: 18%; left: 0; }
    .card-level { right: 0; bottom: 18%; }
    .section-space { padding: 72px 0; }
    .section-heading { margin-bottom: 34px; }
    .section-heading h2, .download-card h2 { font-size: 2.5rem; }
    .feature-card { min-height: 245px; padding: 25px; }
    .steps-list li { grid-template-columns: 44px 1fr; gap: 14px; }
    .download-card { padding: 32px 24px; border-radius: 22px; }
    .legal-main { padding: 50px 0 75px; }
    .legal-layout { display: block; }
    .legal-aside { display: none; }
    .legal-article { padding: 34px 24px; border-radius: 20px; }
    .legal-article h1 { font-size: 3rem; }
    .legal-intro { font-size: 16px; }
    .notice-box { padding: 18px; }
    .footer-inner { flex-direction: column; }
    .footer-links { flex-direction: column; gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; }
}
