.collection-detail-page {
    --cd-bg: #03080e;
    --cd-bg-elevated: #071018;
    --cd-surface: #08111a;
    --cd-surface-2: #0b151f;
    --cd-surface-3: #111c27;
    --cd-border: rgba(255, 255, 255, 0.11);
    --cd-border-strong: rgba(255, 255, 255, 0.19);
    --cd-text: #f5f7f8;
    --cd-muted: #a5adb8;
    --cd-muted-strong: #c5cad1;
    --cd-accent: #d9ef12;
    --cd-accent-strong: #b9ed05;
    --cd-accent-fg: #d9ef12;
    --cd-accent-text: #101500;
    --cd-blue: #32a8ff;
    --cd-green: #3fe6aa;
    --cd-danger: #ff4e55;
    --cd-shadow: 0 20px 50px rgba(0, 0, 0, 0.26);
    min-width: 320px;
    min-height: 100%;
    margin: 0;
    background:
        radial-gradient(circle at 44% 0%, rgba(22, 72, 88, 0.11), transparent 34rem),
        var(--cd-bg);
    color: var(--cd-text);
    color-scheme: dark;
    font-family: "Inter", Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
}

html[data-theme="light"] .collection-detail-page {
    --cd-bg: #f3f5ef;
    --cd-bg-elevated: #ffffff;
    --cd-surface: #ffffff;
    --cd-surface-2: #f5f7f1;
    --cd-surface-3: #e9ede3;
    --cd-border: rgba(15, 28, 18, 0.13);
    --cd-border-strong: rgba(15, 28, 18, 0.22);
    --cd-text: #121811;
    --cd-muted: #687166;
    --cd-muted-strong: #485246;
    --cd-accent: #c9e900;
    --cd-accent-strong: #add900;
    --cd-accent-fg: #617500;
    --cd-accent-text: #111800;
    --cd-shadow: 0 18px 45px rgba(27, 38, 24, 0.1);
    color-scheme: light;
}

.collection-detail-page *,
.collection-detail-page *::before,
.collection-detail-page *::after {
    box-sizing: border-box;
}

.collection-detail-page [hidden] {
    display: none !important;
}

.collection-detail-page button,
.collection-detail-page input,
.collection-detail-page select {
    font: inherit;
}

.collection-detail-page button,
.collection-detail-page select {
    color: inherit;
}

.collection-detail-page button,
.collection-detail-page a {
    -webkit-tap-highlight-color: transparent;
}

.collection-detail-page button {
    border: 0;
}

.collection-detail-page h1,
.collection-detail-page h2,
.collection-detail-page h3,
.collection-detail-page p,
.collection-detail-page dl,
.collection-detail-page dd,
.collection-detail-page ul {
    margin-top: 0;
}

.collection-detail-page svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.cd-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.cd-skip-link {
    position: fixed;
    z-index: 999;
    top: 10px;
    left: 10px;
    padding: 10px 14px;
    border-radius: 7px;
    background: var(--cd-accent);
    color: var(--cd-accent-text) !important;
    font-size: 13px;
    font-weight: 700;
    transform: translateY(-150%);
    transition: transform 160ms ease;
}

.cd-skip-link:focus {
    transform: translateY(0);
}

.collection-detail-page :is(a, button, input, select):focus-visible {
    outline: 2px solid var(--cd-accent-fg);
    outline-offset: 3px;
}

/* Header */

.cd-site-header {
    position: sticky;
    z-index: 80;
    top: 0;
    width: 100%;
    border-bottom: 1px solid var(--cd-border);
    background: color-mix(in srgb, var(--cd-bg) 88%, transparent);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.cd-header-inner {
    display: grid;
    grid-template-columns: auto auto minmax(210px, 1fr) auto;
    gap: clamp(18px, 2vw, 32px);
    align-items: center;
    width: min(1480px, 100%);
    min-height: 76px;
    margin: 0 auto;
    padding: 0 clamp(18px, 2.6vw, 40px);
}

.cd-brand {
    display: inline-flex;
    align-items: center;
    width: 138px;
    border-radius: 8px;
}

.cd-logo {
    display: block;
    width: 100%;
    height: auto;
}

.cd-logo-light {
    display: none;
}

html[data-theme="light"] .cd-logo-dark {
    display: none;
}

html[data-theme="light"] .cd-logo-light {
    display: block;
}

.cd-primary-nav {
    display: flex;
    gap: 24px;
    align-items: stretch;
    align-self: stretch;
}

.cd-primary-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: var(--cd-muted-strong);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: color 160ms ease;
}

.cd-primary-nav a:hover,
.cd-primary-nav a.active {
    color: var(--cd-text);
}

.cd-primary-nav a.active::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: var(--cd-accent);
    content: "";
}

.cd-header-search {
    position: relative;
    justify-self: center;
    width: min(100%, 390px);
}

.cd-header-search > svg,
.cd-mobile-search > div > svg,
.cd-gallery-search > svg {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 14px;
    width: 17px;
    height: 17px;
    color: var(--cd-muted);
    transform: translateY(-50%);
}

.cd-header-search input,
.cd-mobile-search input {
    width: 100%;
    height: 42px;
    padding: 0 14px 0 42px;
    border: 1px solid transparent;
    border-radius: 9px;
    outline: none;
    background: var(--cd-surface-2);
    color: var(--cd-text);
    font-size: 12px;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.cd-header-search input::placeholder,
.cd-mobile-search input::placeholder,
.cd-gallery-search input::placeholder {
    color: var(--cd-muted);
}

.cd-header-search input:focus,
.cd-mobile-search input:focus {
    border-color: color-mix(in srgb, var(--cd-accent) 55%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cd-accent) 12%, transparent);
}

.cd-search-results {
    position: absolute;
    z-index: 90;
    top: calc(100% + 9px);
    right: 0;
    left: 0;
    overflow: hidden;
    padding: 7px;
    border: 1px solid var(--cd-border-strong);
    border-radius: 11px;
    background: var(--cd-bg-elevated);
    box-shadow: var(--cd-shadow);
}

.cd-search-results a,
.cd-search-empty {
    display: flex;
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 8px;
    border-radius: 7px;
    color: var(--cd-text);
    font-size: 12px;
}

.cd-search-results a:hover {
    background: var(--cd-surface-3);
}

.cd-search-results img {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 7px;
    background: var(--cd-surface-3);
    object-fit: cover;
}

.cd-search-results span {
    overflow: hidden;
    min-width: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cd-search-empty {
    color: var(--cd-muted);
}

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

.cd-theme-toggle,
.cd-icon-button,
.cd-cart-button,
.cd-menu-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--cd-border);
    border-radius: 9px;
    background: var(--cd-surface-2);
    color: var(--cd-muted-strong);
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.cd-theme-toggle {
    width: 64px;
    gap: 7px;
}

.cd-theme-toggle svg,
.cd-icon-button svg,
.cd-cart-button svg,
.cd-menu-trigger svg {
    width: 20px;
    height: 20px;
}

