/* 최소주문 발주 계산 — 발주 저울판: 왼쪽 입력, 오른쪽 후보 수량 줄. 골판지 갈색 바탕, 남는 재고는 노란 테이프, 부족은 붉은색. */
:root { --bg: var(--surface-bg, #f5efe6); --panel: var(--surface-panel, #fffdf9); --line: var(--surface-line, #dccfbb); --ink: var(--surface-ink, #2b2118); --ink2: var(--surface-muted, #6b5b4a); --acc: var(--surface-primary, #8a5a2b); --tape: #e8b923; --bad: #a63a2a; --ok: #2f6b46; --r: 3px; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14.5px/1.5 system-ui, "Malgun Gothic", sans-serif; }
header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; padding: 16px 20px 4px; }
h1 { margin: 0; font-size: 19px; } h1 span { color: var(--ink2); font-weight: 400; font-size: 14px; }
h2 { font-size: 16px; margin: 0 0 8px; } h3 { font-size: 14.5px; margin: 6px 0 4px; }
.tag { margin: 0; color: var(--ink2); font-size: 12.5px; flex: 1 1 260px; }
.lang button { border: 1px solid var(--line); background: var(--panel); color: var(--ink2); padding: 4px 10px; font: inherit; cursor: pointer; border-radius: var(--r); }
.lang button[aria-current="true"] { color: var(--acc); border-color: var(--acc); font-weight: 600; }
.state { margin: 6px 20px; min-height: 22px; font-size: 13px; color: var(--ink2); overflow-wrap: anywhere; }
.state.error { color: var(--bad); font-weight: 600; } .state.saved { color: var(--ok); }
body[data-surface-topology] .surface-shell { display: block; }
body[data-surface-state="compiled"] main.split { max-width: 1320px; }
.split { display: grid; grid-template-columns: 380px minmax(0, 1fr); grid-template-rows: auto auto 1fr; gap: 16px; padding: 8px 20px 32px; align-items: start; }
.demand { grid-column: 1; grid-row: 1; } .terms { grid-column: 1; grid-row: 2; margin-bottom: 0; } .saved { grid-column: 1; grid-row: 3; } .board { grid-column: 2; grid-row: 1 / span 3; }
.board, .terms, .saved, .demand { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; min-width: 0; }
.terms { margin-bottom: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 8px 0; }
label { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--ink2); margin-bottom: 6px; }
input, select, textarea { border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 8px 9px; font: inherit; border-radius: var(--r); min-width: 0; }
textarea { width: 100%; resize: vertical; }
button { border: 1px solid var(--acc); background: var(--acc); color: #fff; padding: 8px 14px; font: inherit; cursor: pointer; border-radius: var(--r); min-height: 38px; }
button.ghost { background: var(--panel); color: var(--acc); } button.danger { color: var(--bad); border-color: var(--bad); }
button.primary { font-weight: 700; font-size: 15px; } button.small { min-height: 28px; padding: 1px 8px; font-size: 12px; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--tape); outline-offset: 1px; }
.demand-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.demand-form label { margin: 0; } .demand-form input { width: 120px; } .demand-form select { min-width: 150px; }
.status-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 10px 0; }
.status { border: 1px solid var(--line); border-top: 5px solid var(--acc); border-radius: var(--r); padding: 6px 10px; background: #fff; }
#leftover-range { border-top-color: var(--tape); } #shortage-range { border-top-color: var(--bad); }
.status p { margin: 2px 0; } .bad { color: var(--bad); } .ok { color: var(--ok); }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; } th, td { border-bottom: 1px solid var(--line); padding: 6px; text-align: left; } td.num, th:nth-child(n+3) { text-align: right; font-variant-numeric: tabular-nums; }
tr.picked { background: #f6ebd3; } small { color: var(--ink2); }
.items, #scenario-list { padding-left: 18px; font-size: 13px; } li { margin-bottom: 6px; }
.check { flex-direction: row; align-items: flex-start; gap: 6px; display: flex; color: var(--ink); margin: 0; } .check input { margin-top: 4px; }
.outcome { border-top: 1px dashed var(--line); margin-top: 8px; }
.file { position: relative; border: 1px solid var(--acc); color: var(--acc); padding: 8px 14px; cursor: pointer; flex-direction: row; font-size: 14px; border-radius: var(--r); }
.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.fine { font-size: 12.5px; color: var(--ink2); overflow-wrap: anywhere; }
.surface-identity-band { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 20px 20px; font-size: 12px; color: var(--ink2); }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; grid-template-rows: none; padding: 8px 12px 28px; } .demand, .terms, .saved, .board { grid-column: 1; grid-row: auto; } .demand { order: 0; } .board { order: 1; } .terms { order: 2; } .saved { order: 3; }
  header { padding: 12px 12px 4px; } .state { margin: 6px 12px; }
  .status-row { grid-template-columns: 1fr; } .demand-form input, .demand-form select { width: 100%; } .demand-form label { flex: 1 1 130px; }
}
@media print { header nav, button, .file, form, .terms, .saved, .demand { display: none !important; } .split { display: block; } }

