:root {
    --book-bg: #f4efe7;
    --book-bg-2: #ebe1d2;
    --book-surface: #fffaf1;
    --book-surface-2: #f8f0e3;
    --book-ink: #201d18;
    --book-ink-2: #4b453b;
    --book-muted: #766d60;
    --book-line: #dacbb5;
    --book-line-2: #bca98d;
    --book-accent: #8b3f33;
    --book-accent-2: #5f6f50;
    --book-gold: #b68042;
    --book-danger: #aa3d33;
    --book-success: #4f7357;
    --book-shadow: 0 18px 48px rgba(51, 38, 21, 0.12);
    --book-shadow-sm: 0 8px 24px rgba(51, 38, 21, 0.08);
    --book-radius: 10px;
    --book-radius-sm: 7px;
    --book-container: 1160px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--book-ink);
    background:
        radial-gradient(circle at 100% 0%, rgba(95, 111, 80, 0.14), transparent 34rem),
        linear-gradient(180deg, #fbf6ed 0%, var(--book-bg) 45%, var(--book-bg-2) 100%);
    font-family: "Manrope", sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(32, 29, 24, 0.035) 1px, transparent 1px) 0 0 / 64px 64px,
        linear-gradient(90deg, transparent 0 9%, rgba(139, 63, 51, 0.035) 9% 9.2%, transparent 9.2%);
}

body.builder-modal-open {
    overflow: hidden;
}

main,
.site-header,
.site-footer {
    position: relative;
    z-index: 1;
}

a {
    color: inherit;
    text-decoration-color: rgba(139, 63, 51, 0.32);
    text-underline-offset: 0.22em;
    transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

a:hover {
    color: var(--book-accent);
}

img,
video {
    max-width: 100%;
    display: block;
}

button,
input,
select,
textarea {
    font: inherit;
}

.shell {
    width: min(var(--book-container), calc(100% - 48px));
    margin-inline: auto;
}

.narrow-shell {
    width: min(760px, calc(100% - 48px));
}

.muted,
small {
    color: var(--book-muted);
}

h1,
h2,
h3,
h4 {
    margin: 0;
    color: var(--book-ink);
    font-family: "Cinzel", serif;
    font-weight: 650;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

h1 {
    font-size: clamp(2.3rem, 4.8vw, 4.75rem);
}

h2 {
    font-size: clamp(1.55rem, 3vw, 2.85rem);
}

h3 {
    font-size: clamp(1.12rem, 1.8vw, 1.45rem);
}

p {
    margin: 0 0 1rem;
}

.eyebrow,
.tag,
.panel-title {
    margin: 0 0 12px;
    color: var(--book-accent);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.17em;
    line-height: 1.25;
    text-transform: uppercase;
}

.site-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.08;
    filter: grayscale(0.35) sepia(0.25);
}

.site-background-media,
.site-parallax-layer img,
.parallax-editor-layer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.site-parallax-layer,
.parallax-editor-layer {
    position: absolute;
    inset: -5%;
    will-change: transform;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(188, 169, 141, 0.65);
    background: rgba(250, 245, 236, 0.94);
    backdrop-filter: blur(16px);
}

.site-header.is-hidden {
    transform: translateY(-100%);
}

.header-atmosphere,
.hero-cloud,
.hero-spark,
.header-cloud,
.header-glow,
.footer-cloud,
.footer-star,
.footer-mountain,
.footer-tree,
.footer-moon,
.footer-ground {
    display: none;
}

.header-inner {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
    color: var(--book-ink);
    text-decoration: none;
}

.brand strong {
    display: block;
    font-family: "Cinzel", serif;
    font-size: 1rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.brand small {
    display: block;
    margin-top: -4px;
    color: var(--book-muted);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--book-ink);
    border-radius: 50%;
    background: var(--book-surface);
}

.brand-mark img,
.brand-mark video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-mark-copy {
    font-family: "Cinzel", serif;
    font-weight: 700;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.main-nav a {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border-radius: 999px;
    color: var(--book-ink-2);
    font-size: 0.86rem;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
}

.main-nav a:hover {
    color: var(--book-ink);
    background: rgba(218, 203, 181, 0.5);
}

.nav-badge {
    min-width: 19px;
    min-height: 19px;
    display: inline-grid;
    place-items: center;
    padding: 0 6px;
    color: #fffaf1;
    background: var(--book-accent);
    border-radius: 999px;
    font-size: 0.72rem;
}

.message-stack {
    margin: 22px 0 -6px;
    display: grid;
    gap: 10px;
}

.message {
    padding: 13px 16px;
    border: 1px solid var(--book-line);
    border-left: 4px solid var(--book-accent-2);
    border-radius: var(--book-radius-sm);
    background: var(--book-surface);
    box-shadow: var(--book-shadow-sm);
}

.message.error {
    border-left-color: var(--book-danger);
}

.message.success {
    border-left-color: var(--book-success);
}

.section {
    padding: clamp(42px, 6vw, 76px) 0;
}

.section-tight {
    padding-top: clamp(20px, 3vw, 36px);
}

.section-dark {
    border-block: 1px solid rgba(188, 169, 141, 0.55);
    background: rgba(255, 250, 241, 0.35);
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.section-heading > div {
    max-width: 760px;
}

.section-heading a {
    color: var(--book-accent);
    font-weight: 900;
}

.hero {
    padding: clamp(50px, 7vw, 86px) 0 clamp(42px, 6vw, 72px);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 420px);
    gap: clamp(34px, 6vw, 78px);
    align-items: start;
}

.hero-copy {
    max-width: 790px;
    padding-top: clamp(12px, 3vw, 34px);
}

.hero-copy h1 {
    max-width: 760px;
    margin-bottom: 22px;
}

.hero-text,
.page-hero p {
    max-width: 680px;
    color: var(--book-ink-2);
    font-size: clamp(1.03rem, 1.45vw, 1.18rem);
}

.hero-actions,
.builder-actions,
.queue-summary,
.product-actions,
.summary-actions,
.payment-actions,
.product-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.hero-side {
    display: grid;
    gap: 18px;
}

.hero-art {
    position: relative;
    height: clamp(320px, 42vw, 455px);
    overflow: hidden;
    border: 1px solid var(--book-line-2);
    border-radius: var(--book-radius);
    background:
        linear-gradient(135deg, rgba(255, 250, 241, 0.94), rgba(235, 225, 210, 0.85)),
        linear-gradient(90deg, rgba(32, 29, 24, 0.05) 1px, transparent 1px) 0 0 / 28px 28px;
    box-shadow: var(--book-shadow);
}

.hero-art img,
.hero-art video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-art::after {
    content: "";
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(32, 29, 24, 0.14);
    pointer-events: none;
}

.hero-media-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

.hero-media-placeholder::before {
    content: "DG";
    width: min(52%, 230px);
    aspect-ratio: 0.66;
    display: grid;
    place-items: center;
    border: 1px solid rgba(32, 29, 24, 0.22);
    border-left: 10px solid rgba(95, 111, 80, 0.45);
    border-radius: 4px;
    color: rgba(32, 29, 24, 0.23);
    background: rgba(255, 250, 241, 0.76);
    font-family: "Cinzel", serif;
    font-size: clamp(2.4rem, 5vw, 4.4rem);
    letter-spacing: 0.08em;
}

.page-hero {
    max-width: 920px;
    padding: clamp(22px, 4vw, 44px) 0;
}

.page-hero.compact {
    max-width: 760px;
}

.page-hero h1 {
    max-width: 900px;
    margin-bottom: 18px;
    font-size: clamp(2.05rem, 4.5vw, 4.25rem);
}

.page-store .page-hero,
.page-news .page-hero,
.page-campaigns .page-hero,
.store-hero {
    padding-bottom: 16px;
}

.page-store main > .section:first-of-type,
.page-news main > .section:first-of-type,
.page-campaigns main > .section:first-of-type {
    padding-top: clamp(34px, 5vw, 58px);
    padding-bottom: 14px;
}

.page-store .section-tight,
.page-campaigns .section-tight {
    padding-top: 14px;
    padding-bottom: 34px;
}

.panel,
.form-card,
.summary-card,
.managed-panel,
.progress-panel,
.newsletter-card,
.profile-card,
.queue-panel {
    border: 1px solid var(--book-line);
    border-radius: var(--book-radius);
    background: rgba(255, 250, 241, 0.86);
    box-shadow: var(--book-shadow-sm);
}

.panel,
.form-card,
.summary-card,
.managed-panel {
    padding: clamp(20px, 3vw, 30px);
}

.progress-panel {
    padding: 20px;
}

.progress-item {
    padding: 14px 0;
    border-top: 1px solid var(--book-line);
}

.progress-item:first-of-type {
    border-top: 0;
}

.progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: var(--book-ink);
    font-weight: 900;
}

.progress-meta strong,
.price,
.price-line,
.product-price-cluster strong,
.cart-total-row strong {
    color: var(--book-accent);
}

.progress-bar {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(32, 29, 24, 0.1);
}

.progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--book-accent-2), var(--book-gold));
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.panel-heading h2,
.panel-heading h3 {
    margin-bottom: 4px;
}