.cd-theme-toggle .cd-sun-icon {
    color: #f2c63d;
}

.cd-theme-toggle .cd-moon-icon {
    color: #a64df0;
    fill: currentColor;
    stroke: none;
}

.cd-theme-toggle:hover,
.cd-icon-button:hover,
.cd-cart-button:hover,
.cd-menu-trigger:hover {
    border-color: var(--cd-border-strong);
    background: var(--cd-surface-3);
    color: var(--cd-text);
}

.cd-login-link,
.cd-signup-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 17px;
    border: 1px solid var(--cd-border-strong);
    border-radius: 8px;
    color: var(--cd-text);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.cd-signup-link {
    border-color: var(--cd-accent);
    background: var(--cd-accent);
    color: var(--cd-accent-text) !important;
}

.cd-login-link:hover {
    background: var(--cd-surface-3);
}

.cd-signup-link:hover {
    border-color: var(--cd-accent-strong);
    background: var(--cd-accent-strong);
}

.cd-mobile-menu .cd-dashboard-link {
    grid-column: 1 / -1
}

.cd-mobile-search-trigger,
.cd-menu-trigger,
.cd-mobile-menu,
.cd-mobile-search {
    display: none;
}

/* Main collection content */

.cd-main {
    width: 100%;
    min-height: 62vh;
    margin: 0;
    padding: 24px clamp(18px, 2.6vw, 40px) 40px;
    background-color: var(--cd-bg);
}

.cd-loading {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr 0.9fr;
    gap: 16px;
    min-height: 410px;
}

.cd-skeleton {
    position: relative;
    overflow: hidden;
    border-radius: 13px;
    background: var(--cd-surface-2);
}

.cd-skeleton::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--cd-text) 8%, transparent) 48%, transparent 66%);
    content: "";
    transform: translateX(-100%);
    animation: cd-shimmer 1.5s infinite;
}

.cd-loading-copy {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 32px 10px;
}

.cd-loading-copy span {
    display: block;
    height: 24px;
}

.cd-loading-copy span:nth-child(2) {
    width: 72%;
}

.cd-loading-copy span:nth-child(3) {
    height: 110px;
}

@keyframes cd-shimmer {
    to { transform: translateX(100%); }
}

.cd-error-state {
    max-width: 540px;
    margin: 90px auto;
    padding: 44px;
    border: 1px solid var(--cd-border);
    border-radius: 16px;
    background: var(--cd-surface);
    text-align: center;
    box-shadow: var(--cd-shadow);
}

.cd-error-state > span {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 20px;
    border: 1px solid color-mix(in srgb, var(--cd-danger) 60%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, var(--cd-danger) 12%, transparent);
    color: var(--cd-danger);
    font-size: 25px;
    font-weight: 700;
}

.cd-error-state h1 {
    margin: 0 0 10px;
    padding: 0;
    color: var(--cd-text);
    font-size: 26px;
    letter-spacing: -0.04em;
}

.cd-error-state p {
    color: var(--cd-muted);
    font-size: 14px;
    line-height: 1.6;
}

.cd-error-state button {
    margin-top: 10px;
    padding: 11px 22px;
    border-radius: 8px;
    background: var(--cd-accent);
    color: var(--cd-accent-text);
    font-weight: 700;
    cursor: pointer;
}

.cd-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(330px, 0.95fr);
    gap: 16px;
}

.cd-identity-card,
.cd-roulette-panel {
    min-height: 410px;
    overflow: hidden;
    border: 1px solid var(--cd-border);
    border-radius: 14px;
    background: var(--cd-surface);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.cd-identity-card {
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(330px, 1.1fr);
}

.cd-cover-wrap {
    position: relative;
    min-width: 0;
    min-height: 100%;
    overflow: hidden;
    background: #05090e;
}

.cd-cover-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 410px;
    object-fit: cover;
    object-position: center;
}

.cd-cover-sheen {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent 72%, color-mix(in srgb, var(--cd-surface) 65%, transparent)),
        linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.28));
    pointer-events: none;
}

.cd-collection-profile {
    position: relative;
    z-index: 2;
    display: flex;
    min-width: 0;
    padding: 23px clamp(20px, 2.1vw, 32px);
    flex-direction: column;
}

.cd-verified-pill {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    align-self: flex-start;
    margin-bottom: 16px;
    padding: 6px 10px;
    border: 1px solid rgba(95, 221, 144, 0.22);
    border-radius: 999px;
    background: rgba(25, 139, 82, 0.12);
    color: #6be3a3;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 0 20px rgba(55, 222, 136, 0.08);
}

.cd-verified-pill span {
    display: grid;
    place-items: center;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #24c897;
    color: #06120c;
    font-size: 11px;
    font-weight: 900;
}

