/* ==========================================================================
   MagnoliaMC - Clean Store Theme
   One stylesheet. No layered patch blocks.
   ========================================================================== */

:root {
    /* ---- The Magnolia spectrum: one ordered rainbow, used as a system ---- */
    --rb-rose:   #ff6fae;
    --rb-coral:  #ff8a5c;
    --rb-amber:  #ffc24d;
    --rb-green:  #4fce86;
    --rb-teal:   #2fc2c6;
    --rb-blue:   #5b97f5;
    --rb-violet: #a978f0;

    /* The signature - full spectrum, reserved for one or two moments */
    --rainbow: linear-gradient(100deg,
        var(--rb-rose), var(--rb-coral), var(--rb-amber), var(--rb-green),
        var(--rb-teal), var(--rb-blue), var(--rb-violet));
    /* Softer wash for ambient fills */
    --rainbow-soft: linear-gradient(100deg,
        #ffd7e8, #ffe2cf, #fff0c4, #cdf0d6, #c4eeef, #d2e3fb, #e7d6fb);

    /* Brand anchors (rose -> violet) drive every primary action & active state */
    --accent: #ff6fae;
    --accent-strong: #d8488f;        /* readable rose for text/links on light */
    --grad-primary: linear-gradient(135deg, #ff6fae, #a978f0);
    --grad-primary-hover: linear-gradient(135deg, #ff5da4, #9a64ee);

    /* Legacy aliases kept in sync so older rules stay coherent */
    --primary: #ff6fae;
    --secondary: #a978f0;
    --primary-strong: #d8488f;

    /* Gold is now reserved for one job: sales & "value" highlights */
    --gold: #ffc24d;
    --gold-light: #ffe6a6;
    --gold-dark: #b07d18;

    --bg: #fffafe;
    --surface: #ffffff;
    --surface-soft: #fff7fb;
    --surface-tint: #fff0f7;
    --border: rgba(214, 174, 224, .42);
    --border-strong: rgba(196, 140, 226, .55);

    --text: #40303f;
    --text-mid: #6a5168;
    --text-soft: #927a90;

    --shadow-sm: 0 5px 20px rgba(150, 110, 185, .13);
    --shadow-md: 0 14px 42px rgba(150, 110, 185, .18);
    --shadow-lg: 0 24px 70px rgba(120, 90, 160, .24);

    --radius: 24px;
    --radius-sm: 16px;
    --radius-xs: 12px;
    --page-width: 1420px;
}

/* Base / layout safety */
*,
*::before,
*::after { box-sizing: border-box; }

html {
    min-height: 100%;
    background: var(--bg);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body.mmc-body {
    min-height: 100dvh;
    margin: 0;
    overflow-x: clip;
    overflow-y: auto;
    color: var(--text);
    font-family: "DM Sans", sans-serif;
    background:
        radial-gradient(ellipse 70% 40% at 7% 0%, rgba(255, 197, 226, .22), transparent 60%),
        radial-gradient(ellipse 45% 28% at 95% 10%, rgba(183, 232, 174, .14), transparent 58%),
        linear-gradient(180deg, #fffefe 0%, #fff8fc 100%);
}

a { color: inherit; }

#storeApp {
    position: relative;
    z-index: 1;
    width: 100%;
    min-width: 0;
}

#content,
.mmc-content,
.mmc-container,
.mmc-main,
.mmc-sidebar,
.product-page,
.product-grid-2col,
.product-visual,
.product-details {
    min-width: 0;
}

/* Light, non-interactive ambience */
.mmc-body::before {
    content: "";
    position: fixed;
    z-index: 0;
    inset: 0;
    pointer-events: none;
    opacity: .22;
    background:
        radial-gradient(circle at 10% 26%, rgba(255, 173, 213, .35) 0 2px, transparent 2.5px),
        radial-gradient(circle at 78% 70%, rgba(255, 224, 138, .25) 0 2px, transparent 2.5px),
        radial-gradient(circle at 42% 88%, rgba(183, 232, 174, .27) 0 2px, transparent 2.5px);
    background-size: 180px 180px;
}

.petals {
    display: none;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero-crown-bar,
.hero-band,
.hero-nav {
    display: none !important;
}

.magnolia-hero-v2 {
    position: relative;
    z-index: 20;
}

.hero-art-banner {
    position: relative;
    display: grid;
    min-height: clamp(500px, 43vw, 670px);
    place-items: center;
    overflow: hidden;
    background:
        linear-gradient(to bottom,
            rgba(255, 195, 222, .16) 0%,
            rgba(255, 242, 249, .08) 40%,
            rgba(255, 250, 253, .50) 78%,
            var(--bg) 100%),
        url("./assets/hero-banner.webp") center 42% / cover no-repeat;
}

.hero-art-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(72, 45, 69, .16), transparent 48%, rgba(72, 45, 69, .13)),
        radial-gradient(circle at 18% 15%, rgba(255, 195, 222, .25), transparent 30%),
        radial-gradient(circle at 86% 18%, rgba(183, 232, 174, .13), transparent 28%);
}

.hero-art-banner::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -2px;
    left: 0;
    height: 44%;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent, var(--bg) 86%);
}

.hero-art-scrim {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to bottom,
        rgba(67, 39, 64, .14),
        rgba(255, 243, 249, .02) 45%,
        rgba(255, 250, 253, .28) 80%,
        var(--bg));
}

.hero-art-content {
    position: relative;
    z-index: 2;
    display: flex;
    width: min(1120px, 100%);
    padding: 4rem 1.5rem 6.5rem;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-kicker {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    padding: .4rem 1.1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 206, 228, .78);
    border-radius: 999px;
    color: #704d68;
    background: rgba(255, 252, 254, .78);
    box-shadow: 0 10px 30px rgba(108, 59, 88, .15);
    font-size: .75rem;
    font-weight: 900;
    letter-spacing: .13em;
    text-transform: uppercase;
    backdrop-filter: blur(12px);
}

.hero-art-logo-link {
    display: inline-flex;
    max-width: min(680px, 90vw);
}

.hero-art-logo {
    display: block;
    max-width: 100%;
    max-height: 200px;
    filter: drop-shadow(0 10px 25px rgba(70, 39, 65, .45));
}

