:root {
    --sand: #efe4d8;
    --sand-light: #f8f3ed;
    --ivory: #fcfaf7;
    --white: #fffdfa;
    --plum: #654158;
    --plum-dark: #452c3c;
    --plum-ink: #35232f;
    --rose: #d9aaa9;
    --rose-soft: #ead3cf;
    --clay: #bd856d;
    --ink: #302827;
    --muted: #756965;
    --line: rgba(69, 44, 60, .15);
    --line-strong: rgba(69, 44, 60, .24);
    --success: #247253;
    --success-bg: #edf8f1;
    --danger: #a43d3d;
    --danger-bg: #fff1ef;
    --warning: #9a651c;
    --shadow: 0 22px 60px rgba(61, 42, 48, .10);
    --shadow-soft: 0 12px 32px rgba(61, 42, 48, .07);
    --radius-xl: 30px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --font-sans: "DM Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-serif: "Newsreader", Georgia, serif;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 4%, rgba(217, 170, 169, .16), transparent 28%),
        linear-gradient(180deg, var(--sand-light), var(--ivory));
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .20;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
}
button, input, select, textarea { font: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button { color: inherit; }

/* Shared brand */
.brand-lockup { display: flex; align-items: center; gap: 13px; }
.brand-mark {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 15px;
    color: var(--white);
    background: linear-gradient(145deg, var(--plum), var(--plum-dark));
    box-shadow: 0 10px 24px rgba(69, 44, 60, .22);
    font-size: 14px;
    font-weight: 750;
    letter-spacing: -.05em;
}
.brand-name {
    font-family: var(--font-serif);
    font-size: 21px;
    line-height: 1;
    letter-spacing: -.02em;
}
.brand-kicker {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 650;
    letter-spacing: .15em;
    text-transform: uppercase;
}

/* Login */
.auth-page {
    min-height: 100vh;
    padding: 28px;
    display: grid;
    place-items: center;
}
.auth-shell {
    width: min(1120px, 100%);
    min-height: min(720px, calc(100vh - 56px));
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    overflow: hidden;
    border: 1px solid rgba(69, 44, 60, .11);
    border-radius: 34px;
    background: rgba(255, 253, 250, .84);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}
.auth-story {
    position: relative;
    min-height: 100%;
    padding: 54px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    color: white;
    background:
        radial-gradient(circle at 78% 18%, rgba(245, 219, 202, .46), transparent 25%),
        radial-gradient(circle at 12% 86%, rgba(217, 170, 169, .36), transparent 34%),
        linear-gradient(145deg, #76546b 0%, var(--plum) 48%, var(--plum-dark) 100%);
}
.auth-story::before,
.auth-story::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 50%;
}
.auth-story::before { width: 430px; height: 430px; right: -170px; top: 80px; }
.auth-story::after { width: 260px; height: 260px; left: -110px; bottom: 30px; }
.auth-story .brand-lockup { position: relative; z-index: 1; }
.auth-story .brand-mark { color: var(--plum-dark); background: rgba(255, 253, 250, .94); box-shadow: none; }
.auth-story .brand-name { color: white; }
.auth-story .brand-kicker { color: rgba(255,255,255,.62); }
.auth-quote { position: relative; z-index: 1; max-width: 520px; }
.auth-quote span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    color: rgba(255,255,255,.68);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.auth-quote span::before { content: ""; width: 30px; height: 1px; background: currentColor; }
.auth-quote blockquote {
    margin: 0;
    font-family: var(--font-serif);
    font-size: clamp(38px, 4.5vw, 66px);
    font-weight: 300;
    line-height: .98;
    letter-spacing: -.04em;
}
.auth-quote p { max-width: 430px; margin: 24px 0 0; color: rgba(255,255,255,.70); line-height: 1.7; }
.auth-story-footer { position: relative; z-index: 1; color: rgba(255,255,255,.48); font-size: 12px; }
.auth-panel { padding: 54px; display: grid; align-content: center; background: rgba(255,253,250,.76); }
.auth-card { width: min(100%, 430px); margin: 0 auto; }
.auth-card .eyebrow { margin-bottom: 14px; }
.auth-card h1 {
    margin: 0;
    font-family: var(--font-serif);
    font-size: clamp(42px, 5vw, 60px);
    font-weight: 400;
    line-height: .98;
    letter-spacing: -.04em;
}
.auth-card > p { margin: 18px 0 0; color: var(--muted); line-height: 1.65; }
.form-stack { display: grid; gap: 18px; margin-top: 30px; }

/* App shell */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 286px minmax(0, 1fr); }
.sidebar {
    position: sticky;
    top: 0;
    z-index: 35;
    height: 100vh;
    padding: 28px 20px;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 15% 10%, rgba(217,170,169,.18), transparent 28%),
        linear-gradient(180deg, #513548, var(--plum-dark));
}
.sidebar::after {
    content: "";
    position: absolute;
    width: 290px;
    height: 290px;
    right: -190px;
    bottom: 10%;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 50%;
}
.sidebar .brand-lockup { position: relative; z-index: 1; margin: 0 8px 42px; }
.sidebar .brand-mark { color: var(--plum-dark); background: var(--white); box-shadow: none; }
.sidebar .brand-name { color: white; font-size: 20px; }
.sidebar .brand-kicker { color: rgba(255,255,255,.48); }
.nav { position: relative; z-index: 1; display: grid; gap: 8px; }
.nav a {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    min-height: 56px;
    padding: 7px 12px;
    border: 1px solid transparent;
    border-radius: 16px;
    color: rgba(255,255,255,.66);
    text-decoration: none;
    transition: .22s ease;
}
.nav a:hover { color: white; background: rgba(255,255,255,.06); }
.nav a.active { color: var(--plum-dark); background: var(--white); box-shadow: 0 14px 36px rgba(29,17,25,.18); }
.nav-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: rgba(255,255,255,.08);
    font-size: 17px;
}
.nav a.active .nav-icon { background: var(--rose-soft); color: var(--plum); }
.nav-copy { min-width: 0; display: grid; gap: 2px; }
.nav-copy strong { font-size: 13px; font-weight: 650; }
.nav-copy small { color: inherit; opacity: .64; font-size: 10px; }
.sidebar-version { position: absolute; z-index: 1; left: 28px; bottom: 24px; color: rgba(255,255,255,.30); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.main-area { min-width: 0; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 25;
    min-height: 82px;
    padding: 0 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: rgba(248,243,237,.82);
    border-bottom: 1px solid rgba(69,44,60,.10);
    backdrop-filter: blur(18px);
}
.topbar-title { display: grid; gap: 2px; }
.topbar-title strong { font-family: var(--font-serif); font-size: 19px; font-weight: 400; }
.topbar-title span { color: var(--muted); font-size: 11px; }
.user-menu { display: flex; align-items: center; gap: 11px; }
.user-avatar {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    background: linear-gradient(145deg, var(--rose), var(--plum));
    border: 3px solid rgba(255,255,255,.74);
    box-shadow: 0 6px 18px rgba(69,44,60,.15);
    font-size: 13px;
    font-weight: 750;
}
.user-identity { display: grid; gap: 2px; }
.user-identity strong { font-size: 13px; }
.user-identity span { max-width: 190px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.logout-button { padding: 9px 11px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; transition: .2s ease; }
.logout-button:hover { color: var(--plum); background: rgba(101,65,88,.07); }
.sidebar-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 13px; background: var(--white); cursor: pointer; }
.page { width: min(1450px, 100%); margin: 0 auto; padding: 46px 42px 110px; }

/* Type */
.page-header,
.builder-header { margin-bottom: 30px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 26px; }
.page-header > div:first-child { max-width: 820px; }
.page-header h1,
.builder-header h1 {
    margin: 0;
    font-family: var(--font-serif);
    font-size: clamp(43px, 5.4vw, 72px);
    font-weight: 400;
    line-height: .96;
    letter-spacing: -.045em;
}
.page-header p,
.builder-header p { margin: 15px 0 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 11px;
    color: var(--plum);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; }
.back-link, .text-link { color: var(--plum); text-decoration: none; font-size: 13px; font-weight: 650; }
.back-link { display: inline-flex; margin-bottom: 18px; }
.back-link:hover, .text-link:hover { color: var(--plum-dark); }
.status-pill {
    flex: 0 0 auto;
    padding: 9px 13px;
    border: 1px solid rgba(36,114,83,.13);
    border-radius: 999px;
    color: var(--success);
    background: var(--success-bg);
    font-size: 11px;
    font-weight: 700;
}

/* Buttons */
.primary-button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, opacity .2s ease;
}
.primary-button { width: 100%; color: white; background: var(--plum); box-shadow: 0 12px 28px rgba(69,44,60,.17); }
.button.primary-button { width: auto; }
.primary-button:hover, .button:hover { transform: translateY(-2px); }
.primary-button:hover { background: var(--plum-dark); box-shadow: 0 16px 34px rgba(69,44,60,.22); }
.button:disabled, .primary-button:disabled { opacity: .62; cursor: wait; transform: none; }
.secondary-button { color: var(--plum); background: rgba(255,253,250,.76); border-color: var(--line-strong); }
.secondary-button:hover { background: var(--white); border-color: var(--plum); }
.danger-button { color: var(--danger); background: var(--white); border-color: rgba(164,61,61,.25); }
.danger-button:hover { background: var(--danger-bg); }
.full-button { width: 100%; }
.compact-button { min-height: 40px; padding: 0 15px; }
.header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Forms */
.field { display: grid; gap: 8px; }
.field label { color: var(--plum-ink); font-size: 12px; font-weight: 700; }
.field input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255,253,250,.92);
    color: var(--ink);
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.field input { height: 52px; padding: 0 15px; }
select { height: 52px; padding: 0 42px 0 15px; }
textarea { padding: 14px 15px; resize: vertical; line-height: 1.65; }
.field input:focus, select:focus, textarea:focus {
    border-color: var(--plum);
    background: white;
    box-shadow: 0 0 0 4px rgba(101,65,88,.09);
}
.field small { color: var(--muted); }
.field-error { color: var(--danger) !important; font-size: 11px; line-height: 1.4; }
.optional { color: #9b8f8a; font-size: 10px; font-weight: 500; }
.form-grid { display: grid; gap: 18px; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.full-width { grid-column: 1 / -1; }
.input-prefix, .input-suffix {
    display: flex;
    align-items: center;
    min-height: 52px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255,253,250,.92);
}
.input-prefix:focus-within, .input-suffix:focus-within { border-color: var(--plum); box-shadow: 0 0 0 4px rgba(101,65,88,.09); }
.input-prefix span, .input-suffix span { padding-left: 14px; color: #9b8f8a; }
.input-prefix input, .input-suffix input { height: 50px; border: 0; box-shadow: none !important; background: transparent; }
.input-suffix span { padding: 0 14px 0 0; }
.price-grid { display: grid; grid-template-columns: 96px 1fr; gap: 14px; transition: opacity .18s ease; }
.price-grid.is-muted { opacity: .42; }
.check-row { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; }
.check-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--plum); }
.check-row span { display: grid; gap: 3px; }
.check-row strong { font-size: 12px; }
.check-row small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.field-checkbox { align-self: end; padding-bottom: 9px; }