.panel-heading a {
    color: var(--book-accent);
    font-weight: 900;
}

.button,
button.button,
.text-link {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: var(--book-radius-sm);
    cursor: pointer;
    font-weight: 900;
    line-height: 1.1;
    text-decoration: none;
}

.button.primary {
    color: #fffaf1;
    background: var(--book-ink);
    border-color: var(--book-ink);
}

.button.primary:hover {
    color: #fffaf1;
    background: var(--book-accent);
    border-color: var(--book-accent);
}

.button.secondary {
    color: var(--book-ink);
    background: transparent;
    border-color: var(--book-line-2);
}

.button.secondary:hover {
    color: var(--book-ink);
    background: rgba(218, 203, 181, 0.5);
    border-color: var(--book-accent-2);
}

.button.ghost,
button.ghost {
    color: var(--book-muted);
    background: transparent;
    border-color: transparent;
}

.button.ghost:hover,
button.ghost:hover {
    color: var(--book-accent);
    background: rgba(139, 63, 51, 0.08);
}

.text-link {
    min-height: 0;
    padding: 0;
    color: var(--book-accent);
    border: 0;
    border-radius: 0;
}

.inline-form {
    display: inline;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--book-line);
    border-radius: var(--book-radius-sm);
    padding: 13px 14px;
    color: var(--book-ink);
    background: rgba(255, 250, 241, 0.92);
    outline: none;
}

textarea {
    min-height: 130px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--book-accent-2);
    box-shadow: 0 0 0 3px rgba(95, 111, 80, 0.14);
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    accent-color: var(--book-accent-2);
}

label {
    color: var(--book-ink-2);
    font-weight: 800;
}

form p {
    margin-bottom: 14px;
}

form p label {
    display: block;
    margin-bottom: 6px;
}

.card-grid,
.spotlight-grid,
.news-grid,
.worlds-grid,
.product-grid,
.stats-grid,
.account-stats-grid,
.theme-preset-grid,
.theme-library-grid,
.builder-media-grid,
.author-actions-grid,
.external-link-grid,
.artwork-grid {
    display: grid;
    gap: 20px;
}

.card-grid,
.news-grid,
.worlds-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.spotlight-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.product-grid {
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.stats-grid,
.account-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.spotlight-card,
.news-card,
.world-card,
.product-card,
.address-card,
.stat-card,
.stack-card,
.library-item,
.contribution-card,
.reward-card,
.supporter-card,
.saved-theme-card,
.theme-preset-card,
.builder-media-card,
.parallax-editor-card,
.author-action,
.artwork-card {
    border: 1px solid var(--book-line);
    border-radius: var(--book-radius);
    background: rgba(255, 250, 241, 0.88);
    box-shadow: var(--book-shadow-sm);
}

.news-card,
.world-card,
.address-card,
.stat-card,
.stack-card,
.library-item,
.contribution-card,
.reward-card,
.supporter-card,
.saved-theme-card,
.theme-preset-card,
.builder-media-card,
.parallax-editor-card,
.author-action,
.artwork-card {
    padding: 20px;
}

.spotlight-card,
.product-card-immersive {
    position: relative;
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    padding: 20px;
    overflow: hidden;
}

.compact-card {
    padding: 20px;
}

.product-card {
    min-height: 236px;
}

.stretched-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    color: transparent;
    text-decoration: none;
}