.cd-collection-profile h1 {
    display: flex;
    gap: 9px;
    align-items: center;
    width: 100%;
    margin: 0 0 8px;
    padding: 0;
    color: var(--cd-text);
    font-size: clamp(28px, 2.45vw, 40px);
    font-weight: 650;
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.cd-collection-profile h1 span {
    overflow-wrap: anywhere;
}

.cd-collection-profile h1 .cd-approved-badge {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.cd-author {
    display: flex;
    gap: 5px;
    align-items: center;
    margin: 0 0 13px;
    color: var(--cd-muted-strong);
    font-size: 13px;
}

.cd-author strong {
    overflow: hidden;
    max-width: 75%;
    color: var(--cd-text);
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cd-author > .cd-approved-badge-small {
    display: block;
    flex: 0 0 16px;
    width: 15px;
    height: 15px;
    object-fit: contain;
}

.cd-description {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 18px;
    color: var(--cd-muted-strong);
    font-size: 12px;
    font-weight: 350;
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.cd-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: auto 0 16px;
    border: 1px solid var(--cd-border);
    border-radius: 10px;
    background: color-mix(in srgb, var(--cd-bg-elevated) 70%, transparent);
}

.cd-stats > div {
    position: relative;
    display: flex;
    min-width: 0;
    padding: 13px 8px;
    align-items: center;
    flex-direction: column-reverse;
    text-align: center;
}

.cd-stats > div::after {
    position: absolute;
    top: 0;
    right: 14%;
    left: 14%;
    height: 1px;
    background: transparent;
    content: "";
}

.cd-stat-price {
    background: linear-gradient(180deg, rgba(204, 236, 32, 0.065), transparent 78%);
}

.cd-stats > .cd-stat-price::after {
    background: linear-gradient(90deg, transparent, rgba(204, 236, 32, 0.65), transparent);
}

.cd-stats > div + div {
    border-left: 1px solid var(--cd-border);
}

.cd-stats dt {
    margin-top: 5px;
    color: var(--cd-muted);
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
}

.cd-stats dd {
    display: flex;
    gap: 5px;
    align-items: center;
    overflow: hidden;
    max-width: 100%;
    margin: 0;
    color: var(--cd-text);
    font-size: 16px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cd-stat-mark {
    display: grid;
    flex: 0 0 30px;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--cd-border-strong);
    border-radius: 9px;
    background: var(--cd-surface-3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 4px 12px rgba(0, 0, 0, 0.14);
}

.cd-stat-mark svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.cd-stat-price .cd-stat-mark {
    border-color: rgba(204, 236, 32, 0.32);
    color: #d9ed33;
}

#cd-blockchain {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    overflow: visible;
    width: 100%;
    max-width: none;
    white-space: normal;
}

.cd-chain-mark {
    display: grid;
    flex: 0 0 30px;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid color-mix(in srgb, var(--cd-border-strong) 78%, transparent);
    border-radius: 9px;
    background:
        radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.12), transparent 55%),
        var(--cd-surface-3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 12px rgba(0, 0, 0, 0.14);
}

.cd-chain-mark img {
    display: block;
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
    object-fit: contain;
    opacity: 0.94;
}

html[data-theme="light"] .cd-chain-mark img {
    filter: none;
    opacity: 1;
}

.cd-chain-name {
    min-width: 0;
    max-width: 100%;
    line-height: 1.25;
    overflow-wrap: normal;
    text-align: left;
    word-break: normal;
}

.cd-socials {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
}

.cd-socials button {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 6px 2px;
    background: transparent;
    color: var(--cd-muted-strong);
    font-size: 12px;
    cursor: pointer;
    transition: color 160ms ease;
}

.cd-socials button:hover {
    color: var(--cd-text);
}

.cd-socials svg {
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
}

/* Roulette */

.cd-roulette-slot {
    min-width: 0;
    min-height: 410px;
}

.cd-roulette-panel {
    position: relative;
    display: flex;
    min-width: 0;
    padding: 26px 24px 18px;
    flex-direction: column;
    isolation: isolate;
    background:
        radial-gradient(circle at 82% 52%, rgba(30, 211, 255, 0.14), transparent 35%),
        radial-gradient(circle at 74% 38%, rgba(220, 46, 255, 0.12), transparent 28%),
        #050b11;
    color: #f7f8fa;
}

.cd-roulette-panel::after {
    position: absolute;
    z-index: -1;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(115deg, transparent 45%, rgba(255, 255, 255, 0.035));
    content: "";
    pointer-events: none;
}

.cd-roulette-panel.is-unavailable {
    border-color: color-mix(in srgb, var(--cd-border-strong) 72%, transparent);
    background:
        radial-gradient(circle at 82% 52%, rgba(102, 130, 139, 0.1), transparent 35%),
        radial-gradient(circle at 74% 38%, rgba(133, 112, 139, 0.08), transparent 28%),
        #070c11;
}

.cd-roulette-panel.is-unavailable .cd-roulette-art {
    filter: grayscale(0.72) saturate(0.55) brightness(0.72);
    opacity: 0.58;
}

.cd-roulette-panel.is-unavailable .cd-roulette-copy p {
    color: #b7bec5;
}

.cd-roulette-panel.is-unavailable .cd-roulette-cta {
    border: 1px solid rgba(204, 218, 89, 0.38);
    background: linear-gradient(95deg, rgba(214, 222, 80, 0.82), rgba(125, 188, 65, 0.78));
    box-shadow: none;
}

.cd-roulette-panel.is-unavailable .cd-how-it-works {
    color: #929aa3;
    font-size: 8px;
}

.cd-roulette-panel.is-unavailable .cd-how-it-works span {
    width: 14px;
    height: 14px;
    font-size: 8px;
}

.cd-roulette-copy {
    position: relative;
    z-index: 2;
    width: 53%;
}

.cd-roulette-copy h2 {
    margin: 0 0 12px;
    padding: 0;
    color: #fff;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.cd-roulette-copy p {
    margin: 0;
    color: #d3d7dc;
    font-size: 11px;
    line-height: 1.65;
}

.cd-roulette-art {
    position: absolute;
    z-index: 1;
    right: -21%;
    bottom: 58px;
    width: 112%;
    max-width: none;
    height: auto;
    filter: drop-shadow(0 0 25px rgba(68, 206, 255, 0.16));
    pointer-events: none;
}

.cd-roulette-cta {
    position: relative;
    z-index: 3;
    display: flex;
    gap: 11px;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    margin-top: auto;
    border-radius: 8px;
    background: linear-gradient(95deg, #e7ed00, #84e715);
    color: #111700 !important;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    box-shadow: 0 0 25px rgba(167, 235, 4, 0.15);
    transition: filter 160ms ease, transform 160ms ease;
}

.cd-roulette-cta:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.cd-roulette-cta svg {
    width: 23px;
    height: 23px;
    stroke-width: 2;
}

.cd-how-it-works {
    position: relative;
    z-index: 3;
    display: flex;
    gap: 8px;
    align-items: center;
    align-self: center;
    margin-top: 13px;
    padding: 0;
    background: transparent;
    color: #b8bec6;
    font-size: 10px;
    cursor: pointer;
}

.cd-how-it-works span {
    display: grid;
    place-items: center;
    width: 17px;
    height: 17px;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 10px;
}

.cd-how-it-works strong {
    font: inherit;
    font-weight: 400;
}

/* Roulette video modal */

.collection-detail-page.cd-roulette-modal-open {
    overflow: hidden;
}

.cd-roulette-modal {
    position: fixed;
    z-index: 300;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 220ms ease;
}

.cd-roulette-modal.is-open {
    opacity: 1;
}

.cd-roulette-dialog {
    overflow: auto;
    width: min(520px, 100%);
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    background:
        radial-gradient(circle at 78% 8%, rgba(204, 39, 255, 0.11), transparent 36%),
        radial-gradient(circle at 20% 92%, rgba(33, 195, 255, 0.1), transparent 34%),
        #050a11;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    color: #f7f8fa;
    opacity: 0;
    scrollbar-width: none;
    transform: scale(0.08);
    transform-origin: center;
    transition: width 220ms ease, opacity 180ms ease, transform 320ms cubic-bezier(0.2, 0.9, 0.28, 1.12);
    will-change: opacity, transform;
}

.cd-roulette-dialog::-webkit-scrollbar {
    display: none;
}

.cd-roulette-modal.is-open .cd-roulette-dialog {
    opacity: 1;
    transform: scale(1);
}

.cd-roulette-dialog.is-video {
    width: min(600px, 100%);
}

.cd-roulette-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 2px 2px 14px;
}

.cd-roulette-modal-head span {
    display: block;
    margin-bottom: 4px;
    color: #d9ef12;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.cd-roulette-modal-head h2 {
    margin: 0;
    padding: 0;
    color: #fff;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.cd-roulette-modal-close {
    display: grid;
    flex: 0 0 40px;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: #d9dde2;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.cd-roulette-modal-close:hover {
    border-color: rgba(255, 255, 255, 0.25) !important;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.cd-roulette-modal-close svg {
    width: 20px;
    height: 20px;
}

.cd-roulette-amount-step > p {
    margin: 2px 2px 20px;
    color: #aeb5bf;
    font-size: 13px;
    line-height: 1.6;
}

.cd-roulette-amount-step > label {
    display: block;
    margin: 0 2px 8px;
    color: #e5e8eb;
    font-size: 12px;
    font-weight: 600;
}

.cd-roulette-amount-field {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    min-height: 64px;
    padding: 0 0 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.07);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.cd-roulette-amount-field:focus-within {
    border-color: rgba(217, 239, 18, 0.65);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 0 0 3px rgba(217, 239, 18, 0.08);
}

.cd-roulette-amount-field > span {
    padding-right: 13px;
    color: #d9ef12;
    font-size: 28px;
    font-weight: 650;
}

.collection-detail-page .cd-roulette-amount-field input[type="number"] {
    width: 100%;
    min-width: 0;
    height: 62px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0;
    background: transparent !important;
    color: #fff !important;
    font-size: 31px !important;
    font-weight: 600;
    letter-spacing: -0.02em;
    -webkit-text-fill-color: #fff;
    appearance: textfield;
}

.cd-roulette-amount-field input::-webkit-inner-spin-button,
.cd-roulette-amount-field input::-webkit-outer-spin-button {
    margin: 0;
    appearance: none;
}

.collection-detail-page .cd-roulette-amount-field input[type="number"]::placeholder {
    color: #737b86;
    font-size: 26px !important;
    opacity: 1;
    -webkit-text-fill-color: #737b86;
}

.cd-roulette-amount-field > small {
    display: flex;
    align-self: stretch;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    margin-left: 14px;
    padding: 0 14px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    color: #939aa4;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.cd-roulette-amount-meta {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 42px;
    padding: 8px 2px 5px;
}

.cd-roulette-amount-meta small {
    color: #7f8791;
    font-size: 10px;
}

.cd-roulette-amount-meta strong {
    color: #ff8b91;
    font-size: 10px;
    font-weight: 500;
}

.cd-roulette-amount-actions {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 10px;
}

.cd-roulette-amount-actions button,
.cd-roulette-result > button {
    min-height: 48px;
    padding: 11px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: filter 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.cd-roulette-cancel {
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    background: rgba(255, 255, 255, 0.07);
    color: #d6dae0;
}

.cd-roulette-continue,
.cd-roulette-result > button {
    background: linear-gradient(100deg, #e5f400, #aee600);
    color: #0b1000 !important;
    box-shadow: 0 8px 24px rgba(185, 230, 0, 0.14);
}

.cd-roulette-amount-actions button:hover:not(:disabled),
.cd-roulette-result > button:hover:not(:disabled) {
    filter: brightness(1.07);
    transform: translateY(-1px);
}

.cd-roulette-amount-actions button:disabled,
.cd-roulette-result > button:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.cd-roulette-video-step {
    min-width: 0;
}

.cd-roulette-video-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 472 / 512;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 13px;
    background: #000;
    box-shadow: 0 0 42px rgba(120, 25, 226, 0.13);
}

.cd-roulette-video-wrap video {
    display: block;
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
}

.cd-roulette-result {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px 28px 18px;
    flex-direction: column;
    background: rgba(2, 6, 11, 0.88);
    opacity: 0;
    text-align: center;
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    transition: opacity 220ms ease;
}

.cd-roulette-result.is-visible {
    opacity: 1;
}

.cd-roulette-result-nft {
    position: relative;
    width: min(190px, 54%);
    aspect-ratio: 1;
    margin-bottom: 13px;
}

.cd-roulette-result-nft img {
    display: block;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(217, 239, 18, 0.38);
    border-radius: 13px;
    background: #080d14;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.48), 0 0 32px rgba(217, 239, 18, 0.1);
    object-fit: cover;
    opacity: 0;
    transform: scale(0.08);
    transition: opacity 180ms ease, transform 500ms cubic-bezier(0.2, 0.9, 0.28, 1.14);
    will-change: opacity, transform;
}

.cd-roulette-result-nft img.is-revealed {
    opacity: 1;
    transform: scale(1);
}

.cd-roulette-result-mark {
    position: absolute;
    right: -9px;
    bottom: -8px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(217, 239, 18, 0.38);
    border-radius: 50%;
    background: #172000;
    color: #d9ef12;
    font-size: 18px;
    font-weight: 800;
    box-shadow: 0 0 28px rgba(217, 239, 18, 0.12);
}

.cd-roulette-result h3 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 25px;
    font-weight: 650;
    letter-spacing: -0.035em;
}

.cd-roulette-result p {
    max-width: 330px;
    margin: 0 0 13px;
    color: #c0c6cd;
    font-size: 13px;
    line-height: 1.6;
}

.cd-roulette-result p strong {
    color: #fff;
    font-weight: 700;
}

.cd-roulette-result > button {
    width: min(250px, 100%);
}

.cd-roulette-result > small {
    min-height: 18px;
    margin-top: 8px;
    color: #ff8b91;
    font-size: 10px;
}

@media (min-width: 700px) {
    .cd-roulette-video-wrap {
        width: 75%;
        margin: 0 auto;
    }
}

/* Tabs and gallery */

.cd-tabs {
    display: flex;
    gap: 36px;
    align-items: stretch;
    margin-top: 16px;
    border-bottom: 1px solid var(--cd-border);
}

.cd-tabs a,
.cd-tabs button {
    position: relative;
    padding: 0 0 14px;
    border-radius: 0;
    background: transparent;
    color: var(--cd-muted);
    font-size: 12px;
    cursor: pointer;
}

.cd-tabs a:hover,
.cd-tabs button:hover,
.cd-tabs .active {
    color: var(--cd-text);
}

.cd-tabs .active::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: var(--cd-accent);
    content: "";
}

.cd-tabs button span {
    margin-left: 4px;
    color: #72bf3f;
}

.cd-gallery-section {
    padding: 18px 0 14px;
    scroll-margin-top: 95px;
}

.cd-gallery-heading {
    display: none;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cd-gallery-heading h2 {
    margin: 0;
    padding: 0;
    color: var(--cd-text);
    font-size: 22px;
    font-weight: 550;
    letter-spacing: -0.03em;
}

.cd-gallery-heading button {
    padding: 7px 0;
    background: transparent;
    color: var(--cd-accent-fg);
    font-size: 12px;
    cursor: pointer;
}

.cd-gallery-toolbar {
    display: grid;
    grid-template-columns: auto minmax(220px, 1fr) auto auto;
    gap: 14px;
    align-items: center;
    margin-bottom: 18px;
}

.cd-filter-wrap {
    position: relative;
}

.cd-filter-button,
.cd-gallery-search,
.cd-sort-select select,
.cd-view-controls button {
    height: 42px;
    border: 1px solid var(--cd-border);
    border-radius: 8px;
    background: var(--cd-surface);
}

.cd-filter-button {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 0 15px;
    color: var(--cd-muted-strong);
    font-size: 11px;
    cursor: pointer;
}

.cd-filter-button svg {
    width: 16px;
    height: 16px;
}

.cd-filter-menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 7px);
    left: 0;
    min-width: 190px;
    padding: 10px;
    border: 1px solid var(--cd-border-strong);
    border-radius: 9px;
    background: var(--cd-bg-elevated);
    box-shadow: var(--cd-shadow);
}

.cd-filter-menu label {
    display: flex;
    gap: 9px;
    align-items: center;
    padding: 8px;
    color: var(--cd-muted-strong);
    font-size: 12px;
    cursor: pointer;
}

.cd-filter-menu input {
    accent-color: var(--cd-accent);
}

.cd-gallery-search {
    position: relative;
    display: block;
}

.cd-gallery-search input {
    width: 100%;
    height: 100%;
    padding: 0 14px 0 42px;
    border: 0;
    outline: 0;
    border-radius: inherit;
    background: transparent;
    color: var(--cd-text);
    font-size: 11px;
}

.cd-sort-select select {
    min-width: 196px;
    padding: 0 38px 0 14px;
    background-color: var(--cd-surface);
    color: var(--cd-text);
    font-size: 11px;
    cursor: pointer;
}

.cd-view-controls {
    display: flex;
    gap: 9px;
}

.cd-view-controls button {
    display: grid;
    place-items: center;
    width: 45px;
    padding: 0;
    color: var(--cd-muted);
    cursor: pointer;
}

.cd-view-controls button.active {
    border-color: color-mix(in srgb, var(--cd-accent) 32%, var(--cd-border));
    background: color-mix(in srgb, var(--cd-accent) 8%, var(--cd-surface));
    color: var(--cd-accent-fg);
}

.cd-view-controls svg {
    width: 19px;
    height: 19px;
}

.cd-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 8px;
}

