:root {
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  color: #16223a;
  background: #f4f6fa;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
html.framed, html.framed body { overflow: hidden; }
main { max-width: 1060px; margin: auto; padding: 0 28px 60px; }
.masthead { display: flex; align-items: center; gap: 11px; height: 76px; border-bottom: 1px solid #dce2ed; font-size: 15px; font-weight: 700; }
.mark { display: grid; place-items: center; border-radius: 8px; width: 31px; height: 31px; background: #204bc6; color: white; font-size: 24px; line-height: 1; }
.intro { margin: 42px 0 25px; }
h1 { margin: 0 0 10px; font-size: clamp(30px, 5vw, 44px); letter-spacing: -.06em; }
p { margin: 0; }
.intro p, .hint { color: #55637b; }
.grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; }
.panel { min-width: 0; border: 1px solid #dce2ed; background: white; border-radius: 15px; padding: 24px; }
h2 { margin: 0 0 20px; font-size: 19px; letter-spacing: -.03em; }
.stage { display: grid; justify-items: center; gap: 11px; border-radius: 10px; padding: 22px; background: #eef2f9; overflow: auto; }
.measure { font-size: 12px; color: #55637b; }
.label { position: relative; width: var(--label-width, 50mm); height: var(--label-height, 30mm); flex: none; background: white; box-shadow: 0 6px 20px #17284922; }
.size-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.size-pair label { margin-bottom: 0; }
.size-pair input { margin-top: 6px; }
.base { display: block; width: 100%; height: 100%; }
dl { display: flex; flex-wrap: wrap; gap: 20px 33px; margin: 22px 0 0; font-size: 13px; }
dl div { display: flex; gap: 8px; }
dt { color: #55637b; }
dd { margin: 0; font-weight: 700; }
label { display: block; margin-bottom: 9px; font-weight: 700; font-size: 14px; }
label span { margin-left: 5px; color: #55637b; font-weight: 400; }
input, button, select { font: inherit; border-radius: 8px; }
input, select { width: 100%; padding: 13px; border: 1px solid #b9c4d8; color: inherit; }
.hint { font-size: 12px; margin: 8px 0 18px; }
button { min-height: 44px; padding: 8px 5px; border: 1px solid #b9c4d8; color: #193576; background: white; font-size: 13px; font-weight: 700; cursor: pointer; }
button:hover { background: #eff4ff; }
button:disabled { opacity: .6; cursor: wait; }
.actions { display: grid; gap: 8px; grid-template-columns: 1fr; margin-top: 4px; }
.tune { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 16px; }
.tune label { margin-bottom: 0; }
.tune input { margin-top: 6px; }
.guide { margin-top: 12px; font-size: 12px; line-height: 1.7; color: #475570; }
.guide ol { margin: 6px 0 0; padding-left: 18px; }
#printer-model { margin-bottom: 12px; }
.primary { background: #204bc6; border-color: #204bc6; color: white; font-size: 15px; }
.primary:hover { background: #173ba2; }
.primary:disabled { background: #204bc6; }
:focus-visible { outline: 3px solid #799dff; outline-offset: 2px; }
.status { color: #a32731; font-size: 13px; margin-top: 8px; }
.status:empty { display: none; }
aside { margin-top: 19px; padding: 13px; background: #f2f5fa; border-radius: 8px; font-size: 12px; line-height: 1.7; }
aside p { color: #475570; }
@media (max-width: 700px) {
  main { padding-inline: 16px; }
  .grid { grid-template-columns: 1fr; }
  .intro { margin-top: 26px; }
  .actions { grid-template-columns: 1fr; }
}
.quantity { margin-bottom: 16px; }
.quantity input { width: 108px; margin-right: 5px; }
[hidden] { display: none !important; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
select { margin-bottom: 16px; font-size: 13px; background: white; }
#rotate { margin-bottom: 0; }
fieldset:disabled { opacity: .55; }
fieldset:disabled button { cursor: default; }
#source { font-size: 13px; }
.empty-preview {
  display: grid; place-content: center; gap: 8px; width: 100%; min-height: 220px;
  padding: 20px; border: 1px dashed #a8b7ce; border-radius: 10px;
  background: #eef2f9; color: #253c65; font-size: 14px;
}
.empty-preview span { color: #55637b; font-size: 13px; font-weight: 400; }
.preview.is-dragging { outline: 2px dashed #2450b5; outline-offset: -4px; }
.preview.is-dragging .empty-preview,
.preview.is-dragging .stage { background: #e2ebff; }

aside strong.caution, #print-hint strong.caution { color: #a32731; }