.product-card a:not(.stretched-link),
.product-card button,
.product-card form,
.spotlight-card a,
.spotlight-card button {
    position: relative;
    z-index: 2;
}

.product-card:hover,
.spotlight-card:hover,
.news-card:hover,
.author-action:hover {
    border-color: var(--book-line-2);
    transform: translateY(-2px);
}

.product-meta,
.spotlight-card > div:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-meta h2,
.product-meta h3,
.spotlight-card h3 {
    margin: 0;
    font-size: clamp(1.2rem, 2.2vw, 1.55rem);
}

.product-meta h2 a,
.product-meta h3 a,
.spotlight-card h3 a,
.news-card h3 a,
.compact-card h3 a {
    text-decoration: none;
}

.product-meta p,
.spotlight-card p,
.news-card p,
.world-card p {
    color: var(--book-ink-2);
}

.product-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.product-price-cluster,
.price-row,
.summary-row,
.cart-total-row,
.price-line-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.product-price-cluster strong,
.price-line {
    font-size: 1.18rem;
    font-weight: 950;
}

.price-was,
.price-subline {
    color: var(--book-muted);
    text-decoration: line-through;
}

.product-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.product-flags span {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 5px 9px;
    border: 1px solid rgba(95, 111, 80, 0.22);
    border-radius: 999px;
    color: var(--book-accent-2);
    background: rgba(95, 111, 80, 0.08);
    font-size: 0.76rem;
    font-weight: 900;
}

.card-cover,
.product-cover,
.detail-cover,
.artwork-media {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--book-line-2);
    border-radius: var(--book-radius-sm);
    background:
        linear-gradient(90deg, rgba(32, 29, 24, 0.14) 0 11%, transparent 11%),
        linear-gradient(145deg, rgba(95, 111, 80, 0.17), rgba(139, 63, 51, 0.08)),
        var(--book-surface-2);
}

.card-cover,
.product-cover {
    width: 128px;
    aspect-ratio: 0.68;
    flex: 0 0 128px;
}

.product-cover {
    display: block;
    margin: 0;
    box-shadow: 8px 10px 0 rgba(32, 29, 24, 0.06);
}

.cover-media-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(16px) saturate(0.8);
    transform: scale(1.12);
    opacity: 0.18;
}

.cover-media-front,
.card-cover > img:not(.cover-media-backdrop),
.product-cover > img:not(.cover-media-backdrop),
.detail-cover > img:not(.cover-media-backdrop),
.artwork-media img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-fallback {
    width: 100%;
    height: 100%;
    background:
        linear-gradient(90deg, rgba(32, 29, 24, 0.16) 0 12%, transparent 12%),
        linear-gradient(145deg, rgba(95, 111, 80, 0.2), rgba(139, 63, 51, 0.1));
}

.cover-placeholder-kind {
    position: absolute;
    inset: auto 10px 10px;
    color: rgba(32, 29, 24, 0.62);
    font-size: 0.68rem;
    font-weight: 950;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(160px, 220px) minmax(160px, 220px) auto;
    gap: 12px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--book-line);
    border-radius: var(--book-radius);
    background: rgba(255, 250, 241, 0.82);
    box-shadow: var(--book-shadow-sm);
}

.filter-bar .button {
    width: auto;
    min-width: 132px;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    gap: clamp(32px, 6vw, 72px);
    align-items: start;
}

.detail-cover {
    width: 100%;
    max-width: 360px;
    aspect-ratio: 0.68;
    box-shadow: 14px 16px 0 rgba(32, 29, 24, 0.06);
}

.detail-copy {
    max-width: 760px;
}

.detail-copy h1 {
    margin-bottom: 16px;
    font-size: clamp(2.1rem, 4vw, 4.1rem);
}

.detail-copy .article-body {
    margin-top: 22px;
}

.purchase-panel {
    max-width: 920px;
}

.purchase-stack {
    display: grid;
    gap: 18px;
}

.purchase-stack .inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
}

.purchase-stack input[type="number"] {
    width: 120px;
}

.external-link-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.artwork-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.artwork-card img {
    width: 100%;
    aspect-ratio: 16 / 11;
    object-fit: cover;
    border-radius: var(--book-radius-sm);
    margin-bottom: 14px;
}

.world-card {
    border-top: 4px solid var(--book-accent-2);
}

.world-card[style*="--accent"] {
    border-top-color: var(--accent);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 5px 10px;
    border: 1px solid rgba(95, 111, 80, 0.22);
    border-radius: 999px;
    color: var(--book-accent-2);
    background: rgba(95, 111, 80, 0.1);
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1;
}

.status-paid,
.status-completed,
.status-shipped {
    color: var(--book-success);
    background: rgba(79, 115, 87, 0.12);
}

.status-cancelled,
.status-failed {
    color: var(--book-danger);
    background: rgba(170, 61, 51, 0.1);
}

.status-pending,
.status-waiting_confirmation {
    color: var(--book-gold);
    background: rgba(182, 128, 66, 0.13);
}

.checkout-grid,
.detail-grid,
.payment-grid,
.profile-grid,
.account-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(290px, 370px);
    gap: 24px;
    align-items: start;
}

.summary-card,
.form-card {
    position: sticky;
    top: 96px;
}

.summary-row,
.cart-total-row {
    padding: 10px 0;
    border-top: 1px solid var(--book-line);
}

.summary-row:first-child {
    border-top: 0;
}

.form-card form,
.profile-card form,
.checkout-form,
.support-form,
.payment-form {
    display: grid;
    gap: 14px;
}

.form-grid,
.builder-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.builder-field-grid-wide {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.form-field-full,
.builder-field-full {
    grid-column: 1 / -1;
}

.builder-field,
.form-field {
    display: grid;
    gap: 7px;
}

.builder-field span,
.form-field span {
    color: var(--book-ink-2);
    font-weight: 900;
}

.builder-field small,
.form-field small {
    font-weight: 500;
}

.builder-field-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.builder-color-control,
.builder-inline-inputs {
    display: flex;
    gap: 10px;
    align-items: center;
}

.builder-color-control input[type="color"] {
    width: 58px;
    height: 42px;
    padding: 4px;
}

.builder-sidebar,
.builder-theme-stack {
    display: grid;
    gap: 22px;
}

.builder-form-section {
    padding-top: 22px;
    margin-top: 22px;
    border-top: 1px solid var(--book-line);
}

.builder-form-section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.builder-theme-submit {
    margin-top: 24px;
}

.theme-preset-grid,
.theme-library-grid,
.builder-media-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.theme-preset-swatches {
    display: flex;
    gap: 7px;
    margin-bottom: 14px;
}

.theme-preset-swatch {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(32, 29, 24, 0.18);
    border-radius: 50%;
    background: var(--swatch);
}

.builder-sections-list,
.builder-available-list,
.stack-list,
.account-stack,
.cart-list,
.order-item-list,
.parallax-editor-stack {
    display: grid;
    gap: 12px;
}

.builder-section-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--book-line);
    border-radius: var(--book-radius);
    background: rgba(255, 250, 241, 0.82);
    cursor: pointer;
}