.cd-nft-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--cd-accent) 55%, var(--cd-border));
    border-radius: 10px;
    background: var(--cd-surface);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.cd-nft-card:hover {
    border-color: var(--cd-accent);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    transform: translateY(-2px);
}

.cd-nft-image-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: var(--cd-surface-3);
}

.cd-nft-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 260ms ease;
}

.cd-nft-card:hover .cd-nft-image {
    transform: scale(1.025);
}

.cd-favourite {
    position: absolute;
    top: 7px;
    right: 7px;
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    background: rgba(3, 8, 14, 0.48);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(6px);
}

.cd-favourite svg {
    width: 16px;
    height: 16px;
    stroke-width: 1.8;
}

.cd-favourite[aria-pressed="true"] {
    color: var(--cd-accent);
}

.cd-favourite[aria-pressed="true"] svg {
    fill: currentColor;
}

.cd-nft-info {
    padding: 8px;
}

.cd-nft-name {
    overflow: hidden;
    margin: 0 0 4px;
    padding: 0;
    color: var(--cd-text);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cd-nft-crypto-price {
    margin: 0 0 2px;
    color: var(--cd-text);
    font-size: 10px;
    font-weight: 550;
}

.cd-nft-dollar-price {
    display: block;
    min-height: 14px;
    color: var(--cd-muted);
    font-size: 8px;
}

.cd-nft-actions {
    display: grid;
    gap: 4px;
    margin-top: 7px;
}

.cd-nft-actions button {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 28px;
    padding: 4px 6px;
    border: 1px solid var(--cd-border);
    border-radius: 5px;
    background: transparent;
    color: var(--cd-muted-strong);
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 160ms ease, filter 160ms ease, color 160ms ease;
}

.cd-nft-actions .cd-buy-crypto {
    border-color: #e8ad00;
    background: linear-gradient(100deg, #ffcb05, #f29a00);
    color: #151000;
}

.cd-nft-actions button:hover:not(:disabled) {
    filter: brightness(1.08);
}

.cd-nft-actions button:disabled {
    opacity: 0.46;
    cursor: not-allowed;
}

.cd-nft-actions svg {
    flex: 0 0 13px;
    width: 13px;
    height: 13px;
}

.cd-gallery-grid.list-view {
    grid-template-columns: 1fr;
}

.cd-gallery-grid.list-view .cd-nft-card {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
}

.cd-gallery-grid.list-view .cd-nft-image-wrap {
    aspect-ratio: 1 / 1;
}

.cd-gallery-grid.list-view .cd-nft-info {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) auto auto;
    gap: 14px;
    align-items: center;
    padding: 14px 18px;
}

.cd-gallery-grid.list-view .cd-nft-info > :not(.cd-nft-actions) {
    grid-column: 1;
}

.cd-gallery-grid.list-view .cd-nft-actions {
    grid-column: 3;
    grid-row: 1 / span 3;
    min-width: 160px;
    margin: 0;
}

.cd-gallery-empty {
    padding: 35px;
    border: 1px dashed var(--cd-border-strong);
    border-radius: 10px;
    color: var(--cd-muted);
    font-size: 13px;
    text-align: center;
}

/* Lower information panels */

.cd-information-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr 1fr;
    margin-top: 0;
    overflow: hidden;
    border: 1px solid var(--cd-border);
    border-radius: 12px;
    background: var(--cd-surface);
    scroll-margin-top: 95px;
}

