:root {
    --purple: #6239a3;
    --ink: #332448;
    --yellow: #ffdb69;
    --paper: #fffdf7;
    --muted: #726880;
}

* { box-sizing: border-box; }

html body .debug-view,
html body .debug-view.show-view {
    display: contents !important;
    border: 0 !important;
    margin: 0 !important;
}

html body .debug-view-path,
html body .show-view .debug-view-path {
    display: none !important;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "DM Sans", sans-serif;
    font-size: 16px;
    overflow-x: hidden;
}

button, a, select, input { -webkit-tap-highlight-color: transparent; }
button, input, select { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; color: inherit; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, .brand {
    font-family: Fredoka, "Trebuchet MS", sans-serif;
    font-weight: 500;
}

header {
    max-width: 1400px;
    margin: auto;
    padding: 18px 5%;
    display: flex;
    align-items: center;
    gap: 28px;
    position: relative;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 16px #40274614;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--purple);
    border-radius: 2px;
}

.brand-logo img {
    display: block;
    height: 64px;
    width: auto;
}

.brand {
    font-size: 36px;
    color: var(--purple);
    letter-spacing: -1px;
    line-height: 1;
}

.brand span {
    display: block;
    letter-spacing: 2px;
    font: 700 10px "DM Sans", sans-serif;
    margin-top: 9px;
}

nav {
    display: flex;
    gap: 26px;
    margin: auto;
}

nav a:hover { color: var(--purple); }

button.family, .outline {
    background: transparent;
    border: 1.5px solid #dacde9;
    border-radius: 30px;
    padding: 13px 20px;
    font-weight: 600;
}

.family:hover, .outline:hover { background: #f0e8fc; }

.welcome {
    max-width: 1400px;
    min-height: calc(100vh - 96px);
    margin: 8px auto 120px;
    padding: 12px 5% 56px;
    display: grid;
    grid-template-columns: .83fr 1.17fr;
    gap: 36px;
    align-items: center;
}

h1 {
    font-size: clamp(42px, 4.7vw, 68px);
    line-height: 1.06;
    margin: 20px 0;
    letter-spacing: -1.5px;
}

h1 em {
    font-style: normal;
    color: var(--purple);
}

p { line-height: 1.7; color: var(--muted); }
.welcome p { font-size: 18px; }

.eyebrow {
    font-size: 12px;
    letter-spacing: 2px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--purple);
}

.primary {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    background: var(--purple);
    color: white;
    border: 0;
    border-radius: 30px;
    padding: 16px 25px;
    font-weight: 700;
}

.primary:hover {
    background: #48257f;
    transform: translateY(-2px);
}

.primary span { font-size: 24px; line-height: 1; }
.smallnote { font-size: 14px; color: var(--muted); margin-top: 20px; }

.world {
    position: relative;
    height: min(72vh, 740px);
    min-height: 580px;
    border-radius: 90px 90px 35px 35px;
    background: #cadff9;
}

.world > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 55%;
    border-radius: inherit;
}

.worldlabel {
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff9e9e8;
    border-radius: 20px;
    padding: 10px 16px;
    white-space: nowrap;
    font-family: Fredoka;
}

.pin {
    position: absolute;
    background: white;
    border: 3px solid #ffedaa;
    border-radius: 24px;
    padding: 12px 14px;
    box-shadow: 0 8px 20px #40274622;
    font-size: 14px;
    font-weight: 700;
}

.pin:hover { transform: translateY(-4px); }
.p1 { left: -18px; top: 35%; }
.p2 { right: -15px; top: 50%; }
.p3 { left: 25%; bottom: 20px; }

.opy-greeting {
    position: absolute;
    bottom: 0;
    left: -70px;
    background: none;
    border: none;
}

.opy {
    display: block;
    width: 180px;
    height: auto;
}

.bubble {
    position: absolute;
    top: -8px;
    left: 70px;
    background: white;
    border-radius: 20px 20px 20px 0;
    padding: 10px 16px;
    white-space: nowrap;
    font-family: Fredoka;
}

.ribbon {
    display: flex;
    justify-content: center;
    gap: 80px;
    padding: 22px 24px;
    background: #fff0ba;
    color: #795b23;
    font-size: 14px;
    margin-top: 0;
}

.section {
    max-width: 1230px;
    margin: 76px auto;
    padding: 0 35px;
}

.sectionhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

