:root {
    --mint-50: #f4fffa;
    --mint-100: #e4f9f0;
    --mint-200: #d0f1e4;
    --mint-300: #b7e2d2;
    --mint-400: #8fcab5;
    --mint-500: #6aaf99;
    --mint-600: #4f8e7c;

    --lavender-100: #f0efff;
    --lavender-200: #dedcff;
    --lavender-300: #bebaff;
    --lavender-400: #9996ec;
    --lavender-500: #7775d4;
    --lavender-600: #5c59b6;

    --ink-900: #30314a;
    --ink-800: #3d3f5d;
    --ink-700: #555978;
    --ink-600: #686d8a;
    --ink-500: #8186a0;

    --cream: #fbfcf8;
    --white: #ffffff;
    --blush: #f0b2bf;

    --shadow-soft:
        0 24px 80px rgba(73, 91, 114, 0.12);
    --shadow-card:
        0 24px 60px rgba(67, 74, 117, 0.16);
    --radius-xl: 34px;
    --radius-lg: 24px;
    --radius-md: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink-900);
    font-family: "DM Sans", system-ui, sans-serif;
    background:
        radial-gradient(
            circle at 15% 10%,
            rgba(195, 241, 221, 0.50),
            transparent 30%
        ),
        radial-gradient(
            circle at 90% 25%,
            rgba(209, 206, 255, 0.48),
            transparent 28%
        ),
        linear-gradient(
            180deg,
            #f8fffb 0%,
            #f7f8ff 46%,
            #fbfcf9 100%
        );
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.25;
    background-image:
        radial-gradient(
            circle,
            rgba(87, 110, 125, 0.17) 1px,
            transparent 1px
        );
    background-size: 26px 26px;
    mask-image:
        linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.7),
            transparent 70%
        );
    z-index: -2;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

button,
input {
    font: inherit;
}

/* =======================================================
   NAV
   ======================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 24px 0;
    backdrop-filter: blur(18px);
}

.nav-shell {
    width: min(1460px, 100%);
    margin: 0 auto;
    min-height: 74px;
    padding: 10px 14px 10px 18px;
    display: grid;
    grid-template-columns:
        auto
        1fr
        auto;
    align-items: center;
    gap: 24px;
    background:
        rgba(255, 255, 255, 0.86);
    border:
        1px solid
        rgba(255, 255, 255, 0.86);
    box-shadow:
        0 12px 50px
        rgba(70, 89, 103, 0.12);
    border-radius: 999px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family:
        "Playfair Display",
        serif;
    font-size: 29px;
    font-style: italic;
    font-weight: 700;
    white-space: nowrap;
}

.brand img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
    border:
        2px solid
        rgba(255, 255, 255, 0.9);
    box-shadow:
        0 5px 16px
        rgba(58, 93, 81, 0.20);
}

.brand-spark {
    margin-left: -9px;
    color: var(--lavender-500);
    font-size: 18px;
    align-self: flex-start;
    margin-top: 3px;
}

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.nav-links a {
    position: relative;
    padding: 13px 14px;
    color: var(--ink-700);
    font-size: 14px;
    font-weight: 600;
    border-radius: 14px;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--mint-600);
    background:
        rgba(211, 243, 231, 0.50);
}

.nav-links a.active::after {
    content: "";
    position: absolute;
    left: 24%;
    right: 24%;
    bottom: 4px;
    height: 2px;
    border-radius: 99px;
    background: var(--mint-500);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 12px 7px 7px;
    color: var(--ink-800);
    font-size: 13px;
    font-weight: 700;
    background: var(--mint-100);
    border-radius: 999px;
}

.user-chip img,
.user-chip-dot {
    width: 31px;
    height: 31px;
    border-radius: 50%;
}

.user-chip-dot {
    display: block;
    background:
        linear-gradient(
            135deg,
            var(--mint-400),
            var(--lavender-400)
        );
}

.mobile-nav-toggle {
    display: none;
    width: 45px;
    height: 45px;
    padding: 10px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.mobile-nav-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 99px;
    background: var(--ink-800);
}

/* =======================================================
   BUTTONS
   ======================================================= */

.button {
    min-height: 52px;
    padding: 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border:
        1px solid
        transparent;
    border-radius: 17px;
    font-weight: 700;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-small {
    min-height: 46px;
    padding:
        0
        18px;
    border-radius: 16px;
    font-size: 14px;
}

.button-primary {
    color: white;
    background:
        linear-gradient(
            135deg,
            var(--mint-500),
            var(--mint-600)
        );
    box-shadow:
        0 14px 30px
        rgba(77, 143, 123, 0.23);
}

.button-primary:hover {
    box-shadow:
        0 18px 38px
        rgba(77, 143, 123, 0.31);
}

.button-secondary {
    color: var(--ink-800);
    background:
        rgba(255, 255, 255, 0.72);
    border-color:
        rgba(100, 114, 145, 0.18);
    box-shadow:
        0 10px 28px
        rgba(74, 84, 113, 0.09);
}

.button-discord {
    color: white;
    background:
        linear-gradient(
            135deg,
            #7375e8,
            #6865db
        );
    box-shadow:
        0 12px 30px
        rgba(104, 101, 219, 0.22);
}

.discord-mark {
    width: 26px;
    height: 26px;
    display: inline-grid;
    place-items: center;
    color: #6d6ce1;
    background: white;
    border-radius: 50%;
    font-size: 13px;
}

/* =======================================================
   HERO
   ======================================================= */

.hero {
    position: relative;
    overflow: hidden;
    padding:
        88px 32px
        80px;
}

.hero::before {
    content: "";
    position: absolute;
    left: -8%;
    bottom: -250px;
    width: 720px;
    height: 720px;
    border-radius: 50%;
    background:
        radial-gradient(
            circle,
            rgba(189, 237, 217, 0.42),
            transparent 67%
        );
}

.hero::after {
    content: "";
    position: absolute;
    right: -150px;
    top: 70px;
    width: 630px;
    height: 630px;
    border-radius: 50%;
    background:
        radial-gradient(
            circle,
            rgba(194, 190, 255, 0.46),
            transparent 68%
        );
    z-index: -1;
}

.hero-inner {
    position: relative;
    z-index: 2;
    width:
        min(
            1440px,
            100%
        );
    min-height: 650px;
    margin: 0 auto;
    display: grid;
    grid-template-columns:
        minmax(0, 0.9fr)
        minmax(580px, 1.1fr);
    align-items: center;
    gap: 35px;
}

.hero-copy {
    padding-left: 18px;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--mint-600);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.20em;
}

.eyebrow.compact {
    display: block;
    letter-spacing: 0.16em;
}

.eyebrow-line {
    width: 57px;
    height: 1px;
    background:
        rgba(79, 142, 124, 0.48);
}

.hero h1,
.page-hero h1,
.feature-section h2,
.stats-copy h2,
.cta-card h2 {
    margin: 20px 0;
    font-family:
        "Playfair Display",
        serif;
    font-weight: 600;
    letter-spacing: -0.035em;
}

.hero h1 {
    max-width: 690px;
    font-size:
        clamp(
            64px,
            6.2vw,
            105px
        );
    line-height: 0.91;
}

.hero h1 span,
.feature-section h2 span,
.cta-card h2 span {
    display: block;
    color: var(--mint-500);
    font-style: italic;
}

.hero-description {
    max-width: 620px;
    margin: 30px 0 0;
    color: var(--ink-700);
    font-size: 18px;
    line-height: 1.68;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.quick-features {
    max-width: 680px;
    display: grid;
    grid-template-columns:
        repeat(4, 1fr);
    gap: 0;
    margin-top: 34px;
}

.quick-features > div {
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding:
        0
        20px;
    border-right:
        1px solid
        rgba(82, 96, 126, 0.16);
}

.quick-features > div:first-child {
    padding-left: 0;
}

.quick-features > div:last-child {
    border-right: 0;
}

.quick-features span {
    color: var(--lavender-500);
    font-size: 25px;
}

.quick-features p {
    margin: 0;
    color: var(--ink-700);
    font-size: 12px;
    line-height: 1.35;
    font-weight: 600;
}

/* =======================================================
   HERO CARDS
   ======================================================= */

.hero-cards {
    position: relative;
    min-height: 610px;
    isolation: isolate;
}

.showcase-card {
    position: absolute;
    border-radius: 18px;
    filter:
        drop-shadow(
            0 24px 28px
            rgba(56, 66, 97, 0.22)
        );
    animation:
        card-float
        5.5s ease-in-out
        infinite;
    transform-origin: center center;
}

.showcase-card img {
    display: block;
    width: 100%;
    height: auto;
}

.card-left {
    width: 265px;
    left: 4%;
    top: 130px;
    z-index: 2;
    transform: rotate(-8deg);
    animation-delay: -1.3s;
}

.card-center {
    width: 380px;
    left: 30%;
    top: 34px;
    z-index: 4;
    animation-delay: -2.5s;
}

.card-right {
    width: 275px;
    right: -1%;
    top: 145px;
    z-index: 2;
    transform: rotate(9deg);
    animation-delay: -0.7s;
}

.magical-card {
    filter:
        drop-shadow(
            0 0 20px
            rgba(148, 130, 255, 0.76)
        )
        drop-shadow(
            0 26px 34px
            rgba(63, 63, 126, 0.25)
        );
}

.magical-card::before,
.magical-card::after {
    content: "";
    position: absolute;
    inset: 2% 4%;
    z-index: -1;
    border-radius: 45px;
    background:
        conic-gradient(
            from 0deg,
            rgba(169, 241, 226, 0.45),
            rgba(163, 146, 255, 0.75),
            rgba(255, 190, 232, 0.44),
            rgba(168, 239, 224, 0.55)
        );
    filter: blur(24px);
    animation:
        aura-pulse
        3.8s ease-in-out
        infinite;
}

.magical-card::after {
    inset: -3%;
    filter: blur(45px);
    opacity: 0.45;
}

.magic-ring {
    position: absolute;
    border:
        2px solid
        rgba(146, 132, 243, 0.25);
    border-radius: 50%;
    transform:
        rotateX(68deg)
        rotateZ(-12deg);
    animation:
        ring-spin
        12s linear
        infinite;
}

.magic-ring-one {
    width: 520px;
    height: 330px;
    left: 20%;
    top: 180px;
}

.magic-ring-two {
    width: 420px;
    height: 255px;
    left: 28%;
    top: 215px;
    border-color:
        rgba(96, 178, 151, 0.30);
    animation-direction: reverse;
    animation-duration: 9s;
}

.floating-spark {
    position: absolute;
    z-index: 8;
    color: white;
    text-shadow:
        0 0 14px
        rgba(138, 122, 255, 0.95);
    animation:
        sparkle
        2.6s ease-in-out
        infinite;
}

.spark-one {
    top: 80px;
    left: 33%;
    font-size: 31px;
}

.spark-two {
    top: 195px;
    right: 8%;
    font-size: 26px;
    animation-delay: -1s;
}

.spark-three {
    bottom: 95px;
    left: 28%;
    font-size: 24px;
    animation-delay: -0.5s;
}

.spark-four {
    bottom: 150px;
    right: 17%;
    font-size: 38px;
    animation-delay: -1.6s;
}

.magical-label {
    position: absolute;
    left: 42%;
    bottom: 23px;
    z-index: 9;
    padding:
        10px
        18px;
    color: var(--lavender-600);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background:
        rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(12px);
    border:
        1px solid
        rgba(141, 134, 234, 0.21);
    border-radius: 999px;
    box-shadow: var(--shadow-card);
}

.magical-label span {
    margin-right: 6px;
}

@keyframes card-float {
    0%, 100% {
        translate: 0 0;
    }

    50% {
        translate: 0 -15px;
    }
}

@keyframes aura-pulse {
    0%, 100% {
        opacity: 0.55;
        scale: 0.97;
    }

    50% {
        opacity: 0.95;
        scale: 1.04;
    }
}

@keyframes ring-spin {
    from {
        transform:
            rotateX(68deg)
            rotateZ(0deg);
    }

    to {
        transform:
            rotateX(68deg)
            rotateZ(360deg);
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0.35;
        transform:
            scale(0.74)
            rotate(0deg);
    }

    50% {
        opacity: 1;
        transform:
            scale(1.2)
            rotate(45deg);
    }
}

/* =======================================================
   STATS
   ======================================================= */

.stats-section {
    padding:
        65px 32px
        92px;
}

.stats-inner {
    width:
        min(
            1480px,
            100%
        );
    margin: 0 auto;
    padding:
        52px
        62px;
    display: grid;
    grid-template-columns:
        0.75fr
        1.6fr;
    align-items: center;
    gap: 52px;
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.90),
            rgba(235, 250, 244, 0.88)
        );
    border:
        1px solid
        rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
}

