:root { --bg:#f5f6f8; --card:#fff; --ink:#1d2433; --mute:#6b7385; --line:#dde1e8; --accent:#2f6fed; }
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--ink); font-family:"Malgun Gothic",system-ui,sans-serif; line-height:1.5; }
.tool-head, main { max-width:1000px; margin:0 auto; padding:0 16px; }
.tool-head { padding-top:24px; }
.tool-head h1 { margin:0 0 4px; font-size:24px; }
.tool-head p { margin:0 0 16px; color:var(--mute); }
.panel, .card { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:16px; margin-bottom:16px; }
.row { display:flex; flex-wrap:wrap; gap:16px; align-items:center; margin-bottom:8px; }
label { display:flex; gap:6px; align-items:center; font-weight:600; }
.cartons { display:flex; flex-wrap:wrap; gap:12px; margin:8px 0 12px; }
.carton { margin:0; }
.carton svg { width:260px; max-width:100%; height:auto; background:#fafbfc; border:1px solid var(--line); border-radius:6px; display:block; }
input[type=number] { text-align:right; width:100px; padding:8px; border:1px solid var(--line); border-radius:6px; font-size:16px; }
select { padding:8px; border:1px solid var(--line); border-radius:6px; font-size:16px; }
.chk { font-weight:400; }
.msg { margin:4px 0 0; color:#c0392b; min-height:1.4em; }
.card h2 { margin:0 0 4px; font-size:18px; }
.cardhead { display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap; }
.share button, .onlynote button { padding:6px 12px; font-size:14px; color:var(--accent); background:#fff; border:1px solid var(--accent); border-radius:6px; cursor:pointer; margin-left:6px; }
.share button:hover, .onlynote button:hover { background:#eef3ff; }
.onlynote { background:#eef3ff; border:1px solid #cfdcfb; border-radius:8px; padding:10px 14px; margin:0 0 16px; font-size:14px; }
.count { font-size:34px; font-weight:700; color:var(--accent); }
.count small { font-size:16px; color:var(--ink); font-weight:400; }
.dims { color:var(--mute); font-size:14px; margin-bottom:8px; }
.ors { font-size:14px; margin:0 0 10px; padding-left:18px; }
.views { display:grid; grid-template-columns:1fr; gap:10px; }
.view figcaption { font-size:13px; color:var(--mute); margin-bottom:2px; }
.view svg { width:100%; height:auto; background:#fafbfc; border:1px solid var(--line); border-radius:6px; display:block; }
button#go { padding:10px 28px; font-size:17px; font-weight:700; color:#fff; background:var(--accent); border:0; border-radius:8px; cursor:pointer; }
button#go:hover { filter:brightness(.92); }
.main { font-size:15px; margin:4px 0 8px; padding-left:18px; }
.main .sum { list-style:none; margin-left:-18px; font-weight:700; border-top:1px solid var(--line); margin-top:4px; padding-top:2px; }
.hint { color:var(--mute); text-align:center; padding:24px 0; }
.persp .view svg { max-height:560px; }
.view.small { max-width:360px; }
.note { font-size:13px; color:var(--mute); }

/* ---------- 입력 화면: 단계형(01·02·Option) + 오른쪽 박스 그림 ---------- */
.steps { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:32px; align-items:start; padding:24px; }
.step { margin-bottom:28px; }
.step-no { font-weight:800; font-size:15px; color:var(--ink); letter-spacing:.5px; }
.step-no.opt { color:var(--accent); }
.step-title { margin:2px 0 4px; font-size:22px; }
.step-desc { margin:0 0 14px; color:var(--mute); font-size:15px; }

.dim-row { display:grid; grid-template-columns:repeat(3, minmax(0, 160px)); gap:14px; }
label.dim { display:flex; flex-direction:column; align-items:stretch; gap:6px; font-weight:400; }
.dim-label { color:var(--accent); font-weight:700; font-size:15px; }
.dim-box { position:relative; display:block; }
.dim-box input[type=number] { width:100%; padding:12px 44px 12px 12px; font-size:18px; text-align:right; border:1px solid var(--line); border-radius:8px; background:#fff; }
.dim-box input[type=number]:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px #dbe6ff; }
.dim-box em { position:absolute; right:12px; top:50%; transform:translateY(-50%); font-style:normal; color:var(--mute); font-size:14px; pointer-events:none; }

.opt-cards { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; max-width:520px; }
label.opt-card { display:block; font-weight:400; cursor:pointer; position:relative; }
label.opt-card input { position:absolute; opacity:0; width:1px; height:1px; }
.card-body { display:flex; flex-direction:column; gap:4px; height:100%; padding:14px; border:1.5px solid var(--line); border-radius:10px; background:#fff; transition:border-color .15s, background .15s; }
.card-body svg { width:48px; height:40px; margin-bottom:4px; }
.card-body b { font-size:16px; }
.card-body span { color:var(--mute); font-size:13px; line-height:1.4; }
/* 체크박스 모양을 항상 보여 줌: 선택 안 됨 = 빈 네모, 선택됨 = 파란 네모 + ✓ */
.card-body::after { content:""; position:absolute; top:12px; right:12px; width:22px; height:22px; border:2px solid #9aa3b5; border-radius:5px; background:#fff; color:#fff; font-size:14px; font-weight:800; display:flex; align-items:center; justify-content:center; box-sizing:border-box; }
.opt-card:hover .card-body { border-color:#9fb6ef; }
.opt-card:hover .card-body::after { border-color:var(--accent); }
.opt-card input:checked + .card-body { border-color:var(--accent); background:#eef3ff; }
.opt-card input:checked + .card-body::after { content:"✓"; border-color:var(--accent); background:var(--accent); }
.opt-card input:focus-visible + .card-body { box-shadow:0 0 0 3px #dbe6ff; }

.steps button#go { padding:14px 40px; font-size:18px; }
.step-figure { position:sticky; top:16px; background:#e9eefb; border-radius:14px; padding:16px; }
.step-figure svg { width:100%; height:auto; display:block; }
.fig-note { margin:6px 0 0; text-align:center; color:var(--mute); font-size:13px; }

@media (max-width: 760px) {
  .steps { grid-template-columns:1fr; gap:16px; padding:16px; }
  .step-figure { position:static; order:-1; max-width:300px; width:100%; margin:0 auto; padding:10px; }
  .dim-row { grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; }
  .dim-box input[type=number] { font-size:16px; padding:10px 34px 10px 8px; }
  .dim-box em { right:8px; font-size:12px; }
  .opt-cards { grid-template-columns:1fr; }
  .step-title { font-size:19px; }
  .steps button#go { width:100%; }
}