h2 { font-size: 38px; line-height: 1.2; margin: 10px 0 12px; }
h3 { font-size: 24px; margin: 12px 0; }
.sectionhead p { margin: 0 0 26px; }

.tag {
    font-size: 13px;
    border-radius: 20px;
    background: #ece5f6;
    color: var(--purple);
    padding: 9px 15px;
    white-space: nowrap;
}

.tag-gold { background: var(--yellow); color: var(--ink); }

.playlayout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 48px;
    background: #f2eafb;
    border-radius: 30px;
    padding: 32px;
}

.playlayout aside { text-align: center; }
.mini { margin: -12px auto 0; width: 130px; }
.playlayout aside p { font-size: 14px; }
.playlayout label { display: block; font-size: 14px; margin-bottom: 8px; }

select, input, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cfc0e0;
    border-radius: 12px;
    background: white;
    color: var(--ink);
    font: inherit;
}

.playlayout .outline { margin-top: 12px; width: 100%; font-size: 14px; }

.board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    align-content: center;
}

.card {
    min-height: 120px;
    background: var(--purple);
    color: var(--yellow);
    border: 5px solid white;
    border-radius: 18px;
    box-shadow: 0 4px 0 #d4c2ed;
    font-size: 34px;
}

.card:hover { transform: translateY(-3px); }
.card.flipped, .card.matched { background: white; color: var(--purple); }
.card.matched { box-shadow: inset 0 0 0 3px #93cfb8; }
.gamemessage { text-align: center; font-size: 14px; margin: 14px 0 0; }

.story {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 65px;
    align-items: center;
}

.storyart {
    background: #cde9f8;
    min-height: 290px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.storyart .opy { width: 200px; margin: 5px auto 0; }
.storyart span { text-align: center; font-family: Fredoka; font-size: 20px; margin-bottom: 20px; }

.birthday {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
    background: #fff1c9;
    border-radius: 30px;
    padding: 35px 45px;
}

.birthdaycard {
    text-align: center;
    background: white;
    padding: 25px;
    border-radius: 24px;
    min-width: 280px;
    transform: rotate(2deg);
}

.celebration { font-size: 48px; }
.birthdaycard p { font-size: 14px; }
.birthdaycard .tag { display: inline-block; }

.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.product {
    border: 1px solid #ece4f3;
    border-radius: 22px;
    overflow: hidden;
    background: white;
}

.productvisual {
    height: 145px;
    background: #eee8f7;
    display: grid;
    place-items: center;
    font-size: 66px;
}

.product:nth-child(2n) .productvisual { background: #e0eff4; }
.product:nth-child(3n) .productvisual { background: #fff0c9; }
.productbody { padding: 20px; }
.product h3 { font-size: 22px; margin: 0 0 8px; }
.product p { font-size: 14px; margin: 0 0 10px; }
.product button {
    border: 0;
    background: none;
    color: var(--purple);
    font-weight: 700;
    padding: 0;
}
.product-order {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--purple);
}
.price { font-family: Fredoka, sans-serif; font-size: 22px; color: var(--ink); }

.kits-wrap {
    max-width: 1230px;
    margin: 40px auto 70px;
    padding: 0 35px;
}

.kits-visual {
    height: 280px;
    border-radius: 32px;
    overflow: hidden;
    margin-bottom: 28px;
}

.kits-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 70%;
}

.kits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.kit {
    background: white;
    border: 1px solid #ece4f3;
    border-radius: 24px;
    padding: 24px;
}

.kit ul { padding-left: 18px; color: var(--muted); }
.kit li.hi { font-weight: 700; color: var(--ink); }
.kit .primary { margin-top: 16px; width: 100%; justify-content: center; }

.familybanner {
    max-width: 1160px;
    margin: 70px auto;
    background: #e8dcf9;
    border-radius: 25px;
    padding: 24px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.familybanner img {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 20px;
}

.familybanner h2 { font-size: 28px; }
.familybanner p { margin-bottom: 0; }

footer {
    border-top: 1px solid #e8e0ee;
    padding: 35px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

footer p, footer > span { font-size: 13px; }
.textbutton { border: 0; background: none; color: var(--purple); font-size: 14px; }

dialog {
    border: 0;
    border-radius: 25px;
    padding: 38px;
    width: min(92vw, 600px);
    max-height: 85vh;
    color: var(--ink);
    box-shadow: 0 20px 100px #28133333;
}

dialog::backdrop {
    background: #25153799;
    backdrop-filter: blur(5px);
}

#close {
    position: absolute;
    right: 15px;
    top: 10px;
    background: none;
    border: 0;
    font-size: 30px;
}

dialog h2 { font-size: 32px; }
dialog label { display: block; margin: 20px 0 7px; }
dialog .primary { margin-top: 20px; }

.previewname {
    background: #fff0c9;
    padding: 25px;
    text-align: center;
    border-radius: 20px;
    font-family: Fredoka;
    font-size: 28px;
    margin-top: 20px;
}

.checkout, .thanks {
    max-width: 760px;
    margin: 20px auto 70px;
    padding: 0 24px;
}

.checkout-card {
    background: white;
    border: 1px solid #ece4f3;
    border-radius: 28px;
    padding: 32px;
}

.checkout-card .price { font-size: 32px; }
fieldset { border: 0; padding: 0 0 16px; }
legend { font-family: Fredoka, sans-serif; font-size: 22px; margin-bottom: 8px; }
label { display: block; font-weight: 700; margin: 12px 0; }
.consent { display: flex; gap: 10px; align-items: start; font-weight: 600; }
.form-errors { color: #9b1c3a; }
.quotes label { font-weight: 700; background: #f2eafb; padding: 10px 12px; border-radius: 14px; }
.tiny { color: var(--muted); font-size: 13px; }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
    outline: 3px solid #de8b18;
    outline-offset: 4px;
}

@media (max-width: 1100px) {
    .welcome {
        min-height: auto;
        margin-bottom: 80px;
        gap: 28px;
    }

    .world {
        height: 560px;
        min-height: 0;
    }

    .p1 { left: 8px; }
    .p2 { right: 8px; }
    .opy-greeting { left: -24px; }
}

@media (max-width: 900px) {
    header {
        gap: 12px;
        flex-wrap: nowrap;
    }

    .family {
        display: none;
    }

    .nav-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    nav {
        display: none;
        position: absolute;
        top: calc(100% - 6px);
        left: 5%;
        right: 5%;
        z-index: 30;
        margin: 0;
        padding: 14px;
        background: #fff;
        border-radius: 18px;
        box-shadow: 0 16px 40px #40274622;
        flex-direction: column;
        gap: 4px;
    }

    nav a {
        padding: 12px 14px;
        border-radius: 12px;
        font-weight: 700;
    }

    body.is-nav-open nav {
        display: flex;
    }

    .welcome {
        grid-template-columns: 1fr;
        min-height: auto;
        margin: 10px auto 72px;
        padding: 10px 5% 20px;
    }

    .world {
        height: 420px;
        border-radius: 48px 48px 24px 24px;
    }

    .opy-greeting { left: 8px; }
    .opy { width: 130px; }
    .bubble { left: 56px; top: 4px; font-size: 14px; }
    .p1 { top: 28%; }
    .p2 { top: 46%; }
    .p3 { left: 12px; bottom: 16px; }
    .pin { font-size: 12px; padding: 9px 11px; }

    .ribbon { gap: 16px; flex-wrap: wrap; padding: 18px; }
    .section, .kits-wrap { padding: 0 20px; }
    .section { margin: 56px auto; }
    .playlayout { grid-template-columns: 1fr; gap: 20px; padding: 22px; }
    .products, .kits { grid-template-columns: 1fr 1fr; }
    .story { grid-template-columns: 1fr; gap: 28px; }
    .kits-visual { height: 200px; }
    .familybanner {
        margin: 40px 20px;
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }
    .familybanner .primary { width: 100%; justify-content: center; }
    footer { flex-wrap: wrap; gap: 12px; }
    dialog { padding: 28px 22px; width: min(94vw, 600px); }
}

@media (max-width: 600px) {
    .brand-logo img { height: 46px; }
    h1 { font-size: 40px; max-width: none; }
    h2 { font-size: 30px; }
    .welcome { margin-bottom: 56px; }
    .world { height: 340px; }
    .worldlabel { font-size: 13px; padding: 8px 12px; }
    .opy { width: 110px; }
    .products, .kits { grid-template-columns: 1fr; }
    .board { grid-template-columns: repeat(2, 1fr); }
    .card { min-height: 92px; font-size: 28px; border-width: 3px; }
    .birthday { display: block; padding: 24px; }
    .birthdaycard { margin-top: 20px; min-width: 0; transform: none; }
    .familybanner img { width: 100%; height: 180px; }
    .checkout-card { padding: 22px; }
    .primary { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; transform: none !important; }
}