.stats-copy h2 {
    font-size:
        clamp(
            46px,
            4vw,
            70px
        );
    line-height: 0.92;
}

.stats-copy h2 span {
    color: var(--ink-900);
    font-style: italic;
}

.stats-copy p {
    max-width: 340px;
    color: var(--ink-600);
    line-height: 1.65;
}

.stats-grid {
    display: grid;
    grid-template-columns:
        repeat(3, 1fr);
    gap: 18px;
}

.stat-card {
    min-height: 220px;
    padding:
        28px;
    background:
        rgba(255, 255, 255, 0.82);
    border:
        1px solid
        rgba(110, 126, 153, 0.10);
    border-radius: 24px;
    box-shadow:
        0 14px 38px
        rgba(70, 83, 113, 0.08);
}

.stat-card.purple {
    background:
        linear-gradient(
            160deg,
            rgba(255, 255, 255, 0.92),
            rgba(239, 237, 255, 0.90)
        );
}

.stat-icon {
    width: 47px;
    height: 47px;
    display: grid;
    place-items: center;
    margin-bottom: 20px;
    border-radius: 15px;
    font-size: 25px;
}

.stat-icon.mint {
    color: var(--mint-600);
    background: var(--mint-100);
}

.stat-icon.lavender {
    color: var(--lavender-600);
    background: var(--lavender-100);
}

.stat-card p {
    margin: 0;
    color: var(--ink-600);
    font-size: 13px;
    font-weight: 700;
}

.stat-card strong {
    display: block;
    margin-top: 12px;
    font-family:
        "Playfair Display",
        serif;
    color: var(--ink-900);
    font-size:
        clamp(
            36px,
            3vw,
            52px
        );
    font-weight: 600;
    letter-spacing: -0.03em;
}

.mini-wave {
    width: 72%;
    height: 25px;
    margin:
        17px
        auto
        0;
    border-bottom:
        2px solid
        var(--mint-400);
    border-radius: 50%;
    transform: skewX(-22deg);
    opacity: 0.75;
}

/* =======================================================
   FEATURES
   ======================================================= */

.feature-section {
    width:
        min(
            1380px,
            calc(100% - 64px)
        );
    margin: 0 auto;
    padding:
        80px
        0
        110px;
}

.section-heading {
    max-width: 780px;
    margin-bottom: 44px;
}

.feature-section h2 {
    font-size:
        clamp(
            48px,
            5vw,
            76px
        );
    line-height: 0.98;
}

.feature-grid {
    display: grid;
    grid-template-columns:
        repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    min-height: 300px;
    padding: 36px;
    position: relative;
    overflow: hidden;
    background:
        rgba(255, 255, 255, 0.72);
    border:
        1px solid
        rgba(115, 126, 155, 0.10);
    border-radius: var(--radius-lg);
    box-shadow:
        0 18px 50px
        rgba(70, 80, 110, 0.08);
}

.feature-card.featured {
    background:
        linear-gradient(
            145deg,
            rgba(220, 247, 236, 0.90),
            rgba(236, 234, 255, 0.90)
        );
}

.feature-card::after {
    content: "";
    position: absolute;
    right: -60px;
    bottom: -80px;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background:
        radial-gradient(
            circle,
            rgba(147, 143, 236, 0.16),
            transparent 69%
        );
}

.feature-number {
    color: var(--lavender-500);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.feature-card h3 {
    margin:
        65px
        0
        14px;
    font-family:
        "Playfair Display",
        serif;
    font-size: 34px;
}

.feature-card p {
    color: var(--ink-600);
    line-height: 1.7;
}

/* =======================================================
   CTA + FOOTER
   ======================================================= */

.cta-section {
    padding:
        20px
        32px
        100px;
}

.cta-card {
    width:
        min(
            1380px,
            100%
        );
    margin: 0 auto;
    padding:
        55px
        58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    background:
        linear-gradient(
            135deg,
            rgba(232, 250, 242, 0.95),
            rgba(238, 236, 255, 0.95)
        );
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
}

.cta-card h2 {
    max-width: 800px;
    margin-bottom: 0;
    font-size:
        clamp(
            42px,
            4vw,
            67px
        );
    line-height: 1;
}

.site-footer {
    padding:
        30px
        32px
        60px;
}

.footer-inner {
    width:
        min(
            1380px,
            100%
        );
    margin: 0 auto;
    padding-top: 28px;
    display: flex;
    justify-content: space-between;
    gap: 60px;
    border-top:
        1px solid
        rgba(80, 94, 120, 0.13);
}

.footer-brand {
    font-size: 25px;
}

.footer-brand img {
    width: 42px;
    height: 42px;
}

.footer-inner p {
    max-width: 580px;
    color: var(--ink-600);
    line-height: 1.6;
}

.footer-links {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    color: var(--ink-600);
    font-size: 13px;
    font-weight: 700;
}

/* =======================================================
   INNER PAGES
   ======================================================= */

.page-hero {
    width:
        min(
            1380px,
            calc(100% - 64px)
        );
    min-height: 620px;
    margin: 35px auto 70px;
    padding:
        70px;
    display: grid;
    grid-template-columns:
        1fr
        1fr;
    align-items: center;
    gap: 60px;
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.78),
            rgba(229, 249, 240, 0.80)
        );
    border:
        1px solid
        rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
}

.small-page-hero {
    min-height: 380px;
    grid-template-columns: 1fr;
}

.page-hero h1 {
    margin-bottom: 15px;
    font-size:
        clamp(
            60px,
            7vw,
            100px
        );
}

.page-hero p {
    max-width: 700px;
    color: var(--ink-600);
    font-size: 18px;
    line-height: 1.7;
}

.code-panel {
    max-width: 650px;
    display: grid;
    gap: 8px;
    margin-top: 30px;
}

.code-panel code {
    padding:
        12px
        15px;
    background:
        rgba(48, 49, 74, 0.06);
    border-radius: 12px;
}

/* =======================================================
   COLLECTION
   ======================================================= */

.collection-hero {
    align-items: stretch;
}

.collection-hero-copy {
    align-self: center;
}

.collection-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(100px, 1fr));
    gap: 12px;
    align-self: center;
}

.collection-summary article {
    min-height: 112px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(96, 111, 142, 0.12);
    border-radius: 20px;
    box-shadow: 0 14px 32px rgba(68, 78, 108, 0.07);
}

.collection-summary span {
    color: var(--ink-600);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.collection-summary strong {
    font-family: "Playfair Display", serif;
    font-size: 32px;
    line-height: 1;
}

.collection-section {
    width: min(1420px, calc(100% - 64px));
    margin: 0 auto 100px;
}

.collection-filter-panel {
    margin-bottom: 24px;
    padding: 18px;
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.86),
            rgba(247, 247, 255, 0.84)
        );
    border: 1px solid rgba(96, 111, 142, 0.14);
    border-radius: 22px;
    box-shadow: 0 14px 34px rgba(68, 78, 108, 0.07);
}

.collection-filter-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.collection-filter-copy p {
    margin: 0;
    color: var(--ink-800);
}

.collection-filter-copy small {
    display: block;
    margin-top: 5px;
    color: var(--ink-500);
}

