:root {
    color-scheme: light;
    --cw-bg: #f4f1ea;
    --cw-bg-deep: #e7e0d3;
    --cw-surface: rgba(255, 252, 246, 0.9);
    --cw-surface-strong: #fffdf8;
    --cw-surface-alt: #f1ebdf;
    --cw-line: rgba(68, 56, 42, 0.12);
    --cw-line-strong: rgba(68, 56, 42, 0.2);
    --cw-ink: #1f1a16;
    --cw-muted: #6f655b;
    --cw-muted-strong: #4d4339;
    --cw-accent: #2d5a4c;
    --cw-accent-strong: #21443a;
    --cw-accent-soft: #dbe8e1;
    --cw-highlight: #b9823c;
    --cw-highlight-soft: #f4e2c8;
    --cw-danger: #9f3e35;
    --cw-danger-soft: #f8dfdb;
    --cw-shadow: 0 18px 48px rgba(48, 38, 28, 0.1);
    --cw-shadow-soft: 0 10px 30px rgba(48, 38, 28, 0.08);
    --cw-radius-xl: 30px;
    --cw-radius-lg: 24px;
    --cw-radius-md: 18px;
    --cw-radius-sm: 12px;
    --cw-max: 1280px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--cw-ink);
    font-family: "Optima", "Avenir Next", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(185, 130, 60, 0.14), transparent 28%),
        radial-gradient(circle at top right, rgba(45, 90, 76, 0.12), transparent 24%),
        linear-gradient(180deg, #fbf8f1 0%, var(--cw-bg) 48%, var(--cw-bg-deep) 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 78%);
    opacity: 0.3;
}

a {
    color: inherit;
}

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

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

.cw-app-shell,
.cw-auth-shell {
    position: relative;
    z-index: 1;
}

.cw-page {
    width: min(calc(100% - 32px), var(--cw-max));
    margin: 0 auto;
    padding: 28px 0 48px;
}

.cw-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    width: min(calc(100% - 24px), calc(var(--cw-max) + 24px));
    margin: 14px auto 0;
    padding: 14px 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    background: rgba(255, 250, 242, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(82, 66, 49, 0.08);
    border-radius: 26px;
    box-shadow: var(--cw-shadow-soft);
}

.cw-topbar-home {
    grid-template-columns: auto minmax(360px, 1fr) auto;
}

.cw-topbar-left,
.cw-topbar-right,
.cw-topbar-center {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cw-topbar-right {
    justify-content: flex-end;
    position: relative;
    flex-wrap: nowrap;
}

.cw-topbar-center {
    min-width: 0;
}

.cw-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.cw-brand-mark {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(145deg, var(--cw-accent) 0%, #17342d 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.cw-brand-mark svg {
    width: 22px;
    height: 22px;
}

.cw-brand-copy {
    display: grid;
    gap: 2px;
}

.cw-brand-title {
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
    font-size: 1.55rem;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--cw-ink);
}

.cw-brand-subtitle {
    font-size: 0.72rem;
    line-height: 1;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--cw-muted);
}

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

.cw-topbar-search {
    flex: 1 1 520px;
    max-width: 620px;
    width: 100%;
}

.cw-search-shell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 8px 10px 8px 14px;
    border: 1px solid rgba(82, 66, 49, 0.08);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.cw-search-form {
    flex: 1;
    margin: 0;
}