.cd-info-panel {
    min-width: 0;
    padding: 24px;
}

.cd-info-panel + .cd-info-panel {
    border-left: 1px solid var(--cd-border);
}

.cd-info-panel h2 {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 0 0 12px;
    padding: 0;
    color: var(--cd-text);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.015em;
}

.cd-panel-heading-text {
    display: inline;
    min-width: 0;
}

.cd-about-panel .cd-panel-heading-text #cd-about-name {
    margin-left: 2px;
}

.cd-info-panel h2 small {
    color: var(--cd-muted);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
}

.cd-panel-icon {
    display: grid;
    flex: 0 0 25px;
    place-items: center;
    width: 25px;
    height: 25px;
    color: #d9c32e;
}

.cd-panel-icon svg {
    width: 23px;
    height: 23px;
    stroke-width: 1.7;
}

.cd-info-panel > p {
    margin: 0 0 16px;
    color: var(--cd-muted-strong);
    font-size: 12.5px;
    line-height: 1.65;
}

.cd-about-panel ul {
    display: grid;
    gap: 12px;
    margin: 17px 0 0;
    padding: 0;
    list-style: none;
}

.cd-about-panel li {
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--cd-muted-strong);
    font-size: 13.5px;
    line-height: 1.5;
}

.cd-about-panel .cd-list-icon {
    display: grid;
    flex: 0 0 23px;
    place-items: center;
    width: 23px;
    height: 23px;
    color: #d9c32e;
}

.cd-about-panel .cd-list-icon svg {
    width: 21px;
    height: 21px;
    stroke-width: 1.7;
}

.cd-about-panel strong {
    color: var(--cd-text);
    font-weight: 500;
}

.cd-voucher-warning {
    padding: 14px 16px;
    border: 1px solid color-mix(in srgb, var(--cd-danger) 64%, transparent);
    border-radius: 7px;
    background: color-mix(in srgb, var(--cd-danger) 3%, transparent);
}