/* Alerts */
.alert { margin: 0 0 20px; padding: 14px 16px; border-radius: 15px; font-size: 13px; line-height: 1.5; transition: opacity .35s ease, transform .35s ease; }
.alert-error { color: var(--danger); background: var(--danger-bg); border: 1px solid rgba(164,61,61,.18); }
.alert-success { color: var(--success); background: var(--success-bg); border: 1px solid rgba(36,114,83,.16); }
.alert.is-hiding { opacity: 0; transform: translateY(-8px); }

/* Dashboard */
.dashboard-hero {
    position: relative;
    min-height: 270px;
    margin-bottom: 22px;
    padding: 36px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    overflow: hidden;
    color: white;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 82% 24%, rgba(244,214,196,.42), transparent 24%),
        linear-gradient(130deg, #745267, var(--plum-dark));
    box-shadow: var(--shadow);
}
.dashboard-hero::before,
.dashboard-hero::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; }
.dashboard-hero::before { width: 330px; height: 330px; right: -120px; top: -120px; }
.dashboard-hero::after { width: 170px; height: 170px; right: 180px; bottom: -110px; }
.dashboard-hero-copy { position: relative; z-index: 1; max-width: 730px; }
.dashboard-hero .eyebrow { color: var(--rose-soft); }
.dashboard-hero h1 { margin: 0; font-family: var(--font-serif); font-size: clamp(48px, 6vw, 82px); font-weight: 400; line-height: .95; letter-spacing: -.045em; }
.dashboard-hero p { max-width: 620px; margin: 17px 0 0; color: rgba(255,255,255,.68); line-height: 1.65; }
.dashboard-hero-actions { position: relative; z-index: 1; display: grid; gap: 9px; justify-items: end; }
.dashboard-hero-actions .button { color: var(--plum-dark); background: var(--white); }
.dashboard-hero-actions small { color: rgba(255,255,255,.48); font-size: 10px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card {
    padding: 25px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255,253,250,.84);
    box-shadow: var(--shadow-soft);
}
.card-label { color: var(--plum); font-size: 10px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.card-value { margin-top: 24px; font-family: var(--font-serif); font-size: 38px; line-height: 1; letter-spacing: -.035em; }
.card-note { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.foundation-card { grid-column: 1 / -1; padding: 30px; }
.foundation-card h2 { margin: 0; font-family: var(--font-serif); font-size: 34px; font-weight: 400; letter-spacing: -.03em; }
.foundation-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; }
.foundation-list li { position: relative; padding: 15px 16px 15px 42px; border-radius: 14px; background: rgba(239,228,216,.62); color: #5b4b49; font-size: 12px; }
.foundation-list li::before { content: "✓"; position: absolute; left: 16px; top: 14px; color: var(--plum); font-weight: 800; }

/* Products list */
.page-header-actions { align-items: flex-start; }
.toolbar-card { margin-bottom: 18px; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,253,250,.76); box-shadow: var(--shadow-soft); }
.filter-bar { display: flex; align-items: center; gap: 10px; }
.filter-bar select { width: 200px; height: 46px; background: var(--white); }
.search-field { position: relative; flex: 1; }
.search-field span { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #9b8f8a; font-size: 20px; }
.search-field input { width: 100%; height: 46px; padding: 0 15px 0 44px; border: 0; border-radius: 13px; background: rgba(239,228,216,.48); outline: none; }
.search-field input:focus { box-shadow: 0 0 0 3px rgba(101,65,88,.09); }
.product-list { display: grid; gap: 13px; }
.product-row {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 22px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255,253,250,.90);
    box-shadow: var(--shadow-soft);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.product-row:hover { transform: translateY(-3px); border-color: rgba(101,65,88,.25); box-shadow: var(--shadow); }
.product-cover {
    position: relative;
    display: grid;
    place-items: center;
    width: 104px;
    height: 84px;
    overflow: hidden;
    border-radius: 17px;
    text-decoration: none;
    background:
        radial-gradient(circle at 70% 20%, rgba(255,255,255,.48), transparent 24%),
        linear-gradient(145deg, var(--rose), var(--plum));
}
.product-cover::after { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(255,255,255,.28); border-radius: 12px; }
.product-cover img { width: 100%; height: 100%; object-fit: cover; }
.product-cover span { position: relative; z-index: 1; color: white; font-family: var(--font-serif); font-size: 34px; }
.product-main { min-width: 0; }
.product-title { display: block; margin-top: 7px; overflow: hidden; color: var(--ink); font-family: var(--font-serif); font-size: 25px; line-height: 1.08; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.product-main p { margin: 7px 0 0; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.product-meta-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 10px; font-weight: 650; }
.status-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 999px; font-size: 10px; font-weight: 750; }
.status-draft { color: #78549d; background: #f3ecfa; }
.status-published { color: var(--success); background: var(--success-bg); }
.status-archived { color: #756965; background: #eeeae5; }
.product-stats { display: flex; align-items: center; gap: 27px; }
.product-stats > div { display: grid; gap: 3px; min-width: 90px; }
.product-stats strong { font-family: var(--font-serif); font-size: 18px; font-weight: 500; }
.product-stats span { color: var(--muted); font-size: 10px; }
.row-actions { display: flex; align-items: center; gap: 7px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 11px; border: 0; border-radius: 11px; background: transparent; color: var(--plum); text-decoration: none; font-size: 11px; font-weight: 700; cursor: pointer; }
.icon-button:hover { background: var(--sand-light); color: var(--plum-dark); }
.square-button { width: 38px; padding: 0; font-size: 16px; }
.danger-link { color: var(--danger); }
.empty-state {
    display: grid;
    justify-items: center;
    padding: 84px 24px;
    text-align: center;
    border: 1px dashed rgba(101,65,88,.28);
    border-radius: 26px;
    background: rgba(255,253,250,.70);
}
.empty-state h2, .builder-empty h3 { margin: 16px 0 6px; font-family: var(--font-serif); font-size: 34px; font-weight: 400; letter-spacing: -.03em; }
.empty-state p, .builder-empty p { max-width: 560px; margin: 0 0 24px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.empty-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 19px; color: var(--plum); background: var(--rose-soft); font-size: 27px; }

/* Product and block forms */
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 20px; padding-bottom: 96px; }
.form-panel {
    padding: 29px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255,253,250,.90);
    box-shadow: var(--shadow-soft);
}
.form-sidebar { position: sticky; top: 104px; display: grid; gap: 16px; }
.compact-panel { padding: 23px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 25px; }
.section-heading h2 { margin: 0; font-family: var(--font-serif); font-size: 30px; font-weight: 400; letter-spacing: -.03em; }
.sticky-actions {
    position: fixed;
    z-index: 24;
    right: 0;
    bottom: 0;
    left: 286px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 42px;
    border-top: 1px solid var(--line);
    background: rgba(252,250,247,.88);
    backdrop-filter: blur(18px);
}
.dynamic-block-fields { margin-top: 25px; padding-top: 25px; border-top: 1px solid var(--line); }
.block-field-group[hidden], [data-unlock-fields][hidden] { display: none !important; }
.block-help {
    margin: 0 0 22px;
    padding: 14px 16px;
    border-radius: 15px;
    color: #675851;
    background: rgba(239,228,216,.62);
    font-size: 12px;
    line-height: 1.55;
}

/* Builder */
.builder-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 26px; }
.builder-header > div:first-child { max-width: 820px; }
.builder-header h1 { margin-top: 8px; }
.builder-meta { margin-top: 2px; }
.builder-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: start; gap: 20px; }
.builder-canvas { min-width: 0; padding: 28px; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,253,250,.88); box-shadow: var(--shadow-soft); }
.builder-sidebar { position: sticky; top: 104px; display: grid; gap: 16px; }
.builder-section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 23px; }
.builder-section-title h2 { margin: 0; font-family: var(--font-serif); font-size: 30px; font-weight: 400; letter-spacing: -.03em; }
.count-pill { padding: 8px 11px; border-radius: 999px; color: var(--plum); background: var(--rose-soft); font-size: 10px; font-weight: 700; }
.builder-empty { display: grid; justify-items: center; padding: 72px 20px; text-align: center; border: 1px dashed rgba(101,65,88,.25); border-radius: 19px; }
.block-stack { display: grid; gap: 11px; }
.block-card {
    display: grid;
    grid-template-columns: 36px 50px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255,255,255,.76);
    transition: .2s ease;
}
.block-card:hover { border-color: rgba(101,65,88,.25); background: white; transform: translateY(-1px); }
.block-position { color: #a19590; font-size: 11px; font-weight: 700; text-align: center; }
.block-icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px; color: var(--plum); background: var(--rose-soft); font-size: 17px; }
.block-info { min-width: 0; }
.block-info h3 { margin: 7px 0 4px; font-family: var(--font-serif); font-size: 20px; font-weight: 400; letter-spacing: -.015em; }
.block-unlock { color: var(--muted); font-size: 10px; }
.block-actions { display: flex; align-items: center; gap: 2px; }
.block-actions form { margin: 0; }
.summary-card { padding: 23px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,253,250,.90); box-shadow: var(--shadow-soft); }
.summary-list { display: grid; gap: 0; margin: 8px 0 0; }
.summary-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid rgba(69,44,60,.09); }
.summary-list > div:last-child { border-bottom: 0; }
.summary-list dt { color: var(--muted); font-size: 10px; }
.summary-list dd { margin: 0; font-size: 11px; font-weight: 700; text-align: right; }
.danger-zone { display: grid; gap: 9px; }
.danger-zone form { margin: 0; }