.cw-search-field {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cw-search-field .cw-input {
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 0;
    min-height: auto;
}

.cw-search-field .cw-input:focus {
    outline: none;
    border: none;
}

.cw-search-submit {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
}

.cw-search-center {
    width: 100%;
}

.cw-search-close {
    display: none;
}

.cw-icon,
.cw-icon svg {
    width: 18px;
    height: 18px;
}

.cw-icon-btn,
.cw-icon-link,
.cw-search-submit,
.cw-chip,
.cw-tab,
.cw-pill-link,
.cw-mini-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 16px;
    text-decoration: none;
    transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.cw-icon-btn,
.cw-icon-link,
.cw-search-submit {
    border: 1px solid rgba(82, 66, 49, 0.08);
    background: rgba(255, 255, 255, 0.78);
    color: var(--cw-muted-strong);
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.cw-icon-btn,
.cw-icon-link {
    width: 48px;
    height: 48px;
}

.cw-icon-btn:hover,
.cw-icon-link:hover,
.cw-search-submit:hover,
.cw-chip:hover,
.cw-tab:hover,
.cw-pill-link:hover,
.cw-mini-icon:hover {
    transform: translateY(-1px);
}

.cw-icon-btn:hover,
.cw-icon-link:hover,
.cw-search-submit:hover {
    background: #fff;
    color: var(--cw-accent);
    border-color: rgba(45, 90, 76, 0.18);
}

.cw-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    padding: 10px;
    border: 1px solid rgba(82, 66, 49, 0.1);
    border-radius: 20px;
    background: rgba(255, 252, 246, 0.98);
    box-shadow: var(--cw-shadow);
    display: none;
}

.cw-menu.open {
    display: grid;
    gap: 6px;
}

.cw-menu a,
.cw-menu button {
    width: 100%;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--cw-ink);
    text-align: left;
    padding: 12px 14px;
    text-decoration: none;
    cursor: pointer;
}

.cw-menu a:hover,
.cw-menu button:hover {
    background: var(--cw-surface-alt);
}

.cw-title,
.cw-display,
.cw-section-title,
.cw-auth-title {
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
    letter-spacing: -0.04em;
    color: var(--cw-ink);
}

.cw-title {
    margin: 0;
    font-size: clamp(2.2rem, 4vw, 3.6rem);
    line-height: 0.96;
}

.cw-display {
    margin: 0;
    font-size: clamp(2.8rem, 5vw, 5rem);
    line-height: 0.92;
}

.cw-section-title {
    margin: 0;
    font-size: clamp(1.4rem, 2.2vw, 2rem);
    line-height: 1;
}

.cw-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(82, 66, 49, 0.08);
    color: var(--cw-muted-strong);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.cw-lead {
    margin: 0;
    color: var(--cw-muted-strong);
    font-size: 1.02rem;
    line-height: 1.65;
    max-width: 62ch;
}

.cw-card,
.cw-panel,
.cw-form-wrap,
.cw-auth-card,
.cw-hero,
.cw-shell-card,
.cw-cart-summary,
.cw-detail-grid,
.cw-editor-layout {
    border: 1px solid rgba(82, 66, 49, 0.08);
    border-radius: var(--cw-radius-xl);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 251, 244, 0.82) 100%);
    box-shadow: var(--cw-shadow);
}

.cw-panel,
.cw-shell-card,
.cw-form-wrap,
.cw-auth-card,
.cw-cart-summary {
    padding: 24px;
}

.cw-home {
    display: grid;
    gap: 22px;
}

.cw-discovery-panel {
    transition: opacity 180ms ease, transform 180ms ease, max-height 220ms ease, margin 220ms ease, padding 220ms ease, border-width 220ms ease;
    transform-origin: top;
    max-height: 900px;
}

.cw-discovery-panel.collapsed {
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
    overflow: hidden;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
}

.cw-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(24px, 4vw, 42px);
}

.cw-hero::before,
.cw-hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.cw-hero::before {
    width: 340px;
    height: 340px;
    top: -180px;
    right: -90px;
    background: radial-gradient(circle, rgba(45, 90, 76, 0.18) 0%, rgba(45, 90, 76, 0) 72%);
}

.cw-hero::after {
    width: 280px;
    height: 280px;
    bottom: -130px;
    left: -70px;
    background: radial-gradient(circle, rgba(185, 130, 60, 0.16) 0%, rgba(185, 130, 60, 0) 74%);
}

.cw-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
    gap: 24px;
    align-items: stretch;
}

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

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

.cw-command {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(82, 66, 49, 0.08);
}

.cw-command-head,
.cw-section-head,
.cw-results-head,
.cw-account-head,
.cw-cart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.cw-chip-row,
.cw-tab-row,
.cw-meta-row,
.cw-action-row,
.cw-stat-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cw-chip {
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(82, 66, 49, 0.08);
    background: rgba(255, 255, 255, 0.78);
    color: var(--cw-muted-strong);
    cursor: pointer;
}

