:root {
    --bg: #f7f8f5;
    --surface: #ffffff;
    --text: #172019;
    --muted: #667169;
    --primary: #246b45;
    --primary-dark: #185035;
    --line: #dfe5df;
    --danger: #9b2c2c;
    --warning: #8a5a12;
    --success: #25663f;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: Pretendard, "Noto Sans KR", system-ui, -apple-system, sans-serif;
    line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.narrow { width: min(620px, calc(100% - 40px)); }
.site-header { background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); }
.nav-wrap { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { color: var(--text); font-size: 1.2rem; font-weight: 800; letter-spacing: -.03em; }
nav { display: flex; align-items: center; gap: 18px; }
.welcome { color: var(--muted); }
.inline-form { display: inline; margin: 0; }
.link-button { border: 0; padding: 0; color: var(--primary); background: transparent; font: inherit; cursor: pointer; }
.hero { padding: 90px 0; background: linear-gradient(135deg, #eff8f1, #f7f8f5 65%); }
.hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 70px; align-items: center; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.8rem); line-height: 1.12; letter-spacing: -.05em; margin-bottom: 24px; }
h2 { font-size: 2rem; letter-spacing: -.035em; }
.eyebrow { color: var(--primary); font-weight: 800; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.hero-copy, .muted, .page-heading p, .section-heading p { color: var(--muted); }
.hero-copy { max-width: 650px; font-size: 1.1rem; }
.hero-card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 50px rgba(25,55,35,.08); }
.hero-card { padding: 32px; }
.hero-card ol { padding-left: 22px; margin-bottom: 0; }
.hero-card li + li { margin-top: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; padding: 10px 20px; border: 1px solid var(--primary); border-radius: 10px; color: white; background: var(--primary); font: inherit; font-weight: 700; cursor: pointer; }
.button:hover { background: var(--primary-dark); text-decoration: none; }
.button.secondary { color: var(--primary); background: transparent; }
.button.small { min-height: 38px; padding: 6px 14px; }
.button.full { width: 100%; }
.section { padding-top: 64px; padding-bottom: 72px; }
.form-page { max-width: 820px; }
.page-heading { margin-bottom: 28px; }
.panel { padding: 34px; }
.panel h1 { font-size: 2.2rem; }
fieldset { border: 0; padding: 0; margin: 0 0 34px; }
legend { width: 100%; padding-bottom: 10px; margin-bottom: 18px; border-bottom: 1px solid var(--line); font-weight: 800; font-size: 1.15rem; }
.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 7px; font-weight: 700; }
.field input:not([type="checkbox"]), .field textarea, .field select { width: 100%; padding: 11px 12px; border: 1px solid #bcc8bf; border-radius: 9px; background: white; font: inherit; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 3px solid rgba(36,107,69,.14); border-color: var(--primary); }
.field small { display: block; margin-top: 5px; color: var(--muted); }
.errorlist { margin: 6px 0 0; padding-left: 20px; color: var(--danger); }
.form-errors, .message, .notice { padding: 13px 15px; border-radius: 9px; margin-bottom: 20px; }
.form-errors, .danger { color: var(--danger); background: #fff0f0; }
.message.success, .notice.success { color: var(--success); background: #edf9f1; }
.message.warning { color: var(--warning); background: #fff8e8; }
.messages { padding-top: 18px; }
.form-footer { margin: 22px 0 0; text-align: center; color: var(--muted); }
.subpanel { padding: 22px; margin-bottom: 16px; background: #f7faf7; border: 1px solid var(--line); border-radius: 12px; }
.status-row { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.status { padding: 5px 10px; border-radius: 999px; background: #eef1ee; }
.status.approved { color: var(--success); background: #e7f7ed; }
.status.rejected { color: var(--danger); background: #fff0f0; }
.summary-list div { display: grid; grid-template-columns: 120px 1fr; padding: 12px 0; border-bottom: 1px solid var(--line); }
.summary-list dt { color: var(--muted); }
.summary-list dd { margin: 0; font-weight: 700; }
.site-footer { padding: 32px 0; color: var(--muted); border-top: 1px solid var(--line); background: white; }
.section-heading { margin-bottom: 28px; }
.section-action { margin-top: 30px; text-align: center; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.product-card { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; }
.product-image { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #e8eee9; }
.product-image img, .detail-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-card-body { padding: 17px; }
.product-card h3 { margin: 8px 0; font-size: 1.05rem; line-height: 1.35; }
.product-card h3 a { color: var(--text); }
.product-card p { color: var(--muted); font-size: .9rem; min-height: 2.9em; }
.product-meta, .product-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.product-meta { color: var(--primary); font-size: .78rem; font-weight: 700; }
.product-card-footer { padding-top: 13px; border-top: 1px solid var(--line); }
.product-card-footer span { color: var(--muted); font-size: .8rem; }
.filter-panel { padding: 24px; margin-bottom: 42px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.filter-panel label { display: block; margin-bottom: 5px; font-size: .83rem; font-weight: 700; }
.filter-panel input, .filter-panel select { width: 100%; padding: 10px; border: 1px solid #bcc8bf; border-radius: 8px; background: white; font: inherit; }
.filter-search { margin-bottom: 14px; }
.filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.result-heading, .dashboard-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.result-heading { margin-bottom: 18px; }
.result-heading h2 { margin: 0; }
.result-heading span { color: var(--muted); }
.empty-state { grid-column: 1 / -1; padding: 42px; text-align: center; color: var(--muted); border: 1px dashed #bcc8bf; border-radius: 12px; }
.detail-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 55px; align-items: start; }
.detail-image { overflow: hidden; aspect-ratio: 4 / 3; border-radius: 18px; background: #e8eee9; }
.detail-summary h1 { font-size: 2.7rem; }
.lead { color: var(--muted); font-size: 1.05rem; }
.trainer-line { display: flex; align-items: center; gap: 12px; padding: 14px 0; }
.trainer-line span { color: var(--muted); font-size: .9rem; }
.purchase-box { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px; margin-top: 22px; border-radius: 12px; background: #eef6f0; }
.purchase-box > strong { font-size: 1.5rem; }
.purchase-box button:disabled { cursor: not-allowed; opacity: .55; }
.purchase-actions, .purchase-actions form { display: flex; gap: 10px; margin: 0; }
.content-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; margin-top: 55px; }
.content-grid h2 { font-size: 1.4rem; }
.prose p { color: #354039; }
.reviews-section { margin-top: 48px; }
.review { padding: 20px 0; border-top: 1px solid var(--line); }
.review p { margin: 7px 0 0; color: var(--muted); }
.review-heading, .review-actions { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.review-actions form { margin: 0; }
.dashboard-heading { margin-bottom: 28px; }
.dashboard-heading h1 { margin-bottom: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: white; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 16px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: #f1f5f2; font-size: .82rem; }
td small { display: block; color: var(--muted); }
.table-actions { display: flex; gap: 12px; }
.danger-text { color: var(--danger); }
.status.draft { color: #59645c; }
.status.published { color: var(--success); background: #e7f7ed; }
.status.suspended { color: var(--danger); background: #fff0f0; }
.checkbox-field ul { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 0; list-style: none; }
.checkbox-field li label { display: flex; align-items: center; gap: 7px; font-weight: 500; }
.pagination { display: flex; justify-content: center; gap: 18px; margin-top: 32px; }
.commerce-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, .8fr); gap: 28px; align-items: start; }
.stack { display: grid; gap: 16px; }
.line-item { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto auto; gap: 18px; align-items: center; padding: 16px; background: white; border: 1px solid var(--line); border-radius: 13px; }
.line-item img { width: 110px; height: 82px; object-fit: cover; border-radius: 9px; background: #e8eee9; }
.line-item h2 { margin: 3px 0; font-size: 1.05rem; }
.line-item small, .line-item span, .checkout-line small, .purchase-order small { display: block; color: var(--muted); }
.order-summary { position: sticky; top: 20px; }
.order-summary h2 { font-size: 1.3rem; }
.order-summary > div, .checkout-line, .checkout-total { display: flex; justify-content: space-between; gap: 18px; padding: 15px 0; border-top: 1px solid var(--line); }
.order-summary .button { margin-top: 22px; }
.checkout-line:first-child { border-top: 0; }
.checkout-total { margin-top: 10px; font-size: 1.12rem; }
.order-number { overflow-wrap: anywhere; color: var(--muted); }
.split-actions { justify-content: space-between; }
.status.pending { color: var(--warning); background: #fff8e8; }
.status.paid { color: var(--success); background: #e7f7ed; }
.status.cancelled { color: var(--danger); background: #fff0f0; }
.metric { padding: 12px 18px; border-radius: 10px; background: #eef6f0; }
.metric span { display: block; color: var(--muted); font-size: .8rem; }
.metric strong { font-size: 1.2rem; }
.purchase-order { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 14px; }
.purchase-order > header { display: flex; justify-content: space-between; align-items: center; padding: 15px 18px; background: #f1f5f2; }
.purchase-item { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 18px; border-top: 1px solid var(--line); }
.purchase-item h2 { margin: 0 0 3px; font-size: 1.05rem; }
.purchase-item > div:last-child, .purchase-item-actions { display: flex; align-items: center; gap: 15px; }
.rating-field ul { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 0; list-style: none; }
.rating-field li label { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.error-page { min-height: 62vh; display: grid; place-items: center; text-align: center; }
.error-code { margin-bottom: 8px; color: var(--primary); font-size: clamp(4rem, 14vw, 8rem); font-weight: 900; line-height: 1; letter-spacing: -.08em; }
.error-page h1 { margin-bottom: 14px; font-size: clamp(1.8rem, 5vw, 2.8rem); }
.error-page p { max-width: 560px; margin-right: auto; margin-left: auto; color: var(--muted); }
.error-page .actions { justify-content: center; }

@media (max-width: 760px) {
    .container, .narrow { width: min(100% - 28px, 1120px); }
    .nav-wrap { align-items: flex-start; padding: 18px 0; }
    nav { flex-wrap: wrap; justify-content: flex-end; gap: 10px 14px; }
    .welcome { display: none; }
    .hero { padding: 60px 0; }
    .hero-grid { grid-template-columns: 1fr; gap: 30px; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-grid, .content-grid, .commerce-grid { grid-template-columns: 1fr; gap: 28px; }
    .panel { padding: 24px 20px; }
    .section { padding-top: 42px; padding-bottom: 52px; }
}

@media (max-width: 480px) {
    .product-grid, .filter-grid { grid-template-columns: 1fr; }
    .dashboard-heading { align-items: flex-start; flex-direction: column; }
    .purchase-box { align-items: stretch; flex-direction: column; }
    .purchase-actions { flex-direction: column; }
    .purchase-actions form, .purchase-actions .button { width: 100%; }
    .line-item { grid-template-columns: 80px 1fr; }
    .line-item img { width: 80px; height: 65px; }
    .purchase-item { align-items: flex-start; flex-direction: column; }
    .purchase-item-actions { align-items: flex-start !important; flex-direction: column; }
}