.cd-voucher-warning h3 {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 0 0 10px;
    padding: 0;
    color: var(--cd-danger);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.015em;
    text-transform: uppercase;
}

.cd-voucher-warning h3 span {
    display: grid;
    flex: 0 0 20px;
    place-items: center;
}

.cd-voucher-warning h3 svg {
    width: 19px;
    height: 19px;
    stroke-width: 1.8;
}

.cd-voucher-warning p,
.cd-voucher-warning > strong,
.cd-voucher-warning > small {
    display: block;
    margin: 0 0 7px;
    color: var(--cd-muted-strong);
    font-size: 10.5px;
    line-height: 1.5;
}

.cd-voucher-warning > strong,
.cd-voucher-warning > small {
    color: var(--cd-danger);
}

.cd-technical-panel dl {
    display: grid;
    gap: 15px;
    margin: 20px 0 0;
}

.cd-technical-panel dl > div {
    display: grid;
    grid-template-columns: 42% minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.cd-technical-panel dt,
.cd-technical-panel dd {
    margin: 0;
    color: var(--cd-muted);
    font-size: 13.5px;
    line-height: 1.5;
}

.cd-technical-panel dd {
    display: flex;
    gap: 7px;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    color: var(--cd-muted-strong);
}

.cd-technical-panel code {
    overflow: hidden;
    max-width: 150px;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cd-technical-panel button {
    display: grid;
    flex: 0 0 22px;
    place-items: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--cd-muted);
    cursor: pointer;
}

.cd-technical-panel button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.cd-technical-panel button svg {
    width: 14px;
    height: 14px;
}

.cd-technical-panel a {
    color: var(--cd-accent-fg);
    font-size: 13.5px;
    line-height: 1.5;
}

.cd-technical-panel a[aria-disabled="true"] {
    color: var(--cd-muted);
    pointer-events: none;
}

.cd-trust-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 10px;
    overflow: hidden;
    border: 1px solid var(--cd-border);
    border-radius: 10px;
    background: var(--cd-surface);
}

.cd-trust-strip article {
    display: flex;
    gap: 16px;
    align-items: center;
    min-width: 0;
    padding: 18px 20px;
}

.cd-trust-strip article + article {
    border-left: 1px solid var(--cd-border);
}

.cd-trust-strip article > span {
    display: grid;
    flex: 0 0 50px;
    place-items: center;
    width: 50px;
    height: 50px;
    border: 1px solid color-mix(in srgb, var(--cd-accent-fg) 70%, transparent);
    border-radius: 50%;
    color: var(--cd-accent-fg);
}

.cd-trust-strip svg {
    width: 29px;
    height: 29px;
    stroke-width: 1.55;
}

.cd-trust-strip h3 {
    margin: 0 0 5px;
    padding: 0;
    color: var(--cd-text);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.cd-trust-strip p {
    margin: 0;
    color: var(--cd-muted);
    font-size: 10px;
    line-height: 1.45;
}

.cd-disclaimer {
    margin: 4px auto 0;
    padding: 10px 8px 0;
    color: var(--cd-muted);
    font-size: 9px;
    line-height: 1.55;
    text-align: center;
}

.cd-disclaimer strong {
    color: var(--cd-muted-strong);
}

.cd-bottom-nav {
    display: none;
}

.cd-toast {
    position: fixed;
    z-index: 200;
    right: 22px;
    bottom: 22px;
    max-width: min(360px, calc(100vw - 36px));
    padding: 12px 16px;
    border: 1px solid var(--cd-border-strong);
    border-radius: 9px;
    background: var(--cd-bg-elevated);
    color: var(--cd-text);
    font-size: 12px;
    line-height: 1.4;
    box-shadow: var(--cd-shadow);
}

@media (max-width: 1280px) {
    .cd-header-inner {
        gap: 18px;
    }

    .cd-primary-nav {
        gap: 16px;
    }

    .cd-header-search {
        max-width: 310px;
    }

    .cd-login-link,
    .cd-signup-link {
        padding: 0 13px;
    }

    .cd-identity-card {
        grid-template-columns: minmax(240px, 0.82fr) minmax(320px, 1.18fr);
    }

    .cd-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    }
}

@media (max-width: 1080px) {
    .cd-primary-nav a:nth-child(3) {
        display: none;
    }

    .cd-header-search {
        max-width: 260px;
    }

    .cd-login-link {
        display: none;
    }

    .cd-hero-grid {
        grid-template-columns: minmax(0, 1.75fr) minmax(315px, 0.9fr);
    }

    .cd-identity-card {
        grid-template-columns: minmax(220px, 0.78fr) minmax(300px, 1.22fr);
    }

    .cd-collection-profile {
        padding: 20px;
    }

    .cd-socials button {
        gap: 4px;
    }

    .cd-roulette-panel {
        padding-right: 19px;
        padding-left: 19px;
    }

    .cd-information-grid {
        grid-template-columns: 1fr 1.12fr;
    }

    .cd-technical-panel {
        grid-column: 1 / -1;
        border-top: 1px solid var(--cd-border);
        border-left: 0 !important;
    }

    .cd-technical-panel dl {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cd-trust-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cd-trust-strip article:nth-child(3) {
        border-top: 1px solid var(--cd-border);
        border-left: 0;
    }

    .cd-trust-strip article:nth-child(4) {
        border-top: 1px solid var(--cd-border);
    }
}

@media (max-width: 1000px) {
    .cd-header-inner {
        grid-template-columns: auto 1fr auto;
    }

    .cd-primary-nav {
        display: none;
    }

    .cd-header-actions > .cd-login-link,
    .cd-header-actions > .cd-signup-link,
    .cd-header-actions > .cd-cart-button {
        display: none;
    }

    .cd-menu-trigger {
        display: inline-flex;
    }

    .cd-mobile-menu {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        padding: 12px 18px 18px;
        border-bottom: 1px solid var(--cd-border);
        background: var(--cd-bg-elevated);
        box-shadow: var(--cd-shadow);
    }

    .cd-mobile-menu:not([hidden]) {
        display: grid;
    }

    .cd-mobile-menu > a {
        padding: 13px 8px;
        border-bottom: 1px solid var(--cd-border);
        color: var(--cd-muted-strong);
        font-size: 14px;
    }

    .cd-mobile-menu > a.active {
        color: var(--cd-accent);
    }

    .cd-mobile-menu > div {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 16px;
    }

    .cd-mobile-menu > div a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        border: 1px solid var(--cd-border-strong);
        border-radius: 8px;
        font-size: 13px;
    }

    .cd-mobile-menu .cd-signup-link {
        display: flex;
    }

    .cd-header-search {
        width: min(100%, 360px);
    }

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

    .cd-roulette-slot {
        min-height: 330px;
    }

    .cd-roulette-slot.is-empty {
        display: none;
    }

    .cd-roulette-panel {
        min-height: 330px;
    }

    .cd-roulette-art {
        right: -5%;
        bottom: 50px;
        width: 70%;
    }

    .cd-roulette-copy {
        width: 38%;
    }

    .cd-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    }
}