.cw-chip.active,
.cw-chip[data-tone="accent"] {
    background: linear-gradient(145deg, var(--cw-accent) 0%, var(--cw-accent-strong) 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 14px 28px rgba(45, 90, 76, 0.24);
}

.cw-secondary.active {
    background: var(--cw-accent-soft);
    border-color: rgba(45, 90, 76, 0.18);
    color: var(--cw-accent-strong);
}

.cw-chip[data-tone="soft"] {
    background: var(--cw-highlight-soft);
    color: #6f4720;
}

.cw-tab {
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid rgba(82, 66, 49, 0.08);
    background: rgba(255, 255, 255, 0.78);
    color: var(--cw-muted-strong);
    cursor: pointer;
}

.cw-tab.active {
    border-color: rgba(45, 90, 76, 0.2);
    background: var(--cw-accent-soft);
    color: var(--cw-accent-strong);
}

.cw-button,
.cw-secondary,
.cw-danger,
.cw-big-button,
.cw-nav-link,
.cw-nav-btn,
.cw-pill-link {
    min-height: 52px;
    padding: 0 18px;
    border-radius: 18px;
    border: 1px solid transparent;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.cw-button,
.cw-big-button,
.cw-pill-link[data-tone="accent"] {
    color: #fff;
    background: linear-gradient(145deg, var(--cw-accent) 0%, var(--cw-accent-strong) 100%);
    box-shadow: 0 16px 32px rgba(45, 90, 76, 0.24);
}

.cw-button:hover,
.cw-big-button:hover,
.cw-pill-link[data-tone="accent"]:hover {
    transform: translateY(-1px);
}

.cw-secondary,
.cw-nav-link,
.cw-nav-btn,
.cw-pill-link {
    color: var(--cw-ink);
    background: rgba(255, 255, 255, 0.74);
    border-color: rgba(82, 66, 49, 0.08);
}

.cw-danger {
    color: #fff;
    background: linear-gradient(145deg, #b15247 0%, #8c342c 100%);
    box-shadow: 0 16px 32px rgba(159, 62, 53, 0.2);
}

.cw-button,
.cw-secondary,
.cw-danger,
.cw-big-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.cw-button svg,
.cw-secondary svg,
.cw-danger svg,
.cw-big-button svg,
.cw-nav-link svg,
.cw-icon-btn svg,
.cw-icon-link svg,
.cw-search-submit svg {
    width: 18px;
    height: 18px;
}

.cw-status,
.cw-error {
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 16px;
    font-size: 0.95rem;
}

.cw-status {
    color: var(--cw-muted-strong);
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(82, 66, 49, 0.08);
}

.cw-status:empty,
.cw-error:empty {
    display: none;
}

.cw-error {
    color: var(--cw-danger);
    background: var(--cw-danger-soft);
    border: 1px solid rgba(159, 62, 53, 0.12);
}

.cw-results-shell {
    display: grid;
    gap: 18px;
}

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

.cw-recipe {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.cw-recipe-link {
    text-decoration: none;
}

.cw-recipe-media {
    position: relative;
    height: 220px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(45, 90, 76, 0.92) 0%, rgba(185, 130, 60, 0.88) 100%);
}

.cw-recipe-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
    filter: saturate(0.9) contrast(1.02);
}

.cw-recipe-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20, 20, 20, 0.04) 0%, rgba(20, 20, 20, 0.4) 100%);
}

.cw-recipe-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 1;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 250, 242, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: var(--cw-muted-strong);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cw-recipe-body {
    display: grid;
    gap: 14px;
    padding: 18px 18px 20px;
    flex: 1;
}

.cw-recipe-title {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.cw-card-actions {
    margin-top: auto;
}

.cw-stepper,
.cw-qty {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.cw-stepper {
    width: fit-content;
    min-height: 52px;
    padding: 6px;
    border-radius: 18px;
    border: 1px solid rgba(45, 90, 76, 0.14);
    background: var(--cw-accent-soft);
}

.cw-stepper button,
.cw-qty button {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 14px;
    background: #fff;
    color: var(--cw-accent-strong);
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(45, 90, 76, 0.12);
}

.cw-stepper span,
.cw-qty span {
    min-width: 24px;
    text-align: center;
    font-weight: 700;
    color: var(--cw-accent-strong);
}

.cw-meta-card {
    display: grid;
    gap: 16px;
    align-content: start;
}

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

.cw-stat {
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(82, 66, 49, 0.08);
}

.cw-stat-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cw-muted);
}