.collection-sort-wrap {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--ink-500);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.collection-search-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.collection-search-wrap {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 15px;
    background: rgba(255, 255, 255, 0.90);
    border: 1px solid rgba(96, 111, 142, 0.16);
    border-radius: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.collection-search-wrap:focus-within {
    border-color: var(--mint-400);
    box-shadow: 0 0 0 4px rgba(143, 202, 181, 0.13);
}

.collection-search-wrap > span {
    color: var(--ink-500);
    font-size: 22px;
}

.collection-search {
    width: 100%;
    min-width: 0;
    padding: 13px 14px 13px 0;
    color: var(--ink-800);
    background: transparent;
    border: 0;
    outline: none;
}

.collection-select {
    min-height: 44px;
    padding: 0 36px 0 14px;
    color: var(--ink-800);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(96, 111, 142, 0.16);
    border-radius: 13px;
    outline: none;
    cursor: pointer;
}

.collection-filter-groups {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 14px 22px;
}

.collection-filter-group {
    display: grid;
    gap: 7px;
}

.collection-filter-label {
    color: var(--ink-500);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.collection-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.collection-chip {
    min-height: 36px;
    padding: 0 13px;
    color: var(--ink-600);
    font-weight: 750;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(96, 111, 142, 0.15);
    border-radius: 11px;
    cursor: pointer;
    transition:
        transform 0.16s ease,
        border-color 0.16s ease,
        background 0.16s ease,
        box-shadow 0.16s ease;
}

.collection-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(106, 175, 153, 0.30);
}

.collection-chip.active {
    color: var(--mint-700);
    background: var(--mint-100);
    border-color: rgba(106, 175, 153, 0.38);
    box-shadow: inset 0 0 0 1px rgba(106, 175, 153, 0.08);
}

.collection-chip.rarity-prismatic-chip.active {
    color: #8a7418;
    background: rgba(255, 246, 194, 0.78);
    border-color: rgba(197, 165, 49, 0.36);
}

.collection-chip.rarity-magical-chip.active {
    color: #6953c8;
    background: rgba(235, 229, 255, 0.84);
    border-color: rgba(119, 92, 210, 0.32);
}

.collection-chip.rarity-basic-chip.active {
    color: var(--ink-700);
    background: rgba(238, 241, 247, 0.92);
    border-color: rgba(105, 118, 146, 0.24);
}

.collection-clear-filters {
    min-height: 36px;
    padding: 0 13px;
    margin-left: auto;
    color: var(--ink-500);
    font-weight: 700;
    background: transparent;
    border: 1px dashed rgba(96, 111, 142, 0.20);
    border-radius: 11px;
    cursor: pointer;
}

.collection-clear-filters:hover {
    color: var(--ink-800);
    border-color: rgba(96, 111, 142, 0.38);
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
    gap: 24px;
}

.collection-card {
    overflow: hidden;
    position: relative;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(105, 118, 146, 0.12);
    border-radius: 22px;
    box-shadow:
        0 16px 42px rgba(68, 78, 108, 0.09),
        0 2px 4px rgba(68, 78, 108, 0.04);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}

.collection-card:hover {
    transform: translateY(-4px) scale(1.018);
    box-shadow:
        0 26px 56px rgba(68, 78, 108, 0.15),
        0 8px 18px rgba(68, 78, 108, 0.08);
    z-index: 4;
}

.collection-card.selected-card {
    border-color: rgba(106, 175, 153, 0.52);
    box-shadow:
        0 16px 42px rgba(68, 78, 108, 0.09),
        0 0 0 2px rgba(183, 226, 210, 0.56);
}

.collection-card.rarity-card-prismatic {
    box-shadow:
        0 18px 48px rgba(68, 78, 108, 0.10),
        0 0 24px color-mix(in srgb, var(--card-border) 15%, transparent);
}

.collection-card.rarity-card-magical {
    box-shadow:
        0 20px 52px rgba(68, 78, 108, 0.11),
        0 0 30px color-mix(in srgb, var(--card-border) 20%, transparent);
}

.collection-art {
    min-height: 300px;
    position: relative;
    display: grid;
    place-items: center;
    padding: 12px 12px 8px;
    overflow: visible;
    border-radius: 22px 22px 0 0;
    background:
        linear-gradient(
            145deg,
            rgba(228, 249, 240, 0.92),
            rgba(240, 239, 255, 0.94)
        );
}

.collection-card-frame {
    width: min(100%, 225px);
    position: relative;
    display: grid;
    place-items: center;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.collection-art img {
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
    object-fit: contain;
    border-radius: 0;
    filter: drop-shadow(0 14px 18px rgba(45, 52, 78, 0.16));
}

/* Rare renders contain transparent outside-frame padding.
   Enlarge the rendered PNG so the physical card face stays the same size
   as Basic cards instead of looking shrunken. */
.rarity-card-prismatic .collection-art img,
.rarity-card-magical .collection-art img {
    width: 116.7%;
}

.collection-art.missing-art::after {
    content: "Card art unavailable";
    color: var(--ink-500);
    font-size: 12px;
}

.rarity-badge,
.selected-badge {
    position: absolute;
    top: 12px;
    z-index: 7;
    padding: 6px 9px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(9px);
    border-radius: 999px;
}

.rarity-badge {
    right: 12px;
    color: var(--ink-800);
}

.selected-badge {
    left: 12px;
    color: var(--mint-600);
}

.rarity-magical {
    color: #5f4bc7;
    box-shadow: 0 0 15px rgba(133, 109, 255, 0.35);
}

.rarity-prismatic {
    color: #8d7418;
    box-shadow: 0 0 15px rgba(224, 198, 82, 0.28);
}

.collection-meta {
    min-height: 156px;
    padding: 18px;
    display: grid;
    grid-template-rows: 50px 38px auto;
    gap: 7px;
    overflow: hidden;
    border-radius: 0 0 22px 22px;
    background: rgba(255, 255, 255, 0.92);
}

.collection-title-row {
    min-width: 0;
    min-height: 50px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.collection-title-row strong {
    min-width: 0;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-family: "Playfair Display", serif;
    font-size: 21px;
    line-height: 1.08;
}

.print-pill {
    flex: 0 0 auto;
    padding: 4px 7px;
    color: var(--lavender-600);
    font-size: 10px;
    font-weight: 800;
    background: var(--lavender-100);
    border-radius: 999px;
}

.collection-series {
    min-height: 38px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--ink-600);
    font-size: 13px;
    line-height: 1.4;
}

.collection-stats {
    display: flex;
    align-items: center;
    align-self: end;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 3px;
}

.collection-stats > span,
.collection-stats code {
    padding: 5px 8px;
    color: var(--ink-700);
    font-size: 11px;
    font-weight: 800;
    background: rgba(240, 242, 248, 0.82);
    border-radius: 8px;
}

.collection-stats code {
    color: var(--lavender-600);
    background: var(--lavender-100);
}

@media (max-width: 800px) {
    .collection-filter-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .collection-sort-wrap {
        width: 100%;
    }

    .collection-sort-wrap .collection-select {
        flex: 1;
    }

    .collection-search-grid {
        grid-template-columns: 1fr;
    }

    .collection-clear-filters {
        margin-left: 0;
    }
}

.collection-no-results {
    min-height: 260px;
    margin-top: 12px;
    place-items: center;
    align-content: center;
    text-align: center;
    background: rgba(255, 255, 255, 0.72);
    border-radius: var(--radius-lg);
}

.collection-no-results:not([hidden]) {
    display: grid;
}

.collection-no-results > span {
    color: var(--lavender-500);
    font-size: 34px;
}

.collection-no-results h2,
.collection-no-results p {
    margin: 6px 0;
}

.collection-no-results p {
    color: var(--ink-600);
}

.empty-state {
    min-height: 320px;
    display: grid;
    place-items: center;
    align-content: center;
    text-align: center;
    background: rgba(255, 255, 255, 0.72);
    border-radius: var(--radius-lg);
}

.empty-state > span {
    color: var(--lavender-500);
    font-size: 38px;
}

/* =======================================================
   WHEEL
   ======================================================= */

.wheel-page {
    grid-template-columns: minmax(0, 0.88fr) minmax(420px, 1.12fr);
    align-items: center;
    gap: 50px;
}

.wheel-copy {
    align-self: center;
}

.wheel-copy > p {
    max-width: 600px;
}

.wheel-odds-compact {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(96, 111, 142, 0.12);
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(68, 78, 108, 0.06);
}

.wheel-odds-compact > span {
    min-width: 0;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    color: var(--ink-600);
    background: rgba(255, 255, 255, 0.70);
    border: 1px solid rgba(96, 111, 142, 0.09);
    border-radius: 11px;
    font-size: 12px;
}

.wheel-odds-compact strong {
    color: var(--ink-800);
}

.odds-reward {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.odds-reward .reward-emoji-img {
    width: 16px;
    height: 16px;
}

.odds-reward .reward-emoji-char {
    font-size: 15px;
}

.wheel-shell {
    display: grid;
    justify-items: center;
    gap: 16px;
    position: relative;
    padding: 34px 12px 6px;
}

.wheel-rim {
    width: min(500px, 84vw);
    aspect-ratio: 1;
    position: relative;
    padding: 8px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f7cf99, #dcae7a);
    box-shadow:
        0 26px 60px rgba(67, 74, 105, 0.18),
        inset 0 0 0 2px rgba(255, 255, 255, 0.58);
}

.wheel {
    --wheel-rotation: 0deg;
    width: 100%;
    aspect-ratio: 1;
    position: relative;
    overflow: hidden;
    border: 3px solid rgba(44, 47, 66, 0.88);
    border-radius: 50%;
    background:
        conic-gradient(
            from -30deg,
            #a9dfca 0deg 60deg,
            #c1b3ef 60deg 120deg,
            #f3b6c9 120deg 180deg,
            #f2d98d 180deg 240deg,
            #9fd8d3 240deg 300deg,
            #efd260 300deg 360deg
        );
    box-shadow:
        inset 0 0 0 2px rgba(255, 255, 255, 0.24);
    transform: rotate(var(--wheel-rotation));
    transition:
        transform 4.7s
        cubic-bezier(.13,.82,.12,1);
}

/* Six equal slices with subtle dark boundaries only. */
.wheel::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    border-radius: inherit;
    background:
        repeating-conic-gradient(
            from -30deg,
            transparent 0deg 59.6deg,
            rgba(45, 48, 66, 0.52) 59.6deg 60deg
        ),
        radial-gradient(
            circle at 50% 45%,
            rgba(255, 255, 255, 0.10),
            transparent 58%
        );
}

.wheel-slice-label {
    position: absolute;
    z-index: 3;
    width: 96px;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    color: #252a3e;
    text-align: center;
    line-height: 1.05;
    pointer-events: none;
    transform:
        translate(-50%, -50%)
        rotate(var(--label-angle, 0deg));
}

.wheel-slice-label b {
    max-width: 94px;
    font-size: 12px;
    font-weight: 900;
    white-space: normal;
    text-wrap: balance;
}

.wheel-slice-label .reward-emoji-char {
    font-size: 21px;
}

.wheel-reward-icon-image {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* Slice centers match the six equal 60° sectors exactly. */
.wheel-label-zens {
    --label-angle: 0deg;
    top: 21%;
    left: 50%;
}

.wheel-label-ashes {
    --label-angle: 60deg;
    top: 36%;
    left: 75%;
}

.wheel-label-xp {
    --label-angle: 120deg;
    top: 65%;
    left: 75%;
}

.wheel-label-grab {
    --label-angle: 180deg;
    top: 79%;
    left: 50%;
}

.wheel-label-drop {
    --label-angle: 240deg;
    top: 65%;
    left: 25%;
}

.wheel-label-dandelion {
    --label-angle: 300deg;
    top: 36%;
    left: 25%;
}

.wheel-center-button {
    width: 27%;
    aspect-ratio: 1;
    position: absolute;
    inset: 36.5%;
    z-index: 5;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    color: white;
    background:
        radial-gradient(
            circle at 36% 30%,
            #59617a,
            #2c3248 62%,
            #202538
        );
    border: 5px solid #f2cf63;
    outline: 3px solid rgba(45, 48, 66, 0.94);
    border-radius: 50%;
    box-shadow:
        0 10px 24px rgba(43, 49, 72, 0.24),
        inset 0 0 0 1px rgba(255, 255, 255, 0.16);
    cursor: pointer;
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease;
}

.wheel-center-button:hover:not(:disabled) {
    transform: scale(1.035);
    box-shadow:
        0 14px 30px rgba(43, 49, 72, 0.28),
        inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.wheel-center-button:disabled {
    cursor: wait;
    opacity: 0.78;
}

.wheel-center-button > span {
    font-size: 27px;
    line-height: 1;
}

.wheel-center-button > b {
    font-size: 10px;
    letter-spacing: 0.14em;
}

/* Fixed top pointer, with the point facing DOWN into the wheel. */
.wheel-top-pointer {
    width: 0;
    height: 0;
    position: absolute;
    top: -27px;
    left: 50%;
    z-index: 8;
    transform: translateX(-50%);
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 34px solid #2d3145;
    filter: drop-shadow(0 5px 4px rgba(45, 48, 66, 0.22));
}

.wheel-top-pointer::after {
    content: "";
    position: absolute;
    left: -13px;
    top: -31px;
    width: 0;
    height: 0;
    border-left: 13px solid transparent;
    border-right: 13px solid transparent;
    border-top: 25px solid #f2c733;
}

.wheel-result-card {
    min-width: min(320px, 80vw);
    min-height: 62px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    padding: 10px 16px;
    text-align: center;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(99, 109, 140, 0.12);
    border-radius: 15px;
    box-shadow: 0 12px 30px rgba(64, 73, 106, 0.07);
}

.wheel-result-card strong {
    color: var(--ink-800);
    font-family: "Playfair Display", serif;
    font-size: 18px;
}

.wheel-result-kicker {
    color: var(--lavender-600);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.10em;
}

.wheel-result-card.reward-hit {
    animation: wheel-result-pop 0.55s ease;
}

@keyframes wheel-result-pop {
    0% {
        transform: scale(0.96);
        opacity: 0.72;
    }

    60% {
        transform: scale(1.035);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.wheel-preview-note {
    margin: -4px 0 0;
    color: var(--ink-500);
    font-size: 11px;
}

.reward-name-with-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.reward-emoji-img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.reward-emoji-char {
    font-family:
        "Segoe UI Emoji",
        "Apple Color Emoji",
        "Noto Color Emoji",
        sans-serif;
    line-height: 1;
}

@media (max-width: 800px) {
    .wheel-page {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .wheel-copy h1 {
        font-size: clamp(48px, 13vw, 74px);
    }

    .wheel-odds-compact {
        grid-template-columns: 1fr;
    }

    .wheel-rim {
        width: min(420px, 88vw);
    }

    .wheel-slice-label {
        width: 80px;
        min-height: 46px;
        gap: 4px;
    }

    .wheel-slice-label b {
        max-width: 78px;
        font-size: 10px;
    }

    .wheel-slice-label .reward-emoji-char {
        font-size: 17px;
    }

    .wheel-reward-icon-image {
        width: 18px;
        height: 18px;
    }

    .wheel-center-button {
        width: 29%;
        inset: 35.5%;
    }
}

@media (max-width: 560px) {
    .wheel-page {
        width: calc(100% - 18px);
        padding: 28px 12px 34px;
    }

    .wheel-copy > p {
        font-size: 15px;
        line-height: 1.55;
    }

    .wheel-odds-compact {
        padding: 10px;
        gap: 6px;
    }

    .wheel-rim {
        width: min(350px, 86vw);
        padding: 6px;
    }

    .wheel-slice-label {
        width: 66px;
        min-height: 40px;
        gap: 3px;
    }

    .wheel-slice-label b {
        max-width: 64px;
        font-size: 8px;
    }

    .wheel-slice-label .reward-emoji-char {
        font-size: 14px;
    }

    .wheel-reward-icon-image {
        width: 15px;
        height: 15px;
    }

    .wheel-center-button > span {
        font-size: 22px;
    }

    .wheel-center-button > b {
        font-size: 8px;
    }

    .wheel-top-pointer {
        top: -22px;
        border-left-width: 15px;
        border-right-width: 15px;
        border-top-width: 28px;
    }

    .wheel-top-pointer::after {
        left: -10px;
        top: -25px;
        border-left-width: 10px;
        border-right-width: 10px;
        border-top-width: 20px;
    }
}

/* =======================================================
   GUIDE + LEGAL
   ======================================================= */

.guide-section,
.legal-section {
    width:
        min(
            1100px,
            calc(100% - 64px)
        );
    margin:
        0 auto
        100px;
}

.guide-step {
    padding:
        30px 0;
    display: grid;
    grid-template-columns:
        90px
        1fr;
    gap: 20px;
    border-bottom:
        1px solid
        rgba(84, 99, 125, 0.12);
}

.guide-step > span {
    color: var(--mint-500);
    font-family:
        "Playfair Display",
        serif;
    font-size: 38px;
}

.guide-step h2,
.legal-card h2 {
    margin:
        0 0
        10px;
    font-family:
        "Playfair Display",
        serif;
    font-size: 38px;
}

.guide-step p,
.legal-card p {
    color: var(--ink-600);
    line-height: 1.75;
}

code {
    padding:
        3px
        7px;
    color: var(--lavender-600);
    background:
        var(--lavender-100);
    border-radius: 7px;
}

.legal-section {
    display: grid;
    gap: 24px;
}

.legal-card {
    padding:
        40px;
    background:
        rgba(255, 255, 255, 0.76);
    border:
        1px solid
        rgba(98, 111, 142, 0.10);
    border-radius: var(--radius-lg);
    box-shadow:
        0 16px 40px
        rgba(66, 77, 104, 0.07);
}

.legal-card h3 {
    margin-top: 30px;
}

/* =======================================================
   RESPONSIVE
   ======================================================= */

@media (max-width: 1180px) {
    .nav-shell {
        grid-template-columns:
            auto
            auto
            1fr;
    }

    .mobile-nav-toggle {
        display: block;
        justify-self: end;
        grid-column: 3;
        grid-row: 1;
    }

    .nav-links {
        display: none;
        grid-column: 1 / -1;
        padding:
            5px
            0
            10px;
        flex-wrap: wrap;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-actions {
        justify-self: end;
        grid-column: 2;
        grid-row: 1;
    }

    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        padding-left: 0;
    }

    .hero-cards {
        width:
            min(
                800px,
                100%
            );
        margin: 0 auto;
    }

    .stats-inner {
        grid-template-columns: 1fr;
    }

    .page-hero,
    .wheel-page {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 800px) {
    .site-header {
        padding:
            10px
            10px
            0;
    }

    .nav-shell {
        gap: 8px;
        border-radius: 24px;
    }

    .brand {
        font-size: 22px;
    }

    .brand img {
        width: 42px;
        height: 42px;
    }

    .nav-actions .button {
        padding:
            0
            12px;
    }

    .nav-actions .button span:not(.discord-mark) {
        display: none;
    }

    .hero {
        padding:
            70px
            22px
            35px;
    }

    .hero h1 {
        font-size:
            clamp(
                53px,
                16vw,
                77px
            );
    }

    .hero-description {
        font-size: 16px;
    }

    .quick-features {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .quick-features > div {
        border-right: 0;
        border-bottom:
            1px solid
            rgba(82, 96, 126, 0.12);
        padding: 13px;
    }

    .hero-cards {
        min-height: 470px;
        transform:
            scale(0.88);
        transform-origin:
            top center;
    }

    .card-left {
        width: 190px;
        left: -1%;
    }

    .card-center {
        width: 280px;
        left: 23%;
    }

    .card-right {
        width: 200px;
        right: -2%;
    }

    .stats-section,
    .cta-section {
        padding-left: 18px;
        padding-right: 18px;
    }

    .stats-inner {
        padding:
            38px
            22px;
    }

    .stats-grid,
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .feature-section {
        width:
            calc(100% - 36px);
    }

    .cta-card {
        padding:
            38px
            28px;
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-inner {
        flex-direction: column;
    }

    .footer-links {
        flex-wrap: wrap;
    }

    .page-hero {
        width:
            calc(100% - 28px);
        margin-top: 20px;
        padding:
            40px
            24px;
    }

    .collection-section,
    .guide-section,
    .legal-section {
        width:
            calc(100% - 32px);
    }

    .collection-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .collection-controls {
        justify-content: stretch;
    }

    .collection-search-wrap,
    .collection-select {
        width: 100%;
    }

    .collection-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .collection-summary article:first-child {
        grid-column: 1 / -1;
    }

    .guide-step {
        grid-template-columns:
            55px
            1fr;
    }
}

@media (max-width: 560px) {
    .nav-actions .button-discord {
        width: 44px;
        min-height: 44px;
        padding: 0;
    }

    .nav-actions .button-discord::after {
        content: "";
    }

    .nav-actions .button-discord {
        font-size: 0;
    }

    .discord-mark {
        font-size: 12px;
    }

    .hero-cards {
        min-height: 390px;
        scale: 0.78;
        margin-bottom: -80px;
    }

    .card-left {
        left: -12%;
    }

    .card-right {
        right: -13%;
    }

    .magical-label {
        left: 32%;
    }

    .hero-buttons .button {
        width: 100%;
    }

    .stats-card {
        min-height: 190px;
    }
}


/* =======================================================
   HOME POLISH 01
   ======================================================= */

.hero-eyebrow {
    width: fit-content;
    gap: 10px;
}

.hero-eyebrow .eyebrow-line {
    width: 44px;
    flex: 0 0 44px;
}

.hero-eyebrow .eyebrow-spark {
    color: var(--lavender-500);
    font-size: 14px;
    line-height: 1;
}

.stat-icon {
    font-family:
        "Segoe UI Emoji",
        "Apple Color Emoji",
        "Noto Color Emoji",
        sans-serif;
    font-size: 24px;
    line-height: 1;
}

@media (max-width: 560px) {
    .hero-eyebrow .eyebrow-line {
        width: 24px;
        flex-basis: 24px;
    }

    .hero-eyebrow {
        gap: 7px;
        font-size: 10px;
        letter-spacing: 0.14em;
    }
}


/* =======================================================
   COLLECTION VIEW + MOBILE POLISH
   ======================================================= */

.collection-toolbar-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.collection-view-toggle {
    display: inline-flex;
    padding: 4px;
    gap: 4px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(96, 111, 142, 0.14);
    border-radius: 13px;
}

.collection-view-button {
    width: 38px;
    height: 36px;
    display: grid;
    place-items: center;
    color: var(--ink-500);
    background: transparent;
    border: 0;
    border-radius: 9px;
    font-size: 18px;
    cursor: pointer;
    transition:
        background 0.16s ease,
        color 0.16s ease,
        transform 0.16s ease;
}

.collection-view-button:hover {
    transform: translateY(-1px);
    color: var(--ink-800);
}

.collection-view-button.active {
    color: var(--mint-700);
    background: var(--mint-100);
}

.collection-pagination {
    margin: 24px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.collection-pagination[hidden] {
    display: none;
}

.collection-page-button {
    width: 44px;
    height: 40px;
    display: grid;
    place-items: center;
    color: var(--ink-800);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(96, 111, 142, 0.15);
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(68, 78, 108, 0.06);
    font-size: 20px;
    cursor: pointer;
    transition:
        transform 0.16s ease,
        opacity 0.16s ease,
        background 0.16s ease;
}

.collection-page-button:hover:not(:disabled) {
    transform: translateY(-1px);
    background: var(--mint-100);
}

.collection-page-button:disabled {
    opacity: 0.34;
    cursor: default;
}

.collection-page-status {
    min-width: 94px;
    color: var(--ink-500);
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.collection-list-view {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.collection-list-view .collection-card {
    min-height: 168px;
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    align-items: stretch;
    border-radius: 18px;
}

.collection-list-view .collection-art {
    min-height: 168px;
    padding: 8px;
    border-radius: 18px 0 0 18px;
}

.collection-list-view .collection-card-frame {
    width: 104px;
}

.collection-list-view .collection-art img {
    width: 100%;
    max-height: 152px;
}

.collection-list-view .rarity-card-prismatic .collection-art img,
.collection-list-view .rarity-card-magical .collection-art img {
    width: 116%;
}

.collection-list-view .collection-meta {
    min-height: 168px;
    padding: 18px 18px 15px;
    grid-template-rows: auto auto 1fr;
    border-radius: 0 18px 18px 0;
}

.collection-list-view .collection-title-row strong {
    font-size: 24px;
}

.collection-list-view .collection-series {
    min-height: 0;
}

.collection-list-view .collection-stats {
    align-self: end;
}

.reward-name-with-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
}

.reward-emoji-img {
    width: 18px;
    height: 18px;
    display: inline-block;
    object-fit: contain;
    vertical-align: middle;
}

.reward-emoji-char {
    font-family:
        "Segoe UI Emoji",
        "Apple Color Emoji",
        "Noto Color Emoji",
        sans-serif;
    font-size: 16px;
    line-height: 1;
}

.wheel-label .reward-emoji-img {
    width: 15px;
    height: 15px;
}

.wheel-label .reward-emoji-char {
    font-size: 14px;
}

@media (max-width: 800px) {
    .nav-shell {
        grid-template-columns: minmax(0, 1fr) auto auto;
        padding: 10px 12px;
    }

    .nav-actions {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .nav-actions .user-chip {
        max-width: 46px;
        min-width: 46px;
        height: 46px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
        overflow: hidden;
    }

    .nav-actions .user-chip > span:not(.user-chip-dot) {
        display: none;
    }

    .nav-actions .user-chip img {
        width: 36px;
        height: 36px;
        margin: 0;
    }

    .nav-actions .button-small {
        min-width: 44px;
        width: 44px;
        min-height: 44px;
        padding: 0;
        border-radius: 14px;
    }

    .collection-filter-panel {
        padding: 14px;
        border-radius: 18px;
    }

    .collection-toolbar-actions {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
    }

    .collection-sort-wrap {
        width: 100%;
        display: grid;
        gap: 6px;
    }

    .collection-sort-wrap .collection-select {
        width: 100%;
    }

    .collection-filter-groups {
        align-items: stretch;
        gap: 14px;
    }

    .collection-filter-group {
        width: 100%;
    }

    .collection-filter-row {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
    }

    .collection-chip {
        width: 100%;
        min-width: 0;
        padding: 0 8px;
        font-size: 12px;
    }

    .collection-clear-filters {
        width: 100%;
        margin-left: 0;
    }

    .collection-grid-view {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .collection-grid-view .collection-card {
        border-radius: 17px;
    }

    .collection-grid-view .collection-art {
        min-height: 0;
        padding: 8px 7px 5px;
    }

    .collection-grid-view .collection-card-frame {
        width: 100%;
        max-width: 170px;
    }

    .collection-grid-view .collection-art img {
        max-height: 238px;
    }

    .collection-grid-view .collection-meta {
        min-height: 138px;
        padding: 12px;
        grid-template-rows: 42px 32px auto;
        gap: 5px;
    }

    .collection-grid-view .collection-title-row {
        min-height: 42px;
    }

    .collection-grid-view .collection-title-row strong {
        font-size: 16px;
    }

    .collection-grid-view .collection-series {
        min-height: 32px;
        font-size: 11px;
    }

    .collection-grid-view .collection-stats {
        gap: 5px;
    }

    .collection-grid-view .collection-stats > span,
    .collection-grid-view .collection-stats code {
        padding: 4px 6px;
        font-size: 9px;
    }

    .collection-grid-view .rarity-badge,
    .collection-grid-view .selected-badge {
        top: 7px;
        padding: 4px 6px;
        font-size: 8px;
    }

    .collection-grid-view .rarity-badge {
        right: 7px;
    }

    .collection-grid-view .selected-badge {
        left: 7px;
    }

    .collection-list-view .collection-card {
        grid-template-columns: 92px minmax(0, 1fr);
        min-height: 132px;
    }

    .collection-list-view .collection-art {
        min-height: 132px;
        padding: 6px;
    }

    .collection-list-view .collection-card-frame {
        width: 80px;
    }

    .collection-list-view .collection-art img {
        max-height: 120px;
    }

    .collection-list-view .collection-meta {
        min-height: 132px;
        padding: 12px;
    }

    .collection-list-view .collection-title-row strong {
        font-size: 18px;
    }

    .wheel-page {
        width: calc(100% - 20px);
        padding: 28px 14px 34px;
        gap: 20px;
    }

    .wheel-copy h1 {
        font-size: clamp(44px, 14vw, 72px);
        line-height: 0.95;
    }

    .wheel-copy > p {
        font-size: 15px;
        line-height: 1.55;
    }

    .wheel-odds-card {
        margin-top: 18px;
        padding: 13px;
        border-radius: 16px;
    }

    .wheel-odds-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .wheel-odds-grid > div {
        min-height: 44px;
        padding: 9px 10px;
    }

    .wheel-shell {
        padding: 20px 0 4px;
        gap: 14px;
    }

    .wheel-rim {
        width: min(390px, 88vw);
        padding: 10px;
    }

    .wheel-pointer-wrap {
        top: 2px;
    }

    .wheel-label {
        font-size: 10px;
    }

    .wheel-label .reward-name-with-icon {
        gap: 3px;
    }

    .wheel-button {
        width: min(290px, 86vw);
        min-height: 50px;
    }

    .wheel-result-card {
        width: min(310px, 86vw);
        min-width: 0;
    }
}

@media (max-width: 560px) {
    .page-hero {
        width: calc(100% - 18px);
        padding: 28px 14px;
        border-radius: 24px;
    }

    .collection-section {
        width: calc(100% - 18px);
        margin-bottom: 60px;
    }

    .collection-summary {
        gap: 8px;
    }

    .collection-summary article {
        min-height: 92px;
        padding: 13px;
        border-radius: 15px;
    }

    .collection-summary strong {
        font-size: 25px;
    }

    .collection-summary span {
        font-size: 9px;
    }

    .collection-search-grid {
        gap: 8px;
    }

    .collection-search-wrap {
        min-height: 44px;
        border-radius: 12px;
    }

    .collection-search {
        font-size: 16px;
    }

    .collection-filter-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .collection-grid-view {
        gap: 9px;
    }

    .collection-grid-view .collection-card-frame {
        max-width: 150px;
    }

    .collection-grid-view .collection-art img {
        max-height: 210px;
    }

    .collection-pagination {
        position: sticky;
        bottom: 10px;
        z-index: 20;
        width: fit-content;
        margin: 18px auto 0;
        padding: 7px;
        background: rgba(255, 255, 255, 0.88);
        border: 1px solid rgba(96, 111, 142, 0.12);
        border-radius: 15px;
        box-shadow: 0 12px 30px rgba(68, 78, 108, 0.12);
        backdrop-filter: blur(10px);
    }

    .collection-page-button {
        width: 42px;
        height: 38px;
    }

    .wheel-rim {
        width: min(350px, 91vw);
    }

    .wheel-label {
        font-size: 8px;
    }

    .wheel-label .reward-emoji-img {
        width: 12px;
        height: 12px;
    }

    .wheel-label .reward-emoji-char {
        font-size: 11px;
    }

    .wheel-center {
        border-width: 5px;
    }

    .wheel-center span {
        font-size: 25px;
    }
}


/* =======================================================
   CARD POOL
   ======================================================= */

.pool-hero {
    min-height: 320px;
}

.pool-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.pool-summary > span {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    padding: 9px 12px;
    color: var(--ink-600);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(96, 111, 142, 0.11);
    border-radius: 12px;
}

.pool-summary strong {
    color: var(--ink-800);
    font-family: "Playfair Display", serif;
    font-size: 22px;
}

.pool-section {
    width: min(1420px, calc(100% - 64px));
    margin: 0 auto 100px;
}

.pool-filter-panel {
    margin-bottom: 28px;
    padding: 18px;
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.88),
            rgba(247, 247, 255, 0.84)
        );
    border: 1px solid rgba(96, 111, 142, 0.13);
    border-radius: 22px;
    box-shadow: 0 14px 34px rgba(68, 78, 108, 0.07);
}

.pool-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.34fr);
    gap: 10px;
    margin-bottom: 15px;
}

.pool-filter-bottom {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

.pool-series-section {
    margin: 0 0 34px;
    scroll-margin-top: 110px;
}

.pool-series-heading {
    margin-bottom: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.pool-series-heading > div:first-child {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pool-series-letter {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    color: var(--mint-700);
    background: var(--mint-100);
    border: 1px solid rgba(106, 175, 153, 0.24);
    border-radius: 13px;
    font-family: "Playfair Display", serif;
    font-size: 21px;
    font-weight: 700;
}

.pool-series-heading h2 {
    margin: 0;
    color: var(--ink-900);
    font-family: "Playfair Display", serif;
    font-size: 26px;
    line-height: 1.05;
}

.pool-series-heading p {
    margin: 4px 0 0;
    color: var(--ink-500);
    font-size: 11px;
}

.pool-series-count {
    flex: 0 0 auto;
    padding: 6px 9px;
    color: var(--ink-500);
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(96, 111, 142, 0.10);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
}

.pool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 14px;
}

.pool-item {
    min-width: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(96, 111, 142, 0.10);
    border-radius: 17px;
    box-shadow: 0 11px 28px rgba(68, 78, 108, 0.06);
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease;
}

.pool-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 17px 34px rgba(68, 78, 108, 0.11);
}

.pool-art-wrap {
    min-height: 224px;
    position: relative;
    display: grid;
    place-items: center;
    padding: 9px;
    background:
        linear-gradient(
            145deg,
            rgba(228, 249, 240, 0.78),
            rgba(240, 239, 255, 0.88)
        );
}

.pool-art-wrap img {
    width: 100%;
    height: 215px;
    display: block;
    object-fit: contain;
    border-radius: 10px;
}

.pool-item-poster {
    grid-column: span 2;
}

.pool-art-poster {
    min-height: 300px;
    padding: 12px;
}

.pool-art-poster img {
    height: 286px;
    width: 100%;
    object-fit: contain;
}

.pool-type-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 5px 7px;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(8px);
    border-radius: 999px;
}

.pool-type-common {
    color: var(--ink-600);
}

.pool-type-skin {
    color: var(--lavender-600);
}

.pool-type-poster {
    color: #8b7013;
}

.pool-item-meta {
    min-height: 72px;
    padding: 11px 12px 12px;
    display: grid;
    align-content: center;
    gap: 4px;
}

.pool-item-meta strong {
    min-width: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--ink-900);
    font-family: "Playfair Display", serif;
    font-size: 15px;
    line-height: 1.08;
}

.pool-item-meta span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ink-500);
    font-size: 10px;
}

@media (max-width: 800px) {
    .pool-section {
        width: calc(100% - 24px);
    }

    .pool-search-row {
        grid-template-columns: 1fr;
    }

    .pool-filter-bottom {
        align-items: stretch;
        flex-direction: column;
    }

    .pool-filter-bottom .collection-clear-filters {
        width: 100%;
    }

    .pool-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .pool-art-wrap {
        min-height: 180px;
        padding: 7px;
    }

    .pool-art-wrap img {
        height: 170px;
    }

    .pool-item-poster {
        grid-column: span 2;
    }

    .pool-art-poster {
        min-height: 240px;
        padding: 9px;
    }

    .pool-art-poster img {
        height: 226px;
    }
}

@media (max-width: 560px) {
    .pool-filter-panel {
        padding: 13px;
        border-radius: 17px;
    }

    .pool-series-heading {
        align-items: flex-start;
    }

    .pool-series-letter {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        font-size: 18px;
    }

    .pool-series-heading h2 {
        font-size: 21px;
    }

    .pool-grid {
        gap: 8px;
    }

    .pool-art-wrap {
        min-height: 155px;
    }

    .pool-art-wrap img {
        height: 146px;
    }

    .pool-art-poster {
        min-height: 210px;
    }

    .pool-art-poster img {
        height: 196px;
    }

    .pool-item-meta {
        min-height: 64px;
        padding: 9px;
    }

    .pool-item-meta strong {
        font-size: 13px;
    }
}


/* =======================================================
   COLLECTION CUSTOMIZE BUTTON
   ======================================================= */

.collection-customize-button {
    width: 100%;
    min-height: 38px;
    margin-top: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    background:
        linear-gradient(
            135deg,
            var(--mint-500),
            var(--mint-600)
        );
    border-radius: 11px;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 9px 20px rgba(77, 143, 123, 0.17);
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease;
}

.collection-customize-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(77, 143, 123, 0.24);
}

.collection-meta {
    grid-template-rows: 50px 38px auto auto;
}


/* =======================================================
   CARD CUSTOMIZER
   ======================================================= */

.customizer-page {
    width: min(1500px, calc(100% - 42px));
    min-height: calc(100vh - 150px);
    margin: 30px auto 70px;
    display: grid;
    grid-template-columns:
        minmax(260px, 0.8fr)
        minmax(390px, 1.25fr)
        minmax(260px, 0.8fr);
    gap: 20px;
    align-items: stretch;
}

.customizer-panel,
.customizer-stage {
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.90),
            rgba(245, 248, 255, 0.82)
        );
    border: 1px solid rgba(95, 111, 143, 0.12);
    border-radius: 24px;
    box-shadow: 0 20px 48px rgba(68, 78, 108, 0.09);
}

.customizer-panel {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.customizer-panel-heading h2 {
    margin: 7px 0 7px;
    font-family: "Playfair Display", serif;
    font-size: 26px;
}

.customizer-panel-heading p {
    margin: 0;
    color: var(--ink-500);
    font-size: 12px;
    line-height: 1.55;
}

.customizer-field {
    display: grid;
    gap: 7px;
}

.customizer-field > span,
.customizer-position-group > .customizer-position-title strong {
    color: var(--ink-700);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.055em;
}

.customizer-color-field > div {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 8px;
}

.customizer-color-field input[type="color"] {
    width: 48px;
    height: 44px;
    padding: 4px;
    background: white;
    border: 1px solid rgba(96, 111, 142, 0.15);
    border-radius: 12px;
    cursor: pointer;
}

.customizer-color-field input[type="text"] {
    min-width: 0;
    padding: 0 12px;
    color: var(--ink-800);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(96, 111, 142, 0.15);
    border-radius: 12px;
    outline: none;
}

.customizer-position-group {
    display: grid;
    gap: 9px;
    padding: 13px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(96, 111, 142, 0.10);
    border-radius: 15px;
}

.customizer-position-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.customizer-position-title button {
    padding: 4px 7px;
    color: var(--lavender-600);
    background: var(--lavender-100);
    border: 0;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}

.customizer-position-group label {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    color: var(--ink-500);
    font-size: 11px;
}

.customizer-position-group input[type="range"] {
    width: 100%;
    accent-color: var(--mint-500);
}

.customizer-toggle {
    min-height: 66px;
    padding: 12px 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(96, 111, 142, 0.10);
    border-radius: 14px;
}

.customizer-toggle > div {
    display: grid;
    gap: 2px;
}

.customizer-toggle strong {
    color: var(--ink-800);
    font-size: 12px;
}

.customizer-toggle span {
    color: var(--ink-500);
    font-size: 10px;
}

.customizer-toggle input {
    width: 21px;
    height: 21px;
    accent-color: var(--mint-500);
}

.customizer-stage {
    min-height: 720px;
    position: relative;
    overflow: hidden;
    padding: 22px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    place-items: center;
    background:
        radial-gradient(
            circle at 50% 42%,
            rgba(196, 241, 222, 0.45),
            transparent 38%
        ),
        radial-gradient(
            circle at 70% 24%,
            rgba(213, 207, 255, 0.36),
            transparent 30%
        ),
        rgba(255, 255, 255, 0.82);
}

.customizer-card-title {
    width: 100%;
    text-align: center;
}

.customizer-card-title span {
    color: var(--ink-500);
    font-size: 11px;
    font-weight: 700;
}

.customizer-card-title h1 {
    margin: 4px 0;
    font-family: "Playfair Display", serif;
    font-size: 30px;
}

.customizer-card-title code {
    color: var(--lavender-600);
    font-size: 11px;
}

.customizer-preview-wrap {
    width: min(440px, 100%);
    position: relative;
    display: grid;
    place-items: center;
}

.customizer-preview-glow {
    width: 74%;
    height: 76%;
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    background:
        radial-gradient(
            circle,
            rgba(178, 231, 211, 0.42),
            rgba(193, 184, 246, 0.20) 46%,
            transparent 70%
        );
    filter: blur(28px);
}

.customizer-preview {
    max-width: 100%;
    max-height: 610px;
    position: relative;
    z-index: 1;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 18px 28px rgba(54, 61, 90, 0.19));
}

.customizer-preview-loading {
    position: absolute;
    z-index: 3;
    padding: 7px 10px;
    color: var(--ink-700);
    background: rgba(255, 255, 255, 0.88);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    backdrop-filter: blur(9px);
}

.customizer-stage-note {
    margin: 0;
    color: var(--ink-500);
    font-size: 11px;
}

.customizer-card-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.customizer-card-info span {
    padding: 10px;
    display: grid;
    gap: 2px;
    color: var(--ink-500);
    background: rgba(255, 255, 255, 0.65);
    border-radius: 12px;
    font-size: 10px;
}

.customizer-card-info strong {
    color: var(--ink-800);
    font-size: 12px;
}

.customizer-font-warning {
    margin-top: 12px;
    padding: 11px 13px;
    color: #8b3d37;
    background: rgba(255, 232, 228, 0.86);
    border: 1px solid rgba(190, 79, 70, 0.22);
    border-radius: 13px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.45;
}

.customizer-save-status {
    min-height: 18px;
    margin: auto 0 0;
    color: var(--mint-600);
    font-size: 11px;
    font-weight: 800;
}

.customizer-save-status.error {
    color: #c74343;
}

.customizer-save-button {
    width: 100%;
    min-height: 48px;
}


/* =======================================================
   DAILY WHEEL STATUS
   ======================================================= */

.wheel-cooldown-error {
    margin: -2px 0 0;
    color: #c94141;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.wheel-cooldown-error[hidden] {
    display: none;
}


@media (max-width: 1050px) {
    .customizer-page {
        grid-template-columns: 1fr 1.25fr;
    }

    .customizer-panel-border {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .customizer-page {
        width: calc(100% - 18px);
        grid-template-columns: 1fr;
    }

    .customizer-panel,
    .customizer-stage {
        border-radius: 18px;
    }

    .customizer-stage {
        min-height: 560px;
        order: -1;
    }

    .customizer-preview {
        max-height: 470px;
    }

    .customizer-panel-border {
        grid-column: auto;
    }
}


/* Web customizer color economy */
.customizer-color-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.customizer-color-actions button {
    min-height: 34px;
    padding: 0 9px;
    color: var(--ink-700);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(96, 111, 142, 0.13);
    border-radius: 10px;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        background 0.15s ease,
        border-color 0.15s ease;
}

.customizer-color-actions button:hover:not(:disabled) {
    transform: translateY(-1px);
    color: var(--mint-600);
    background: var(--mint-100);
    border-color: rgba(106, 175, 153, 0.26);
}

.customizer-color-actions button:disabled {
    opacity: 0.55;
    cursor: wait;
}

.customizer-cost-card {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.customizer-cost-card > span {
    min-width: 0;
    padding: 9px;
    display: grid;
    gap: 3px;
    color: var(--ink-500);
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(96, 111, 142, 0.09);
    border-radius: 11px;
    font-size: 9px;
    text-align: center;
}

.customizer-cost-card strong {
    overflow: hidden;
    color: var(--ink-800);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customizer-cost-note {
    margin: 0;
    color: var(--ink-500);
    font-size: 10px;
    line-height: 1.45;
}

@media (max-width: 760px) {
    .customizer-cost-card {
        grid-template-columns: 1fr;
    }
}


/* =======================================================
   CUSTOMIZER V2
   ======================================================= */

.customizer-v2 {
    align-items: start;
    gap: 24px;
}

.customizer-v2 .customizer-panel {
    padding: 22px;
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.84),
            rgba(246, 250, 255, 0.70)
        );
    border: 1px solid rgba(95, 108, 140, 0.12);
    border-radius: 24px;
    box-shadow:
        0 18px 55px rgba(57, 72, 102, 0.08);
    backdrop-filter: blur(18px);
}

.customizer-v2 .customizer-panel-heading {
    margin-bottom: 16px;
}

.customizer-v2 .customizer-panel-heading h2 {
    margin: 4px 0 5px;
}

.customizer-v2 .customizer-panel-heading p {
    margin: 0;
    color: var(--ink-500);
    line-height: 1.45;
}

.customizer-control-card {
    margin-top: 12px;
    padding: 14px;
    background:
        linear-gradient(
            135deg,
            rgba(239, 250, 247, 0.94),
            rgba(246, 243, 255, 0.90)
        );
    border: 1px solid rgba(96, 109, 142, 0.10);
    border-radius: 17px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.74);
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        border-color 0.16s ease;
}

.customizer-control-card:hover {
    border-color: rgba(113, 104, 176, 0.18);
    box-shadow:
        0 9px 24px rgba(74, 83, 119, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.customizer-v2 .customizer-field {
    display: grid;
    gap: 7px;
}

.customizer-v2 .customizer-field + .customizer-field {
    margin-top: 12px;
}

.customizer-v2 .customizer-field > span,
.customizer-control-heading > span:first-child,
.customizer-v2 .customizer-position-title strong {
    color: var(--ink-700);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.customizer-select {
    width: 100%;
    min-height: 42px;
    padding: 0 42px 0 13px;
    color: var(--ink-800);
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.92),
            rgba(242, 248, 250, 0.92)
        );
    border: 1px solid rgba(99, 112, 145, 0.15);
    border-radius: 13px;
    outline: 0;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(75, 84, 112, 0.7) 50%),
        linear-gradient(135deg, rgba(75, 84, 112, 0.7) 50%, transparent 50%),
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.92),
            rgba(242, 248, 250, 0.92)
        );
    background-position:
        calc(100% - 18px) 18px,
        calc(100% - 13px) 18px,
        0 0;
    background-size:
        5px 5px,
        5px 5px,
        100% 100%;
    background-repeat: no-repeat;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}

.customizer-select:hover,
.customizer-select:focus {
    border-color: rgba(111, 101, 181, 0.38);
    box-shadow:
        0 0 0 4px rgba(126, 112, 197, 0.08);
}

.customizer-control-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.customizer-color-dot {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    background: var(--swatch, #fff);
    border: 2px solid rgba(255, 255, 255, 0.96);
    border-radius: 50%;
    box-shadow:
        0 0 0 1px rgba(52, 59, 82, 0.17),
        0 4px 10px rgba(50, 58, 83, 0.12);
}

.customizer-color-row {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 8px;
}

.customizer-color-row input[type="color"] {
    width: 44px;
    height: 42px;
    padding: 3px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(99, 112, 145, 0.15);
    border-radius: 12px;
    cursor: pointer;
}

.customizer-color-row input[type="text"] {
    min-width: 0;
    padding: 0 12px;
    color: var(--ink-800);
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(99, 112, 145, 0.15);
    border-radius: 12px;
    outline: none;
}

.customizer-color-row input[type="text"]:focus {
    border-color: rgba(111, 101, 181, 0.38);
    box-shadow: 0 0 0 4px rgba(126, 112, 197, 0.08);
}

.customizer-v2 .customizer-color-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin-top: 8px;
}

.customizer-v2 .customizer-color-actions button,
.customizer-v2 [data-reset-position] {
    min-height: 34px;
    padding: 0 10px;
    color: var(--ink-700);
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.84),
            rgba(233, 241, 244, 0.82)
        );
    border: 1px solid rgba(97, 110, 142, 0.14);
    border-radius: 11px;
    cursor: pointer;
    transition:
        transform 0.14s ease,
        box-shadow 0.14s ease,
        border-color 0.14s ease;
}