.builder-section-row.is-active {
    border-color: var(--book-accent-2);
    box-shadow: 0 0 0 3px rgba(95, 111, 80, 0.12);
}

.builder-section-row.is-dragging {
    opacity: 0.55;
}

.builder-drag {
    color: var(--book-line-2);
    font-weight: 900;
}

.builder-row-copy {
    display: grid;
    gap: 2px;
}

.builder-row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.builder-modal[hidden] {
    display: none;
}

.builder-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 28px;
}

.builder-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(32, 29, 24, 0.38);
    backdrop-filter: blur(4px);
}

.builder-modal-card {
    position: relative;
    width: min(820px, 100%);
    max-height: min(84vh, 860px);
    overflow: auto;
}

.builder-section-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.builder-workspace-section {
    padding-top: 34px;
}

.builder-workspace-section .shell {
    width: min(1500px, calc(100% - 36px));
}

.builder-studio {
    display: grid;
    grid-template-columns: minmax(230px, 280px) minmax(0, 1fr) minmax(300px, 360px);
    gap: 18px;
    align-items: start;
}

.builder-studio-sidebar,
.builder-canvas-panel,
.builder-inspector-panel {
    border: 1px solid rgba(188, 169, 141, 0.72);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 250, 241, 0.94), rgba(248, 240, 227, 0.88));
    box-shadow: 0 18px 50px rgba(51, 38, 21, 0.1);
}

.builder-studio-sidebar,
.builder-inspector-panel {
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 118px);
    overflow: auto;
    padding: 18px;
}

.builder-canvas-panel {
    min-width: 0;
    min-height: 720px;
    padding: 18px;
}

.builder-studio-title,
.builder-inspector-header {
    display: grid;
    gap: 8px;
}

.builder-studio-title h1 {
    font-size: clamp(1.65rem, 2.4vw, 2.35rem);
}

.builder-studio-title p:not(.eyebrow),
.builder-inspector-header .muted {
    margin: 0;
    font-size: 0.93rem;
}

.builder-page-tabs {
    display: grid;
    gap: 8px;
    margin: 18px 0;
}

.builder-page-tab {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(188, 169, 141, 0.7);
    border-radius: 12px;
    background: rgba(255, 250, 241, 0.54);
    color: var(--book-ink);
    text-decoration: none;
}

.builder-page-tab span {
    min-width: 0;
    overflow: hidden;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.builder-page-tab small {
    flex: 0 0 auto;
    font-size: 0.75rem;
}

.builder-page-tab:hover,
.builder-page-tab.is-active {
    border-color: rgba(95, 111, 80, 0.65);
    background: rgba(95, 111, 80, 0.1);
    color: var(--book-ink);
}

.builder-palette {
    display: grid;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(188, 169, 141, 0.48);
}

.builder-palette .panel-heading {
    margin-bottom: 0;
}

.builder-palette .panel-heading h2 {
    font-size: 1.12rem;
}

.builder-palette-list {
    display: grid;
    gap: 10px;
}

.builder-palette-list > p {
    margin: 0;
    padding: 12px;
    border: 1px dashed rgba(188, 169, 141, 0.72);
    border-radius: 12px;
    color: var(--book-muted);
    font-size: 0.9rem;
}

.builder-palette-card {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 3px 10px;
    align-items: start;
    padding: 12px;
    border: 1px dashed rgba(188, 169, 141, 0.88);
    border-radius: 14px;
    background: rgba(255, 250, 241, 0.64);
    color: var(--book-ink);
    text-align: left;
    cursor: grab;
}

.builder-palette-card:hover {
    border-color: rgba(139, 63, 51, 0.56);
    background: rgba(139, 63, 51, 0.06);
    transform: translateY(-1px);
}

.builder-palette-card:active {
    cursor: grabbing;
}

.builder-palette-card > span {
    grid-row: span 2;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--book-ink);
    color: var(--book-surface);
    font-weight: 950;
}

.builder-palette-card strong,
.builder-palette-card small {
    min-width: 0;
}

.builder-palette-card strong {
    line-height: 1.22;
}

.builder-palette-card small {
    font-size: 0.78rem;
    line-height: 1.35;
}

.builder-canvas-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

.builder-canvas-toolbar .eyebrow {
    margin-bottom: 4px;
}

.builder-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    align-items: center;
}