.cw-stat-value {
    font-family: "Iowan Old Style", "Palatino Linotype", serif;
    font-size: 1.45rem;
    letter-spacing: -0.04em;
}

.cw-list-shell {
    display: grid;
    gap: 12px;
}

.cw-cart-layout,
.cw-detail-grid,
.cw-editor-layout {
    display: grid;
    gap: 22px;
}

.cw-cart-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.75fr);
}

.cw-cart-list {
    display: grid;
    gap: 14px;
}

.cw-cart-item {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr) auto auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 24px;
    border: 1px solid rgba(82, 66, 49, 0.08);
    background: rgba(255, 255, 255, 0.7);
}

.cw-cart-item img {
    width: 108px;
    height: 88px;
    object-fit: cover;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(45, 90, 76, 0.9) 0%, rgba(185, 130, 60, 0.86) 100%);
}

.cw-cart-item-title {
    margin: 0 0 6px;
    font-size: 1.15rem;
    line-height: 1.2;
}

.cw-cart-item-subtitle {
    margin: 0;
    color: var(--cw-muted);
    font-size: 0.92rem;
}

.cw-cart-remove {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(159, 62, 53, 0.14);
    border-radius: 16px;
    background: #fff;
    color: var(--cw-danger);
    cursor: pointer;
}

.cw-cart-summary {
    display: grid;
    gap: 18px;
    align-content: start;
    position: sticky;
    top: 108px;
}

.cw-summary-block {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(82, 66, 49, 0.08);
}

.cw-detail-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.85fr);
    align-items: start;
    padding: 24px;
}

.cw-detail-main,
.cw-detail-side,
.cw-detail-panel {
    display: grid;
    gap: 20px;
}

.cw-detail-hero {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    min-height: 300px;
    background:
        linear-gradient(135deg, rgba(45, 90, 76, 0.94) 0%, rgba(185, 130, 60, 0.88) 100%);
}

.cw-detail-image {
    width: 100%;
    height: 100%;
    min-height: 300px;
    object-fit: cover;
    opacity: 0.48;
}

.cw-detail-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    align-content: end;
    gap: 12px;
    padding: 24px;
    background: linear-gradient(180deg, rgba(20, 20, 20, 0.04) 20%, rgba(20, 20, 20, 0.54) 100%);
    color: #fff;
}

.cw-detail-overline {
    color: rgba(255, 255, 255, 0.82);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.cw-detail-title {
    margin: 0;
    color: #fff;
    font-size: clamp(2.2rem, 4vw, 3.6rem);
}

.cw-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cw-detail-pill,
.cw-servings {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(82, 66, 49, 0.08);
    color: var(--cw-muted-strong);
}

.cw-detail-section {
    margin: 0;
    font-family: "Iowan Old Style", "Palatino Linotype", serif;
    font-size: 1.45rem;
    letter-spacing: -0.03em;
}

.cw-detail-list,
.cw-detail-steps {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 12px;
    color: var(--cw-muted-strong);
    line-height: 1.6;
}

.cw-detail-footer {
    position: sticky;
    bottom: 18px;
    width: min(calc(100% - 24px), 560px);
    margin: 0 auto 24px;
    padding: 10px;
    border-radius: 24px;
    background: rgba(255, 250, 242, 0.78);
    border: 1px solid rgba(82, 66, 49, 0.08);
    backdrop-filter: blur(18px);
    box-shadow: var(--cw-shadow-soft);
    z-index: 15;
}

#detail-cart-control,
#detail-cart-control-footer {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cw-detail-side #detail-cart-control .cw-stepper,
.cw-detail-footer #detail-cart-control-footer .cw-stepper {
    margin: 0 auto;
}

.cw-detail-footer .cw-button,
.cw-detail-footer .cw-stepper {
    width: 100%;
}

.cw-detail-footer .cw-stepper {
    width: fit-content;
}

.cw-auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 22px;
}