.customizer-v2 .customizer-color-actions button:hover:not(:disabled),
.customizer-v2 [data-reset-position]:hover {
    transform: translateY(-1px);
    border-color: rgba(111, 101, 181, 0.28);
    box-shadow: 0 7px 15px rgba(67, 77, 107, 0.08);
}

.customizer-v2 .customizer-position-group {
    display: grid;
    gap: 10px;
}

.customizer-v2 .customizer-position-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.customizer-v2 .customizer-position-group label {
    display: grid;
    grid-template-columns: 76px 1fr;
    align-items: center;
    gap: 10px;
    color: var(--ink-500);
    font-size: 11px;
}

.customizer-v2 input[type="range"] {
    accent-color: var(--lavender-500);
    cursor: grab;
}

.customizer-v2 input[type="range"]:active {
    cursor: grabbing;
}

.customizer-toggle-stack {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.customizer-v2 .customizer-toggle {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.customizer-v2 .customizer-toggle > div {
    display: grid;
    gap: 3px;
}

.customizer-v2 .customizer-toggle > div span {
    color: var(--ink-500);
    font-size: 11px;
    line-height: 1.35;
}

.customizer-v2 .customizer-toggle input {
    width: 38px;
    height: 21px;
    accent-color: var(--mint-500);
    cursor: pointer;
}

.customizer-v2 .customizer-card-title {
    display: grid;
    justify-items: center;
    gap: 3px;
    margin-bottom: 12px;
    text-align: center;
}

.customizer-v2 .customizer-card-title h1 {
    order: 0;
    margin: 0;
}

.customizer-v2 .customizer-card-title span {
    order: 1;
    color: var(--ink-500);
}

.customizer-v2 .customizer-card-title code {
    order: 2;
    margin-top: 3px;
}

.customizer-v2 .customizer-preview-wrap {
    position: relative;
    user-select: none;
    touch-action: none;
}

.customizer-drag-handle {
    position: absolute;
    z-index: 7;
    transform: translate(-4px, -50%);
    min-width: 48px;
    min-height: 25px;
    padding: 3px 8px;
    color: var(--ink-800);
    background: rgba(255, 255, 255, 0.90);
    border: 1px solid rgba(105, 97, 175, 0.35);
    border-radius: 999px;
    box-shadow:
        0 5px 15px rgba(58, 66, 96, 0.14);
    font-size: 10px;
    font-weight: 800;
    cursor: grab;
    backdrop-filter: blur(8px);
    transition:
        transform 0.12s ease,
        opacity 0.12s ease;
}

.customizer-drag-handle:hover,
.customizer-drag-handle.dragging {
    transform: translate(-4px, -50%) scale(1.05);
    cursor: grabbing;
}

.customizer-drag-series {
    border-color: rgba(91, 171, 141, 0.42);
}

.customizer-drag-handle[hidden] {
    display: none;
}

.customizer-v2 .customizer-cost-card {
    grid-template-columns: 1fr 1fr;
}

.customizer-v2 .customizer-save-button {
    width: 100%;
    margin-top: 7px;
    border-radius: 14px;
}

@media (max-width: 1120px) {
    .customizer-v2 {
        grid-template-columns: 1fr;
    }

    .customizer-v2 .customizer-stage {
        order: -1;
    }
}


/* =======================================================
   CUSTOMIZER V3 — COZY TRANSFORM STUDIO
   ======================================================= */

.customizer-v3 {
    --studio-cream: rgba(255, 252, 247, 0.94);
    --studio-mint: rgba(232, 249, 242, 0.92);
    --studio-lilac: rgba(242, 236, 255, 0.92);
    --studio-peach: rgba(255, 239, 229, 0.88);
    --studio-border: rgba(112, 100, 132, 0.13);
    --studio-shadow: 0 18px 46px rgba(72, 67, 94, 0.10);
    gap: 28px;
}

.customizer-v3 .customizer-panel {
    position: relative;
    overflow: hidden;
    padding: 24px;
    background:
        radial-gradient(
            circle at 12% 2%,
            rgba(255, 255, 255, 0.98),
            transparent 32%
        ),
        linear-gradient(
            145deg,
            var(--studio-cream),
            rgba(244, 249, 248, 0.93)
        );
    border: 1px solid var(--studio-border);
    border-radius: 30px;
    box-shadow: var(--studio-shadow);
}

.customizer-v3 .customizer-panel::before {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    top: -76px;
    right: -62px;
    background: rgba(180, 237, 214, 0.19);
    border-radius: 50%;
    pointer-events: none;
}

.customizer-v3 .customizer-panel-border::before {
    background: rgba(202, 184, 246, 0.18);
}

.customizer-v3 .customizer-panel-heading {
    position: relative;
    z-index: 1;
    padding: 4px 2px 12px;
}

.customizer-v3 .customizer-panel-heading h2 {
    margin: 5px 0 6px;
    font-family: "Playfair Display", serif;
    font-size: 27px;
    letter-spacing: -0.02em;
}

.customizer-v3 .customizer-panel-heading p {
    max-width: 330px;
    color: var(--ink-500);
    font-size: 12px;
    line-height: 1.6;
}

.customizer-v3 .customizer-control-card {
    position: relative;
    margin-top: 13px;
    padding: 15px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.82),
            rgba(244, 250, 247, 0.78)
        );
    border: 1px solid rgba(110, 108, 132, 0.10);
    border-radius: 20px;
    box-shadow:
        0 8px 22px rgba(68, 75, 92, 0.055),
        inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.customizer-v3 .customizer-control-card:hover {
    transform: translateY(-1px);
    border-color: rgba(116, 103, 166, 0.17);
    box-shadow:
        0 12px 30px rgba(68, 75, 92, 0.075),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.customizer-v3 .customizer-select,
.customizer-v3 .customizer-color-row input[type="text"] {
    min-height: 44px;
    background-color: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(102, 103, 126, 0.12);
    border-radius: 15px;
    box-shadow:
        inset 0 1px 2px rgba(51, 54, 70, 0.025);
}

.customizer-v3 .customizer-select:focus,
.customizer-v3 .customizer-color-row input[type="text"]:focus {
    border-color: rgba(119, 106, 190, 0.35);
    box-shadow:
        0 0 0 5px rgba(145, 126, 213, 0.08),
        inset 0 1px 2px rgba(51, 54, 70, 0.02);
}

.customizer-v3 .customizer-color-row input[type="color"] {
    width: 46px;
    height: 44px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(102, 103, 126, 0.12);
    border-radius: 15px;
    box-shadow: 0 5px 13px rgba(67, 72, 91, 0.07);
}

.customizer-v3 .customizer-color-actions button,
.customizer-v3 [data-reset-position] {
    min-height: 36px;
    color: #555568;
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.90),
            rgba(238, 246, 242, 0.88)
        );
    border: 1px solid rgba(104, 106, 129, 0.11);
    border-radius: 13px;
    box-shadow: 0 5px 12px rgba(71, 75, 92, 0.045);
}