.builder-save-status {
    min-width: 104px;
    padding: 8px 10px;
    border: 1px solid rgba(188, 169, 141, 0.64);
    border-radius: 999px;
    background: rgba(255, 250, 241, 0.82);
    color: var(--book-muted);
    font-size: 0.78rem;
    font-weight: 950;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.builder-save-status[data-state="saving"] {
    border-color: rgba(182, 128, 66, 0.58);
    color: var(--book-gold);
}

.builder-save-status[data-state="saved"] {
    border-color: rgba(79, 115, 87, 0.52);
    color: var(--book-success);
}

.builder-save-status[data-state="error"] {
    border-color: rgba(170, 61, 51, 0.54);
    color: var(--book-danger);
}

.builder-canvas {
    position: relative;
    min-width: 1120px;
    min-height: 980px;
    display: block;
    overflow: hidden;
    padding: 18px;
    border: 1px dashed rgba(188, 169, 141, 0.86);
    border-radius: 18px;
    background:
        linear-gradient(rgba(32, 29, 24, 0.026) 1px, transparent 1px) 0 0 / 28px 28px,
        linear-gradient(90deg, rgba(32, 29, 24, 0.026) 1px, transparent 1px) 0 0 / 28px 28px,
        rgba(244, 239, 231, 0.5);
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.builder-canvas-panel {
    overflow-x: auto;
}

.builder-canvas-ruler {
    position: absolute;
    z-index: 0;
    pointer-events: none;
    background: rgba(32, 29, 24, 0.06);
}

.builder-canvas-ruler-x {
    top: 0;
    left: 0;
    right: 0;
    height: 24px;
    background:
        repeating-linear-gradient(90deg, rgba(32, 29, 24, 0.18) 0 1px, transparent 1px 80px),
        rgba(32, 29, 24, 0.035);
}

.builder-canvas-ruler-y {
    top: 0;
    bottom: 0;
    left: 0;
    width: 24px;
    background:
        repeating-linear-gradient(180deg, rgba(32, 29, 24, 0.18) 0 1px, transparent 1px 80px),
        rgba(32, 29, 24, 0.035);
}

.builder-canvas.is-drop-target {
    border-color: rgba(95, 111, 80, 0.9);
    background:
        linear-gradient(rgba(95, 111, 80, 0.055) 1px, transparent 1px) 0 0 / 28px 28px,
        linear-gradient(90deg, rgba(95, 111, 80, 0.055) 1px, transparent 1px) 0 0 / 28px 28px,
        rgba(95, 111, 80, 0.08);
    box-shadow: inset 0 0 0 3px rgba(95, 111, 80, 0.1);
}

.builder-empty-canvas {
    position: absolute;
    inset: 70px 70px auto 70px;
    display: grid;
    place-items: center;
    min-height: 360px;
    padding: 28px;
    border: 1px dashed rgba(188, 169, 141, 0.78);
    border-radius: 16px;
    color: var(--book-muted);
    text-align: center;
}

.builder-empty-canvas[hidden] {
    display: none;
}

.builder-empty-canvas strong {
    display: block;
    margin-bottom: 6px;
    color: var(--book-ink);
    font-family: "Cinzel", serif;
    font-size: 1.2rem;
}

.builder-canvas-block {
    position: absolute;
    z-index: 1;
    width: 680px;
    max-width: none;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
    padding: 16px;
    border: 1px solid rgba(188, 169, 141, 0.72);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(255, 250, 241, 0.98), rgba(248, 240, 227, 0.92));
    box-shadow: 0 14px 34px rgba(51, 38, 21, 0.08);
    cursor: pointer;
    touch-action: none;
    transition: border-color 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.builder-canvas-block:hover {
    border-color: rgba(139, 63, 51, 0.38);
}

.builder-canvas-block.is-active {
    border-color: rgba(139, 63, 51, 0.78);
    box-shadow: 0 0 0 4px rgba(139, 63, 51, 0.12), 0 18px 42px rgba(51, 38, 21, 0.11);
}

.builder-canvas-block.is-dragging {
    opacity: 0.54;
}

.builder-canvas-block.is-resizing {
    cursor: nwse-resize;
}

.builder-canvas-block.tone-accent {
    background:
        linear-gradient(135deg, rgba(139, 63, 51, 0.1), rgba(255, 250, 241, 0.96));
}

.builder-canvas-block.tone-muted {
    background:
        linear-gradient(135deg, rgba(248, 240, 227, 0.98), rgba(235, 225, 210, 0.82));
}

.builder-canvas-block.tone-quiet {
    box-shadow: none;
}

.builder-block-handle {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(188, 169, 141, 0.72);
    border-radius: 12px;
    background: rgba(255, 250, 241, 0.78);
    color: var(--book-muted);
    font-weight: 950;
    cursor: grab;
}

.builder-block-handle:active {
    cursor: grabbing;
}

.builder-block-preview {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.builder-block-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.builder-block-meta span,
.builder-block-meta small {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(32, 29, 24, 0.06);
    color: var(--book-muted);
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.builder-inline {
    min-width: 0;
    border-radius: 8px;
    outline: none;
    padding: 2px 4px;
}

.builder-inline:hover {
    background: rgba(255, 250, 241, 0.7);
}

.builder-inline:focus {
    background: rgba(255, 250, 241, 0.96);
    box-shadow: 0 0 0 3px rgba(95, 111, 80, 0.16);
}

.builder-inline:empty::before {
    content: attr(data-placeholder);
    color: var(--book-muted);
}

.builder-block-body {
    margin-bottom: 0;
    color: var(--book-ink-2);
}

.builder-block-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

.builder-block-buttons span {
    padding: 7px 10px;
    border: 1px solid rgba(188, 169, 141, 0.7);
    border-radius: 999px;
    color: var(--book-accent);
    font-size: 0.8rem;
    font-weight: 950;
}

.builder-block-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.builder-block-actions .button {
    padding: 8px 10px;
    font-size: 0.76rem;
}

.builder-resize-handle {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 2;
    width: 18px;
    height: 18px;
    border-right: 3px solid rgba(139, 63, 51, 0.58);
    border-bottom: 3px solid rgba(139, 63, 51, 0.58);
    border-radius: 3px;
    cursor: nwse-resize;
}

.builder-resize-handle::before {
    content: "";
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 7px;
    height: 7px;
    border-right: 2px solid rgba(139, 63, 51, 0.35);
    border-bottom: 2px solid rgba(139, 63, 51, 0.35);
}

.builder-inspector-form {
    grid-template-columns: 1fr;
    margin-top: 16px;
}

.builder-inspector-form input,
.builder-inspector-form select,
.builder-inspector-form textarea {
    width: 100%;
}

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

.builder-size-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.builder-size-presets button {
    padding: 8px 10px;
    border: 1px solid rgba(188, 169, 141, 0.74);
    border-radius: 999px;
    background: rgba(255, 250, 241, 0.66);
    color: var(--book-ink-2);
    font-size: 0.78rem;
    font-weight: 950;
    cursor: pointer;
}

.builder-size-presets button:hover {
    border-color: rgba(95, 111, 80, 0.66);
    background: rgba(95, 111, 80, 0.1);
}

.builder-inspector-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.builder-inspector-actions .button {
    width: 100%;
}

.builder-studio {
    grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
}

.builder-canvas-panel {
    overflow: visible;
}

.builder-sidebar-toggle,
.builder-sidebar-close {
    display: none;
}

body.is-builder-shell {
    min-width: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 14% 14%, rgba(139, 63, 51, 0.14), transparent 30%),
        linear-gradient(135deg, #f5efe4 0%, #e8ddce 48%, #d7c8b7 100%);
}

body.is-builder-shell::before,
body.is-builder-shell > .site-header,
body.is-builder-shell > .site-footer,
body.is-builder-shell main > .shell:first-child {
    display: none;
}

body.is-builder-shell main {
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
}

body.is-builder-shell .builder-workspace-section {
    min-height: 100vh;
    padding: 0;
}

body.is-builder-shell .builder-workspace-section .shell {
    width: 100%;
    max-width: none;
}

body.is-builder-shell .builder-studio {
    display: block;
    min-height: 100vh;
}

body.is-builder-shell .builder-canvas-panel {
    height: 100vh;
    min-height: 100vh;
    padding: 18px 24px 24px;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background:
        linear-gradient(90deg, rgba(32, 29, 24, 0.08), transparent 180px),
        rgba(245, 239, 228, 0.72);
    box-shadow: none;
}

body.is-builder-shell .builder-canvas-toolbar {
    position: relative;
    z-index: 6;
    min-height: 82px;
    margin: 0 0 14px;
    padding: 14px 16px;
    border: 1px solid rgba(188, 169, 141, 0.58);
    border-radius: 18px;
    background: rgba(255, 250, 241, 0.86);
    box-shadow: 0 14px 40px rgba(51, 38, 21, 0.1);
    backdrop-filter: blur(14px);
}

body.is-builder-shell .builder-canvas-toolbar .muted {
    max-width: 860px;
    margin: 4px 0 0;
    font-size: 0.9rem;
}

body.is-builder-shell .builder-exit-button {
    border-color: rgba(139, 63, 51, 0.42);
    color: var(--book-accent);
}

body.is-builder-shell .builder-preview-stage {
    --builder-preview-width: 1280px;
    height: calc(100vh - 138px);
    min-height: 0;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(32, 29, 24, 0.08), transparent 26%),
        rgba(232, 221, 206, 0.82);
}

body.is-builder-shell .builder-studio-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 90;
    width: min(370px, calc(100vw - 28px));
    height: 100vh;
    max-height: none;
    padding: 22px 18px 28px;
    overflow: auto;
    border-radius: 0 28px 28px 0;
    opacity: 0;
    pointer-events: none;
    transform: translateX(calc(-100% - 22px));
    transition: transform 220ms ease, opacity 180ms ease;
}

body.is-builder-shell .builder-studio-sidebar.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

body.is-builder-shell .builder-sidebar-toggle {
    position: fixed;
    left: 0;
    top: 50%;
    z-index: 85;
    width: 100px;
    height: 250px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(32, 29, 24, 0.16);
    border-left: 0;
    border-radius: 0 46px 46px 0;
    background:
        linear-gradient(145deg, rgba(255, 250, 241, 0.96), rgba(232, 221, 206, 0.9));
    clip-path: polygon(0 0, 100% 12%, 100% 88%, 0 100%);
    color: var(--book-ink);
    cursor: pointer;
    font-family: "Cinzel", serif;
    font-size: 3.8rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 20px 55px rgba(51, 38, 21, 0.18);
    transform: translateY(-50%);
    transition: transform 220ms ease, opacity 180ms ease, box-shadow 160ms ease;
}

body.is-builder-shell .builder-sidebar-toggle:hover {
    box-shadow: 0 24px 66px rgba(51, 38, 21, 0.24);
    transform: translateY(-50%) translateX(4px);
}

body.is-builder-shell .builder-sidebar-toggle.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-116%, -50%);
}

