:root {
    --ice: #e7f2fa;
    --snow: #f6fbfe;
    --paper: #ffffff;
    --ink: #173044;
    --steel: #3d6f97;
    --line: #d3e4f1;
    --green: #238a45;
    --green-deep: #176433;
    --cyan: #1496c4;
    --copper: #c56a2d;
    --copper-deep: #8a4318;
    --wing: #e07a22;
    --shadow: 0 14px 36px rgba(23, 48, 68, 0.08);
    --font: "Source Sans 3", "Segoe UI", sans-serif;
    --display: "Exo 2", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0)),
        repeating-linear-gradient(135deg, #eef6fb 0 14px, #e7f1f8 14px 15px);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--steel); }
button, input { font: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; letter-spacing: 0.01em; }
h1 { font-size: clamp(2rem, 4vw, 3.3rem); margin: 0 0 0.4rem; }
h2 { font-size: 1.55rem; margin: 0 0 0.5rem; }
p { margin: 0 0 0.85rem; }

.skip {
    position: absolute;
    left: 12px;
    top: -40px;
    background: var(--ink);
    color: #fff;
    padding: 8px 12px;
    z-index: 20;
}
.skip:focus { top: 12px; }

.masthead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(246, 251, 254, 0.94);
    backdrop-filter: blur(8px);
    border-bottom: 4px solid var(--bar, var(--cyan));
    box-shadow: 0 8px 24px rgba(23, 48, 68, 0.05);
}
body[data-view="home"] { --bar: var(--cyan); }
body[data-view="company"] { --bar: var(--copper); }
body[data-view="game"] { --bar: var(--green); }
body[data-view="contact"] { --bar: var(--steel); }
body[data-view="shop"] { --bar: var(--wing); }
body[data-view="confirm"] { --bar: var(--copper); }
body[data-view="payfinish"] { --bar: var(--green); }
body[data-view="error"] { --bar: #c4473a; }

.brand-row, .context, .wrap, .site-foot .wrap {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}
.brand-row {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 84px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--ink);
    min-width: 0;
}
.brand img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    flex: 0 0 auto;
}
.brand-name {
    font-family: var(--display);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 0.04em;
    line-height: 1.15;
}
.brand small {
    display: block;
    margin-top: 2px;
    color: var(--steel);
    font-family: var(--font);
    font-weight: 600;
    letter-spacing: 0;
    font-size: 0.82rem;
}
.links {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}
.links a {
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 999px;
}
.links a.is-on {
    background: #e5f4ea;
    color: var(--green-deep);
}
.store-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 118px;
    padding: 12px 18px;
    border-radius: 999px;
    background: linear-gradient(180deg, #e8883a, var(--copper-deep));
    color: #fff;
    text-decoration: none;
    font-family: var(--display);
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 8px 0 #6d3412;
}
.store-btn .ico { width: 18px; height: 18px; stroke: #fff; }
.store-btn.is-on {
    outline: 3px solid #ffe1c2;
    outline-offset: 3px;
    box-shadow: 0 8px 0 #6d3412, 0 0 0 6px rgba(197, 106, 45, 0.18);
}
.context {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 0 0 10px;
    font-size: 0.92rem;
}
.context a { font-weight: 700; text-decoration: none; }
.menu-toggle { display: none; }

.wrap { padding: 36px 0 56px; }
.lead { max-width: 68ch; color: #345066; }

.stage-frame {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 28px;
    align-items: center;
    margin-bottom: 28px;
}
.stage-frame img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 8px 42px 8px 8px;
    box-shadow: var(--shadow);
    background: #d7e7f3;
}
.kicker {
    margin: 0 0 8px;
    color: var(--copper-deep);
    font-family: var(--display);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.82rem;
}

.badge-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.badge img { height: 54px; width: auto; }
.badge { display: inline-block; filter: drop-shadow(0 6px 0 rgba(23, 48, 68, 0.12)); }

.shot-row, .reason-row, .edge-grid, .culture, .promise-grid, .contact-grid {
    display: grid;
    gap: 16px;
}
.shot-row { grid-template-columns: repeat(4, 1fr); margin: 10px 0 28px; }
.shot-row img, .story figure img, .mission img, .contact-photo img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow);
    background: #d7e7f3;
}
.shot-row figcaption, .story figcaption { font-size: 0.85rem; color: var(--steel); margin-top: 6px; }

