:root {
    --ink: #3a2460;
    --ink-soft: #6b568c;
    --cream: #fff8fc;
    --lilac: #f3e9ff;
    --petal: #ffe3f1;
    --pink: #ff5fa2;
    --sky: #49c2ff;
    --mint: #2fce86;
    --gold: #ffc53d;
    --gold-deep: #f0a000;
    --line: rgba(58, 36, 96, 0.12);
    --card: #ffffff;
    --shadow: 0 16px 40px rgba(92, 48, 150, 0.12);
    --radius: 22px;
    --max: 1180px;
    --font: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    --display: "Fredoka", "Trebuchet MS", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(900px 420px at 8% -10%, #ffe1f3 0%, transparent 60%),
        radial-gradient(700px 380px at 100% 0%, #d9f3ff 0%, transparent 55%),
        var(--cream);
    font-family: var(--font);
    font-size: 16.5px;
    line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #7a3dff; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input { font: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 0.45em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.45rem, 2.4vw, 2rem); }
p { margin: 0 0 0.9em; }
.skip { position: absolute; left: 12px; top: -40px; background: #fff; padding: 8px 12px; z-index: 20; }
.skip:focus { top: 12px; }

.ico { width: 1.15em; height: 1.15em; display: inline-block; vertical-align: -0.15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.page-wrap { min-height: 100vh; display: flex; flex-direction: column; }
.page-body { flex: 1; }
.page-main { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; padding: 28px 0 48px; }

/* Header */
.site-head {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.head-inner {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}
.head-inner .brand { justify-self: start; }
.head-inner #site-nav { justify-self: center; }
.head-tools { justify-self: end; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.head-store { background: linear-gradient(180deg, #fffef8, #fff); border-bottom: 3px solid var(--gold-deep); }

.head-ribbon {
    border-top: 1px dashed var(--line);
    background: linear-gradient(90deg, #f7f1ff, #fff);
}
.head-ribbon,
.head-ribbon-store {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    padding: 10px 0 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.head-ribbon p,
.head-ribbon-store p { margin: 0; font-weight: 700; color: var(--ink-soft); }
.head-ribbon-store { justify-content: center; background: linear-gradient(90deg, #fff7d6, #fff); }

.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; min-width: 0; }
.brand img { width: 52px; height: 52px; border-radius: 14px; background: #fff; box-shadow: 0 8px 18px rgba(122, 61, 255, 0.16); flex: none; }
.brand span { font-family: var(--display); font-size: clamp(0.88rem, 2vw, 1.05rem); line-height: 1.15; }

#site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; justify-content: center; }
.nav-link {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--ink); text-decoration: none; font-weight: 700;
    padding: 8px 12px; border-radius: 999px; white-space: nowrap;
}
.nav-link.is-here { background: var(--lilac); color: #5b2ee0; }
.nav-link.nav-shop {
    background: linear-gradient(180deg, #ffe07a, var(--gold) 45%, var(--gold-deep));
    color: #4a2a00;
    box-shadow: 0 4px 0 #e09400;
    font-family: var(--display);
}
.nav-link.nav-shop.is-here {
    background: linear-gradient(180deg, #ffe07a, var(--gold) 45%, var(--gold-deep));
    color: #4a2a00;
    box-shadow: 0 4px 0 #c88400, inset 0 0 0 2px rgba(74, 42, 0, 0.25);
}

.nav-toggle {
    display: none; border: 0; background: var(--lilac); color: var(--ink);
    border-radius: 999px; padding: 8px 12px; font-weight: 700; align-items: center; gap: 6px; cursor: pointer;
}

.store-pop {
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(180deg, #ffe07a, var(--gold) 45%, var(--gold-deep));
    color: #4a2a00; text-decoration: none; font-family: var(--display);
    font-size: 1.05rem; padding: 10px 18px; border-radius: 999px;
    box-shadow: 0 8px 0 #e09400, 0 12px 20px rgba(240, 160, 0, 0.22);
}
.store-pop:hover { transform: translateY(-1px); }

.intl { position: relative; }
.intl-btn {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--line); background: #fff; color: var(--ink);
    border-radius: 999px; padding: 8px 12px; font-weight: 800; cursor: pointer;
}
.intl-note {
    position: absolute; right: 0; top: calc(100% + 8px); width: 230px;
    margin: 0; padding: 10px 12px; background: #fff; border-radius: 14px;
    box-shadow: var(--shadow); z-index: 5; font-size: 0.92rem;
}
.landing-top .intl-note { right: auto; left: 0; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: 999px; padding: 12px 18px; font-weight: 800; text-decoration: none; border: 0; cursor: pointer;
}
.btn-play { background: linear-gradient(180deg, #6d7bff, #7a3dff); color: #fff; box-shadow: 0 8px 0 #5420c9; }
.btn-apk { background: #fff; color: var(--ink); border: 2px solid var(--ink); }
.btn-confirm {
    width: 100%; background: linear-gradient(180deg, #ffe07a, var(--gold) 40%, var(--gold-deep));
    color: #4a2a00; font-family: var(--display); font-size: 1.15rem; padding: 14px 18px;
    box-shadow: 0 8px 0 #e09400;
}
.play-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.kicker { display: inline-block; font-weight: 800; color: #b4236e; background: var(--petal); border-radius: 999px; padding: 4px 10px; margin-bottom: 10px; }
.lede { font-size: 1.08rem; color: var(--ink-soft); max-width: 52ch; }

/* Home */
.landing {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 28px;
    align-items: center;
    margin-bottom: 28px;
}
.landing-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 6px; }
.landing-visual { margin: 0; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); background: #efe4ff; }
.landing-visual img { width: 100%; height: min(380px, 52vw); object-fit: cover; }

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}
.gallery img { width: 100%; height: 200px; object-fit: cover; border-radius: 18px; object-position: center 78%; }

.home-duo {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 18px;
    margin-bottom: 22px;
}
.panel {
    background: var(--card);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.6);
}
.panel-game { display: flex; flex-direction: column; }
.panel-shot { margin: auto 0 0; text-align: center; }
.panel-shot img { width: min(180px, 70%); margin: 12px auto 0; border-radius: 24px; }

.perk-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
.perk { background: #faf6ff; border-radius: 16px; padding: 14px; border: 1px solid var(--line); }
.perk .ico { width: 1.6em; height: 1.6em; color: #7a3dff; }

.home-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.reach-card { background: linear-gradient(160deg, #fff, #e7f7ff); border-radius: var(--radius); padding: 22px; border: 1px solid var(--line); }
.store-teaser {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 14px;
    align-items: center;
    background: linear-gradient(120deg, #fff7d6, #fff);
    border-radius: var(--radius);
    padding: 18px;
    border: 1px solid #ffe08a;
}
.store-teaser img { width: 72px; }
.store-teaser .store-pop { grid-column: 1 / -1; justify-self: start; }

/* Company */
.skin-company .page-body { border-left: 6px solid #7a3dff; background: linear-gradient(90deg, rgba(122, 61, 255, 0.04), transparent 120px); }
.company-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.65fr);
    gap: 28px;
    align-items: start;
    margin-bottom: 28px;
}
.company-media { margin: 0; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); max-height: 520px; }
.company-media img { width: 100%; height: 100%; max-height: 520px; object-fit: cover; object-position: center top; }

.advantage-block h2 { margin-bottom: 14px; }
.advantage-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.advantage {
    background: #fff;
    border-radius: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(92, 48, 150, 0.06);
}
.advantage .ico { width: 1.7em; height: 1.7em; color: #7a3dff; margin-bottom: 6px; }

/* Game */
.skin-game .page-main { padding-top: 18px; }
.game-stage {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    align-items: center;
    background: linear-gradient(135deg, #fff, #f3ebff);
    border-radius: 28px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--line);
}
.game-icon-wrap { margin: 0; text-align: center; }
.game-mark { width: 168px; margin: 0 auto; border-radius: 28px; box-shadow: var(--shadow); }
.online-flag { display: inline-flex; align-items: center; gap: 6px; background: #e5fff3; color: #0d7a45; font-weight: 800; border-radius: 999px; padding: 4px 10px; }

.feature-bento {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.feature {
    background: #fff;
    border-radius: 18px;
    padding: 18px;
    border: 1px solid var(--line);
}
.feature-wide { grid-column: span 1; }
.feature .ico { width: 1.6em; height: 1.6em; color: #7a3dff; }

/* Contact */
.contact-sheet {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.55fr);
    gap: 24px;
    align-items: stretch;
}
.contact-main {
    background: #fff;
    border-radius: 28px;
    padding: 24px;
    box-shadow: var(--shadow);
}
.contact-media { margin: 0; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); min-height: 100%; }
.contact-media img { width: 100%; height: 100%; min-height: 360px; object-fit: cover; }

.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.contact-list li {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 10px;
    align-items: start;
    background: #faf6ff;
    border-radius: 14px;
    padding: 12px 14px;
}
.contact-list a { color: var(--ink); font-weight: 700; word-break: break-word; }

/* Store */
.store-band {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
    background: linear-gradient(120deg, #fff9e6, #fff);
    border: 1px solid #ffe08a;
    border-radius: 24px;
    padding: 20px 22px;
    margin-bottom: 20px;
}
.store-band img { width: 96px; height: 96px; object-fit: contain; }
.coin-intro { max-width: none; }

.money-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; }
.money-btn { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 12px; font-weight: 800; cursor: pointer; }
.money-btn.is-on { background: var(--ink); color: #fff; }

.store-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.75fr); gap: 22px; align-items: start; }
.pack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pack {
    text-align: center; border: 2px solid transparent; background: #fff; border-radius: 18px;
    padding: 12px; cursor: pointer; box-shadow: 0 8px 20px rgba(92, 48, 150, 0.06);
}
.pack.is-on { border-color: #7a3dff; background: #f7f1ff; }
.pack img { width: 64px; height: 64px; margin: 0 auto 8px; object-fit: contain; }
.pack strong { display: block; font-size: 0.95rem; }
.pack em { font-style: normal; color: #b4236e; font-weight: 800; }

.order-card { position: sticky; top: 96px; background: #fff; border-radius: 24px; padding: 18px; box-shadow: var(--shadow); border: 2px solid #ffe08a; }
.field { margin-bottom: 12px; }
.field label { display: block; font-weight: 800; margin-bottom: 4px; }
.field input[type="text"], .field input[type="email"] {
    width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff;
}
.field input[readonly] { background: #f6f2fb; }
.pay-list { display: grid; gap: 8px; }
.pay, .pay-view {
    display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff;
}
.pay { cursor: pointer; }
.pay.is-on { border-color: #7a3dff; background: #f7f1ff; }
.pay-view { color: var(--ink-soft); }
.pay input { margin: 0; }
.agree { display: flex; gap: 8px; align-items: flex-start; font-size: 0.95rem; }
.err { color: #c4234a; font-size: 0.88rem; min-height: 1.1em; display: block; }
.alert { background: #ffe6ee; color: #8d1238; border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.picked { display: flex; justify-content: space-between; gap: 8px; background: #fff7d6; border-radius: 12px; padding: 10px 12px; font-weight: 800; }

.receipt, .status-card, .error-card {
    max-width: 680px; margin: 20px auto; background: #fff; border-radius: 28px; padding: 28px; box-shadow: var(--shadow);
}
.receipt table { width: 100%; border-collapse: collapse; }
.receipt th, .receipt td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.receipt th { width: 34%; color: var(--ink-soft); font-weight: 700; }
.status-card { text-align: center; }
.status-card .ico { width: 64px; height: 64px; }
.status-card.is-ok .ico { color: var(--mint); }
.status-card.is-bad .ico { color: #e23b6a; }
.error-card { display: grid; grid-template-columns: 88px 1fr; gap: 16px; align-items: center; border-left: 8px solid #e23b6a; }
.error-card img { width: 88px; }

/* Footer */
.foot { margin-top: 28px; }
.foot-copy {
    width: 100%;
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 0.88rem;
    color: var(--ink-soft);
}
.foot-home .foot-copy {
    grid-column: 1 / -1;
    border-top-color: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.72);
}
.foot-contact .foot-copy {
    border-top-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.85);
    width: 100%;
    flex-basis: 100%;
}
.foot-game .foot-copy {
    border-top-color: rgba(58, 36, 96, 0.16);
    color: var(--ink-soft);
    width: 100%;
    flex-basis: 100%;
}
.foot-store .foot-copy,
.foot-slip .foot-copy,
.foot-company .foot-copy,
.foot-error .foot-copy { width: 100%; }
.foot-game { flex-wrap: wrap; }
.foot-contact { flex-wrap: wrap; }
.foot a { color: var(--ink); font-weight: 700; text-decoration: none; }
.foot-home { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 18px; background: #2b1848; color: #fff; border-radius: 28px; padding: 22px; }
.foot-home a, .foot-home strong { color: #fff; }
.foot-home em { display: block; font-style: normal; color: #ffc53d; font-weight: 800; margin-bottom: 6px; }
.foot-home div { display: grid; gap: 6px; align-content: start; }
.foot-company { text-align: center; color: var(--ink-soft); border-top: 1px dashed var(--line); padding-top: 16px; }
.foot-game { display: flex; justify-content: space-between; gap: 12px; align-items: center; background: linear-gradient(90deg, #ffe3f6, #e5f6ff); border-radius: 20px; padding: 16px 18px; }
.foot-game > div:first-child strong,
.foot-game > div:first-child span { display: block; }
.foot-game .foot-links { display: flex; gap: 14px; flex-wrap: wrap; }
.foot-contact { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; background: #24143d; color: #fff; border-radius: 18px; padding: 14px; }
.foot-contact a { color: #fff; display: inline-flex; gap: 6px; align-items: center; }
.foot-store { display: flex; justify-content: center; gap: 18px; font-size: 0.92rem; flex-wrap: wrap; }
.foot-slip { text-align: center; }
.foot-error { display: flex; justify-content: space-between; gap: 10px; background: #fff; border-radius: 16px; padding: 12px 14px; flex-wrap: wrap; }

@media (max-width: 1024px) {
    .pack-grid { grid-template-columns: repeat(2, 1fr); }
    .head-inner { grid-template-columns: 1fr auto; }
    .head-inner #site-nav { grid-column: 1 / -1; order: 3; }
    .head-inner .brand { order: 1; }
    .head-tools { order: 2; }
}

@media (max-width: 900px) {
    .landing, .home-duo, .home-bottom, .company-hero, .game-stage, .contact-sheet, .store-layout, .store-band, .foot-home { grid-template-columns: 1fr; }
    .gallery { grid-template-columns: repeat(3, 1fr); }
    .advantage-grid, .perk-grid, .feature-bento { grid-template-columns: 1fr; }
    .store-teaser { grid-template-columns: 72px 1fr; }
    .order-card { position: static; }
    .contact-media img { min-height: 280px; }
    .head-ribbon { flex-direction: column; align-items: flex-start; }
    .head-ribbon .play-actions { width: 100%; }
}

@media (max-width: 720px) {
    .head-inner { grid-template-columns: 1fr auto; }
    .nav-toggle { display: inline-flex; }
    #site-nav ul { display: none; }
    #site-nav.is-open ul {
        display: flex; flex-direction: column; position: absolute; left: 16px; right: 16px; top: 68px;
        background: #fff; padding: 10px; border-radius: 16px; box-shadow: var(--shadow); z-index: 12;
    }
    .site-head { position: sticky; }
    .head-inner { position: relative; }
    .gallery { grid-template-columns: 1fr 1fr; }
    .gallery img { height: 160px; }
    .pack-grid { grid-template-columns: 1fr 1fr; }
    .brand span { max-width: 42vw; }
}

@media (max-width: 480px) {
    .gallery, .pack-grid { grid-template-columns: 1fr; }
    .play-actions { flex-direction: column; align-items: stretch; }
    .foot-game, .foot-error { flex-direction: column; align-items: flex-start; }
}