.hero-art-wordmark {
    color: #fffafd;
    font-family: "Cinzel Decorative", "Cinzel", serif;
    font-size: clamp(3rem, 8.3vw, 6rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: .015em;
    text-decoration: none;
    text-shadow: 0 6px 22px rgba(71, 43, 68, .65), 0 0 34px rgba(255, 157, 204, .26);
}

.hero-art-tagline {
    width: min(720px, 94vw);
    margin: 1rem auto 0;
    color: #fff;
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(1.18rem, 2.3vw, 1.65rem);
    font-weight: 500;
    line-height: 1.35;
    text-shadow: 0 4px 16px rgba(67, 39, 64, .62);
}

.hero-art-actions {
    display: flex;
    width: min(600px, 94vw);
    margin-top: 1.55rem;
    gap: .8rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-action {
    display: grid;
    min-width: 238px;
    padding: .88rem 1.1rem;
    grid-template-columns: 30px 1fr;
    grid-template-areas: "icon title" "icon sub";
    column-gap: .7rem;
    align-items: center;
    border: 1px solid rgba(255, 208, 229, .68);
    border-radius: 20px;
    color: #3d2a3c;            /* fixed ink: these buttons always sit on bright fills */
    box-shadow: 0 13px 34px rgba(85, 43, 68, .17);
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.hero-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 42px rgba(85, 43, 68, .24);
    filter: saturate(1.08);
}

.hero-action i {
    grid-area: icon;
    font-size: 1.35rem;
}

.hero-action span {
    grid-area: title;
    font-weight: 900;
    line-height: 1.08;
}

.hero-action small {
    grid-area: sub;
    margin-top: .13rem;
    color: #7c5f78;
    font-size: .78rem;
}

.hero-action--primary {
    color: #fff;
    background: var(--grad-primary);
    box-shadow: 0 14px 34px rgba(168, 96, 200, .34);
}
.hero-action--primary small { color: rgba(255, 255, 255, .9); }

.hero-action--secondary {
    color: #3d2a3c;
    background: #fbf3f8;
}

.hero-action.is-copied {
    color: #1f5a37;
    background: linear-gradient(135deg, #7fe0a4, #c6f0d4);
}
.hero-action.is-copied small { color: #2c7048; }

/* ==========================================================================
   Navigation
   ========================================================================== */

.hero-nav-v2 {
    position: sticky;
    z-index: 60;
    top: 8px;
    padding: 0 1rem 1rem;
    margin-top: -48px;
}

.hero-nav-v2-inner {
    display: flex;
    width: min(var(--page-width), 100%);
    min-height: 72px;
    padding: .58rem .68rem;
    margin: 0 auto;
    gap: .45rem;
    align-items: center;
    border: 1px solid rgba(255, 187, 219, .48);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(255, 254, 255, .94), rgba(255, 239, 247, .88));
    box-shadow: 0 16px 52px rgba(228, 125, 174, .20);
    backdrop-filter: blur(20px) saturate(1.18);
}

.nav-brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: .58rem;
    padding: .62rem .8rem;
    color: #594157;
    font-size: .96rem;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.nav-brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: var(--rainbow);
    box-shadow: 0 7px 18px rgba(150, 110, 185, .28);
    text-shadow: 0 1px 2px rgba(60, 30, 60, .35);
}

.nav-links-v2 {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    gap: .1rem;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.nav-links-v2::-webkit-scrollbar { display: none; }

.nav-link-v2 {
    display: inline-flex;
    min-height: 42px;
    padding: .65rem .78rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #6d506a;
    font-size: .9rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}

.nav-link-v2:hover {
    color: var(--primary-strong);
    background: #fff0f7;
}

.nav-link-v2.active {
    color: #fff;
    background: var(--grad-primary);
}

.nav-link-v2.active:hover {
    color: #fff;
    background: var(--grad-primary-hover);
}

.nav-actions-v2 {
    display: flex;
    flex: 0 0 auto;
    gap: .42rem;
    align-items: center;
    margin-left: auto;
}

.nav-cart-v2,
.nav-account-v2,
.theme-toggle {
    display: inline-flex;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 190, 220, .42);
    border-radius: 999px;
    color: #674c64;
    background: rgba(255, 255, 255, .64);
    font: inherit;
    text-decoration: none;
}

.nav-cart-v2 {
    padding: 0 .74rem 0 .88rem;
    gap: .42rem;
    font-weight: 900;
}

.nav-cart-v2 b {
    display: grid;
    min-width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 999px;
    color: #4f374e;
    background: #d9c8ff;
    font-size: .73rem;
}

.nav-account-v2,
.theme-toggle {
    width: 42px;
    padding: 0;
    cursor: pointer;
}

.nav-account-v2 img {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    image-rendering: pixelated;
}

/* ==========================================================================
   Primary layout
   ========================================================================== */

.mmc-content {
    position: relative;
    z-index: 1;
    padding: 1rem 2rem 3rem;
}

.mmc-container {
    display: flex;
    width: min(var(--page-width), 100%);
    margin: 0 auto;
    gap: 1.25rem;
    align-items: flex-start;
}

.mmc-main {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 1.25rem;
}

.mmc-sidebar {
    position: sticky;
    top: 96px;
    display: flex;
    width: 270px;
    flex: 0 0 270px;
    flex-direction: column;
    gap: .85rem;
    order: 2;
}

.mobile-nav { display: none; }

/* Shared cards */
.mmc-card,
.info-strip,
.sidebar-category-list,
.product-description {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(255, 249, 253, .98));
    box-shadow: var(--shadow-sm);
}

.mmc-card {
    position: relative;
    padding: 2rem;
}

.mmc-card--regal {
    border-color: rgba(255, 217, 127, .58);
    background: linear-gradient(145deg, #fff, #fffdf4);
}

.mmc-card--regal::before {
    content: "";
    position: absolute;
    top: 0;
    right: 2rem;
    left: 2rem;
    height: 2px;
    border-radius: 0 0 99px 99px;
    background: linear-gradient(90deg, transparent, var(--gold), var(--primary), var(--gold), transparent);
}

.card-section-label,
.adventure-eyebrow,
.featured-eyebrow {
    display: flex;
    gap: .4rem;
    align-items: center;
    color: #ec70ab;
    font-size: .75rem;
    font-weight: 900;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.card-section-label::before { content: "✦"; color: var(--gold-dark); }

.card-title,
.product-name {
    margin: .38rem 0 .6rem;
    color: var(--text);
    font-family: "Cinzel Decorative", "Cinzel", serif;
    font-size: clamp(1.65rem, 3vw, 2.35rem);
    line-height: 1.2;
}

.card-title--sm { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }

.card-body-text,
.category-desc,
.product-label {
    color: var(--text-mid);
    font-family: "Cormorant Garamond", serif;
    font-size: 1.18rem;
    line-height: 1.7;
}

.card-icon-row {
    display: flex;
    gap: .75rem;
    align-items: center;
}

.card-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 15px;
    color: var(--primary-strong);
    background: linear-gradient(135deg, #fff2f8, #ffe0ef);
}

.card-actions,
.product-actions {
    display: flex;
    gap: .7rem;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary,
.btn-gold {
    display: inline-flex;
    min-height: 44px;
    padding: .68rem 1.15rem;
    gap: .48rem;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 14px;
    font: inherit;
    font-size: .88rem;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-gold:hover { transform: translateY(-2px); }

.btn-primary {
    color: #fff;
    background: var(--grad-primary);
    box-shadow: 0 8px 22px rgba(255, 157, 204, .25);
}

.btn-gold {
    color: #654a22;
    background: linear-gradient(135deg, #ffe08a, #fff3bf);
    box-shadow: 0 8px 22px rgba(255, 210, 101, .22);
}

.btn-secondary {
    border-color: var(--border);
    color: var(--text-mid);
    background: #fff;
}

/* Sidebar */
.sidebar-menu-btn,
.adventure-hero,
.featured-banner {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 10% 0%, rgba(255, 189, 219, .36), transparent 40%),
        radial-gradient(circle at 90% 100%, rgba(183, 232, 174, .20), transparent 40%),
        linear-gradient(145deg, #fff8fc, #ffeaf5 62%, #fffdfd);
    box-shadow: var(--shadow-md);
}

.sidebar-menu-btn {
    display: block;
    padding: 1.15rem;
    color: var(--text);
    text-align: center;
    text-decoration: none;
}

.sidebar-adventure-icon {
    display: block;
    margin-bottom: .4rem;
    font-size: 1.45rem;
}

.sidebar-menu-title {
    display: block;
    color: var(--text);
    font-family: "Cinzel", serif;
    font-size: .95rem;
    font-weight: 800;
}

.sidebar-menu-sub {
    display: block;
    margin-top: .2rem;
    color: var(--text-soft);
    font-family: "Cormorant Garamond", serif;
    font-size: .9rem;
}

.sidebar-category-list { overflow: hidden; }

.sidebar-category-title {
    display: flex;
    padding: 1rem 1.1rem .75rem;
    gap: .5rem;
    align-items: center;
    border-bottom: 1px solid rgba(255, 186, 218, .24);
    color: var(--text-soft);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.sidebar-category-title i { color: var(--gold-dark); }

.sidebar-cat-item {
    display: flex;
    padding: .82rem 1.05rem;
    gap: .62rem;
    align-items: center;
    border-left: 3px solid transparent;
    color: var(--text-mid);
    font-size: .9rem;
    font-weight: 750;
    text-decoration: none;
}

.sidebar-cat-item + .sidebar-cat-item { border-top: 1px solid rgba(255, 186, 218, .18); }

.sidebar-cat-item:hover,
.sidebar-cat-item.active {
    border-left-color: var(--primary);
    color: var(--primary-strong);
    background: linear-gradient(90deg, #fff0f7, transparent);
}

.cat-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
}

/* Homepage */
.featured-banner {
    display: flex;
    padding: 1.6rem;
    gap: 1.3rem;
    align-items: center;
    justify-content: space-between;
}

.featured-title,
.adventure-title {
    margin: .38rem 0 .45rem;
    color: var(--text);
    font-family: "Cinzel Decorative", "Cinzel", serif;
    font-size: clamp(1.55rem, 2.8vw, 2.3rem);
    line-height: 1.16;
}

.featured-sub,
.adventure-subtitle {
    margin: 0;
    color: var(--text-mid);
    font-family: "Cormorant Garamond", serif;
    font-size: 1.08rem;
    line-height: 1.55;
}

.featured-emoji { font-size: 3.6rem; }

.adventure-hero { padding: 1.55rem; }

.adventure-grid {
    display: grid;
    margin-top: 1rem;
    gap: .72rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.adventure-card {
    display: flex;
    min-height: 150px;
    padding: 1rem;
    gap: .42rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 176, 214, .36);
    border-radius: 18px;
    color: var(--text);
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 6px 18px rgba(225, 119, 172, .08);
    text-align: center;
    text-decoration: none;
    flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease;
}

.adventure-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.adventure-card-emoji { font-size: 2rem; }

.adventure-card-name {
    font-family: "Cinzel", serif;
    font-size: .96rem;
    font-weight: 850;
}

.adventure-card-sub {
    color: var(--text-soft);
    font-family: "Cormorant Garamond", serif;
    font-size: .9rem;
}

.info-strip {
    display: flex;
    padding: .8rem 1rem;
    gap: .75rem;
    justify-content: space-around;
    flex-wrap: wrap;
}

.info-item {
    display: inline-flex;
    gap: .45rem;
    align-items: center;
    color: var(--text-mid);
    font-size: .85rem;
    font-weight: 800;
}

.info-item i { color: var(--gold-dark); }

/* Category / product grid */
.category-header {
    display: flex;
    padding: 1rem 0;
    gap: 1rem;
    align-items: end;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.category-count {
    padding: .35rem .7rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-soft);
    background: #fff2f8;
    font-size: .78rem;
    font-weight: 800;
}

.product-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
}

.product-card {
    position: relative;
    display: flex;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 23px;
    background: linear-gradient(180deg, #fff, #fff7fb);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.product-card::after {
    content: "✿";
    position: absolute;
    z-index: 3;
    top: .6rem;
    left: .75rem;
    color: rgba(255, 136, 194, .42);
}

.card-img {
    position: relative;
    display: grid;
    aspect-ratio: 1 / 1;
    margin: .72rem .72rem 0;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 187, 219, .42);
    border-radius: 17px;
    background: linear-gradient(135deg, #fff7fb, #ffe7f2);
}

.card-img img {
    width: 100%;
    height: 100%;
    padding: .5rem;
    object-fit: contain;
    filter: drop-shadow(0 10px 16px rgba(77, 49, 74, .15));
    transition: transform .25s ease;
}

.product-card:hover .card-img img { transform: scale(1.045); }

.card-img-placeholder {
    color: #f6a2ca;
    font-size: 3rem;
}

.card-badge {
    position: absolute;
    z-index: 4;
    top: 1rem;
    right: 1rem;
    padding: .25rem .63rem;
    border-radius: 999px;
    color: white;
    background: var(--grad-primary);
    box-shadow: 0 6px 16px rgba(255, 157, 204, .23);
    font-size: .65rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.card-badge--sale {
    color: #5c3f0e;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
}

.card-out-of-stock {
    position: absolute;
    z-index: 4;
    inset: .72rem;
    display: grid;
    place-items: center;
    border-radius: 17px;
    color: white;
    background: rgba(71, 50, 70, .58);
    font-weight: 900;
    text-align: center;
    backdrop-filter: blur(3px);
}

.card-body {
    display: flex;
    padding: .9rem 1rem 1rem;
    gap: .42rem;
    flex: 1;
    flex-direction: column;
}

.card-name {
    color: var(--text);
    font-family: "Cinzel", serif;
    font-size: 1rem;
    font-weight: 850;
    line-height: 1.3;
}

.card-price-row,
.product-price-row {
    display: flex;
    gap: .42rem;
    align-items: baseline;
    flex-wrap: wrap;
}

.card-price {
    color: var(--primary-strong);
    font-size: 1.24rem;
    font-weight: 900;
}

.card-price--original {
    color: var(--text-soft);
    font-size: .8rem;
    font-weight: 500;
    text-decoration: line-through;
}

.btn-card-view {
    display: flex;
    min-height: 40px;
    padding: .55rem;
    margin-top: auto;
    gap: .42rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 217, 127, .75);
    border-radius: 13px;
    color: #765727;
    background: linear-gradient(135deg, #fffdf2, #fff3c1);
    font: inherit;
    font-size: .84rem;
    font-weight: 850;
}

.btn-card-view:hover {
    border-color: transparent;
    color: white;
    background: var(--grad-primary);
}

/* Product page */
.product-page { width: min(980px, 100%); margin: 0 auto; }

.product-grid-2col {
    display: grid;
    gap: 2.4rem;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.product-visual {
    position: sticky;
    top: 96px;
    align-self: start;
}

.product-img,
.product-img-placeholder {
    display: block;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.product-img-placeholder {
    display: grid;
    aspect-ratio: 1;
    place-items: center;
    color: #f6a2ca;
    background: linear-gradient(135deg, #fff7fb, #ffe7f2);
    font-size: 5rem;
}

.product-oos-badge,
.sale-badge {
    display: inline-flex;
    padding: .25rem .65rem;
    border-radius: 999px;
    color: #75413d;
    background: #ffe3e3;
    font-size: .75rem;
    font-weight: 900;
}

.product-tags {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
}

.product-tag {
    padding: .23rem .6rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: #75566e;
    background: #fff1f7;
    font-size: .7rem;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.product-price {
    color: var(--primary-strong);
    font-size: 2rem;
    font-weight: 900;
}

.product-price--original {
    color: var(--text-soft);
    font-size: 1.05rem;
    font-weight: 500;
    text-decoration: line-through;
}

.vat-note,
.field-hint {
    color: var(--text-soft);
    font-size: .8rem;
}

.product-divider {
    height: 1px;
    margin: 1.2rem 0;
    background: var(--border);
}

.product-field { margin-bottom: 1.1rem; }

.field-label {
    display: block;
    margin-bottom: .4rem;
    color: var(--text-soft);
    font-size: .75rem;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.field-label i { color: var(--gold-dark); }

.field-input,
.field-select {
    width: 100%;
    padding: .7rem .9rem;
    border: 1px solid var(--border);
    border-radius: 13px;
    outline: none;
    color: var(--text);
    background: white;
    font: inherit;
}

.field-input:focus,
.field-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 157, 204, .16);
}

.trust-pills {
    display: flex;
    gap: .42rem;
    flex-wrap: wrap;
}

.trust-pill {
    display: inline-flex;
    padding: .28rem .65rem;
    gap: .36rem;
    align-items: center;
    border: 1px solid rgba(255, 217, 127, .55);
    border-radius: 999px;
    color: var(--text-soft);
    background: #fffdf4;
    font-size: .75rem;
}

.trust-pill i { color: var(--gold-dark); }

.product-description {
    padding: 1.5rem;
    color: var(--text-mid);
    font-family: "Cormorant Garamond", serif;
    font-size: 1.1rem;
    line-height: 1.75;
}

/* Custom page / Wiki */
.wiki-shell {
    display: grid;
    width: min(var(--page-width), 100%);
    margin: 0 auto;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1fr) 250px;
}

.wiki-shell .mmc-main { order: 1; }
.wiki-side-card { position: sticky; top: 96px; order: 2; height: fit-content; }

.wiki-side-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(255,255,255,.94);
    box-shadow: var(--shadow-sm);
}

.wiki-side-card a {
    display: block;
    padding: .9rem 1rem;
    border-left: 3px solid transparent;
    color: var(--text-mid);
    font-size: .88rem;
    font-weight: 800;
    text-decoration: none;
}

.wiki-side-card a + a { border-top: 1px solid rgba(255, 186, 218, .2); }
.wiki-side-card a:hover { border-left-color: var(--primary); color: var(--primary-strong); background: #fff1f7; }

.wiki-landing {
    display: flex;
    padding: clamp(1.45rem, 4vw, 2.4rem);
    gap: 1.1rem;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 92% 5%, rgba(183,232,174,.20), transparent 30%),
        radial-gradient(circle at 6% 0%, rgba(255,190,219,.33), transparent 34%),
        linear-gradient(145deg, #fff9fc, #fff);
    box-shadow: var(--shadow-md);
}

.wiki-overline {
    color: #ec70ab;
    font-size: .75rem;
    font-weight: 900;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.wiki-landing h1 {
    margin: 0;
    font-family: "Cinzel Decorative", "Cinzel", serif;
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 1.1;
    background: var(--rainbow);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.wiki-lead {
    max-width: 760px;
    margin: 0;
    color: var(--text-mid);
    font-family: "Cormorant Garamond", serif;
    font-size: 1.25rem;
    line-height: 1.55;
}

.wiki-jump-grid {
    display: grid;
    gap: .7rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.wiki-jump-card {
    display: flex;
    min-height: 126px;
    padding: 1rem;
    gap: .38rem;
    flex-direction: column;
    justify-content: center;
    border: 1px solid rgba(255, 176, 214, .38);
    border-radius: 18px;
    color: var(--text);
    background: rgba(255, 255, 255, .90);
    box-shadow: 0 6px 18px rgba(221, 122, 170, .08);
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease;
}

.wiki-jump-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.wiki-jump-icon { font-size: 1.6rem; }

.wiki-jump-card strong {
    font-family: "Cinzel", serif;
    font-size: .94rem;
}

.wiki-jump-card span {
    color: var(--text-soft);
    font-size: .82rem;
    line-height: 1.35;
}

.wiki-section {
    scroll-margin-top: 105px;
    padding: clamp(1.35rem, 3vw, 2rem);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255,255,255,.96);
    box-shadow: var(--shadow-sm);
}

.wiki-section + .wiki-section { margin-top: 1.1rem; }

.wiki-section h2 {
    margin: .3rem 0 .8rem;
    color: var(--text);
    font-family: "Cinzel Decorative", "Cinzel", serif;
    font-size: clamp(1.45rem, 3vw, 2rem);
}

.wiki-section > p {
    color: var(--text-mid);
    font-family: "Cormorant Garamond", serif;
    font-size: 1.15rem;
    line-height: 1.65;
}

.wiki-rule-list {
    display: grid;
    gap: .65rem;
    margin: 1rem 0 0;
}

.wiki-rule {
    display: grid;
    padding: .9rem;
    gap: .7rem;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: start;
    border: 1px solid rgba(255, 186, 218, .30);
    border-radius: 16px;
    background: #fff9fc;
}

.wiki-rule-number {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(255, 216, 138, .65);
    border-radius: 12px;
    color: var(--gold-dark);
    background: #fff8dc;
    font-size: .75rem;
    font-weight: 900;
}

.wiki-rule strong,
.wiki-card strong {
    display: block;
    margin-bottom: .18rem;
    color: var(--text);
    font-size: .95rem;
}

.wiki-rule p,
.wiki-card p {
    margin: 0;
    color: var(--text-mid);
    font-size: .9rem;
    line-height: 1.55;
}

.wiki-card-grid {
    display: grid;
    gap: .8rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wiki-card {
    padding: 1rem;
    border: 1px solid rgba(255, 186, 218, .32);
    border-radius: 18px;
    background: #fff9fc;
}

.wiki-card h3 {
    margin: 0 0 .3rem;
    color: var(--text);
    font-family: "Cinzel", serif;
    font-size: 1rem;
}

.wiki-card ul {
    padding: 0;
    margin: .55rem 0 0;
    list-style: none;
}

.wiki-card li {
    position: relative;
    padding-left: 1rem;
    margin: .33rem 0;
    color: var(--text-mid);
    font-size: .86rem;
    line-height: 1.4;
}

.wiki-card li::before {
    content: "✦";
    position: absolute;
    left: 0;
    color: var(--gold-dark);
    font-size: .58rem;
    top: .25rem;
}

.wiki-command-list {
    overflow: hidden;
    margin-top: 1rem;
    border: 1px solid rgba(255, 186, 218, .35);
    border-radius: 17px;
}

.wiki-command-row {
    display: grid;
    padding: .8rem .9rem;
    gap: .75rem;
    grid-template-columns: minmax(130px, .5fr) 1fr;
    border-bottom: 1px solid rgba(255, 186, 218, .18);
    background: #fff;
}

.wiki-command-row:last-child { border-bottom: 0; }
.wiki-command-row:nth-child(even) { background: #fff9fc; }

.wiki-command-row code {
    color: #aa4f80;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .85rem;
    font-weight: 750;
}

.wiki-command-row span {
    color: var(--text-mid);
    font-size: .88rem;
}

.wiki-callout {
    display: flex;
    padding: .85rem 1rem;
    gap: .65rem;
    align-items: flex-start;
    border: 1px solid rgba(255, 216, 138, .55);
    border-radius: 15px;
    color: var(--text-mid);
    background: #fffdf2;
    font-size: .9rem;
    line-height: 1.5;
}

.wiki-callout i { color: var(--gold-dark); margin-top: .1rem; }

.wiki-connect {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wiki-connect-card {
    padding: 1rem;
    border: 1px solid rgba(255, 186, 218, .35);
    border-radius: 16px;
    background: #fff9fc;
}

.wiki-connect-label {
    color: var(--text-soft);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.wiki-connect-value {
    margin-top: .35rem;
    color: var(--text);
    font-family: "Cinzel", serif;
    font-size: .98rem;
    font-weight: 800;
    word-break: break-word;
}

/* Footer */
.mmc-footer {
    position: relative;
    z-index: 1;
    margin-top: 3rem;
    color: rgba(255,255,255,.78);
    background:
        radial-gradient(circle at 8% 0%, rgba(255, 157, 204, .20), transparent 34%),
        linear-gradient(180deg, #4a3049, #271b2b);
}

.footer-inner {
    display: grid;
    width: min(var(--page-width), 100%);
    padding: 2.8rem 2rem 1.8rem;
    margin: 0 auto;
    gap: 2rem;
    grid-template-columns: 1.45fr 1fr 1fr 1fr;
}

.footer-brand {
    display: flex;
    gap: .58rem;
    align-items: center;
}

.footer-name {
    color: #fff2bd;
    font-family: "Cinzel", serif;
    font-weight: 900;
}

.footer-desc {
    color: rgba(255,255,255,.74);
    font-family: "Cormorant Garamond", serif;
    font-size: 1rem;
    line-height: 1.65;
}

.footer-socials {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.social-icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(255, 206, 228, .2);
    border-radius: 12px;
    color: #fff;
    background: rgba(255,255,255,.08);
    text-decoration: none;
}

.social-icon:hover { background: rgba(255, 157, 204, .36); }

.footer-col-title {
    margin: 0 0 .8rem;
    color: #ffe08a;
    font-size: .74rem;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.footer-nav {
    display: flex;
    gap: .5rem;
    flex-direction: column;
}

.footer-nav a,
.footer-paynow {
    color: rgba(255,255,255,.72);
    font-size: .84rem;
    text-decoration: none;
}

.footer-nav a:hover,
.footer-paynow:hover { color: #ffe08a; }

.footer-trust {
    display: flex;
    gap: .45rem;
    flex-direction: column;
    font-size: .82rem;
}

.trust-row { display: flex; gap: .45rem; align-items: center; }
.trust-row i { color: #ffe08a; }

.payment-icons {
    display: flex;
    gap: .55rem;
    margin-top: .7rem;
    color: rgba(255,255,255,.55);
    font-size: 1.25rem;
    flex-wrap: wrap;
}

.footer-bottom {
    display: flex;
    width: min(var(--page-width), 100%);
    padding: 1rem 2rem 1.4rem;
    margin: 0 auto;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255,255,255,.10);
    flex-wrap: wrap;
}

.footer-bottom p { margin: .15rem 0; color: rgba(255,255,255,.62); font-size: .78rem; }

/* Notifications / utility */
.hidden { display: none !important; }

.mmc-notification {
    position: fixed;
    z-index: 100;
    top: 1rem;
    right: 1rem;
    display: flex;
    max-width: min(360px, calc(100vw - 2rem));
    padding: .85rem 1rem;
    gap: .6rem;
    align-items: center;
    border-radius: 15px;
    color: #fff;
    background: #d75d81;
    box-shadow: var(--shadow-lg);
}

.mmc-notification button {
    margin-left: auto;
    border: 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
}

/* ==========================================================================
   Dark mode
   ========================================================================== */

html.dark-mode {
    --bg: #2a1b2b;
    --surface: #493249;
    --surface-soft: #573b57;
    --surface-tint: #623e5e;
    --border: rgba(255, 197, 226, .24);
    --border-strong: rgba(255, 180, 216, .38);
    --text: #fff8fc;
    --text-mid: #f3d7e7;
    --text-soft: #d8afc8;
    --shadow-sm: 0 7px 22px rgba(0,0,0,.24);
    --shadow-md: 0 16px 50px rgba(0,0,0,.30);
    --shadow-lg: 0 26px 72px rgba(0,0,0,.38);
}

html.dark-mode body.mmc-body {
    background:
        radial-gradient(ellipse 70% 40% at 7% 0%, rgba(255, 157, 204, .14), transparent 60%),
        radial-gradient(ellipse 45% 28% at 95% 10%, rgba(183, 232, 174, .08), transparent 58%),
        linear-gradient(180deg, #352236 0%, #201620 100%);
}

html.dark-mode .hero-art-banner {
    background:
        linear-gradient(to bottom,
            rgba(32, 20, 31, .18) 0%,
            rgba(32, 20, 31, .06) 42%,
            rgba(42, 27, 43, .48) 79%,
            var(--bg) 100%),
        url("./assets/hero-banner.webp") center 42% / cover no-repeat;
}

html.dark-mode .hero-art-banner::after { background: linear-gradient(to bottom, transparent, var(--bg) 86%); }

html.dark-mode .hero-art-scrim {
    background: linear-gradient(to bottom, rgba(30,18,30,.25), transparent 45%, rgba(42,27,43,.38) 78%, var(--bg));
}

html.dark-mode .hero-nav-v2-inner {
    border-color: rgba(255, 197, 226, .25);
    background: linear-gradient(135deg, rgba(83, 55, 82, .94), rgba(51, 33, 51, .93));
    box-shadow: 0 16px 52px rgba(0,0,0,.34);
}

html.dark-mode .nav-brand,
html.dark-mode .nav-link-v2,
html.dark-mode .nav-cart-v2,
html.dark-mode .nav-account-v2,
html.dark-mode .theme-toggle { color: #f8ddeb; }

html.dark-mode .nav-link-v2:hover { color: #fff; background: rgba(255, 255, 255, .12); }
html.dark-mode .nav-link-v2.active { color: #fff; }
html.dark-mode .nav-link-v2.active:hover { color: #fff; background: var(--grad-primary-hover); }

html.dark-mode .mmc-card,
html.dark-mode .info-strip,
html.dark-mode .sidebar-category-list,
html.dark-mode .product-description,
html.dark-mode .product-card,
html.dark-mode .wiki-section,
html.dark-mode .wiki-landing,
html.dark-mode .wiki-side-card {
    border-color: rgba(255, 197, 226, .22);
    background: linear-gradient(180deg, #503650, #3e2b40);
    box-shadow: var(--shadow-sm);
}

html.dark-mode .mmc-card--regal {
    background: linear-gradient(145deg, #503650, #483746);
    border-color: rgba(255, 224, 138, .34);
}

html.dark-mode .card-title,
html.dark-mode .product-name,
html.dark-mode .featured-title,
html.dark-mode .adventure-title,
html.dark-mode .sidebar-menu-title,
html.dark-mode .wiki-section h2,
html.dark-mode .wiki-rule strong,
html.dark-mode .wiki-card strong,
html.dark-mode .wiki-card h3,
html.dark-mode .wiki-connect-value { color: var(--text); }

html.dark-mode .card-body-text,
html.dark-mode .category-desc,
html.dark-mode .product-label,
html.dark-mode .featured-sub,
html.dark-mode .adventure-subtitle,
html.dark-mode .sidebar-menu-sub,
html.dark-mode .wiki-lead,
html.dark-mode .wiki-section > p,
html.dark-mode .wiki-rule p,
html.dark-mode .wiki-card p,
html.dark-mode .wiki-card li,
html.dark-mode .wiki-command-row span { color: var(--text-mid); }

html.dark-mode .sidebar-menu-btn,
html.dark-mode .adventure-hero,
html.dark-mode .featured-banner {
    border-color: rgba(255, 197, 226, .24);
    background:
        radial-gradient(circle at 10% 0%, rgba(255, 157, 204, .18), transparent 40%),
        radial-gradient(circle at 90% 100%, rgba(183, 232, 174, .08), transparent 40%),
        linear-gradient(145deg, #5a3d59, #3d293d);
}

html.dark-mode .sidebar-category-title { color: #f3d7e7; background: rgba(255,255,255,.05); }
html.dark-mode .sidebar-cat-item { color: #f3d7e7; }
html.dark-mode .sidebar-cat-item:hover,
html.dark-mode .sidebar-cat-item.active { color: #fff; background: linear-gradient(90deg, rgba(255,157,204,.22), transparent); }

html.dark-mode .adventure-card,
html.dark-mode .wiki-jump-card,
html.dark-mode .wiki-card,
html.dark-mode .wiki-rule,
html.dark-mode .wiki-command-row,
html.dark-mode .wiki-connect-card {
    border-color: rgba(255,197,226,.18);
    color: var(--text);
    background: rgba(255,255,255,.08);
}

html.dark-mode .adventure-card-name,
html.dark-mode .wiki-jump-card strong { color: #fff; }

html.dark-mode .adventure-card-sub,
html.dark-mode .wiki-jump-card span { color: #f3d7e7; }

html.dark-mode .card-img,
html.dark-mode .product-img-placeholder {
    border-color: rgba(255,197,226,.18);
    background: linear-gradient(135deg, #5e405d, #3f2c40);
}

html.dark-mode .field-input,
html.dark-mode .field-select {
    border-color: rgba(255,197,226,.22);
    color: var(--text);
    background: #3e2a40;
}

html.dark-mode .btn-secondary {
    border-color: rgba(255,197,226,.22);
    color: var(--text-mid);
    background: rgba(255,255,255,.08);
}

html.dark-mode .product-tag,
html.dark-mode .wiki-rule-number,
html.dark-mode .wiki-callout,
html.dark-mode .trust-pill {
    color: #f3d7e7;
    background: rgba(255,255,255,.08);
    border-color: rgba(255,197,226,.20);
}

html.dark-mode .wiki-command-row:nth-child(even) { background: rgba(255,255,255,.12); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1120px) {
    .mmc-sidebar { display: none; }
    .mmc-container { display: block; }
    .wiki-shell { display: flex; flex-direction: column; }
    .wiki-side-card { position: static; display: flex; overflow-x: auto; order: 0; white-space: nowrap; }
    .wiki-side-card a { flex: 0 0 auto; border-top: 0 !important; }
}

@media (max-width: 760px) {
    html,
    body.mmc-body { overflow-x: clip; }

    .mmc-content { padding: 1rem 14px 2.5rem; }
    .mmc-container { width: 100%; }
    .mmc-main { width: 100%; }

    .hero-art-banner {
        min-height: 540px;
        background-position: center 44%;
    }

    .hero-art-content { padding: 3.35rem 1rem 6.05rem; max-width: 100%; }
    .hero-kicker { max-width: 92vw; font-size: .67rem; }
    .hero-art-wordmark { font-size: clamp(1.6rem, 11vw, 3.4rem); letter-spacing: 0; max-width: 100%; overflow-wrap: anywhere; }
    .hero-art-tagline { font-size: 1.12rem; }
    .hero-art-actions { width: 100%; flex-direction: column; }
    .hero-action { width: 100%; min-width: 0; }

    .hero-nav-v2 {
        position: relative;
        top: auto;
        padding: 0 .75rem .8rem;
        margin-top: -43px;
    }

    .hero-nav-v2-inner {
        display: grid;
        min-height: 0;
        padding: .55rem;
        gap: .35rem .5rem;
        grid-template-areas:
            "brand actions"
            "links links";
        grid-template-columns: minmax(0, 1fr) auto;
        overflow: hidden;
        border-radius: 22px;
    }

    .nav-brand { grid-area: brand; padding: .55rem .65rem; }
    .nav-brand > span:last-child { display: none; }

    .nav-actions-v2 { grid-area: actions; margin-left: 0; }
    .nav-cart-v2 span { display: none; }

    .nav-links-v2 {
        width: 100%;
        max-width: 100%;
        padding: .15rem 0 .05rem;
        grid-area: links;
        overflow-x: auto;
        overflow-y: hidden;
        touch-action: pan-x;
    }

    .nav-link-v2 { min-height: 39px; padding: .56rem .73rem; font-size: .82rem; }

    .mmc-card { padding: 1.35rem; }
    .featured-banner { padding: 1.3rem; align-items: flex-start; flex-direction: column; }
    .featured-emoji { font-size: 2.8rem; }
    .adventure-hero { padding: 1.3rem; }
    .adventure-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .adventure-card { min-height: 128px; padding: .85rem; }
    .info-strip { justify-content: flex-start; }

    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .product-grid-2col { display: block; }
    .product-visual { position: static; margin-bottom: 1.2rem; }
    .product-description { padding: 1.2rem; }

    .wiki-jump-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wiki-card-grid { grid-template-columns: 1fr; }
    .wiki-connect { grid-template-columns: 1fr; }
    .wiki-command-row { grid-template-columns: 1fr; gap: .25rem; }

    .footer-inner { padding: 2.2rem 1.4rem 1.4rem; grid-template-columns: 1fr; }
    .footer-bottom { padding: 1rem 1.4rem 1.2rem; }
}

@media (max-width: 430px) {
    .hero-art-banner { min-height: 515px; }
    .adventure-grid,
    .product-grid { grid-template-columns: 1fr; }
    .wiki-jump-grid { grid-template-columns: 1fr; }
    .nav-account-v2,
    .theme-toggle { width: 39px; height: 39px; }
    .nav-cart-v2 { height: 39px; padding: 0 .65rem; }
}


/* ==========================================================================
   V3 refinement - clean home, edition controls, direct product-card actions,
   and high-contrast dark mode.
   ========================================================================== */

:root {
    /* Legacy aliases used by account, cart and module templates */
    --surface-2: #fff7fb;
    --surface-3: #fff0f7;
    --border-soft: rgba(255,176,214,.26);
    --border-gold: rgba(255,216,138,.54);
    --pink-50: #fffafd;
    --pink-100: #fff1f8;
    --pink-200: #ffe0ef;
    --pink-300: #ffc9e1;
    --pink-400: #ff9dcc;
    --purple-50: #fffafd;
    --purple-100: #fff1f8;
    --purple-200: #ffe0ef;
    --purple-300: #ffc9e1;
    --gold-50: #fffdf2;
    --gold-100: #fff8dc;
    --gold-200: #ffebb0;
    --gold-300: #ffe08a;
    --gold-400: #ffd66f;
    --gold-500: #bc8620;
    --primary-glow: rgba(255,157,204,.28);
}

/* Java / Bedrock chooser inside hero */
.hero-edition-switcher {
    display: inline-flex;
    padding: .3rem;
    margin-top: 1rem;
    gap: .25rem;
    align-items: center;
    border: 1px solid rgba(255, 206, 228, .60);
    border-radius: 999px;
    color: #724f69;
    background: rgba(255, 252, 254, .78);
    box-shadow: 0 9px 26px rgba(88, 49, 72, .12);
    backdrop-filter: blur(10px);
}

.hero-edition-label {
    padding: 0 .4rem .02rem .65rem;
    color: #8c6b87;
    font-size: .73rem;
    font-weight: 800;
}

.hero-edition-option {
    min-height: 31px;
    padding: .35rem .66rem;
    border: 0;
    border-radius: 999px;
    color: #77536e;
    background: transparent;
    font: inherit;
    font-size: .74rem;
    font-weight: 850;
    cursor: pointer;
}

.hero-edition-option:hover { background: rgba(255, 185, 220, .28); }
.hero-edition-option.is-active { color: #fff; background: var(--grad-primary); box-shadow: 0 6px 16px rgba(168,96,200,.32); }

.hero-edition-hint {
    min-height: 1.2rem;
    margin: .5rem 0 0;
    color: rgba(255,255,255,.96);
    font-size: .78rem;
    font-weight: 750;
    letter-spacing: .02em;
    text-shadow: 0 2px 10px rgba(70,38,66,.55);
}

/* Cleaner homepage */
.home-landing {
    padding: clamp(1.5rem, 4vw, 2.4rem);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 96% 6%, rgba(183,232,174,.22), transparent 28%),
        radial-gradient(circle at 3% 0%, rgba(255,190,219,.34), transparent 34%),
        linear-gradient(145deg, #fff9fc, #fff);
    box-shadow: var(--shadow-md);
}

.home-landing-copy { max-width: 720px; }
.home-overline { color: #ec70ab; font-size: .75rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.home-landing h1 {
    margin: .38rem 0 .55rem;
    font-family: "Cinzel Decorative", "Cinzel", serif;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    background: var(--rainbow);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.home-landing p {
    margin: 0;
    color: var(--text-mid);
    font-family: "Cormorant Garamond", serif;
    font-size: 1.22rem;
    line-height: 1.55;
}

.adventure-grid--clean { margin-top: 1.35rem; }
.adventure-card-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    color: #ed72b0;
    background: linear-gradient(135deg, #fff0f7, #ffe0ef);
    font-size: 1.05rem;
}

.home-note {
    display: flex;
    padding: 1rem 1.15rem;
    gap: .7rem;
    align-items: flex-start;
    border: 1px solid rgba(255,216,138,.52);
    border-radius: 17px;
    color: var(--text-mid);
    background: #fffdf4;
    font-family: "Cormorant Garamond", serif;
    font-size: 1.04rem;
    line-height: 1.5;
}
.home-note i { margin-top: .15rem; color: #d59e34; }

.home-help-grid { display: grid; gap: .85rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-help-card {
    display: grid;
    padding: 1rem;
    gap: .8rem;
    grid-template-columns: auto 1fr;
    align-items: start;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255,255,255,.90);
    box-shadow: var(--shadow-sm);
}
.home-help-card > i { color: #ec70ab; font-size: 1.2rem; margin-top: .08rem; }
.home-help-card strong { display: block; color: var(--text); font-size: .92rem; }
.home-help-card span { display: block; margin-top: .18rem; color: var(--text-soft); font-size: .84rem; line-height: 1.4; }
.home-help-card a { grid-column: 2; color: #b85589; font-size: .82rem; font-weight: 850; text-decoration: none; }

/* Product cards: explicit View | Add to Cart */
.card-image-link,
.card-name-link { display: block; color: inherit; text-decoration: none; }

.card-actions-row {
    display: grid;
    margin-top: .22rem;
    gap: .48rem;
    grid-template-columns: 1fr 1.25fr;
}

.btn-card-view,
.btn-card-cart {
    display: inline-flex;
    min-height: 41px;
    padding: .55rem .45rem;
    gap: .38rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,216,138,.66);
    border-radius: 13px;
    color: #765727;
    background: linear-gradient(135deg, #fffdf2, #fff3c1);
    font: inherit;
    font-size: .78rem;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn-card-cart {
    border-color: transparent;
    color: white;
    background: var(--grad-primary);
    box-shadow: 0 7px 16px rgba(255,157,204,.20);
}

.btn-card-view:hover,
.btn-card-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 9px 20px rgba(221,122,170,.20);
}

.btn-card-cart.is-disabled,
.btn-card-cart:disabled {
    color: #9a7b91;
    background: #f2e8ef;
    box-shadow: none;
    cursor: not-allowed;
}

.btn-card-cart.is-loading { opacity: .76; pointer-events: none; }

/* Player delivery form */
.delivery-card {
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface-soft);
}

.edition-choice {
    display: grid;
    padding: .3rem;
    margin: .55rem 0 .75rem;
    gap: .3rem;
    grid-template-columns: 1fr 1fr;
    border: 1px solid rgba(255,176,214,.34);
    border-radius: 14px;
    background: rgba(255,255,255,.78);
}

.edition-choice-button {
    min-height: 40px;
    padding: .5rem .65rem;
    border: 0;
    border-radius: 10px;
    color: var(--text-soft);
    background: transparent;
    font: inherit;
    font-size: .85rem;
    font-weight: 850;
    cursor: pointer;
}

.edition-choice-button:hover { background: #fff0f7; color: #b85589; }
.edition-choice-button.is-active { color: #fff; background: var(--grad-primary); box-shadow: 0 4px 12px rgba(168,96,200,.26); }

.delivery-hint {
    margin: .5rem 0 0;
    color: var(--text-soft);
    font-size: .78rem;
    line-height: 1.45;
}

.auth-page {
    display: grid;
    width: 100%;
    min-height: 55vh;
    place-items: center;
}
.auth-card { width: min(470px,100%); text-align: center; }
.auth-icon {
    display: grid;
    width: 56px;
    height: 56px;
    place-items: center;
    margin: 0 auto 1rem;
    border-radius: 18px;
    color: #fff;
    background: var(--grad-primary);
    box-shadow: 0 7px 18px rgba(255,157,204,.25);
}
.auth-card form { margin-top: 1rem; text-align: left; }
.auth-card .card-title { margin-bottom: .25rem; }
.auth-lead { margin: 0; color: var(--text-soft); font-size: .92rem; }
.auth-submit { width: 100%; margin-top: 1rem; }
.auth-note { display: flex; padding: .8rem .9rem; margin-top: 1rem; gap: .6rem; align-items: flex-start; border: 1px solid var(--border); border-radius: 14px; color: var(--text-mid); background: var(--surface-soft); font-size: .8rem; line-height: 1.5; text-align: left; }
.auth-note i { margin-top: .05rem; color: #ec70ab; }

/* Strong, readable dark-mode cascade */
html.dark-mode {
    --surface-2: #553b55;
    --surface-3: #634261;
    --pink-50: #4d344e;
    --pink-100: #573b57;
    --pink-200: #674262;
    --pink-300: #995e8c;
    --purple-50: #4d344e;
    --purple-100: #573b57;
    --purple-200: #674262;
    --purple-300: #995e8c;
    --gold-50: #514222;
    --gold-100: #604e26;
    --gold-200: #81652d;
    --gold-300: #ffe08a;
    --gold-400: #ffd66f;
    --gold-500: #bc8620;
    --border-gold: rgba(255,224,138,.40);
    --border-soft: rgba(255,197,226,.20);
    --primary-glow: rgba(255,157,204,.21);
}

html.dark-mode .home-landing,
html.dark-mode .home-help-card,
html.dark-mode .home-note,
html.dark-mode .delivery-card,
html.dark-mode .edition-choice,
html.dark-mode .auth-note {
    border-color: rgba(255,197,226,.24);
    color: var(--text-mid);
    background: linear-gradient(180deg, #513751, #412d43);
}

html.dark-mode .home-help-card strong { color: #fff8fc; }

html.dark-mode .home-landing p,
html.dark-mode .home-help-card span,
html.dark-mode .home-note { color: #f4d9e8; }

html.dark-mode .adventure-card-icon { color: #ffb8da; background: rgba(255,255,255,.11); }

html.dark-mode .btn-card-view {
    border-color: rgba(255,224,138,.34);
    color: #ffe08a;
    background: #544321;
}
html.dark-mode .btn-card-cart { color: #fff; }
html.dark-mode .btn-card-cart.is-disabled { color: #c5a6b9; background: #493248; }

html.dark-mode .edition-choice { background: rgba(255,255,255,.07); }
html.dark-mode .edition-choice-button { color: #f0cfe0; }
html.dark-mode .edition-choice-button:hover { color: #fff; background: rgba(255,157,204,.14); }
html.dark-mode .edition-choice-button.is-active { color: #fff; background: var(--grad-primary); }

html.dark-mode .field-input,
html.dark-mode .field-select { color: #fff8fc; background: #3d2a40; border-color: rgba(255,197,226,.25); }
html.dark-mode .field-input::placeholder { color: #d9b2c9; }

html.dark-mode .card-price,
html.dark-mode .product-price { color: #ffb8da; }

html.dark-mode .product-card .card-name,
html.dark-mode .card-name-link,
html.dark-mode .card-name-link:hover { color: #fff8fc; }

html.dark-mode .card-img { background: linear-gradient(135deg, #5a3d59, #402c43); }

html.dark-mode .home-help-card a { color: #ffb8da; }

/* Remove noisy legacy pickaxe decorations if any old text remains cached */
.pickaxe-icon,
.legacy-pickaxe { display: none !important; }

@media (max-width: 760px) {
    .hero-edition-switcher { max-width: 94vw; }
    .hero-edition-label { display: none; }

    .home-help-grid { grid-template-columns: 1fr; }
    .home-landing { padding: 1.35rem; }

    .card-actions-row { grid-template-columns: 1fr 1.2fr; }
    .btn-card-view, .btn-card-cart { font-size: .75rem; }

    .auth-card { padding: 1.35rem; }
}

@media (max-width: 430px) {
    .hero-edition-option { padding: .35rem .56rem; }
    .card-actions-row { grid-template-columns: 1fr; }
}

/* ==========================================================================
   V4 - Cohesive rainbow system
   One ordered spectrum used as a signature; quiet surfaces; readable in dark.
   ========================================================================== */

/* --- Signature: a single rainbow rule anchoring the footer --- */
.mmc-footer {
    border-top: 3px solid transparent;
    border-image: var(--rainbow) 1;
}

/* --- Per-category hue: store "adventure" cards --- */
.adventure-card { --hue: var(--rb-rose); }
.adventure-card .adventure-card-icon {
    color: var(--hue);
    background: color-mix(in srgb, var(--hue) 16%, #fff);
}
.adventure-card:hover {
    border-color: color-mix(in srgb, var(--hue) 55%, transparent);
    box-shadow: 0 14px 30px color-mix(in srgb, var(--hue) 22%, transparent);
}

/* --- Help band (replaces the disliked info strip + old help cards) --- */
.help-band {
    margin-top: 1.1rem;
    padding: clamp(1.4rem, 3.5vw, 2.1rem);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 100% 0%, rgba(169,120,240,.10), transparent 42%),
        radial-gradient(circle at 0% 100%, rgba(255,111,174,.10), transparent 44%),
        linear-gradient(180deg, #fff9fc, #fff);
    box-shadow: var(--shadow-md);
}
.help-band-eyebrow {
    color: var(--accent-strong);
    font-size: .72rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase;
}
.help-band-head h2 {
    margin: .35rem 0 .25rem; color: var(--text);
    font-family: "Cinzel Decorative", "Cinzel", serif; font-size: clamp(1.5rem, 3vw, 2.1rem);
}
.help-band-head p {
    margin: 0 0 1.15rem; color: var(--text-mid);
    font-family: "Cormorant Garamond", serif; font-size: 1.12rem;
}
.help-card-grid { display: grid; gap: .85rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.help-card {
    --hue: var(--rb-rose);
    display: grid; grid-template-columns: auto 1fr auto; gap: .95rem; align-items: center;
    padding: 1.05rem 1.15rem; border: 1px solid var(--border); border-radius: 18px;
    background: #fff; box-shadow: var(--shadow-sm); text-decoration: none; color: inherit;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.help-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--hue) 50%, transparent);
    box-shadow: 0 16px 34px color-mix(in srgb, var(--hue) 20%, transparent);
}
.help-card-icon {
    display: grid; width: 46px; height: 46px; place-items: center; border-radius: 14px;
    color: #fff; font-size: 1.2rem;
    background: linear-gradient(135deg, color-mix(in srgb, var(--hue) 80%, #fff), var(--hue));
    box-shadow: 0 8px 18px color-mix(in srgb, var(--hue) 34%, transparent);
}
.help-card-body strong { display: block; color: var(--text); font-family: "Cinzel", serif; font-size: 1rem; }
.help-card-body span { display: block; margin-top: .15rem; color: var(--text-soft); font-size: .86rem; line-height: 1.4; }
.help-card-go {
    display: grid; width: 34px; height: 34px; place-items: center; flex: 0 0 auto;
    border-radius: 50%; color: var(--hue);
    background: color-mix(in srgb, var(--hue) 14%, #fff);
    transition: transform .18s ease;
}
.help-card:hover .help-card-go { transform: translateX(3px); }

/* --- Wiki: per-section hue accent --- */
.wiki-section { --hue: var(--rb-rose); position: relative; overflow: hidden; }
.wiki-section::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--hue); }

.wiki-jump-card { --hue: var(--rb-rose); border-top: 3px solid var(--hue); }

/* --- Wiki side nav: clearer "on this page" rail + active highlight --- */
.wiki-side-card { padding: 0; }
.wiki-side-title {
    display: flex; gap: .5rem; align-items: center;
    padding: .85rem 1rem; border-bottom: 1px solid var(--border);
    color: var(--text-soft); font-size: .72rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase;
}
.wiki-side-title i { color: var(--accent-strong); }
.wiki-side-nav { display: flex; flex-direction: column; }
.wiki-side-card .wiki-side-nav a {
    --hue: var(--rb-rose);
    display: flex; align-items: center; gap: .5rem;
    padding: .78rem 1rem; border-left: 3px solid transparent;
    color: var(--text-mid); font-size: .88rem; font-weight: 800; text-decoration: none;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.wiki-side-card .wiki-side-nav a + a { border-top: 1px solid rgba(214,174,224,.2); }
.wiki-side-card .wiki-side-nav a:hover { color: var(--text); background: rgba(214,174,224,.14); }
.wiki-side-card .wiki-side-nav a.is-current {
    border-left-color: var(--hue); color: var(--text);
    background: color-mix(in srgb, var(--hue) 12%, transparent);
}
.wiki-side-back {
    display: flex; align-items: center; gap: .5rem;
    padding: .85rem 1rem; border-top: 1px solid var(--border);
    color: var(--accent-strong); font-size: .84rem; font-weight: 850; text-decoration: none;
}
.wiki-side-back:hover { background: rgba(214,174,224,.14); }

/* --- Back-to-top (wiki) --- */
.wiki-top {
    position: fixed; right: 18px; bottom: 18px; z-index: 50;
    display: grid; place-items: center; width: 46px; height: 46px;
    border: 0; border-radius: 50%; color: #fff; cursor: pointer;
    background: var(--grad-primary);
    box-shadow: 0 10px 26px rgba(168,96,200,.42);
    opacity: 0; transform: translateY(12px); pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
}
.wiki-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* --- Dark mode: new components --- */
html.dark-mode .help-band {
    border-color: rgba(255,197,226,.22);
    background: linear-gradient(180deg, #4f3650, #3f2c42);
}
html.dark-mode .help-band-head h2 { color: #fff8fc; }
html.dark-mode .help-band-head p { color: #f0d6e6; }
html.dark-mode .help-card { background: rgba(255,255,255,.05); border-color: rgba(255,197,226,.2); }
html.dark-mode .help-card-body strong { color: #fff8fc; }
html.dark-mode .help-card-body span { color: #d6b4cd; }
html.dark-mode .help-card-go { color: #fff; background: color-mix(in srgb, var(--hue) 30%, #2a1b2b); }
html.dark-mode .adventure-card .adventure-card-icon {
    color: #fff; background: color-mix(in srgb, var(--hue) 30%, #2a1b2b);
}
html.dark-mode .wiki-side-title { color: #d6b4cd; border-color: rgba(255,197,226,.18); }
html.dark-mode .wiki-side-card .wiki-side-nav a { color: #e9cfe0; }
html.dark-mode .wiki-side-card .wiki-side-nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
html.dark-mode .wiki-side-card .wiki-side-nav a.is-current { color: #fff; background: color-mix(in srgb, var(--hue) 24%, transparent); }
html.dark-mode .wiki-side-back { color: #ffb8da; border-color: rgba(255,197,226,.18); }

/* --- Mobile: tighter product grid (less scrolling) + safe overflow --- */
html, body.mmc-body { overflow-x: clip; }

@media (max-width: 760px) {
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
    .product-card { border-radius: 18px; }
    .product-card::after { top: .45rem; left: .55rem; }
    .card-img { margin: .5rem .5rem 0; border-radius: 13px; }
    .card-body { padding: .7rem .75rem .85rem; gap: .3rem; }
    .card-name { font-size: .92rem; }
    .card-price { font-size: 1.08rem; }
    .card-actions-row { grid-template-columns: auto 1fr; gap: .4rem; }
    .btn-card-view { padding: .5rem .6rem; }
    .btn-card-view span { display: none; }
    .btn-card-view, .btn-card-cart { min-height: 38px; font-size: .76rem; }

    .help-card-grid { grid-template-columns: 1fr; }
    .help-card { padding: .9rem 1rem; gap: .8rem; }

    /* Wiki side nav becomes a clean pill bar at the top of the guide */
    .wiki-side-card {
        position: static; display: block; overflow: visible; padding: .4rem;
        border-radius: 16px;
    }
    .wiki-side-card .wiki-side-title, .wiki-side-card .wiki-side-back { display: none; }
    .wiki-side-nav {
        flex-direction: row; gap: .4rem; overflow-x: auto;
        -webkit-overflow-scrolling: touch; scrollbar-width: none;
    }
    .wiki-side-nav::-webkit-scrollbar { display: none; }
    .wiki-side-card .wiki-side-nav a {
        flex: 0 0 auto; padding: .5rem .8rem; white-space: nowrap;
        border: 1px solid var(--border); border-radius: 999px;
    }
    .wiki-side-card .wiki-side-nav a + a { border-top: 1px solid var(--border); }
    .wiki-side-card .wiki-side-nav a.is-current {
        border-color: color-mix(in srgb, var(--hue) 55%, transparent);
        background: color-mix(in srgb, var(--hue) 16%, #fff);
        color: var(--text);
    }
    html.dark-mode .wiki-side-card { background: rgba(58,38,58,.9); }
    html.dark-mode .wiki-side-card .wiki-side-nav a { border-color: rgba(255,197,226,.2); }
    html.dark-mode .wiki-side-card .wiki-side-nav a.is-current {
        background: color-mix(in srgb, var(--hue) 26%, #2a1b2b); color: #fff;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .wiki-top { transition: none; }
}

/* ==========================================================================
   V5 - More rainbow (tasteful signature touches)
   ========================================================================== */

/* Site-wide rainbow ribbon pinned to the very top edge */
body.mmc-body::after {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--rainbow);
    z-index: 999;
    pointer-events: none;
}

/* Rainbow scrollbar on desktop pointers */
@media (pointer: fine) {
    html { scrollbar-width: thin; scrollbar-color: var(--rb-violet) transparent; }
    ::-webkit-scrollbar { width: 12px; height: 12px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb {
        background: var(--rainbow);
        border-radius: 99px;
        border: 3px solid var(--bg);
    }
    html.dark-mode ::-webkit-scrollbar-thumb { border-color: #2a1b2b; }
}

/* Eyebrows with a literal sparkle become a soft rainbow */
.wiki-overline, .help-band-eyebrow {
    background: var(--rainbow);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Regal card divider upgraded from gold to full spectrum */
.mmc-card--regal::before { background: var(--rainbow); opacity: .9; }

/* Wiki section headings carry their section hue (kept readable) */
.wiki-section h2 { color: color-mix(in srgb, var(--hue) 68%, #46303f); }
html.dark-mode .wiki-section h2 { color: color-mix(in srgb, var(--hue) 82%, #ffffff); }

/* Featured banner gets a rainbow spine */
.featured-banner::after {
    content: "";
    position: absolute;
    top: 0; bottom: 0; left: 0;
    width: 5px;
    background: var(--rainbow);
}

/* ==========================================================================
   V6 - Wiki rebuild: Font Awesome icons, affinity cards, sub-headings
   ========================================================================== */

/* Icons in headings, jump cards and the side rail (replacing emoji) */
.wiki-section h2 i { margin-right: .55rem; font-size: .8em; }
.wiki-jump-icon { color: var(--hue); }
.wiki-side-card .wiki-side-nav a i { width: 1.2em; margin-right: .2rem; text-align: center; }

/* Sub-section headings inside a section */
.wiki-subhead {
    display: flex; align-items: center; gap: .5rem;
    margin: 1.6rem 0 .55rem;
    color: var(--text);
    font-family: "Cinzel", serif;
    font-size: 1.08rem;
}
.wiki-subhead i { color: var(--hue); font-size: .92em; }
html.dark-mode .wiki-subhead { color: #fff8fc; }

/* Mods chapter - allowed / disallowed banners */
.wiki-mod-band {
    display: flex; align-items: center; gap: .6rem;
    margin: 2.4rem 0 1rem; padding: 0 0 .55rem;
    border-bottom: 3px solid rgba(0,0,0,.08);
}
.wiki-mod-band i { font-size: 1.5rem; }
.wiki-mod-band-title {
    font-family: "Cinzel Decorative", "Cinzel", serif; font-weight: 700;
    font-size: clamp(1.6rem, 3.4vw, 2.1rem); letter-spacing: .01em;
    line-height: 1.15;
}
.wiki-mod-band-sub {
    margin-left: auto; font-size: .85rem; font-style: italic;
    color: var(--text-soft); text-align: right; align-self: center;
}
.wiki-mod-band--deny { border-bottom-color: rgba(220,90,120,.5); }
.wiki-mod-band--deny i, .wiki-mod-band--deny .wiki-mod-band-title { color: #c23e68; }
.wiki-mod-band--allow { border-bottom-color: rgba(79,206,134,.5); }
.wiki-mod-band--allow i, .wiki-mod-band--allow .wiki-mod-band-title { color: #2f9e63; }
.wiki-mod-group {
    margin: .2rem 0 .4rem; padding: .1rem 0 .1rem 1.05rem;
    border-left: 3px solid rgba(79,206,134,.4);
}
.wiki-mod-group--deny { border-left-color: rgba(220,90,120,.4); }
html.dark-mode .wiki-mod-band--deny i, html.dark-mode .wiki-mod-band--deny .wiki-mod-band-title { color: #ff9ab8; }
html.dark-mode .wiki-mod-band--allow i, html.dark-mode .wiki-mod-band--allow .wiki-mod-band-title { color: #7be0a6; }
html.dark-mode .wiki-mod-group { border-left-color: rgba(123,224,166,.35); }
html.dark-mode .wiki-mod-group--deny { border-left-color: rgba(255,154,184,.35); }

/* Affinity grid - fills rows cleanly for seven cards */
.affinity-grid {
    display: grid;
    gap: .8rem;
    grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
}
.affinity-card h3 i { color: var(--hue); margin-right: .4rem; }

.affinity-active {
    margin: .65rem 0 .55rem;
    padding: .5rem .65rem;
    border-radius: 11px;
    font-size: .82rem;
    line-height: 1.5;
    color: var(--text-mid);
    background: color-mix(in srgb, var(--hue) 12%, #fff);
    border: 1px solid color-mix(in srgb, var(--hue) 28%, transparent);
}
.affinity-active i { color: var(--hue); }
.affinity-active strong { color: var(--text); }
.affinity-active span { color: var(--text-soft); }

.affinity-tradeoff { margin-top: .55rem; color: var(--text-soft); font-size: .82rem; }
.affinity-tradeoff strong { color: #c2607f; }

html.dark-mode .affinity-active {
    background: color-mix(in srgb, var(--hue) 24%, #2a1b2b);
    border-color: color-mix(in srgb, var(--hue) 40%, transparent);
    color: #e9cfe0;
}
html.dark-mode .affinity-active strong { color: #fff8fc; }
html.dark-mode .affinity-active span { color: #d6b4cd; }
html.dark-mode .affinity-tradeoff { color: #c9a8c0; }
html.dark-mode .affinity-tradeoff strong { color: #ffa9bf; }

/* Rank path ladder */
.wiki-rank-path {
    display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
    margin-top: .35rem;
}
.wiki-rank-path span {
    padding: .42rem .85rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff9fc;
    color: var(--text);
    font-family: "Cinzel", serif;
    font-size: .85rem;
    font-weight: 700;
}
.wiki-rank-path span:last-of-type {
    color: #fff;
    background: var(--grad-primary);
    border-color: transparent;
}
.wiki-rank-path i { color: var(--text-soft); font-size: .68rem; }
html.dark-mode .wiki-rank-path span { background: rgba(255,255,255,.05); border-color: rgba(255,197,226,.2); color: #f3dbe8; }
html.dark-mode .wiki-rank-path span:last-of-type { color: #fff; background: var(--grad-primary); border-color: transparent; }
html.dark-mode .wiki-rank-path i { color: #b58aa8; }

/* ==========================================================================
   V7 - Base affinity statistics (passives / drawbacks) + roomier cards
   ========================================================================== */
.affinity-grid { grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); }

/* cooldown tag inside the active box */
.affinity-active em {
    display: inline-block; font-style: normal; vertical-align: middle;
    margin-left: .4rem; padding: .06rem .5rem;
    border-radius: 999px; font-size: .64rem; font-weight: 800; letter-spacing: .02em;
    color: var(--hue); background: color-mix(in srgb, var(--hue) 14%, #fff);
}
.affinity-active span { display: block; margin-top: .3rem; }
html.dark-mode .affinity-active em { color: #f6ddec; background: rgba(255,255,255,.13); }

/* passives + drawbacks groups */
.affinity-stats { margin-top: .65rem; display: grid; gap: .55rem; }
.affinity-stat-label {
    display: inline-block; margin-bottom: .3rem;
    padding: .13rem .52rem; border-radius: 999px;
    font-size: .62rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase;
}
.affinity-stat-perk { color: #2f8f57; background: rgba(79,206,134,.16); }
.affinity-stat-draw { color: #c45c7d; background: rgba(248,178,178,.2); }
html.dark-mode .affinity-stat-perk { color: #93e6b1; background: rgba(79,206,134,.18); }
html.dark-mode .affinity-stat-draw { color: #ffb3c6; background: rgba(248,178,178,.15); }

.affinity-perks, .affinity-draws { margin: 0; padding: 0; list-style: none; }
.affinity-perks li, .affinity-draws li {
    position: relative; padding-left: 1rem; margin: .22rem 0;
    color: var(--text-mid); font-size: .82rem; line-height: 1.42;
}
.affinity-perks li::before { content: "✦"; position: absolute; left: 0; top: .14rem; font-size: .54rem; color: #3fbf76; }
.affinity-draws li::before { content: "✦"; position: absolute; left: 0; top: .14rem; font-size: .54rem; color: #e08aa2; }
html.dark-mode .affinity-perks li, html.dark-mode .affinity-draws li { color: #dcc0d4; }

/* ==========================================================================
   V8 - Dark navbar action buttons, Bedrock "-" prefix affix, inline errors
   ========================================================================== */

/* (1) Dark mode: the cart / account / theme buttons were keeping their light
   fill + pink border, so they glowed against the dark nav. Give them a subtle
   dark chip treatment with a real hover. */
html.dark-mode .nav-cart-v2,
html.dark-mode .nav-account-v2,
html.dark-mode .theme-toggle {
    background: rgba(255, 255, 255, .07);
    border-color: rgba(255, 190, 220, .22);
}
html.dark-mode .nav-cart-v2:hover,
html.dark-mode .nav-account-v2:hover,
html.dark-mode .theme-toggle:hover {
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 190, 220, .42);
}
html.dark-mode .nav-cart-v2 b { background: #b98fe6; color: #241033; }

/* (2) Bedrock "-" prefix affordance shown inside the username field */
.field-affix { position: relative; display: block; }
.field-affix .field-input { width: 100%; }
.field-affix-prefix {
    position: absolute;
    left: 0; top: 6px; bottom: 6px;
    width: 2.2rem;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.05rem;
    line-height: 1;
    color: var(--accent, #ff6fae);
    border-right: 1.5px solid color-mix(in srgb, var(--accent, #ff6fae) 32%, transparent);
    pointer-events: none;
}
.field-affix.is-bedrock .field-affix-prefix { display: flex; }
.field-affix.is-bedrock .field-input { padding-left: 2.55rem; }

/* (3) Inline "enter your name" error state (replaces the sign-in bounce) */
.field-input--error {
    border-color: #e5484d !important;
    box-shadow: 0 0 0 3px rgba(229, 72, 77, .16);
}
.delivery-hint--error { color: #e5484d; font-weight: 700; }
html.dark-mode .field-input--error {
    border-color: #ff7a7f !important;
    box-shadow: 0 0 0 3px rgba(255, 122, 127, .18);
}
html.dark-mode .delivery-hint--error { color: #ff9ea1; }

/* ============================================================
   Wiki — book mode (paged navigation, one chapter at a time)
   ============================================================ */
.wiki-book {
    display: grid;
    width: min(var(--page-width), 100%);
    margin: 0 auto;
    gap: 1.25rem;
    grid-template-columns: 258px minmax(0, 1fr);
    align-items: start;
}

/* Chapter index — the "spine" of the book */
.wiki-index {
    position: sticky;
    top: 96px;
    order: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--shadow-sm);
}
.wiki-index-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .95rem 1rem .8rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-family: "Cinzel", serif;
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.wiki-index-title i { color: var(--accent-strong); }
.wiki-index-nav { display: flex; flex-direction: column; }
.wiki-index-nav button {
    display: flex;
    align-items: center;
    gap: .6rem;
    width: 100%;
    padding: .7rem 1rem;
    border: 0;
    border-left: 3px solid transparent;
    background: transparent;
    color: var(--text-mid);
    font-family: inherit;
    font-size: .86rem;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.wiki-index-nav button + button { border-top: 1px solid rgba(214, 174, 224, .2); }
.wiki-index-nav button:hover { border-left-color: var(--hue, var(--accent)); color: var(--accent-strong); background: #fff1f7; }
.wiki-index-nav button.is-current {
    color: #fff;
    border-left-color: transparent;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--hue, #ff6fae) 92%, #fff),
        color-mix(in srgb, var(--hue, #ff6fae) 70%, #a978f0));
}
.wiki-index-num {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 7px;
    background: rgba(214, 174, 224, .18);
    color: var(--text-soft);
    font-size: .68rem;
    font-weight: 900;
}
.wiki-index-nav button.is-current .wiki-index-num { background: rgba(255, 255, 255, .28); color: #fff; }
.wiki-index-nav button i.fa-solid { width: 1.1em; text-align: center; font-size: .9em; }

/* Book body */
.wiki-book-body { order: 1; min-width: 0; }

/* Top bar — progress + page counter + (mobile) contents toggle */
.wiki-book-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: .72rem 1.05rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, .92);
    box-shadow: var(--shadow-sm);
}
.wiki-book-contents-toggle {
    display: none;
    align-items: center;
    gap: .45rem;
    padding: .5rem .8rem;
    border: 1px solid var(--border-strong);
    border-radius: 11px;
    background: #fff;
    color: var(--accent-strong);
    font-family: "Cinzel", serif;
    font-weight: 800;
    font-size: .8rem;
    cursor: pointer;
}
.wiki-book-progress {
    flex: 1;
    height: 8px;
    border-radius: 99px;
    background: var(--surface-tint);
    overflow: hidden;
}
.wiki-book-progress span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 99px;
    background: var(--rainbow);
    transition: width .4s cubic-bezier(.4, 0, .2, 1);
}
.wiki-book-count {
    color: var(--text-mid);
    font-family: "Cinzel", serif;
    font-weight: 800;
    font-size: .84rem;
    white-space: nowrap;
}

/* Pages */
.wiki-book-viewport { position: relative; }
.wiki-page { display: none; }
.wiki-page.is-active { display: flex; flex-direction: column; gap: 1.1rem; animation: wikiPageIn .34s cubic-bezier(.22, .61, .36, 1); }
@keyframes wikiPageIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

/* Bottom pager — the "page turn" controls */
.wiki-book-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.3rem;
}
.wiki-pager-btn {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    min-width: 148px;
    padding: .72rem 1.15rem;
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    background: rgba(255, 255, 255, .94);
    color: var(--accent-strong);
    font-family: "Cinzel", serif;
    font-weight: 800;
    font-size: .9rem;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, opacity .16s ease;
}
.wiki-pager-btn--next { justify-content: flex-end; background: var(--grad-primary); color: #fff; border-color: transparent; }
.wiki-pager-btn--prev { justify-content: flex-start; }
.wiki-pager-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.wiki-pager-btn--next:hover:not(:disabled) { background: var(--grad-primary-hover); }
.wiki-pager-btn:disabled { opacity: .35; cursor: default; box-shadow: none; }
.wiki-pager-label { display: flex; flex-direction: column; line-height: 1.1; }
.wiki-pager-btn--next .wiki-pager-label { text-align: right; }
.wiki-pager-label small {
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    opacity: .72;
}
.wiki-pager-label b { font-size: .92rem; font-weight: 800; }

.wiki-book-dots {
    display: flex;
    gap: .34rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 240px;
}
.wiki-book-dots button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--border-strong);
    cursor: pointer;
    transition: transform .16s ease, background .16s ease;
}
.wiki-book-dots button:hover { background: var(--accent-strong); }
.wiki-book-dots button.is-current { background: var(--accent); transform: scale(1.35); }

/* Cover page tweaks — jump cards become page switches */
.wiki-page--cover .wiki-jump-card { border: 1px solid rgba(255, 176, 214, .38); cursor: pointer; font: inherit; text-align: left; }
.wiki-page--cover .wiki-jump-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Command reference groups (used inside the Commands chapter) */
.wiki-cmd-group + .wiki-cmd-group { margin-top: 1.15rem; }

/* Rank unlock rows */
.wiki-rank-unlocks { display: grid; gap: .6rem; margin-top: 1rem; }
.wiki-rank-unlock {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: .8rem;
    align-items: center;
    padding: .8rem .9rem;
    border: 1px solid rgba(255, 186, 218, .32);
    border-radius: 16px;
    background: #fff9fc;
}
.wiki-rank-unlock-name {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .35rem .2rem;
    border-radius: 10px;
    background: var(--grad-primary);
    color: #fff;
    font-family: "Cinzel", serif;
    font-weight: 800;
    font-size: .84rem;
}
.wiki-rank-unlock-cmds { display: flex; flex-wrap: wrap; gap: .3rem; }
.wiki-rank-unlock-cmds code {
    padding: .18rem .5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 186, 218, .4);
    background: #fff;
    color: #aa4f80;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .8rem;
    font-weight: 700;
}
.wiki-rank-unlock-cmds span { align-self: center; color: var(--text-soft); font-size: .82rem; font-style: italic; }

/* ---- Book: dark mode ---- */
html.dark-mode .wiki-index,
html.dark-mode .wiki-book-bar {
    border-color: rgba(255, 197, 226, .16);
    background: rgba(48, 34, 47, .82);
}
html.dark-mode .wiki-index-title { color: #fff8fc; border-color: rgba(255, 197, 226, .16); }
html.dark-mode .wiki-index-nav button { color: #e9cfe0; }
html.dark-mode .wiki-index-nav button + button { border-color: rgba(255, 197, 226, .14); }
html.dark-mode .wiki-index-nav button:hover { color: #fff; background: rgba(255, 255, 255, .06); }
html.dark-mode .wiki-index-num { background: rgba(255, 255, 255, .1); color: #d6b4cd; }
html.dark-mode .wiki-book-count { color: #e9cfe0; }
html.dark-mode .wiki-book-progress { background: rgba(255, 255, 255, .1); }
html.dark-mode .wiki-book-contents-toggle { background: rgba(255, 255, 255, .06); border-color: rgba(255, 197, 226, .2); color: #ffb8da; }
html.dark-mode .wiki-pager-btn { background: rgba(255, 255, 255, .06); border-color: rgba(255, 197, 226, .2); color: #ffb8da; }
html.dark-mode .wiki-pager-btn--next { background: var(--grad-primary); color: #fff; border-color: transparent; }
html.dark-mode .wiki-book-dots button { background: rgba(255, 197, 226, .3); }
html.dark-mode .wiki-book-dots button.is-current { background: var(--accent); }
html.dark-mode .wiki-rank-unlock { border-color: rgba(255, 197, 226, .16); background: rgba(255, 255, 255, .04); }
html.dark-mode .wiki-rank-unlock-cmds code { background: rgba(255, 255, 255, .06); border-color: rgba(255, 197, 226, .2); color: #ffc2dc; }

/* ---- Book: responsive ---- */
@media (max-width: 980px) {
    .wiki-book { display: flex; flex-direction: column; }
    .wiki-index {
        position: static;
        order: 0;
        max-height: 0;
        border: 0;
        border-radius: 16px;
        box-shadow: none;
        opacity: 0;
        transition: max-height .3s ease, opacity .25s ease;
    }
    .wiki-index.is-open {
        max-height: 720px;
        border: 1px solid var(--border);
        box-shadow: var(--shadow-sm);
        opacity: 1;
    }
    .wiki-book-contents-toggle { display: inline-flex; }
    .wiki-book-count { margin-left: auto; }
    .wiki-pager-btn { min-width: 0; flex: 1; padding: .7rem .8rem; }
    .wiki-pager-btn span.wiki-pager-face { display: none; }
    .wiki-book-dots { display: none; }
}

/* ==========================================================================
   Log out / clear username  (nav account menu + delivery field)
   ========================================================================== */

/* Alpine: hide dropdown until initialised so it never flashes on load */
[x-cloak] { display: none !important; }

/* --- Delivery field: "x" to clear the name (buy for a friend) --- */
.field-clear {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 1.7rem;
    height: 1.7rem;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    color: var(--accent-strong);
    font-size: .82rem;
    cursor: pointer;
    transition: background .16s ease, color .16s ease, transform .16s ease;
}
.field-clear.is-visible { display: inline-flex; }
.field-clear:hover {
    background: var(--accent);
    color: #fff;
}
.field-clear:focus-visible {
    outline: 2px solid var(--accent-strong);
    outline-offset: 2px;
}
/* keep typed text from sliding under the x while it's showing */
.field-affix:has(.field-clear.is-visible) .field-input { padding-right: 2.4rem; }

/* --- Delivery card: "Signed in as X · Not you? Log out" --- */
.delivery-account-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .35rem .9rem;
    margin-top: .7rem;
    padding-top: .7rem;
    border-top: 1px dashed var(--border);
    font-size: .82rem;
}
.delivery-account-who { color: var(--text-mid); }
.delivery-account-who strong { color: var(--text); font-weight: 700; }
.delivery-account-who i { color: #4fce86; margin-right: .1rem; }
.delivery-logout-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--accent-strong);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.delivery-logout-link:hover { text-decoration: underline; }

/* --- Nav: account avatar dropdown with Log out --- */
.nav-account-menu { position: relative; display: inline-flex; }

.nav-account-pop {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 60;
    min-width: 216px;
    padding: .55rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
}
.nav-account-pop::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 16px;
    width: 12px;
    height: 12px;
    background: var(--surface);
    border-left: 1px solid var(--border);
    border-top: 1px solid var(--border);
    transform: rotate(45deg);
}
.nav-account-pop-head {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .35rem .55rem .6rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: .4rem;
}
.nav-account-pop-head img {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    image-rendering: pixelated;
    flex: none;
}
.nav-account-pop-id { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.nav-account-pop-id small { color: var(--text-soft); font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; }
.nav-account-pop-id strong { color: var(--text); font-size: .92rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav-account-pop-link {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem .6rem;
    border-radius: 11px;
    color: var(--text);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .14s ease, color .14s ease;
}
.nav-account-pop-link i { width: 16px; text-align: center; color: var(--text-soft); }
.nav-account-pop-link:hover { background: var(--surface-tint); }
.nav-account-pop-link:hover i { color: var(--accent-strong); }

.nav-account-pop-logout { color: #c0392b; }
.nav-account-pop-logout i { color: #c0392b; }
.nav-account-pop-logout:hover { background: #fdeaea; color: #a5281f; }
.nav-account-pop-logout:hover i { color: #a5281f; }

html.dark-mode .nav-account-pop-logout { color: #ff9a93; }
html.dark-mode .nav-account-pop-logout i { color: #ff9a93; }
html.dark-mode .nav-account-pop-logout:hover { background: rgba(255, 122, 127, .16); color: #ffb4ad; }
html.dark-mode .nav-account-pop-logout:hover i { color: #ffb4ad; }
html.dark-mode .delivery-logout-link { color: #ff9ec8; }

/* On phones the nav card clips overflow, so float the account menu as an
   overlay anchored top-right instead of dropping inside the clipped card. */
@media (max-width: 760px) {
    .nav-account-pop {
        position: fixed;
        top: 62px;
        right: 12px;
        left: auto;
        min-width: 60vw;
        max-width: 280px;
    }
    .nav-account-pop::before { display: none; }
}

/* Friend-buying hint under the delivery field (replaces the old Gift button) */
.delivery-hint--friend {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-top: .35rem;
    color: var(--text-mid);
}
.delivery-hint--friend i { color: var(--accent-strong); font-size: .8rem; }
html.dark-mode .delivery-hint--friend i { color: #ff9ec8; }