/* ── 정적 사이트 추가: 첫 화면, 요금제 줄, Pro 창, 하단 링크 (이미지 없이 CSS만) ── */
.planbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 2px 20px; font-size: 13px; }
.plan-label { font-weight: 600; color: var(--acc); }
.hero { margin: 8px 20px 4px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-left: 8px solid var(--tape); border-radius: var(--r); background-image: repeating-linear-gradient(135deg, transparent 0 14px, rgba(232, 185, 35, 0.12) 14px 28px); }
.hero[hidden] { display: none; }
.hero h2 { font-size: 18px; } .hero p { margin: 6px 0; max-width: 70ch; }
.hero-steps { margin: 8px 0 0; padding-left: 20px; font-size: 13.5px; }
.btn-link { display: inline-block; border: 1px solid var(--acc); background: var(--acc); color: #fff; padding: 8px 14px; border-radius: var(--r); text-decoration: none; font-weight: 600; }
.btn-link[hidden], .pending[hidden] { display: none; }
dialog { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); color: var(--ink); max-width: 560px; width: calc(100% - 24px); padding: 18px; }
dialog::backdrop { background: rgba(43, 33, 24, 0.45); }
.plan-mini { margin: 8px 0; } .plan-mini th, .plan-mini td { text-align: left; }
.site-links { padding: 8px 20px 28px; font-size: 13px; color: var(--ink2); } .site-links a { color: var(--acc); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== v2 비주얼 레이어: 첫 화면 히어로·둥근 카드·단계 색. surface.css(계약 파일)는 건드리지 않고 여기서만 덮어쓴다. ===== */
:root { --bg: #fbf5ea; --panel: #ffffff; --line: #eadfcc; --ink: #2a2238; --ink2: #6b6580; --acc: #12806f; --tape: #f5a524; --bad: #d1493a; --ok: #12806f; --r: 14px; --shadow: 0 1px 2px rgba(42, 34, 56, 0.05), 0 10px 28px rgba(42, 34, 56, 0.07); }
[hidden] { display: none !important; }
body[data-surface-state="compiled"] { background: radial-gradient(circle at 92% -4%, rgba(245, 165, 36, 0.16), transparent 34%), radial-gradient(circle at 4% 100%, rgba(18, 128, 111, 0.12), transparent 30%), var(--bg); font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif; font-size: 15px; }
header { align-items: center; padding: 14px 24px 6px; }
.brand-mark { height: 46px; width: auto; display: block; }
h1 { font-size: 24px; letter-spacing: -0.03em; }
button { border-radius: 999px; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; }
button:hover { transform: translateY(-1px); }
button.primary { background: linear-gradient(180deg, #1aa08b, var(--acc)); border-color: #0d6b5c; box-shadow: 0 6px 16px rgba(18, 128, 111, 0.28); padding: 12px 24px; font-size: 16px; }
button.ghost { background: #fff; border-color: var(--line); color: var(--ink); }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(18, 128, 111, 0.4); outline-offset: 2px; }
input, select, textarea { border-radius: 12px; background: #fffdf9; }
.planbar { padding: 6px 24px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 20px; align-items: center; margin: 12px 24px 18px; padding: 30px 34px; background: #fffaf1; border: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); overflow: hidden; background-image: none; animation: rb-rise 0.6s ease both; }
.hero h2 { font-size: clamp(24px, 3.4vw, 38px); line-height: 1.22; letter-spacing: -0.035em; margin: 0 0 12px; }
.hero p { color: var(--ink2); font-size: 15.5px; line-height: 1.65; }
.hero-steps { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; counter-reset: step; }
.hero-steps li { counter-increment: step; position: relative; padding: 38px 12px 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; font-size: 13px; }
.hero-steps li::before { content: counter(step); position: absolute; left: 12px; top: 10px; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--acc); color: #fff; font-size: 12px; font-weight: 700; }
.hero-steps li:nth-child(2)::before { background: var(--tape); }
.hero-steps li:nth-child(3)::before { background: #7b61e8; }
.hero-art { position: relative; min-height: 300px; background: url("/assets/art/hero.webp") right center / cover no-repeat; border-radius: 22px; }
.hero-mascot { position: absolute; left: 4%; bottom: 3%; height: 46%; width: auto; animation: rb-float 3.6s ease-in-out infinite; }
.demand, .board, .terms, .table-wrap, .status, section.panel { border-radius: 20px; }
.status { border: 1px solid var(--line); border-radius: 16px; box-shadow: inset 0 5px 0 var(--acc), var(--shadow); padding-top: 12px; }
.status:nth-child(2) { box-shadow: inset 0 5px 0 var(--tape), var(--shadow); }
.status:nth-child(3) { box-shadow: inset 0 5px 0 var(--bad), var(--shadow); }
@keyframes rb-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes rb-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@media (prefers-reduced-motion: reduce) { .hero, .hero-mascot { animation: none; } button { transition: none; } }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; padding: 20px 18px; margin: 10px 14px; } .hero-art { min-height: 200px; order: -1; } .hero-steps { grid-template-columns: 1fr; } header { padding: 12px 14px 4px; } }