body.is-builder-shell .builder-sidebar-toggle span {
    transform: translateX(7px);
}

body.is-builder-shell .builder-sidebar-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(188, 169, 141, 0.72);
    border-radius: 50%;
    background: rgba(255, 250, 241, 0.86);
    color: var(--book-ink);
    cursor: pointer;
    font-size: 1.35rem;
    line-height: 1;
}

body.is-builder-shell .builder-studio-title {
    padding-right: 46px;
}

body.is-builder-shell .builder-inspector-panel.is-drawer {
    top: 18px;
    right: 18px;
    max-height: calc(100vh - 36px);
}

@media (max-width: 760px) {
    body.is-builder-shell .builder-canvas-panel {
        padding: 12px 12px 18px;
    }

    body.is-builder-shell .builder-canvas-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    body.is-builder-shell .builder-preview-stage {
        height: calc(100vh - 210px);
    }

    body.is-builder-shell .builder-sidebar-toggle {
        width: 74px;
        height: 190px;
        font-size: 3rem;
    }
}

.builder-preview-stage {
    --builder-preview-width: 1180px;
    --builder-preview-height: 920px;
    position: relative;
    width: 100%;
    min-height: 620px;
    height: min(78vh, 880px);
    overflow: auto;
    border: 1px solid rgba(188, 169, 141, 0.86);
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(32, 29, 24, 0.06), transparent 22%),
        rgba(244, 239, 231, 0.78);
    box-shadow: inset 0 0 0 1px rgba(255, 250, 241, 0.82);
    isolation: isolate;
}

.builder-preview-stage.is-drop-target {
    border-color: rgba(95, 111, 80, 0.9);
    box-shadow: inset 0 0 0 3px rgba(95, 111, 80, 0.16);
}

.builder-preview-frame,
.builder-live-overlay {
    position: absolute;
    inset: 0 auto auto 0;
    width: var(--builder-preview-width);
    min-width: var(--builder-preview-width);
    min-height: var(--builder-preview-height);
}

.builder-preview-frame {
    z-index: 1;
    height: var(--builder-preview-height);
    border: 0;
    background: var(--book-bg);
    pointer-events: none;
}

.builder-live-overlay {
    z-index: 2;
    pointer-events: auto;
}