.customizer-v3 .customizer-color-actions button:hover:not(:disabled),
.customizer-v3 [data-reset-position]:hover {
    transform: translateY(-2px);
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.98),
            rgba(235, 245, 241, 0.96)
        );
    border-color: rgba(125, 108, 190, 0.22);
    box-shadow: 0 9px 18px rgba(74, 77, 103, 0.08);
}

.customizer-v3 .customizer-position-group {
    gap: 12px;
}

.customizer-v3 .customizer-position-title {
    padding-bottom: 2px;
}

.customizer-v3 .customizer-position-group label {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
}

.customizer-v3 input[type="range"] {
    width: 100%;
    height: 6px;
    appearance: none;
    background:
        linear-gradient(
            90deg,
            rgba(175, 222, 205, 0.85),
            rgba(183, 165, 226, 0.82)
        );
    border-radius: 999px;
    outline: none;
}

.customizer-v3 input[type="range"]::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
    appearance: none;
    background: #fff;
    border: 3px solid rgba(133, 116, 193, 0.72);
    border-radius: 50%;
    box-shadow: 0 3px 9px rgba(76, 71, 102, 0.16);
    cursor: grab;
}

.customizer-v3 input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #fff;
    border: 3px solid rgba(133, 116, 193, 0.72);
    border-radius: 50%;
    box-shadow: 0 3px 9px rgba(76, 71, 102, 0.16);
    cursor: grab;
}