@media (max-width: 1180px) {
    .product-row { grid-template-columns: 86px minmax(0, 1fr) auto; }
    .product-cover { width: 86px; }
    .product-stats { display: none; }
    .form-layout, .builder-layout { grid-template-columns: minmax(0, 1fr) 290px; }
}

@media (max-width: 940px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-story { min-height: 360px; padding: 38px; }
    .auth-quote blockquote { font-size: 48px; }
    .auth-panel { padding: 42px 30px; }

    .app-shell { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: min(310px, 86vw);
        height: 100vh;
        transform: translateX(-105%);
        transition: transform .25s ease;
        box-shadow: 22px 0 60px rgba(40,24,34,.22);
    }
    body.nav-open .sidebar { transform: translateX(0); }
    body.nav-open::after { content: ""; position: fixed; inset: 0; z-index: 30; background: rgba(45,32,39,.42); backdrop-filter: blur(2px); }
    .sidebar-toggle { display: grid; place-items: center; position: relative; z-index: 31; }
    .topbar { padding: 0 20px; }
    .page { padding: 34px 20px 100px; }
    .sticky-actions { left: 0; padding: 12px 20px; }
    .form-layout, .builder-layout { grid-template-columns: 1fr; }
    .form-sidebar, .builder-sidebar { position: static; }
    .builder-header { flex-direction: column; }
    .sidebar-version { display: none; }
}