.builder-live-overlay .builder-canvas-block {
    position: absolute;
    z-index: 1;
    display: block;
    padding: 0;
    border: 2px solid rgba(126, 196, 255, 0.24);
    border-radius: 14px;
    background: rgba(126, 196, 255, 0.035);
    box-shadow: none;
    cursor: move;
    touch-action: none;
    transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.builder-live-overlay .builder-canvas-block:hover {
    border-color: rgba(126, 196, 255, 0.76);
    background: rgba(126, 196, 255, 0.075);
}

.builder-live-overlay .builder-canvas-block.is-active {
    z-index: 3;
    border-color: rgba(255, 94, 58, 0.9);
    background: rgba(255, 94, 58, 0.055);
    box-shadow: 0 0 0 4px rgba(255, 94, 58, 0.14), 0 16px 36px rgba(32, 29, 24, 0.14);
}

.builder-live-overlay .builder-canvas-block.is-dragging,
.builder-live-overlay .builder-canvas-block.is-resizing {
    opacity: 0.7;
}

.builder-live-overlay .builder-canvas-block.tone-accent,
.builder-live-overlay .builder-canvas-block.tone-muted,
.builder-live-overlay .builder-canvas-block.tone-quiet {
    background: rgba(126, 196, 255, 0.035);
}

.builder-live-overlay .builder-block-handle {
    position: absolute;
    left: 8px;
    top: -38px;
    z-index: 4;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(32, 29, 24, 0.92);
    color: var(--book-surface);
    box-shadow: 0 8px 22px rgba(32, 29, 24, 0.18);
}

.builder-live-label {
    position: absolute;
    left: 46px;
    top: -38px;
    z-index: 4;
    max-width: min(520px, calc(100% - 220px));
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 7px 10px;
    border: 1px solid rgba(32, 29, 24, 0.18);
    border-radius: 999px;
    background: rgba(255, 250, 241, 0.96);
    box-shadow: 0 8px 22px rgba(32, 29, 24, 0.12);
    color: var(--book-ink);
    line-height: 1.2;
}

.builder-live-label strong {
    max-width: 220px;
    overflow: hidden;
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.builder-live-label small {
    color: var(--book-muted);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.builder-live-overlay .builder-block-actions {
    position: absolute;
    right: 8px;
    top: -38px;
    z-index: 4;
    flex-wrap: nowrap;
}

.builder-live-overlay .builder-block-actions .button {
    min-height: 32px;
    padding: 6px 9px;
    border-radius: 10px;
    font-size: 0.72rem;
    box-shadow: 0 8px 22px rgba(32, 29, 24, 0.12);
}

.builder-live-overlay .builder-resize-handle {
    right: -9px;
    bottom: -9px;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(32, 29, 24, 0.78);
    border-radius: 8px;
    background: rgba(255, 250, 241, 0.96);
    box-shadow: 0 8px 18px rgba(32, 29, 24, 0.16);
}

.builder-live-overlay .builder-resize-handle::before {
    right: 5px;
    bottom: 5px;
}

.builder-context-menu {
    position: absolute;
    z-index: 20;
    width: 250px;
    display: grid;
    gap: 7px;
    padding: 10px;
    border: 1px solid rgba(32, 29, 24, 0.16);
    border-radius: 14px;
    background: rgba(255, 250, 241, 0.98);
    box-shadow: 0 18px 48px rgba(32, 29, 24, 0.18);
}

.builder-context-menu[hidden] {
    display: none;
}

.builder-context-menu strong {
    padding: 2px 4px 6px;
    font-size: 0.78rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.builder-context-menu button {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid rgba(188, 169, 141, 0.72);
    border-radius: 10px;
    background: rgba(248, 240, 227, 0.82);
    color: var(--book-ink);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 900;
    text-align: left;
    cursor: pointer;
}

.builder-context-menu button:hover {
    border-color: rgba(139, 63, 51, 0.52);
    background: rgba(139, 63, 51, 0.08);
}

.builder-context-divider {
    height: 1px;
    margin: 4px 0;
    background: rgba(188, 169, 141, 0.56);
}

.builder-context-builtin-list {
    display: grid;
    gap: 7px;
}

.builder-context-builtin-list small {
    color: var(--book-muted);
    font-size: 0.82rem;
}

.builder-inspector-panel.is-drawer {
    position: fixed;
    top: 84px;
    right: 18px;
    z-index: 80;
    width: min(390px, calc(100vw - 36px));
    max-height: calc(100vh - 108px);
    padding: 18px;
    overflow: auto;
    opacity: 0;
    pointer-events: none;
    transform: translateX(calc(100% + 28px));
    transition: transform 180ms ease, opacity 180ms ease;
}

.builder-inspector-panel.is-drawer.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.builder-inspector-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(188, 169, 141, 0.72);
    border-radius: 50%;
    background: rgba(255, 250, 241, 0.82);
    color: var(--book-ink);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.builder-inspector-close:hover {
    border-color: rgba(139, 63, 51, 0.52);
    color: var(--book-accent);
}

body.is-builder-preview {
    min-width: 1180px;
    background: var(--book-bg);
}

body.is-builder-preview::before,
.is-builder-preview .message-stack {
    display: none;
}

.is-builder-preview main {
    min-height: 0;
}

.is-builder-preview .managed-page-canvas {
    width: min(1180px, calc(100% - 48px));
}

.is-builder-preview .managed-page-canvas-item {
    max-width: none;
}

.parallax-editor-stage {
    position: relative;
    min-height: 340px;
    overflow: hidden;
    border: 1px solid var(--book-line);
    border-radius: var(--book-radius);
    background: var(--book-surface-2);
}

.parallax-editor-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    text-align: center;
}

.builder-parallax-note {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid var(--book-line);
    border-radius: var(--book-radius-sm);
    background: rgba(255, 250, 241, 0.7);
}

.parallax-editor-thumb {
    width: 88px;
    height: 60px;
    overflow: hidden;
    border: 1px solid var(--book-line);
    border-radius: var(--book-radius-sm);
}

.parallax-editor-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-actions-panel {
    margin-top: 18px;
}

.author-actions-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.author-action {
    display: grid;
    gap: 8px;
    color: var(--book-ink);
    text-decoration: none;
}

.author-action span {
    font-weight: 950;
}

.cart-row,
.order-row,
.fulfillment-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
}

.cart-row + .cart-row,
.order-row + .order-row {
    padding-top: 16px;
    border-top: 1px solid var(--book-line);
}

.sbp-box,
.external-link-card,
.payment-method-card {
    padding: 16px;
    border: 1px solid var(--book-line);
    border-radius: var(--book-radius);
    background: rgba(255, 250, 241, 0.78);
}

.article-body {
    max-width: 780px;
    color: var(--book-ink-2);
}

.article-body h2,
.article-body h3 {
    margin: 2rem 0 0.8rem;
}

.article-body p {
    margin-bottom: 1.15rem;
}

.article-body img {
    border-radius: var(--book-radius);
    box-shadow: var(--book-shadow-sm);
}

.managed-custom .managed-panel {
    border-style: dashed;
}

.managed-panel-muted {
    background: rgba(248, 240, 227, 0.78);
}

.managed-panel-accent {
    border-color: rgba(139, 63, 51, 0.28);
    background: rgba(139, 63, 51, 0.07);
}

.managed-panel-quiet {
    box-shadow: none;
}

.managed-custom-media {
    margin-top: 18px;
    overflow: hidden;
    border-radius: var(--book-radius);
}

.managed-custom-media img {
    width: 100%;
    max-height: 460px;
    object-fit: cover;
}

.managed-section-shell {
    width: min(var(--section-max-width, var(--managed-section-width, var(--book-container))), calc(100% - 48px));
    min-height: var(--section-min-height, var(--managed-section-min-height, auto));
}

.managed-page-canvas-shell {
    padding: 36px 0 52px;
}

.managed-page-canvas {
    position: relative;
    width: min(1180px, calc(100% - 48px));
    min-height: var(--managed-page-height, 720px);
    margin-inline: auto;
}

.managed-page-canvas-item {
    position: absolute;
    left: var(--section-x, 0);
    top: var(--section-y, 0);
    width: min(var(--section-max-width, 680px), 100%);
    min-height: var(--section-min-height, auto);
}

.managed-page-canvas-item > .section,
.managed-page-canvas-item > .hero {
    padding: 0;
}

.managed-page-canvas-item .shell,
.managed-page-canvas-item .narrow-shell,
.managed-page-canvas-item .managed-section-shell {
    width: 100%;
}

.stat-card {
    display: grid;
    gap: 8px;
}

.stat-card strong {
    color: var(--book-accent);
    font-family: "Cinzel", serif;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1;
}

.stat-card span {
    color: var(--book-muted);
    font-weight: 900;
}

.library-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.profile-avatar,
.avatar {
    width: 88px;
    height: 88px;
    overflow: hidden;
    border: 1px solid var(--book-line);
    border-radius: 50%;
    background: var(--book-surface-2);
}

.profile-avatar img,
.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.site-footer {
    margin-top: 36px;
    border-top: 1px solid var(--book-line);
    background: rgba(235, 225, 210, 0.68);
}

.footer-visual-shell {
    display: none;
}

.footer-signature-row {
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-signature {
    margin: 0;
    color: var(--book-muted);
    font-size: 0.84rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

@media (max-width: 1260px) {
    .builder-studio {
        grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    }

    .builder-inspector-panel {
        grid-column: 1 / -1;
        position: static;
        max-height: none;
    }
}

@media (max-width: 1040px) {
    .hero-grid,
    .product-detail-grid,
    .checkout-grid,
    .detail-grid,
    .payment-grid,
    .profile-grid,
    .account-layout {
        grid-template-columns: 1fr;
    }

    .hero-side {
        max-width: 560px;
    }

    .summary-card,
    .form-card {
        position: static;
    }

    .filter-bar {
        grid-template-columns: 1fr 1fr;
    }

    .builder-studio {
        grid-template-columns: 1fr;
    }

    .builder-studio-sidebar,
    .builder-inspector-panel {
        position: static;
        max-height: none;
    }
}

@media (max-width: 820px) {
    .header-inner {
        min-height: auto;
        align-items: flex-start;
        flex-direction: column;
        padding: 14px 0;
    }

    .main-nav {
        justify-content: flex-start;
    }

    .product-grid,
    .spotlight-grid {
        grid-template-columns: 1fr;
    }

    .builder-canvas-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .builder-toolbar-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .shell,
    .narrow-shell,
    .managed-section-shell {
        width: min(100% - 30px, var(--book-container));
    }

    .managed-page-canvas {
        width: min(100% - 30px, var(--book-container));
        overflow-x: auto;
    }

    .managed-page-canvas-item .shell,
    .managed-page-canvas-item .narrow-shell,
    .managed-page-canvas-item .managed-section-shell {
        width: 100%;
    }

    .section {
        padding: 36px 0;
    }

    .hero {
        padding-top: 38px;
    }

    .section-heading,
    .panel-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    h1 {
        font-size: clamp(2rem, 10vw, 3.1rem);
    }

    .hero-art {
        height: 310px;
    }

    .filter-bar,
    .form-grid,
    .builder-field-grid,
    .builder-section-form,
    .builder-size-grid,
    .builder-canvas-block,
    .cart-row,
    .order-row,
    .fulfillment-row {
        grid-template-columns: 1fr;
    }

    .builder-workspace-section .shell {
        width: min(100% - 22px, var(--book-container));
    }

    .builder-studio-sidebar,
    .builder-canvas-panel,
    .builder-inspector-panel {
        padding: 14px;
        border-radius: 14px;
    }

    .builder-canvas {
        min-height: 420px;
        padding: 12px;
    }

    .builder-canvas-block {
        gap: 10px;
        padding: 14px;
    }

    .builder-block-actions {
        justify-content: stretch;
    }

    .builder-block-actions .button {
        width: 100%;
    }

    .filter-bar .button {
        width: 100%;
    }

    .spotlight-card,
    .product-card-immersive {
        grid-template-columns: 104px minmax(0, 1fr);
        gap: 15px;
        padding: 15px;
    }

    .card-cover,
    .product-cover {
        width: 104px;
        flex-basis: 104px;
    }

    .product-footer,
    .builder-row-actions,
    .builder-inline-inputs {
        align-items: stretch;
        flex-direction: column;
    }

    .main-nav a {
        font-size: 0.8rem;
    }
}

@media (max-width: 430px) {
    .spotlight-card,
    .product-card-immersive {
        grid-template-columns: 1fr;
    }

    .card-cover,
    .product-cover {
        width: min(170px, 100%);
        justify-self: start;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}

.builder-inspector-panel.is-drawer {
    position: fixed;
    top: 84px;
    right: 18px;
    max-height: calc(100vh - 108px);
}

.builder-canvas-panel {
    overflow: visible;
}
