:root {
    --bg: #f6f3ee;
    --card: rgba(255, 255, 255, 0.88);
    --line: rgba(70, 51, 34, 0.12);
    --text: #1f1a17;
    --muted: #6e5d53;
    --accent: #c85f2f;
    --accent-2: #1d4ed8;
    --accent-soft: rgba(29, 78, 216, 0.10);
    --shadow: 0 18px 40px rgba(49, 33, 20, 0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    font-family: "Pretendard", "Noto Sans KR", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(200, 95, 47, 0.14), transparent 28%),
        radial-gradient(circle at top right, rgba(29, 78, 216, 0.10), transparent 24%),
        linear-gradient(180deg, #fbfaf8 0%, var(--bg) 100%);
}

.site-shell {
    width: min(1240px, calc(100% - 28px));
    margin: 20px auto 40px;
    display: grid;
    gap: 16px;
}

.site-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.hero,
.product-hero {
    padding: 26px;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 20px;
}

.hero-copy h1,
.product-hero h1,
.panel-head h2 {
    margin: 0;
    letter-spacing: -0.03em;
}

.hero-copy h1,
.product-hero h1 {
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.04;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent-2);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.lead {
    margin: 12px 0 0;
    color: #3d332d;
    font-size: 16px;
    line-height: 1.7;
}

.hero-pills {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(70, 51, 34, 0.08);
    font-size: 13px;
    font-weight: 700;
}

.pill.muted {
    color: var(--muted);
}

.hero-panel {
    display: grid;
    gap: 12px;
}

.metric {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.90);
    border: 1px solid rgba(70, 51, 34, 0.08);
}

.metric span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.metric strong {
    font-size: 20px;
}

.toolbar {
    padding: 18px;
    display: grid;
    grid-template-columns: 1.2fr 0.7fr 1.4fr;
    gap: 16px;
    align-items: end;
}

.field span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

input,
select {
    width: 100%;
    min-height: 48px;
    padding: 0 15px;
    border-radius: 16px;
    border: 1px solid rgba(70, 51, 34, 0.12);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    font: inherit;
    outline: none;
}

input:focus,
select:focus {
    border-color: rgba(29, 78, 216, 0.34);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.theme-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.theme-tab {
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid rgba(70, 51, 34, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.theme-tab.is-active {
    background: linear-gradient(180deg, #3267dd 0%, #214aa0 100%);
    color: #fff;
    border-color: transparent;
}

.notice {
    padding: 16px 20px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.notice strong {
    white-space: nowrap;
    color: var(--accent-2);
}

.notice p,
.muted {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.content-grid {
    display: grid;
    grid-template-columns: 1.65fr 0.95fr;
    gap: 16px;
    align-items: start;
}

.products-panel,
.side-panel,
.product-main {
    padding: 20px;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: end;
    margin-bottom: 18px;
}

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

.product-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid rgba(70, 51, 34, 0.10);
    background: rgba(255, 255, 255, 0.90);
}

.product-media,
.product-visual {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.36), transparent 34%),
        linear-gradient(140deg, #d07a3f 0%, #1d4ed8 55%, #0f766e 100%);
}

.product-media {
    height: 154px;
}

.product-visual {
    min-height: 280px;
}

.product-media::after,
.product-visual::after {
    content: "";
    position: absolute;
    inset: 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.media-label,
#product-visual-label {
    position: absolute;
    left: 18px;
    bottom: 18px;
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #1f3654;
    font-size: 12px;
    font-weight: 800;
}

.product-card h3 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
}

.merchant-badge,
.theme-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: #eef5ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
}

.product-actions,
.button-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 14px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
}

.action-btn-primary {
    background: linear-gradient(180deg, #3468de 0%, #214aa0 100%);
    color: #fff;
}

.action-btn-secondary {
    background: #eef4fb;
    color: #223047;
}

.side-stack {
    display: grid;
    gap: 16px;
}

.route-nav {
    padding: 14px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.route-chip {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(70, 51, 34, 0.12);
    background: rgba(255, 255, 255, 0.84);
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

.route-chip-accent {
    background: linear-gradient(180deg, #3267dd 0%, #214aa0 100%);
    color: #fff;
    border-color: transparent;
}

.portal-grid {
    grid-template-columns: 1.5fr 0.95fr;
}

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

.surface-card {
    display: grid;
    gap: 10px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(70, 51, 34, 0.10);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.surface-card.is-active {
    border-color: rgba(29, 78, 216, 0.36);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.surface-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.surface-state {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.surface-card h3 {
    margin: 0;
    font-size: 22px;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.surface-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.surface-actions .action-btn {
    min-width: 124px;
}

.steps,
.bullet-list {
    margin: 0;
    padding-left: 18px;
    color: #3d332d;
    line-height: 1.8;
}

.empty-state {
    min-height: 220px;
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--muted);
    font-weight: 700;
}

.product-layout {
    grid-template-columns: 1.7fr 0.9fr;
}

.product-main {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 18px;
}

.product-copy {
    display: grid;
    align-content: start;
    gap: 14px;
}

@media (max-width: 1080px) {
    .hero,
    .product-hero,
    .toolbar,
    .content-grid,
    .product-layout,
    .product-main {
        grid-template-columns: 1fr;
    }

    .portal-grid,
    .surface-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 720px) {
    .site-shell {
        width: min(100% - 14px, 100%);
        margin: 10px auto 24px;
    }

    .hero,
    .product-hero,
    .toolbar,
    .products-panel,
    .side-panel,
    .product-main {
        padding: 14px;
    }

    .hero-copy h1,
    .product-hero h1 {
        font-size: 28px;
    }

    .route-nav {
        padding: 12px;
    }

    .surface-card {
        padding: 14px;
    }

    .action-btn {
        width: 100%;
    }
}
