:root {
  color-scheme: only light;
  --brand: #d9ad45;
  --brand-hover: #c89b34;
  --brand-soft: #fcf6e7;
  --brand-ink: #7c5c16;
  --ink: #272521;
  --muted: #706e67;
  --line: #e9e7e1;
  --surface: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: #ffffff;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 16px; background: #ffffff; color: var(--ink); }
button, input, a { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
button { cursor: pointer; transition: background .18s, border-color .18s, transform .18s; }
button:disabled { cursor: not-allowed; opacity: .46; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--brand-ink); outline-offset: 4px; }
button:not(:disabled):active { transform: translateY(1px); }
a { color: inherit; }
svg { stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

.topbar { height: 80px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 20px; padding: 0 max(32px, calc((100vw - 1256px) / 2)); background: #ffffff; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-size: 30px; font-weight: 700; letter-spacing: -1.5px; line-height: 1; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--brand); color: var(--ink); }
.brand-mark svg { width: 29px; height: 29px; stroke-width: 2.4; }
.brand-pics { font-weight: 500; }
.brand-period { color: var(--brand); }
.demo-tag { font-size: 12px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); letter-spacing: -.2px; }
.header-note { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.header-note svg { width: 17px; height: 17px; fill: none; color: var(--brand-ink); }
main { max-width: 1320px; padding: 35px 32px 20px; margin: 0 auto; }
.intro { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 26px; }
.eyebrow { margin: 0 0 9px; font-size: 14px; color: var(--muted); }
h1 { margin: 0; font-size: 32px; line-height: 1.4; letter-spacing: -1.25px; font-weight: 700; }
.headline-accent { text-decoration: underline; text-decoration-color: var(--brand); text-decoration-thickness: 5px; text-underline-offset: 6px; text-decoration-skip-ink: none; }
h2, p { margin-top: 0; }
.button { border: 1px solid transparent; border-radius: 8px; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 18px; font-size: 15px; font-weight: 600; }
.button.primary { background: var(--brand); color: var(--ink); }
.button.primary:not(:disabled):hover, .download:not(:disabled):hover { background: var(--brand-hover); }
.button.subtle { background: #ffffff; color: var(--ink); border-color: #dbd8cf; }
.button.subtle:hover { border-color: var(--brand); background: var(--brand-soft); }
.full { width: 100%; }

.editor { display: grid; grid-template-columns: minmax(0, 1fr) 316px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #ffffff; box-shadow: 0 5px 25px #27252106; }
.workspace { display: flex; flex-direction: column; min-width: 0; background: #ffffff; }
.workspace-bar { height: 66px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.segmented { display: flex; padding: 3px; gap: 3px; background: #f5f5f3; border: 1px solid #eeede9; border-radius: 8px; }
.segmented button { border: 0; background: transparent; color: var(--muted); padding: 7px 13px; border-radius: 5px; font-size: 14px; }
.segmented button.selected { background: #ffffff; color: var(--ink); box-shadow: 0 1px 4px #29251012; font-weight: 600; }
.segmented button:not(:disabled):hover { color: var(--brand-ink); }
#image-meta { font-size: 12px; color: var(--muted); text-align: right; }
.checker { background-color: #ffffff; background-image: conic-gradient(#f0f1f2 25%, transparent 0 50%, #f0f1f2 0 75%, transparent 0); background-size: 22px 22px; }
.stage { margin: 20px; min-height: 470px; flex: 1; position: relative; border: 1px solid #eeede9; border-radius: 9px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.stage.dragging { outline: 3px solid var(--brand); outline-offset: -3px; }
.empty { text-align: center; padding: 38px 24px; z-index: 1; }
.upload-icon { width: 78px; height: 78px; margin: 0 auto 24px; display: grid; place-items: center; border: 1px solid #ebd59e; border-radius: 22px; background: var(--brand-soft); box-shadow: 0 5px 15px #9980460a; }
.upload-icon svg { width: 42px; height: 42px; color: var(--brand-ink); }
.empty h2 { font-size: 23px; letter-spacing: -.7px; margin-bottom: 11px; font-weight: 600; }
.empty p { color: var(--muted); font-size: 14px; margin-bottom: 25px; }
.empty .button { margin: 0 auto; min-width: 184px; box-shadow: 0 3px 9px #c59c3330; }
.empty .file-hint { font-size: 12px; margin: 17px 0 22px; }
.text-button { border: 0; background: none; color: var(--brand-ink); text-decoration: underline; text-underline-offset: 4px; font-size: 14px; padding: 2px 0; }
.text-button:hover { color: var(--ink); }
.stage canvas { max-width: calc(100% - 40px); max-height: 475px; width: auto; height: auto; object-fit: contain; box-shadow: 0 5px 22px #2222220b; }
.workspace-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 20px 18px; min-height: 36px; color: var(--muted); font-size: 12px; }
#file-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.controls { border-left: 1px solid var(--line); background: #ffffff; }
.control-section { padding: 23px; border-bottom: 1px solid var(--line); }
.section-title { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; }
.step { font-size: 12px; font-weight: 600; color: var(--brand-ink); background: var(--brand-soft); border: 1px solid #f0dfb9; border-radius: 5px; padding: 2px 5px; }
.section-title h2, .export-heading h2 { font-size: 16px; font-weight: 600; margin: 0; }
.small-badge { margin-left: auto; color: var(--brand-ink); font-size: 12px; padding: 2px 6px; background: var(--brand-soft); border-radius: 4px; }
.helper { color: var(--muted); font-size: 14px; line-height: 1.7; margin-bottom: 17px; }
.status { font-size: 13px; color: #57554e; line-height: 1.7; margin-top: 12px; overflow-wrap: anywhere; }
.status.error { color: #a12d22; }
progress { width: 100%; height: 5px; margin-top: 8px; accent-color: var(--brand); border: 0; }
.model-note { font-size: 13px; color: var(--muted); line-height: 1.7; margin: 12px 0 0; }
.dimension-row { display: flex; align-items: end; gap: 10px; }
.dimension-row label { flex: 1; min-width: 0; color: #57544d; font-size: 14px; }
.dimension-row label span { float: right; color: var(--muted); font-size: 12px; }
.dimension-row input { display: block; width: 100%; margin-top: 8px; border: 1px solid #d8d6ce; background: #ffffff; color: var(--ink); border-radius: 6px; height: 42px; padding: 9px 11px; font-size: 16px; appearance: textfield; }
.dimension-row input:disabled { background: #f8f8f6; }
.dimension-row input[aria-invalid="true"] { border-color: #b8473b; }
.dimension-times { padding-bottom: 11px; color: var(--muted); font-size: 13px; }
.checkbox-row { display: flex; align-items: center; gap: 7px; font-size: 14px; color: #605d55; margin-top: 13px; }
.checkbox-row input { accent-color: var(--brand); width: 16px; height: 16px; margin: 0; }
.presets { display: flex; gap: 7px; margin: 16px 0 12px; }
.presets button { border: 1px solid #e1ddd2; border-radius: 5px; background: #ffffff; color: #615c50; font-size: 14px; padding: 6px 8px; }
.presets button:not(:disabled):hover { border-color: var(--brand); background: var(--brand-soft); }
.control-section .helper:last-child { margin-bottom: 0; font-size: 13px; }
.export-section { border: 0; }
.export-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; }
.export-heading > span { font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.swatches { display: flex; gap: 11px; margin-bottom: 23px; }
.swatch { background: none; border: 0; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 9px; font-size: 14px; padding: 0 5px; }
.swatch.selected { color: var(--ink); }
.color { display: block; width: 29px; height: 29px; border: 1px solid #c4c1b9; border-radius: 50%; background-size: 10px 10px; }
.swatch.selected .color { outline: 2px solid var(--brand); outline-offset: 3px; }
.white { background: #ffffff; }
.dark { background: #18201d; }
.download { background: var(--brand); color: var(--ink); }
.download-note { font-size: 13px; text-align: center; color: var(--muted); margin: 11px 0 0; }

.below { display: flex; justify-content: space-between; gap: 20px; margin: 17px 3px 25px; font-size: 12px; color: var(--muted); }
.below p { margin: 0; line-height: 1.7; }
.below p span { color: var(--brand-ink); margin-right: 8px; }
.below > span { white-space: nowrap; }
.about { border-top: 1px solid var(--line); padding: 17px 3px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.about summary { cursor: pointer; color: #57544b; font-size: 14px; margin-bottom: 10px; }
.about p { max-width: 900px; margin: 8px 0; }
.about a { color: var(--brand-ink); text-underline-offset: 3px; }
footer { max-width: 1256px; margin: 0 auto; padding: 7px 3px 28px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; }
.footer-brand { color: #55514b; font-weight: 700; font-size: 19px; letter-spacing: -.8px; }
.footer-brand span { color: var(--brand); }
.busy-overlay { position: absolute; inset: 0; z-index: 3; background: #ffffffed; color: var(--ink); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 13px; padding: 25px; text-align: center; font-size: 15px; }
.busy-overlay span { font-size: 13px; color: var(--muted); }
.spinner { width: 32px; height: 32px; border: 3px solid #f0e6ca; border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; }
.stage-label { position: absolute; bottom: 13px; left: 13px; background: #ffffffee; border: 1px solid #e6e1d5; color: #5d5748; border-radius: 5px; padding: 5px 9px; font-size: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 1500px) {
  .stage { min-height: 530px; }
  .stage canvas { max-height: 525px; }
}
@media (max-width: 900px) {
  .topbar { padding: 0 24px; }
  main { padding: 28px 20px 20px; }
  .editor { grid-template-columns: minmax(0, 1fr) 284px; }
  .control-section { padding: 20px; }
  .workspace-bar { padding: 10px 12px; }
  #image-meta { display: none; }
  .stage { margin: 14px; min-height: 475px; }
  .empty { padding: 24px 12px; }
  .empty h2 { font-size: 20px; }
  footer { margin: 0 23px; }
}
@media (max-width: 680px) {
  .topbar { height: 70px; padding: 0 20px; gap: 12px; }
  .brand { font-size: 27px; gap: 8px; }
  .brand-mark { width: 33px; height: 33px; border-radius: 9px; }
  .brand-mark svg { width: 26px; height: 26px; }
  .header-note { display: none; }
  .demo-tag { font-size: 12px; padding: 4px 7px; }
  .intro { align-items: start; gap: 10px; margin-bottom: 23px; }
  h1 { font-size: 25px; }
  .eyebrow { font-size: 13px; }
  .intro .button { font-size: 12px; padding: 8px 10px; min-height: 38px; margin-top: 24px; white-space: nowrap; }
  .editor { grid-template-columns: 1fr; }
  .stage { min-height: 330px; height: 360px; }
  .stage canvas { max-height: 330px; }
  .controls { border-left: 0; border-top: 1px solid var(--line); }
  .control-section { padding: 22px; }
  .empty .upload-icon { width: 64px; height: 64px; margin-bottom: 17px; }
  .empty p { margin-bottom: 18px; }
  .below { display: block; }
  .below > span { display: block; margin-top: 7px; padding-left: 20px; }
  .workspace-footer { padding: 0 15px 15px; }
  .dimension-row { max-width: 100%; }
  footer { padding-top: 0; }
}
@media (max-width: 370px) {
  main { padding-right: 14px; padding-left: 14px; }
  .intro { flex-wrap: wrap; }
  .intro .button { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .spinner { animation: none; }
}