.reason-row { grid-template-columns: repeat(3, 1fr); }
.tile, .edge, .mission, .slip, .receipt, .status-card, .promise article, .contact-card {
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.tile, .edge, .promise article, .contact-card {
    padding: 18px;
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}
.tile h2, .edge h3 { font-size: 1.15rem; }

.ico {
    width: 28px;
    height: 28px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.tile .ico, .edge .ico, .contact-card .ico { color: var(--cyan); }
.shop-call {
    margin-top: 28px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 22px;
    background: var(--ink);
    color: #fff;
    border-radius: 16px;
}
.shop-call a { color: #fff; }
.shop-call .store-btn { flex: 0 0 auto; }

.story {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 28px;
}
.story-side { position: sticky; top: 120px; align-self: start; }
.story-side a { display: flex; gap: 8px; align-items: center; text-decoration: none; font-weight: 700; margin-bottom: 8px; }
.story figure { margin: 0 0 16px; float: right; width: min(240px, 42%); margin-left: 16px; }
.story figure img { max-height: 170px; object-fit: cover; }
.edge-grid { grid-template-columns: 1fr 1fr; clear: both; }
.culture { grid-template-columns: repeat(3, 1fr); margin: 8px 0 0; padding: 0; clear: both; }
.badge-row { clear: both; }
.culture li { list-style: none; background: #fff; border: 1px solid var(--line); padding: 12px 14px; font-weight: 700; }

.mission-list { display: grid; gap: 22px; }
.mission {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 18px;
    padding: 14px;
    align-items: center;
}
.mission:nth-child(even) { grid-template-columns: 1fr 280px; }
.mission:nth-child(even) img { order: 2; }
.mission img { max-height: 190px; object-fit: cover; }
.feature-line { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.feature-line .ico { color: var(--green); flex: 0 0 auto; margin-top: 2px; }

.contact-grid { grid-template-columns: 1.1fr 0.9fr; align-items: start; }
.contact-card { display: flex; gap: 12px; margin-bottom: 12px; align-items: flex-start; }
.contact-card .ico { color: var(--copper); }
.contact-card a { font-weight: 700; }
.contact-photo img { max-width: 360px; max-height: 220px; object-fit: cover; }

.note {
    background: #fff4ea;
    border: 1px solid #f0c49a;
    color: #6d3412;
    padding: 12px 14px;
    margin: 0 0 16px;
}
.money-switch { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 16px; }
.money-switch button, .pack, .confirm-btn, .text-btn {
    border: 0;
    cursor: pointer;
}
.money-switch button {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
}
.money-switch button.is-on { background: var(--ink); color: #fff; }

.ledger { display: grid; gap: 18px; }
.pack-group h2 { font-size: 1rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--steel); }
.pack-list { display: grid; gap: 10px; }
.pack {
    width: 100%;
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 12px;
    align-items: center;
    text-align: left;
    background: #fff;
    border: 1px solid var(--line);
    border-left: 6px solid var(--cyan);
    padding: 10px 14px;
}
.pack img { width: 54px; height: 50px; object-fit: contain; }
.pack-name { font-family: var(--display); font-weight: 800; display: block; }
.pack-cost { color: var(--copper-deep); font-weight: 800; }
.pack.is-picked { border-color: var(--copper); background: #fff8f2; box-shadow: inset 0 0 0 1px var(--copper); }

.order-slip {
    margin-top: 8px;
    background:
        radial-gradient(circle at 12px 0, transparent 10px, #fff 11px) top left / 24px 16px repeat-x,
        #fff;
    border: 1px solid var(--line);
    padding: 28px 20px 20px;
    box-shadow: var(--shadow);
}
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field.wide { grid-column: 1 / -1; }
label { display: block; font-weight: 700; margin-bottom: 4px; }
input[type="text"], input[readonly] {
    width: 100%;
    border: 1px solid #c5d8e8;
    background: #f8fbfd;
    padding: 10px 12px;
    border-radius: 8px;
}
.pays { display: flex; flex-wrap: wrap; gap: 8px; }
.pay {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    padding: 8px 12px;
}
.pay.is-on { border-color: var(--green); background: #eef8f1; }
.pay-look { color: var(--steel); background: #f3f7fb; cursor: default; }
.agree { display: flex; gap: 8px; align-items: flex-start; }
.agree input { margin-top: 4px; }
.err { display: block; min-height: 1.1em; color: #a32626; font-size: 0.92rem; }
.confirm-btn {
    background: var(--green);
    color: #fff;
    font-family: var(--display);
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 12px 22px;
    border-radius: 999px;
    box-shadow: 0 6px 0 var(--green-deep);
}
.picked-line { display: flex; justify-content: space-between; gap: 12px; background: var(--ice); padding: 10px 12px; border-radius: 8px; font-weight: 700; }
.trap { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.promise { margin-top: 28px; }
.promise-grid { grid-template-columns: repeat(3, 1fr); }
.promise .ico { color: var(--wing); }

.receipt, .status-card {
    max-width: 720px;
    margin: 0 auto;
    padding: 28px 22px;
    border-radius: 18px;
}
.receipt table { width: 100%; border-collapse: collapse; }
.receipt th, .receipt td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.receipt th { width: 34%; color: var(--steel); font-weight: 700; }
.status-card { text-align: center; }
.status-card.ok { border-top: 8px solid var(--green); }
.status-card.bad { border-top: 8px solid #c4473a; }
.status-card .ico { width: 54px; height: 54px; margin: 0 auto 8px; }
.status-card.ok .ico { color: var(--green); }
.status-card.bad .ico { color: #c4473a; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.text-btn, .actions a.solid, .actions a.ghost {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 800;
}
.actions a.solid { background: var(--copper); color: #fff; }
.actions a.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }

.site-foot {
    background: var(--ink);
    color: #d5e4f0;
    padding: 28px 0;
}
.site-foot a { color: #fff; }
.foot-grid { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.copy-line { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(213, 228, 240, 0.25); font-size: 0.92rem; }
.foot-links { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

@media (max-width: 860px) {
    .menu-toggle { display: inline-flex; margin-left: auto; background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
    .links { display: none; width: 100%; flex-direction: column; align-items: stretch; margin: 0 0 10px; }
    .links.is-open { display: flex; }
    .brand-row { flex-wrap: wrap; padding: 10px 0; }
    .store-btn { width: 100%; margin-bottom: 10px; }
    .stage-frame, .story, .mission, .mission:nth-child(even), .contact-grid, .reason-row, .edge-grid, .culture, .promise-grid, .shot-row, .fields {
        grid-template-columns: 1fr;
    }
    .story figure { float: none; width: min(280px, 100%); margin: 0 0 12px; }
    .story-side { position: static; }
    .mission:nth-child(even) img { order: 0; }
    .shop-call { flex-direction: column; align-items: flex-start; }
}