@media (max-width: 720px) {
    .auth-page { padding: 0; }
    .auth-shell { min-height: 100vh; border: 0; border-radius: 0; }
    .auth-story { min-height: 300px; padding: 28px 24px; }
    .auth-story-footer { display: none; }
    .auth-quote blockquote { font-size: 42px; }
    .auth-quote p { display: none; }
    .auth-panel { padding: 38px 22px 48px; }

    .topbar-title span, .user-identity { display: none; }
    .logout-button { padding-inline: 7px; }
    .page-header { align-items: flex-start; flex-direction: column; }
    .dashboard-hero { min-height: 390px; padding: 28px; align-items: flex-start; flex-direction: column; }
    .dashboard-hero-actions { justify-items: start; }
    .grid { grid-template-columns: 1fr; }
    .foundation-list { grid-template-columns: 1fr; }
    .filter-bar { align-items: stretch; flex-direction: column; }
    .filter-bar select { width: 100%; }
    .product-row { grid-template-columns: 64px minmax(0, 1fr); gap: 13px; }
    .product-cover { width: 64px; height: 64px; border-radius: 14px; }
    .product-title { font-size: 21px; }
    .row-actions { grid-column: 1 / -1; justify-content: flex-end; padding-top: 10px; border-top: 1px solid rgba(69,44,60,.09); }
    .two-columns { grid-template-columns: 1fr; }
    .full-width { grid-column: auto; }
    .form-panel { padding: 22px; }
    .block-card { grid-template-columns: 30px 44px minmax(0, 1fr); }
    .block-icon { width: 44px; height: 44px; }
    .block-actions { grid-column: 1 / -1; justify-content: flex-end; padding-top: 10px; border-top: 1px solid rgba(69,44,60,.09); }
    .builder-canvas { padding: 19px; }
    .sticky-actions { justify-content: stretch; }
    .sticky-actions .button { flex: 1; }
}

@media (max-width: 480px) {
    .page-header h1, .builder-header h1 { font-size: 48px; }
    .header-actions { width: 100%; }
    .header-actions .button { flex: 1; }
    .user-menu { gap: 6px; }
    .topbar-title strong { font-size: 16px; }
}