.customizer-v3 .customizer-toggle-stack {
    gap: 11px;
}

.customizer-v3 .customizer-toggle {
    min-height: 72px;
    padding: 14px 15px;
}

.customizer-v3 .customizer-toggle input {
    width: 44px;
    height: 24px;
    flex: 0 0 auto;
}

.customizer-v3 .customizer-preview-shell {
    padding: 18px;
    background:
        radial-gradient(
            circle at 50% 18%,
            rgba(255, 255, 255, 0.96),
            rgba(237, 247, 244, 0.72) 52%,
            rgba(237, 233, 250, 0.70)
        );
    border: 1px solid rgba(104, 107, 133, 0.10);
    border-radius: 34px;
    box-shadow:
        0 24px 65px rgba(67, 70, 96, 0.11),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.customizer-v3 .customizer-preview-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    touch-action: none;
}

.customizer-v3 .customizer-preview {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 20px;
    user-select: none;
    pointer-events: none;
}

.customizer-v3 .customizer-transform-box {
    --control-scale: 1;
    position: absolute;
    z-index: 9;
    min-width: 66px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 7px 6px 10px;
    color: #454254;
    background: rgba(255, 255, 255, 0.88);
    border: 1.5px solid rgba(135, 116, 202, 0.58);
    border-radius: 11px;
    box-shadow:
        0 6px 18px rgba(61, 61, 84, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    transform:
        translate(-5px, -50%)
        scale(var(--control-scale));
    transform-origin: left center;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.02em;
    cursor: move;
    user-select: none;
    transition:
        box-shadow 0.12s ease,
        border-color 0.12s ease,
        opacity 0.12s ease;
}

.customizer-v3 .customizer-transform-box:hover,
.customizer-v3 .customizer-transform-box.dragging,
.customizer-v3 .customizer-transform-box.resizing {
    border-color: rgba(115, 92, 206, 0.82);
    box-shadow:
        0 9px 24px rgba(69, 63, 100, 0.18),
        0 0 0 3px rgba(145, 126, 213, 0.09);
}

.customizer-v3 .customizer-transform-series {
    border-color: rgba(89, 173, 139, 0.66);
}

.customizer-v3 .customizer-transform-print {
    border-color: rgba(222, 161, 88, 0.72);
}

.customizer-v3 .customizer-resize-grip {
    width: 23px;
    height: 23px;
    display: grid;
    place-items: center;
    color: #fff;
    background:
        linear-gradient(
            145deg,
            #9a86d7,
            #6f5bb4
        );
    border-radius: 7px;
    font-size: 11px;
    line-height: 1;
    cursor: nwse-resize;
    box-shadow: 0 4px 9px rgba(90, 72, 145, 0.20);
}

.customizer-v3 .customizer-transform-series .customizer-resize-grip {
    background:
        linear-gradient(
            145deg,
            #76c6a4,
            #4b9c7d
        );
}

.customizer-v3 .customizer-transform-print .customizer-resize-grip {
    background:
        linear-gradient(
            145deg,
            #efba75,
            #c88742
        );
}

.customizer-v3 .customizer-transform-box[hidden] {
    display: none;
}

.customizer-v3 .customizer-stage-note {
    margin-top: 13px;
    padding: 9px 14px;
    color: var(--ink-500);
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(100, 105, 130, 0.08);
    border-radius: 999px;
    text-align: center;
    font-size: 11px;
}

.customizer-v3 .customizer-card-info,
.customizer-v3 .customizer-cost-card {
    margin-top: 13px;
    padding: 14px;
    background:
        linear-gradient(
            145deg,
            var(--studio-mint),
            var(--studio-lilac)
        );
    border: 1px solid rgba(108, 106, 137, 0.09);
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}

.customizer-v3 .customizer-save-button {
    min-height: 48px;
    border-radius: 17px;
    box-shadow:
        0 10px 24px rgba(107, 88, 176, 0.16);
}

@media (max-width: 1180px) {
    .customizer-v3 {
        grid-template-columns: 1fr;
        max-width: 760px;
        margin-inline: auto;
    }

    .customizer-v3 .customizer-stage {
        order: -1;
    }
}

@media (max-width: 600px) {
    .customizer-v3 .customizer-panel {
        padding: 17px;
        border-radius: 24px;
    }

    .customizer-v3 .customizer-preview-shell {
        padding: 10px;
        border-radius: 25px;
    }

    .customizer-v3 .customizer-transform-box {
        min-width: 58px;
        padding-left: 8px;
        gap: 5px;
    }

    .customizer-v3 .customizer-position-group label {
        grid-template-columns: 64px minmax(0, 1fr);
    }
}


/* =======================================================
   CUSTOMIZER V3.1 — DARKER STUDIO + TRUE TRANSFORM BOXES
   ======================================================= */

.customizer-v3 {
    --studio-panel-deep: rgba(229, 234, 238, 0.96);
    --studio-panel-soft: rgba(238, 241, 244, 0.94);
    --studio-card-soft: rgba(245, 247, 248, 0.90);
}

.customizer-v3 .customizer-panel {
    background:
        radial-gradient(
            circle at 10% 0%,
            rgba(255, 255, 255, 0.80),
            transparent 30%
        ),
        linear-gradient(
            145deg,
            var(--studio-panel-deep),
            var(--studio-panel-soft)
        );
    border-color: rgba(85, 91, 108, 0.14);
}

.customizer-v3 .customizer-control-card {
    background:
        linear-gradient(
            145deg,
            rgba(247, 249, 250, 0.90),
            rgba(233, 238, 240, 0.84)
        );
    border-color: rgba(78, 86, 104, 0.12);
}

.customizer-v3 .customizer-preview-shell {
    padding: 26px;
    background:
        radial-gradient(
            circle at 50% 12%,
            rgba(235, 238, 243, 0.96),
            rgba(218, 224, 230, 0.88) 58%,
            rgba(209, 215, 223, 0.86)
        );
    border-color: rgba(73, 81, 99, 0.14);
    box-shadow:
        0 26px 70px rgba(51, 57, 74, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

/* Do not clip Prismatic / Magical outer borders or card corners. */
.customizer-v3 .customizer-preview-wrap {
    overflow: visible;
    border-radius: 0;
    padding: 0;
}

.customizer-v3 .customizer-preview {
    max-width: 100%;
    margin: 0 auto;
    border-radius: 0;
}

/*
   Selection overlays should behave like design-app bounding boxes:
   transparent fill, subtle white outline, four corner nodes.
*/
.customizer-v3 .customizer-transform-box {
    --control-scale: 1;
    min-width: 0;
    min-height: 0;
    padding: 0;
    background: rgba(255, 255, 255, 0.035);
    border: 1.5px solid rgba(255, 255, 255, 0.88);
    border-radius: 4px;
    box-shadow:
        0 0 0 1px rgba(34, 36, 49, 0.28),
        0 2px 9px rgba(16, 18, 28, 0.16);
    backdrop-filter: none;
    transform: translate(0, 0);
    transform-origin: top left;
    cursor: move;
}

.customizer-v3 .customizer-transform-box:hover,
.customizer-v3 .customizer-transform-box.dragging,
.customizer-v3 .customizer-transform-box.resizing {
    border-color: #ffffff;
    box-shadow:
        0 0 0 1px rgba(63, 56, 95, 0.55),
        0 0 0 3px rgba(255, 255, 255, 0.10),
        0 5px 14px rgba(18, 19, 31, 0.18);
}

.customizer-v3 .customizer-transform-series,
.customizer-v3 .customizer-transform-print {
    border-color: rgba(255, 255, 255, 0.88);
}

.customizer-v3 .customizer-corner {
    position: absolute;
    width: 9px;
    height: 9px;
    background: rgba(255, 255, 255, 0.98);
    border: 1.5px solid rgba(91, 77, 170, 0.88);
    border-radius: 2px;
    box-shadow:
        0 1px 4px rgba(31, 31, 48, 0.20);
    pointer-events: none;
}

.customizer-v3 .customizer-corner-tl {
    top: -5px;
    left: -5px;
}

.customizer-v3 .customizer-corner-tr {
    top: -5px;
    right: -5px;
}

.customizer-v3 .customizer-corner-bl {
    bottom: -5px;
    left: -5px;
}

.customizer-v3 .customizer-corner-br {
    right: -5px;
    bottom: -5px;
}

.customizer-v3 .customizer-resize-grip {
    display: block;
    width: 11px;
    height: 11px;
    background: rgba(255, 255, 255, 0.99);
    border: 2px solid rgba(91, 77, 170, 0.94);
    border-radius: 2px;
    box-shadow:
        0 1px 4px rgba(31, 31, 48, 0.24);
    cursor: nwse-resize;
    pointer-events: auto;
}

.customizer-v3 .customizer-transform-series .customizer-resize-grip,
.customizer-v3 .customizer-transform-print .customizer-resize-grip {
    background: rgba(255, 255, 255, 0.99);
    border-color: rgba(91, 77, 170, 0.94);
}

.customizer-v3 .customizer-stage-note {
    background: rgba(225, 229, 234, 0.80);
    border-color: rgba(73, 81, 99, 0.11);
    color: #666b79;
}

@media (max-width: 600px) {
    .customizer-v3 .customizer-preview-shell {
        padding: 16px;
    }

    .customizer-v3 .customizer-corner {
        width: 8px;
        height: 8px;
    }
}


/* =======================================================
   CUSTOMIZER V3.2 — LIVE TEXT EDITING
   ======================================================= */

.customizer-v3 .customizer-live-text {
    position: absolute;
    z-index: 8;
    display: inline-block;
    max-width: 92%;
    white-space: nowrap;
    line-height: 1;
    transform-origin: top left;
    cursor: pointer;
    user-select: none;
    touch-action: none;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.18));
}

.customizer-v3 .customizer-live-name {
    font-weight: 800;
}

.customizer-v3 .customizer-live-series {
    font-weight: 700;
}

.customizer-v3 .customizer-live-print {
    font-weight: 800;
}

/* Selection chrome exists only for the currently selected text element. */
.customizer-v3 .customizer-transform-box[hidden] {
    display: none !important;
}

.customizer-v3 .customizer-transform-box {
    pointer-events: auto;
}

/* The live text itself is the thing users click; the box appears afterward. */
.customizer-v3 .customizer-live-text:hover {
    text-shadow:
        0 0 7px rgba(255,255,255,0.18);
}

/* No artificial loading veil while dragging/resizing. */
.customizer-v3 .customizer-preview-loading {
    display: none !important;
}


/* =======================================================
   CUSTOMIZER V3.3 — HIGH QUALITY PIL TEXT LAYERS
   ======================================================= */

.customizer-v3 .customizer-live-text {
    display: none !important;
}

.customizer-v3 .customizer-live-layer {
    position: absolute;
    inset: 0 auto auto 0;
    z-index: 8;
    width: 100%;
    height: auto;
    max-width: none;
    pointer-events: none;
    user-select: none;
    image-rendering: auto;
    transform-origin: top left;
    will-change: transform, left, top;
}

.customizer-v3 .customizer-live-layer[hidden] {
    display: none !important;
}

/* The transform chrome remains clickable while the rendered text layer itself
   stays click-through; hit-testing is handled against the text bounds. */
.customizer-v3 .customizer-transform-box {
    z-index: 10;
}


/* =======================================================
   CUSTOMIZER V3.4 — CONTAIN EDITOR OVERFLOW
   ======================================================= */

/*
   The live PIL text layers are full-card transparent canvases. Scaling those
   canvases must never enlarge the document or push the editor down the page.
   Clip only editor overlays to the card rectangle; the actual card image and
   its rendered border remain fully visible inside that rectangle.
*/
.customizer-v3 .customizer-preview-wrap {
    overflow: clip !important;
    border-radius: 0 !important;
    contain: layout paint;
    isolation: isolate;
}

/* Keep the card itself as the fixed layout box. Overlay transforms must not
   contribute scrollable overflow or change the stage height. */
.customizer-v3 .customizer-preview {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
}

.customizer-v3 .customizer-live-layer {
    position: absolute;
    z-index: 8;
    pointer-events: none;
    max-width: none;
}



/* =======================================================
   CUSTOMIZER V3.5 — DIRECT DRAG FEEL
   ======================================================= */

.customizer-v3 .customizer-transform-box {
    transition:
        border-color 0.10s ease,
        box-shadow 0.10s ease !important;
    will-change: left, top;
}

.customizer-v3 .customizer-transform-box.dragging {
    transition: none !important;
    cursor: grabbing;
}

.customizer-v3 .customizer-live-layer {
    will-change: left, top, transform;
}

.customizer-v3 .customizer-transform-box.dragging,
.customizer-v3 .customizer-live-layer {
    backface-visibility: hidden;
}


/* =======================================================
   CUSTOMIZER V3.6 — FOUR-CORNER RESIZE
   ======================================================= */

.customizer-v3 .customizer-corner {
    pointer-events: auto !important;
}

.customizer-v3 .customizer-corner-tl,
.customizer-v3 .customizer-corner-br {
    cursor: nwse-resize;
}

.customizer-v3 .customizer-corner-tr,
.customizer-v3 .customizer-corner-bl {
    cursor: nesw-resize;
}

.customizer-v3 .customizer-transform-box.resizing {
    transition: none !important;
}

.customizer-v3 .customizer-transform-box.resizing .customizer-corner {
    transition: none !important;
}


/* =======================================================
   CUSTOMIZER V3.7 — NAME ROTATION
   ======================================================= */

.customizer-v3 .customizer-position-group label output {
    margin-left: 4px;
    color: var(--ink-700, #454254);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.customizer-v3 .customizer-rotation-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.customizer-v3 .customizer-rotation-presets button {
    flex: 1 1 0;
    min-width: 44px;
    padding: 5px 6px;
    color: var(--lavender-600, #5f4fa8);
    background: var(--lavender-100, #ece8f8);
    border: 0;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}

.customizer-v3 .customizer-rotation-presets button:hover {
    filter: brightness(0.96);
}

/* Round handle above the selected name; it turns with the box. */
.customizer-v3 .customizer-rotate-grip {
    position: absolute;
    top: -30px;
    left: 50%;
    width: 13px;
    height: 13px;
    margin-left: -6.5px;
    background: rgba(255, 255, 255, 0.99);
    border: 2px solid rgba(91, 77, 170, 0.94);
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(31, 31, 48, 0.24);
    cursor: grab;
    pointer-events: auto;
    touch-action: none;
}

.customizer-v3 .customizer-rotate-grip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    width: 1.5px;
    height: 15px;
    margin-left: -0.75px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 0 0 0.5px rgba(34, 36, 49, 0.28);
    pointer-events: none;
}

.customizer-v3 .customizer-transform-box.rotating .customizer-rotate-grip {
    cursor: grabbing;
}

.customizer-v3 .customizer-transform-box.rotating {
    transition: none !important;
}


/* =======================================================
   CUSTOMIZER V3.8 — PINNED PREVIEW STAGE
   ======================================================= */

/*
   The side panels are intentionally allowed to grow. Keep the preview stage
   anchored to the top instead of stretching to the tallest grid item, so
   adding controls never pushes the card farther down the page.
*/
.customizer-v3 .customizer-stage {
    align-self: start;
    position: sticky;
    top: 104px;
    align-content: start;
    grid-template-rows: auto auto auto;
    place-items: start center;
}

/* When a text box reaches the top edge the normal rotate grip would be clipped
   by .customizer-preview-wrap. Move it inside the box instead. */
.customizer-v3 .customizer-transform-box.rotate-grip-inside .customizer-rotate-grip {
    top: 6px;
}

.customizer-v3 .customizer-transform-box.rotate-grip-inside .customizer-rotate-grip::after {
    display: none;
}

@media (max-width: 1120px) {
    .customizer-v3 .customizer-stage {
        position: static;
        top: auto;
        align-self: stretch;
    }
}


/* =======================================================
   CUSTOMIZER V3.9 — HD EXPORT ACTIONS
   ======================================================= */

.customizer-v3 .customizer-action-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.customizer-v3 .customizer-action-row .customizer-save-button {
    width: 100%;
    margin-top: 0;
}

@media (max-width: 600px) {
    .customizer-v3 .customizer-action-row {
        grid-template-columns: 1fr;
    }
}


/* =======================================================
   CUSTOMIZER HISTORY — COMPACT UNDO / REDO CONTROLS
   ======================================================= */

.customizer-v3 .customizer-history-actions {
    grid-row: 3;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 4px 0 8px;
    overflow: visible;
}

.customizer-v3 .customizer-history-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 13px;
    color: var(--ink-700);
    background: linear-gradient(145deg, #ffffff, var(--studio-mint));
    border: 1px solid rgba(91, 77, 170, 0.20);
    border-radius: 50%;
    box-shadow: 0 5px 14px rgba(67, 70, 96, 0.10);
    cursor: pointer;
    transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
    overflow: visible;
}

.customizer-v3 .customizer-history-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 18px rgba(67, 70, 96, 0.16);
}

.customizer-v3 .customizer-history-button[aria-disabled="true"] {
    opacity: 0.42;
    filter: saturate(0.45);
    cursor: not-allowed;
    box-shadow: none;
}

.customizer-v3 .customizer-history-button:focus-visible {
    outline: 3px solid var(--studio-lilac, #c9bdf4);
    outline-offset: 3px;
}

.customizer-v3 .customizer-history-button::after {
    content: attr(data-tooltip);
    position: absolute;
    z-index: 30;
    top: calc(100% + 7px);
    left: 50%;
    transform: translate(-50%, -3px);
    padding: 6px 9px;
    color: #ffffff;
    background: rgba(42, 45, 57, 0.96);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(23, 25, 35, 0.16);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
}

.customizer-v3 .customizer-history-button:hover::after,
.customizer-v3 .customizer-history-button:focus::after {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
    .customizer-v3 .customizer-history-button,
    .customizer-v3 .customizer-history-button::after {
        transition: none;
    }
}

@media (max-width: 600px) {
    .customizer-v3 .customizer-history-actions {
        margin-top: 10px;
        gap: 16px;
        padding: 4px 0 10px;
    }

    .customizer-v3 .customizer-history-button {
        width: 50px;
        height: 50px;
    }
}