@media (max-width: 699px) {
    .collection-detail-page {
        padding-bottom: calc(64px + env(safe-area-inset-bottom));
        background: var(--cd-bg);
    }

    .cd-roulette-modal {
        padding: 10px;
    }

    .cd-roulette-dialog {
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
        padding: 10px;
        border-radius: 14px;
    }

    .cd-roulette-modal-head {
        padding: 3px 3px 10px;
    }

    .cd-roulette-modal-head span {
        margin-bottom: 2px;
        font-size: 8px;
    }

    .cd-roulette-modal-head h2 {
        font-size: 18px;
    }

    .cd-roulette-modal-close {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
    }

    .cd-roulette-amount-step > p {
        margin-bottom: 15px;
        font-size: 12px;
    }

    .cd-roulette-amount-field {
        min-height: 56px;
        padding-left: 14px;
    }

    .collection-detail-page .cd-roulette-amount-field input[type="number"] {
        height: 54px;
        font-size: 28px !important;
    }

    .collection-detail-page .cd-roulette-amount-field input[type="number"]::placeholder {
        font-size: 23px !important;
    }

    .cd-roulette-amount-field > span {
        padding-right: 10px;
        font-size: 25px;
    }

    .cd-roulette-amount-field > small {
        min-width: 52px;
        margin-left: 10px;
        padding: 0 11px;
        font-size: 10px;
    }

    .cd-roulette-amount-meta {
        min-height: 39px;
    }

    .cd-roulette-amount-actions button {
        min-height: 44px;
    }

    .cd-roulette-result {
        padding: 16px 22px 12px;
    }

    .cd-roulette-result-nft {
        width: min(160px, 49%);
        margin-bottom: 10px;
    }

    .cd-roulette-result-mark {
        right: -7px;
        bottom: -6px;
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .cd-roulette-result h3 {
        margin-bottom: 8px;
        font-size: 22px;
    }

    .cd-roulette-result p {
        margin-bottom: 11px;
        font-size: 12px;
    }

    .cd-roulette-video-wrap {
        border-radius: 10px;
    }

    .cd-site-header {
        position: sticky;
    }

    .cd-header-inner {
        display: flex;
        min-height: 56px;
        padding: 0 18px;
        justify-content: space-between;
    }

    .cd-brand {
        width: 102px;
    }

    .cd-header-search,
    .cd-login-link,
    .cd-signup-link,
    .cd-cart-button {
        display: none;
    }

    .cd-header-actions {
        gap: 8px;
    }

    .cd-mobile-search-trigger,
    .cd-menu-trigger {
        display: inline-flex;
    }

    .cd-theme-toggle {
        width: 45px;
    }

    .cd-theme-toggle .cd-sun-icon {
        display: none;
    }

    .cd-theme-toggle,
    .cd-icon-button,
    .cd-menu-trigger {
        width: 40px;
        height: 40px;
        padding: 0;
        background: var(--cd-surface);
    }

    .cd-theme-toggle svg,
    .cd-icon-button svg,
    .cd-menu-trigger svg {
        width: 28px;
        height: 28px;
    }

    .cd-mobile-search {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        padding: 12px 16px;
        border-bottom: 1px solid var(--cd-border);
        background: var(--cd-bg-elevated);
        box-shadow: var(--cd-shadow);
    }

    .cd-mobile-search:not([hidden]) {
        display: block;
    }

    .cd-mobile-search > div:first-child {
        position: relative;
    }

    .cd-mobile-search input {
        padding-right: 44px;
    }

    .cd-mobile-search > div > button {
        position: absolute;
        top: 0;
        right: 0;
        width: 42px;
        height: 42px;
        border-radius: 8px;
        background: transparent;
        color: var(--cd-muted);
        font-size: 24px;
        cursor: pointer;
    }

    .cd-mobile-search .cd-search-results {
        position: static;
        margin-top: 8px;
        box-shadow: none;
    }

    .cd-main {
        width: 100%;
        padding: 12px 12px 28px;
    }

    .cd-loading {
        grid-template-columns: 1fr;
        min-height: 600px;
    }

    .cd-loading-hero {
        min-height: 580px;
    }

    .cd-loading-copy,
    .cd-loading-panel {
        display: none;
    }

    .cd-error-state {
        margin: 50px auto;
        padding: 32px 22px;
    }

    .cd-hero-grid {
        gap: 12px;
    }

    .cd-identity-card {
        position: relative;
        display: block;
        min-height: 0;
        border-radius: 14px;
    }

    .cd-cover-wrap {
        position: absolute;
        inset: 0;
        min-height: 0;
    }

    .cd-cover-wrap img {
        min-height: 100%;
        object-position: center center;
    }

    .cd-cover-sheen {
        background:
            linear-gradient(180deg, transparent 30%, rgba(4, 8, 13, 0.56) 47%, color-mix(in srgb, var(--cd-surface) 95%, transparent) 68%, var(--cd-surface) 82%),
            linear-gradient(90deg, rgba(0, 0, 0, 0.08), transparent 70%);
    }

    .cd-collection-profile {
        min-height: 0;
        padding: 169px 20px 0;
        background: linear-gradient(180deg, transparent 38%, rgba(4, 8, 13, 0.15) 47%, transparent 75%);
    }

    .cd-verified-pill {
        position: absolute;
        top: 18px;
        right: 16px;
        margin: 0;
        background: rgba(7, 20, 18, 0.67);
        backdrop-filter: blur(8px);
    }

    .cd-collection-profile h1 {
        margin-bottom: 8px;
        color: #fff;
        font-size: clamp(20px, 6vw, 24px);
    }

    .cd-author,
    .cd-author strong,
    .cd-description {
        color: #f3f5f7;
    }

    .cd-description {
        margin-bottom: 12px;
        font-size: 13px;
        line-height: 1.55;
        -webkit-line-clamp: 5;
    }

    .cd-stats {
        width: 100%;
        margin: 0 0 8px;
        border-color: rgba(255, 255, 255, 0.13);
        border-radius: 6px;
        background: rgba(4, 9, 14, 0.3);
        box-shadow: none;
        backdrop-filter: none;
    }

    .cd-stats > div {
        padding: 7px 4px;
        background: none;
    }

    .cd-stats > div::after {
        display: none;
    }

    .cd-stats > div + div {
        border-color: rgba(255, 255, 255, 0.13);
    }

    .cd-stats dt {
        margin-top: 3px;
        color: #b9c0c8;
        font-size: 9px;
    }

    .cd-stats dd {
        gap: 3px;
        color: #fff;
        font-size: 12px;
    }

    .cd-stat-mark,
    .cd-chain-mark {
        flex-basis: 22px;
        width: 22px;
        height: 22px;
        border: 0;
        border-radius: 4px;
        background: transparent;
        box-shadow: none;
    }

    .cd-stat-mark svg {
        width: 14px;
        height: 14px;
    }

    #cd-blockchain {
        gap: 4px;
    }

    .cd-chain-mark img {
        width: 15px;
        height: 15px;
    }

    .cd-socials button {
        gap: 5px;
        padding: 4px 2px 3px;
        color: #e4e8eb;
        font-size: 11px;
    }

    .cd-socials svg {
        width: 19px;
        height: 19px;
    }

    html[data-theme="light"] .cd-collection-profile {
        background: linear-gradient(180deg, transparent 37%, rgba(4, 8, 13, 0.2) 45%, rgba(18, 24, 17, 0.76) 61%, rgba(18, 24, 17, 0.9) 100%);
    }

    .cd-roulette-slot {
        min-height: 0;
    }

    .cd-roulette-slot:empty {
        display: none;
    }

    .cd-roulette-panel {
        min-height: 235px;
        padding: 16px 16px 10px;
        border-radius: 14px;
    }

    .cd-roulette-copy {
        width: 46%;
    }

    .cd-roulette-copy h2 {
        margin-bottom: 8px;
        font-size: 19px;
    }

    .cd-roulette-copy p {
        font-size: 10px;
        line-height: 1.5;
    }

    .cd-roulette-art {
        right: 0;
        bottom: 44px;
        width: 55%;
    }

    .cd-roulette-cta {
        gap: 7px;
        min-height: 38px;
        border-radius: 6px;
        font-size: 10px;
    }

    .cd-roulette-cta svg {
        width: 17px;
        height: 17px;
    }

    .cd-how-it-works {
        gap: 6px;
        margin-top: 8px;
        font-size: 8px;
    }

    .cd-how-it-works span {
        width: 14px;
        height: 14px;
        font-size: 8px;
    }

    .cd-tabs {
        display: none;
    }

    .cd-gallery-section {
        overflow: hidden;
        padding: 14px 0 12px;
    }

    .cd-gallery-heading {
        display: flex;
        padding: 0 3px;
    }

    .cd-gallery-heading h2 {
        overflow: hidden;
        max-width: 78%;
        font-size: 21px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .cd-gallery-toolbar {
        display: none;
    }

    .cd-gallery-grid,
    .cd-gallery-grid.list-view {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        margin: 0 -12px;
        padding: 0 12px 10px;
        scroll-padding-left: 12px;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .cd-gallery-grid::-webkit-scrollbar {
        display: none;
    }

    .cd-gallery-grid .cd-nft-card,
    .cd-gallery-grid.list-view .cd-nft-card {
        display: block;
        flex: 0 0 104px;
        width: 104px;
        scroll-snap-align: start;
    }

    .cd-gallery-grid.list-view .cd-nft-info {
        display: block;
        padding: 10px;
    }

    .cd-gallery-grid.list-view .cd-nft-actions {
        min-width: 0;
        margin-top: 9px;
    }

    .cd-nft-name {
        font-size: 11px;
    }

    .cd-nft-crypto-price {
        font-size: 10px;
    }

    .cd-nft-actions button {
        min-height: 31px;
        font-size: 8px;
    }

    .cd-nft-actions button span {
        font-size: 0;
    }

    .cd-nft-actions button span::after {
        font-size: 10px;
        content: "BUY";
    }

    .cd-nft-actions .cd-buy-card span::after {
        content: "CARD";
    }

    .cd-information-grid {
        grid-template-columns: 1fr;
        margin-top: 2px;
    }

    .cd-info-panel {
        padding: 22px 20px;
    }

    .cd-info-panel + .cd-info-panel,
    .cd-technical-panel {
        grid-column: auto;
        border-top: 1px solid var(--cd-border);
        border-left: 0;
    }

    .cd-info-panel h2 {
        margin-bottom: 12px;
        font-size: 17px;
    }

    .cd-info-panel > p {
        font-size: 12.5px;
    }

    .cd-about-panel li {
        font-size: 14px;
        line-height: 1.5;
    }

    .cd-info-panel > p {
        line-height: 1.6;
    }

    .cd-voucher-warning p,
    .cd-voucher-warning > strong,
    .cd-voucher-warning > small {
        font-size: 10.5px;
    }

    .cd-technical-panel dl {
        display: grid;
        grid-template-columns: 1fr;
    }

    .cd-technical-panel dt,
    .cd-technical-panel dd,
    .cd-technical-panel a {
        font-size: 14px;
        line-height: 1.5;
    }

    .cd-trust-strip {
        grid-template-columns: 1fr;
    }

    .cd-trust-strip article + article,
    .cd-trust-strip article:nth-child(3),
    .cd-trust-strip article:nth-child(4) {
        border-top: 1px solid var(--cd-border);
        border-left: 0;
    }

    .cd-trust-strip h3 {
        font-size: 12.5px;
    }

    .cd-trust-strip p {
        font-size: 10.5px;
    }

    .cd-disclaimer {
        padding: 12px 8px 0;
        font-size: 9px;
    }

    .cd-bottom-nav {
        position: fixed;
        z-index: 100;
        right: 0;
        bottom: 0;
        left: 0;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        min-height: calc(60px + env(safe-area-inset-bottom));
        padding: 5px 6px env(safe-area-inset-bottom);
        border-top: 1px solid var(--cd-border);
        background: color-mix(in srgb, var(--cd-bg) 94%, transparent);
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.16);
        backdrop-filter: blur(18px);
    }

    .cd-bottom-nav.roulette-disabled {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .cd-bottom-nav a {
        display: flex;
        gap: 3px;
        align-items: center;
        justify-content: center;
        min-width: 0;
        color: var(--cd-muted);
        font-size: 8px;
        flex-direction: column;
    }

    .cd-bottom-nav a.active {
        color: var(--cd-accent-fg);
    }

    .cd-bottom-nav svg {
        width: 20px;
        height: 20px;
        stroke-width: 1.6;
    }

    .collection-detail-page .site-footer {
        margin-bottom: calc(-64px - env(safe-area-inset-bottom));
        padding-bottom: calc(84px + env(safe-area-inset-bottom));
    }

    .cd-toast {
        right: 18px;
        bottom: calc(76px + env(safe-area-inset-bottom));
        left: 18px;
        max-width: none;
        text-align: center;
    }
}

@media (max-width: 390px) {
    .cd-header-inner {
        padding: 0 14px;
    }

    .cd-brand {
        width: 93px;
    }

    .cd-header-actions {
        gap: 6px;
    }

    .cd-theme-toggle,
    .cd-icon-button,
    .cd-menu-trigger {
        width: 38px;
        height: 38px;
    }

    .cd-theme-toggle svg,
    .cd-icon-button svg,
    .cd-menu-trigger svg {
        width: 27px;
        height: 27px;
    }

    .cd-collection-profile {
        min-height: 0;
        padding: 158px 16px 0;
    }

    .cd-socials button {
        font-size: 10px;
    }

    .cd-roulette-copy {
        width: 48%;
    }

    .cd-roulette-art {
        right: 0;
        width: 54%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .collection-detail-page *,
    .collection-detail-page *::before,
    .collection-detail-page *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
