
* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body { margin: 0; font-family: "Segoe UI", "Noto Sans KR", sans-serif; font-size: 16px; line-height: 1.45; }
.top, main, footer { width: min(1120px, calc(100% - 24px)); margin-inline: auto; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; }
.brand { font-weight: 700; text-decoration: none; font-size: 1.05rem; }
.lang summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.lang a { display: block; min-height: 44px; line-height: 44px; }
.find, form.shop-form, form.band-form, form.optic-form, form.motion-form, form.studio-form { display: grid; gap: 10px; margin-bottom: 12px; }
label { display: grid; gap: 4px; font-size: 16px; }
input, select, button { min-height: 48px; font-size: 16px; padding: 8px 10px; }
button { min-width: 44px; }
main { padding: 16px; }
.answer { font-size: 1.15rem; }
.mono { font-family: Consolas, "Noto Sans Mono", monospace; }
h1, h2, p, label, .lead { overflow-wrap: anywhere; }
.lead { display: block; margin: 0 0 16px; }
.formula, .note, .lead { max-width: 68ch; }
.warn { padding: 8px 10px; border: 1px solid currentColor; }
footer { padding: 18px 0 28px; }
.copy-note { margin-left: 6px; }
@media (max-width: 720px) {
  .top { align-items: flex-start; }
  form.shop-form, form.band-form, form.optic-form, form.motion-form, form.studio-form { grid-template-columns: 1fr; }
}


body.shop { background: #f3efe6; color: #1c1917; }
body.shop .brand { color: #9a3412; letter-spacing: 0.04em; }
body.shop .bench { background: #fffaf3; border: 1px solid #d6d3d1; border-top: 8px solid #b45309; }
.thread { width: 100%; height: auto; display: block; margin: 8px 0 12px; }
.stock { fill: #44403c; }
.crest { fill: none; stroke: #fdba74; stroke-width: 3; }
.hole { fill: #f3efe6; stroke: #b45309; }

body.lab { background: #f8fafc; color: #0f172a; }
body.lab .brand { color: #0e7490; }
body.lab .stage { background: #ffffff; border: 1px solid #e2e8f0; border-top: 8px solid #06b6d4; }
form.lab-form { display: grid; gap: 10px; margin-bottom: 12px; }
.scope { width: 100%; height: auto; display: block; margin: 8px 0 12px; }
.barrel { fill: none; stroke: #0f172a; stroke-width: 4; }
.field { fill: #ecfeff; stroke: #06b6d4; stroke-width: 3; }
.ray { fill: none; stroke: #f59e0b; stroke-width: 3; }
@media (max-width: 720px) { form.lab-form { grid-template-columns: 1fr; } }



body.mast { background: #f8fafc; color: #0f172a; }
body.mast .brand { color: #1d4ed8; }
body.mast .wire { background: #fff; border: 1px solid #dbeafe; border-top: 8px solid #2563eb; }
form.mast-form { display: grid; gap: 10px; margin-bottom: 12px; }
.span { width: 100%; height: auto; display: block; margin: 8px 0 12px; }
.arm { fill: none; stroke: #1d4ed8; stroke-width: 4; }
.feed { fill: none; stroke: #f59e0b; stroke-width: 3; }
@media (max-width: 720px) { form.mast-form { grid-template-columns: 1fr; } }

.top { flex-wrap: wrap; }
.find { display: flex; gap: 8px; align-items: end; width: min(360px, 100%); margin: 0; }
.find label { min-width: 0; flex: 1; }
.find input { width: 100%; }
.work { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 16px; align-items: start; }
fieldset, details.advanced { border: 1px solid #cbd5e1; margin: 0 0 10px; padding: 10px 12px; background: transparent; }
legend, details.advanced summary { font-weight: 700; }
details.advanced summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.hint { display: block; font-size: 14px; max-width: 62ch; }
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hero { font-size: 1.45rem; }
.match { margin-top: 12px; padding-top: 8px; border-top: 1px solid #cbd5e1; }
.dim { font-size: 13px; fill: currentColor; }
.stroke { fill: none; stroke: currentColor; stroke-width: 2; }
.lang { position: relative; }
[hidden] { display: none !important; }
@media (max-width: 720px) {
  .work, .sides { grid-template-columns: 1fr; }
  .find { width: 100%; }
}

body.mast .length-panel { background: #f8fafc; border: 1px solid #bfdbfe; padding: 12px 14px; }
body.mast .work > .result { grid-column: 2; grid-row: 1 / span 4; }
body.mast .match { background: #fffbeb; border: 1px solid #fcd34d; padding: 12px 14px; }
body.mast .span { background: #fff; border: 1px solid #dbeafe; }
body.mast .field-error { display: block; color: #b91c1c; font-size: 14px; font-weight: 700; }
body.mast input[aria-invalid="true"] { outline: 2px solid #b91c1c; }
body.mast .load-label { margin: 0 0 6px; font-weight: 700; }
body.mast .load-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
body.mast .chip { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; border: 1px solid #93c5fd; background: #eff6ff; color: #1e3a8a; text-decoration: none; }
body.mast .dim.val { font-size: 15px; font-weight: 700; }
body.mast .hero { font-size: 1.35rem; }
@media (max-width: 720px) {
  body.mast .work > .result { grid-column: auto; grid-row: auto; }
}