.cw-auth-layout {
    width: min(1100px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    gap: 22px;
}

.cw-auth-stage {
    position: relative;
    overflow: hidden;
    padding: 32px;
    border-radius: var(--cw-radius-xl);
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 28%),
        linear-gradient(135deg, #26493f 0%, #1f332e 44%, #9a6f39 100%);
    color: #fff;
    box-shadow: var(--cw-shadow);
}

.cw-auth-stage::after {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    right: -110px;
    bottom: -140px;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    transform: rotate(18deg);
}

.cw-auth-stage > * {
    position: relative;
    z-index: 1;
}

.cw-auth-title {
    margin: 0;
    color: #fff;
    font-size: clamp(2.6rem, 4vw, 4.6rem);
    line-height: 0.95;
}

.cw-auth-copy {
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.7;
    max-width: 38ch;
}

.cw-auth-points {
    display: grid;
    gap: 10px;
}

.cw-auth-point {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cw-auth-card {
    display: grid;
    gap: 18px;
    align-content: start;
}

.cw-auth-head {
    display: grid;
    gap: 10px;
}

.cw-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.88rem;
    color: var(--cw-muted-strong);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cw-input,
.cw-select,
textarea.cw-input {
    width: 100%;
    min-height: 56px;
    padding: 16px 18px;
    border: 1px solid rgba(82, 66, 49, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--cw-ink);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.cw-input:focus,
.cw-select:focus,
textarea.cw-input:focus {
    outline: none;
    border-color: rgba(45, 90, 76, 0.26);
    box-shadow: 0 0 0 4px rgba(45, 90, 76, 0.1);
}

textarea.cw-input {
    min-height: 110px;
    resize: vertical;
}

.cw-stack {
    display: grid;
    gap: 14px;
}

.cw-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cw-center {
    text-align: center;
}

.cw-mt {
    margin-top: 14px;
}

.cw-help {
    margin: 0;
    color: var(--cw-muted);
    line-height: 1.6;
}

.cw-help a {
    color: var(--cw-accent);
    text-decoration: none;
    font-weight: 700;
}

.cw-account-layout,
.cw-editor-layout {
    grid-template-columns: minmax(0, 0.9fr) minmax(260px, 0.52fr);
    align-items: start;
    padding: 24px;
}

.cw-account-panel,
.cw-side-panel {
    display: grid;
    gap: 16px;
}

.cw-list-card {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(82, 66, 49, 0.08);
}

.cw-list-card h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.cw-editor-grid {
    display: grid;
    gap: 12px;
}

.cw-editor-ingredient {
    display: grid;
    grid-template-columns: 110px 160px minmax(0, 1fr);
    gap: 10px;
}

.cw-empty {
    padding: 24px;
    border-radius: 22px;
    border: 1px dashed rgba(82, 66, 49, 0.18);
    color: var(--cw-muted);
    background: rgba(255, 255, 255, 0.35);
}

.cw-sentinel {
    height: 1px;
}

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

@media (max-width: 1100px) {
    .cw-topbar-home {
        grid-template-columns: auto minmax(280px, 1fr) auto;
    }

    .cw-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .cw-hero-grid,
    .cw-detail-grid,
    .cw-cart-layout,
    .cw-account-layout,
    .cw-editor-layout,
    .cw-auth-layout {
        grid-template-columns: 1fr;
    }

    .cw-cart-summary {
        position: static;
    }
}

@media (max-width: 820px) {
    .cw-page {
        width: min(calc(100% - 20px), var(--cw-max));
        padding-top: 18px;
    }

    .cw-topbar {
        width: min(calc(100% - 16px), calc(var(--cw-max) + 24px));
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 14px;
    }

    .cw-topbar-left,
    .cw-topbar-right {
        justify-content: space-between;
    }

    .cw-topbar-center,
    .cw-topbar-search {
        width: 100%;
        max-width: none;
    }

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

    .cw-cart-item,
    .cw-editor-ingredient {
        grid-template-columns: 1fr;
    }

    .cw-detail-footer {
        width: calc(100% - 20px);
        bottom: 12px;
    }
}

@media (max-width: 560px) {
    .cw-grid {
        grid-template-columns: 1fr;
    }

    .cw-brand-subtitle {
        display: none;
    }

    .cw-stat-grid {
        grid-template-columns: 1fr;
    }

    .cw-auth-shell,
    .cw-page {
        padding-bottom: 28px;
    }

    .cw-panel,
    .cw-shell-card,
    .cw-form-wrap,
    .cw-auth-card,
    .cw-cart-summary,
    .cw-detail-grid,
    .cw-editor-layout {
        padding: 18px;
    }
}
