@font-face {
  font-family: "Studio Sans";
  src: url("./assets/body-ko.woff") format("woff");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Studio Myeongjo";
  src: url("./assets/display-ko.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Bricolage;
  src: url("./assets/bricolage-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #faf8f3; --white: #fffdfa; --ink: #302b28; --muted: #68615b; --line: #d8d1c8;
  --blue: #722b3d; --blue-dark: #582030; --soft: #f1e6e7; --wash: #f0ece5;
  --body: "Studio Sans", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --display: "Studio Myeongjo", "AppleMyungjo", Batang, serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 300px; -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 400 1rem/1.55 var(--body); word-break: keep-all; overflow-wrap: anywhere; }
body:has(dialog[open]) { overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; touch-action: manipulation; }
button:disabled { opacity: .45; cursor: default; }
:focus-visible, .choice:has(input:focus-visible), .file-control:focus-within { outline: 3px solid var(--blue); outline-offset: 3px; }
h1,h2,h3,p,ol,figure { margin: 0; }
h1,h2,h3 { line-height: 1.2; }
fieldset { padding: 0; margin: 0; min-width: 0; border: 0; }
i[data-icon] { display: inline-flex; width: 1.15em; height: 1.15em; align-items: center; flex: none; }
i[data-icon] svg { width: 100%; height: 100%; }
.shell { width: min(1184px, calc(100% - 88px)); margin-inline: auto; }
.topbar { border-bottom: 1px solid var(--line); }
.bar-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand,.top-actions,.help-button { display: inline-flex; align-items: center; }
.brand { min-width: 0; gap: 9px; }
.brand img { width: 33px; height: 33px; display: block; object-fit: contain; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: italic 700 1.92rem/1.18 Georgia,var(--display); letter-spacing: -.07em; padding-right: 4px; }
.top-actions { flex: none; gap: 18px; }
.help-button { font-size: .86rem; min-height: 42px; gap: 6px; }
.help-button:hover,.inline-button:hover,.text-button:hover,.guide-page a:hover { text-decoration: underline; text-underline-offset: 4px; }
.main-shell { padding-top: clamp(24px,3.1vw,46px); }
.mast { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; margin-bottom: 27px; }
.mast > div { min-width: 0; }
h1 { font: 700 clamp(3rem,4.7vw,4.8rem)/1.15 var(--display); letter-spacing: -.068em; }
h1:focus { outline: 0; }
.mast p { color: var(--muted); font-size: .98rem; margin-top: 8px; letter-spacing: -.03em; text-wrap: pretty; }
.steps { list-style: none; display: flex; flex-wrap: wrap; flex: none; padding: 0; gap: 15px; }
.steps li { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); }
.steps li span { display: grid; place-items: center; width: 21px; height: 21px; border: 1px solid var(--line); border-radius: 50%; font: 600 .78rem/1 Georgia,serif; }
.steps li[aria-current=step] { color: var(--blue); font-weight: 700; }
.steps li[aria-current=step] span { border-color: var(--blue); background: var(--blue); color: #fff; }
.workspace { display: grid; grid-template-columns: minmax(0,1.56fr) minmax(340px,.97fr); gap: clamp(26px,4.2vw,66px); align-items: start; }
.preview-panel,.panel { min-width: 0; }
.sample-board,.result-board {
  background-color: #d3b3a5;
  background-image: url("./assets/studio-table.webp"); background-size: cover; background-position: center;
  position: relative; isolation: isolate; overflow: hidden; border-radius: 5px;
}
.sample-board { height: clamp(420px,38vw,500px); display: grid; grid-template-rows: minmax(0,1fr) auto; padding: clamp(24px,3vw,42px) 7% 17px; gap: 15px; }
.print-stage { min-width: 0; min-height: 0; display: grid; place-items: center; }
.proof-output { width: 100%; height: 100%; display: grid; place-items: center; min-height: 0; }
.proof-output canvas { width: 100%; height: 100%; min-height: 0; display: block; object-fit: contain; transform: rotate(-3deg) scale(.94); filter: drop-shadow(2px 4px 2px #35231538) drop-shadow(7px 13px 9px #40261f42); }
.cut-inspector { height: 100%; width: min(100%,475px); display: grid; grid-template-rows: minmax(0,1fr) auto; place-items: center; gap: 10px; min-height: 0; }
.cut-window { width: 100%; height: 100%; min-height: 0; }
.cut-window canvas { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(1px 4px 5px #30221e45); }
.cut-picker { display: flex; align-items: center; justify-content: center; gap: 8px; background: #fbf8f1; border-radius: 3px; padding: 4px 8px 4px 4px; }
.cut-picker output { font: 500 .76rem/1 var(--body); color: var(--muted); }
.cut-buttons { display: flex; gap: 4px; }
.cut-button { position: relative; width: 42px; height: 32px; display: inline-grid; padding: 2px; border: 1px solid transparent; border-radius: 2px; }
.cut-button[aria-pressed=true] { border-color: var(--blue); }
.cut-button canvas { width: 100%; height: 100%; object-fit: cover; }
.cut-number { position: absolute; bottom: 2px; left: 2px; padding-inline: 3px; color: white; background: #322a26db; font: 600 .6rem/1.4 var(--body); }
.preview-switch { display: inline-flex; align-items: center; justify-self: center; gap: 2px; padding: 3px; background: #faf8f1; border: 1px solid #fff9; border-radius: 30px; box-shadow: 0 2px 8px #422d2126; }
.preview-switch button { padding: 6px 14px; font-size: .79rem; min-height: 31px; border-radius: 30px; color: #534641; }
.preview-switch button[aria-pressed=true] { background: #403431; color: #fff; }
.preview-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; font-size: .81rem; color: var(--muted); }
.preview-foot > span:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.preview-foot strong { color: var(--ink); font-weight: 600; }
.preview-foot i { width: 14px; height: 14px; }.preview-foot b { font-weight: 400; }
.panel { display: flex; flex-direction: column; border-top: 2px solid var(--ink); padding: 19px 0 0; }
.panel-title { display: flex; align-items: center; gap: 8px; margin-bottom: 21px; }
h2 { font: 700 1.8rem/1.23 var(--display); letter-spacing: -.064em; }
.title-icon { display: none; }
.field-group,.range-field,.switch-row { margin-bottom: 20px; }
.field-group legend,.field-group > label,.field-heading h3,.switch-row label,.range-field label { display: block; font-size: .91rem; letter-spacing: -.025em; font-weight: 650; margin-bottom: 9px; }
.layout-options,.themes { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; }
.layout-options { grid-template-columns: repeat(3,minmax(0,1fr)); }
#captureSettings {padding:10px 0;margin-bottom:16px;border-block:1px solid var(--line)}
#captureSettings summary {cursor:pointer;font-weight:650;font-size:.92rem}
#settingsSummary {float:right;color:var(--muted);font-weight:400;font-size:.85rem}
#captureSettings .field-group,#captureSettings .shot-target {margin:12px 0 0}
.shot-target,.art-controls label {display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:.88rem}
.shot-target select {border:1px solid var(--line);background:var(--white);border-radius:4px;padding:5px 12px}
.art-controls {display:grid;gap:8px;margin:10px 0 16px}.art-controls label {display:grid;grid-template-columns:6em minmax(0,1fr)}.art-controls input {accent-color:var(--blue)}
#inkSurface {position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:crosshair}
.site-foot a {margin-left:auto;color:var(--blue)}
.choice { display: flex; position: relative; min-width: 0; flex-direction: column; align-items: center; justify-content: center; text-align: center; cursor: pointer; user-select: none; }
.choice input,.sr-only { clip-path: inset(50%); position: absolute; width: 1px; height: 1px; overflow: hidden; white-space: nowrap; margin: 0; }
.layout-choice { min-height: 59px; gap: 6px; border: 1px solid var(--line); border-radius: 5px; font-size: .8rem; color: var(--muted); background: var(--white); }
.layout-choice svg { width: 29px; height: 17px; }
.layout-choice:hover,.utility-btn:hover,.file-control:hover { border-color: var(--ink); }
.layout-choice:has(:checked) { border-color: var(--blue); color: var(--blue); background: var(--soft); font-weight: 700; }
.theme-field { position: relative; }
.theme-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin: -33px 0 6px; min-height: 27px; }
.themes { max-height: 235px; overflow: auto; scrollbar-width: thin; padding: 3px; margin: -3px; row-gap: 9px; }
.theme-choice { gap: 4px; font-size: .76rem; color: var(--muted); }
.theme-choice canvas { display: block; width: 100%; height: 36px; border-radius: 4px; border: 1px solid #40322d20; }
.theme-choice > span:not(.selected-mark) { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 100%; }
.theme-choice:has(:checked) { color: var(--blue); font-weight: 700; }
.theme-choice:has(:checked) canvas,.theme-choice:hover canvas { outline: 1px solid var(--blue); outline-offset: 1px; }
.selected-mark { display: none; position: absolute; right: 3px; top: 3px; width: 17px; height: 17px; border: 1px solid white; place-items: center; border-radius: 50%; color: white; background: var(--blue); }
.selected-mark svg { width: 10px; height: 10px; }.theme-choice:has(:checked) .selected-mark { display: grid; }
.action-stack { display: grid; gap: 8px; margin-top: auto; padding-top: 3px; }
.btn,.utility-btn,.file-control,.icon-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; border-radius: 5px; }
.btn { min-height: 48px; padding: 9px 16px; font-size: .96rem; font-weight: 650; transition: background .15s; }
.primary { background: var(--blue); color: white; }
.primary:hover:not(:disabled) { background: var(--blue-dark); }
.secondary,.small-btn { background: var(--white); border: 1px solid var(--line); }
.secondary:hover:not(:disabled),.small-btn:hover { background: var(--wash); }
.text-button,.inline-button { min-height: 32px; padding: 2px 0; font-size: .83rem; font-weight: 600; }
.inline-button { color: var(--blue); }.text-button { color: var(--muted); }
.site-foot { display: flex; align-items: center; gap: 7px; margin-top: 22px; border-top: 1px solid var(--line); padding-block: 14px 22px; color: var(--muted); font-size: .8rem; }
.segments { display: flex; padding: 3px; gap: 3px; border-radius: 5px; background: var(--wash); }
.segment { flex: 1; min-height: 36px; color: var(--muted); font-size: .85rem; border-radius: 3px; }
.segment:has(:checked) { color: var(--blue); background: var(--white); box-shadow: 0 1px 3px #45342d20; }
.selection-note,.capture-copy,.input-hint,.tool-hint,.custom-status,.config-transfer p { color: var(--muted); font-size: .86rem; line-height: 1.6; }
.selection-note { margin: -11px 0 17px; }
.switch-row,.field-heading,.range-field label,.edit-links,.dialog-head,.frame-save { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.switch-row label,.field-heading h3 { margin: 0; }
.switch { appearance: none; width: 43px; height: 26px; border: none; padding: 3px; border-radius: 20px; background: #847e77; cursor: pointer; margin: 0; }
.switch:before { content: ""; display: block; width: 20px; height: 20px; border-radius: 50%; background: white; }
.switch:checked { background: var(--blue); }.switch:checked:before { transform: translateX(17px); }
.capture-copy { padding: 13px 15px; border-left: 2px solid var(--line); background: var(--wash); margin-bottom: 20px; }
.viewfinder { position: relative; display: grid; grid-template: minmax(0,1fr)/minmax(0,1fr); isolation: isolate; overflow: hidden; border-radius: 5px; aspect-ratio: 1.5; background: #282321; color: #fff; }
.viewfinder>video,.shutter-light { grid-area: 1/1; }.viewfinder video { width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: cover; }.mirrored video { transform: scaleX(-1); }
.view-guides { position: absolute; inset: 10%; pointer-events: none; }.view-guides b { position: absolute; width: 22px; height: 22px; border: 2px solid #fffb; }
.view-guides b:nth-child(1){top:0;left:0;border-right:0;border-bottom:0}.view-guides b:nth-child(2){top:0;right:0;border-left:0;border-bottom:0}.view-guides b:nth-child(3){bottom:0;left:0;border-top:0;border-right:0}.view-guides b:nth-child(4){bottom:0;right:0;border-left:0;border-top:0}
.cam-overlay,.countdown { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 7px; padding: 18px; text-align: center; }
.cam-overlay { background: #342b29; }.cam-symbol { font-size: 1.7rem; }.cam-overlay h3 { font: 700 1.6rem var(--display); }.cam-overlay p { max-width: 340px; color: #e9dfd7; font-size: .88rem; }
.small-btn { min-height: 34px; color: var(--ink); font-size: .84rem; }.frame-count { position: absolute; top: 14px; left: 14px; padding: 3px 10px; background: #302623cc; border-radius: 3px; font-variant-numeric: tabular-nums; }
.countdown { font: 700 clamp(4rem,10vw,8rem)/1 Georgia,serif; text-shadow: 0 3px 20px #0008; pointer-events: none; }.shutter-light { z-index: 2; background: white; opacity: 0; pointer-events: none; }
.shot-row,.retake-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin-top: 9px; }
.shot,.retake-grid button { display: grid; place-items: center; overflow: hidden; background: var(--wash); color: var(--muted); border: 1px solid var(--line); border-radius: 3px; font-size: .8rem; }
.shot { aspect-ratio: 1.65; }.shot.current { outline: 2px solid var(--blue); }.shot canvas,.retake-grid canvas { width: 100%; height: 100%; object-fit: cover; }.retake-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.retake-grid span { padding: 5px; }
.result-board { height: clamp(430px,39vw,540px); container-type:size; }
.shot-row { grid-template-columns: repeat(8,minmax(0,1fr)); gap: 4px; }
.pick-board { height: clamp(380px,37vw,505px); }
#pickPaper { width: min(calc(100cqw - 36px),calc((100cqh - 65px)*var(--paper-ratio))); aspect-ratio: var(--paper-ratio); }
#pickCanvas { width: 100%; height: 100%; display: block; }
#pickSlots { position: absolute; inset: 0; }
.pick-slot { position: absolute; display: grid; place-items: start; padding: 3px; color: #fff; }
.pick-slot span,.shot-number,.candidate strong { padding: 3px 5px; border-radius: 2px; background: #302624da; font: 650 .72rem/1.2 var(--body); }
.pick-slot.empty { place-items: center; }.pick-slot.empty span { color: #665651; background: #f8f2ea; }
.pick-slot[aria-pressed=true],.pick-slot:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.pick-slot[aria-pressed=true] span,.candidate strong { background: var(--blue); color: #fff; }
.pick-panel .field-heading { margin-bottom: 6px; }
#pickCount { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--blue); }
#candidates { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin: 15px 0 10px; }
.candidate { position: relative; aspect-ratio: 1.5; overflow: hidden; min-width: 0; border-radius: 4px; box-shadow: 0 0 0 1px var(--line); }
.candidate canvas { display: block; width: 100%; height: 100%; }
.candidate[aria-pressed=true] { outline: 3px solid var(--blue); outline-offset: 0; }
.candidate .shot-number { position: absolute; left: 3px; top: 3px; color: #fff; }
.candidate strong { position: absolute; right: 2px; bottom: 2px; }
.candidate strong:empty { display: none; }.pick-panel .action-stack { margin-top: 18px; }
.crop-editor { display: grid; gap: 12px; }
.crop-editor canvas { display: block; width: 100%; border-radius: 4px; cursor: grab; touch-action: none; }.crop-editor canvas:active { cursor: grabbing; }
.crop-editor label { display: grid; grid-template-columns: 6em 1fr; align-items: center; gap: 8px; font-size: .9rem; }
.crop-editor input { min-width: 0; accent-color: var(--blue); }
@media(max-width:760px) {
  #pickBoard { height: clamp(235px,65vw,320px); }
  #pickBoard[data-layout=vertical] { height: clamp(318px,41svh,365px); }
  #shotRow { grid-template-columns: repeat(4,minmax(0,1fr)); }
  #shotRow .shot { aspect-ratio: 2; }
}
.board-label { position: absolute; left: 12px; top: 12px; display: flex; align-items: center; gap: 6px; border-radius: 3px; color: #423730; font-size: .77rem; background: #fbf8f1e8; padding: 4px 9px; z-index: 1; pointer-events: none; }
.result-paper { position: absolute; top: 54%; left: 50%; transform: translate(-50%,-50%); box-shadow: 2px 5px 12px #40261f45; line-height: 0; }
#resultCanvas { width: 100%; height: 100%; display: block; touch-action: none; }
#stickerRing { position:absolute; border:1.5px dashed var(--blue); border-radius:5px; box-shadow:0 0 0 1px white; pointer-events:none; transform:translate(-50%,-50%); }
.editor-tabs { display:flex; gap:22px; margin:-3px 0 16px; border-bottom:1px solid var(--line); }
.editor-tabs button { padding:6px 0 9px; border-bottom:2px solid transparent; color:var(--muted); font-size:.9rem; }.editor-tabs button[aria-pressed=true]{color:var(--blue);border-color:var(--blue);font-weight:650}
.stickers { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 5px; }
.sticker-btn { min-height: 42px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--white); border-radius: 4px; }.sticker-btn:hover { background: var(--soft); }.sticker-btn canvas { width: 30px; height: 30px; }
.input-hint { margin-top: 6px; font-size: .79rem; }.field-heading { margin-bottom: 8px; }.range-field label { margin: 0; }.range-field output { color: var(--blue); }
input[type=range] { width: 100%; accent-color: var(--blue); min-height: 24px; }
input[type=text],.custom-form select,.custom-form input[type=color] { width: 100%; min-width: 0; min-height: 40px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); padding: 7px 9px; font-size: .92rem; }
dialog { width: min(440px,calc(100% - 28px)); max-height: 85dvh; padding: 24px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--paper); box-shadow: 0 22px 75px #30231e35; }
dialog::backdrop { background: #2a211e70; } .dialog-head { margin-bottom: 18px; }.dialog-head h2 { font-size: 1.65rem; }
.icon-button { width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 50%; }.icon-button:hover { background: var(--wash); }
#dialogBody p { color: var(--muted); font-size: .92rem; margin-bottom: 12px; }
.guide-list { padding: 0; list-style: none; display: grid; gap: 14px; }.guide-list li { display:grid; grid-template-columns:26px 1fr; gap:10px; }.guide-list li>span { text-align:center; color:var(--blue); font:italic 700 1.25rem Georgia,serif; }.guide-list b { display:block; margin-bottom:3px; }#dialogBody .guide-list p {margin:0}
.dialog-actions,.inline-controls { display: flex; gap: 8px; flex-wrap: wrap; }.dialog-actions { margin-top: 16px; justify-content: end; }.qr-image { display: block; max-width:100%; width:224px; margin:4px auto 14px; image-rendering:pixelated; }
#toast { position:fixed; z-index:9; left:50%; transform:translateX(-50%); bottom:22px; width:max-content; max-width:calc(100% - 24px); padding:9px 16px; color:#fff; background:#3e322f; border-radius:5px; font-size:.88rem; text-align:center; }
.custom-dialog { width:min(565px,calc(100% - 26px)); }.custom-form,.frame-inputs { display:grid;gap:16px; }.custom-form label:not(.file-control){display:grid;gap:5px;min-width:0;font-size:.86rem;font-weight:600;}
.config-grid {display:grid;grid-template-columns:1fr 1fr;gap:12px}.custom-form input[type=color]{padding:3px;cursor:pointer}.logo-field,.logo-field>div{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.logo-field>img{width:45px;height:45px;object-fit:contain}
.config-transfer,.art-options {padding:13px;border:1px solid var(--line);border-radius:5px}.config-transfer{background:var(--wash)}.config-transfer h3{font-size:1rem;margin-bottom:4px}.config-transfer .inline-controls,.art-options[open]>label,.art-options .inline-controls,.art-options .tool-hint{margin-top:9px}
.utility-btn,.file-control { position:relative;min-height:37px;border:1px solid var(--line);padding:5px 10px;background:var(--white);font-size:.82rem;cursor:pointer}.file-control input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.frame-editor{display:grid;grid-template-columns:minmax(90px,.75fr) minmax(0,1.25fr);gap:13px}.mini-board{min-height:176px;display:grid;place-items:center;background:var(--board-color,var(--wash));border-radius:4px}.mini-board canvas{max-width:93%;max-height:175px;object-fit:contain}.color-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.frame-inputs{gap:9px}.frame-save>.primary{flex:1}.art-options summary{cursor:pointer;font-size:.87rem;font-weight:600}
.caption-font-field { display: grid; gap: 8px; }
#boothStatus { display: none; margin: 24px auto; max-width: 620px; }
#boothStatus h1 { font-size: clamp(1.55rem,5vw,2.2rem); }
.booth-status-actions { margin-top: 1rem; }
.booth-loading #boothStatus { display: block; }
.booth-loading .mast,.booth-loading #setup,.booth-loading #helpButton { display: none; }
.student-booth #schoolButton,.student-booth #shareSetup { display: none; }
.student-booth:not(.booth-fallback) .layout-field,.student-booth:not(.booth-fallback) .theme-field,.student-booth:not(.booth-fallback) #editFrame,.booth-fallback .theme-actions { display: none; }
#shareSetup .share-lock {display:flex;align-items:center;gap:8px;font-size:.93rem;font-weight:650;cursor:pointer;}
.share-lock input {width:18px;height:18px;accent-color:var(--blue);}
#captureSettings[data-locked] .field-group,#captureSettings[data-locked] .shot-target {display:none;}
#cameraHelp {color:inherit;text-decoration:underline;text-underline-offset:3px;font-size:.86rem;}
@media(max-width:480px){
  .cam-overlay {padding:10px;gap:4px;}
  .cam-overlay h3 {font-size:1.2rem;}
  .cam-overlay .cam-symbol {display:none;}
}
#boothLinkUrl { width: 100%; margin: 10px 0; }
.student-qr-preview { display:block; width:min(180px,100%); height:auto; margin:0 auto; }
.department-board {background:white;padding:clamp(16px,3vw,55px);}
.department-board .board-qr-layout {min-height:calc(100dvh - clamp(32px,6vw,110px));}
.department-board h1 {font-size:clamp(2rem,4.2vw,5rem);line-height:1.15;}
#departmentQrStatus:empty {display:none;}
#printSheet { display:none; }
#shareSetup select, #deskSetup select, .desk-main select, .desk-main input:not([type=checkbox]) {padding:.55rem .7rem; border:1px solid var(--line); border-radius:5px; background:white; color:var(--ink); font:inherit; max-width:100%;}
#shareSetup > label[for=studentPrinting], #deskSetup label[for=deskChoice], .desk-panel > label:first-child {font-weight:650; display:block;}
#deskSetup .inline-controls {margin:.5rem 0;}
.desk-main {max-width:48rem; margin:auto; padding:clamp(20px,5vw,58px) 20px 5rem;}
.desk-main h1 {font:700 clamp(2rem,5vw,3.4rem)/1.25 var(--display); margin:0 0 .5rem;}
.desk-panel { margin:1.25rem 0; padding:clamp(14px,3vw,24px); background:var(--white); border:1px solid var(--line); border-radius:8px; display:grid; gap:.75rem;}
.desk-main .share-lock {display:flex; align-items:center; gap:.5rem;}
.desk-ticket-number {display:block; font:700 clamp(1.5rem,6vw,2rem) var(--body); font-variant-numeric:tabular-nums; margin:.65em 0;}
#deskPhoto {display:block; width:100%; max-height:48vh; object-fit:contain;}
@media print {
  body.print-restricted > *, .desk-page > * { display:none !important; }
  body.print-restricted::after {content:"이 학생 링크에서는 기기 직접 인쇄를 사용할 수 없어요.";}
  body.desk-printing #deskPaper {display:block !important; position:fixed; inset:0; width:100%; height:100%; object-fit:contain; print-color-adjust:exact; -webkit-print-color-adjust:exact;}
  body.printing-photo { margin:0; padding:0; background:white; }
  body.printing-photo > :not(#printSheet) { display:none !important; }
  body.printing-photo #printSheet { display:block; position:fixed; inset:0; width:100%; height:100%; object-fit:contain; print-color-adjust:exact; -webkit-print-color-adjust:exact; }
}
#studentBoard { box-sizing:border-box; position:fixed; inset:0; margin:0; width:100%; max-width:none; height:100%; max-height:none; padding:clamp(12px,3vw,50px); border:0; border-radius:0; background:white; }
.board-qr-layout { min-height:100%; display:flex; align-items:center; justify-content:center; gap:clamp(16px,4vw,72px); }
#studentBoardQr { width:min(57vw,85vh); height:auto; flex:none; }
.board-qr-instructions { max-width:32em; overflow-wrap:anywhere; }
.board-qr-instructions h2 { font-size:clamp(2rem,4.2vw,5rem); line-height:1.18; }
.board-qr-instructions p { margin:1em 0; font-size:clamp(1rem,2vw,2.4rem); }
.board-qr-details { color:var(--muted); }
@media (orientation:portrait) {
  .board-qr-layout { flex-direction:column; text-align:center; }
  #studentBoardQr { width:min(88vw,55vh); }
}
.caption-font-field legend { margin-bottom: 7px; font-weight: 650; font-size: .9rem; }
#captionFontPreview { display: grid; place-items: center; text-align: center; min-height: 72px; padding: 12px; background: var(--wash); border-radius: 4px; overflow-wrap: anywhere; }
.caption-font-controls { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
#removeCaptionFont { justify-self: start; }
.custom-status{margin-top:10px;padding:8px;background:var(--soft);border-radius:4px}.custom-status.error{color:#8a301f;background:#ffede1}
.receive-main{width:min(455px,calc(100% - 32px));margin:35px auto;text-align:center}.receive-main h1{font-size:2.3rem}.receive-main p{margin:10px 0 16px;color:var(--muted)}.receive-board{display:grid;place-items:center;padding:16px;height:54vh;height:54dvh;background:var(--wash)}.receive-board img{display:block;width:auto;height:auto;max-width:100%;max-height:calc(54vh - 32px);max-height:calc(54dvh - 32px);object-fit:contain}.receive-main .btn{margin-top:14px;width:100%;text-decoration:none}
@media(max-width:920px) {
  .shell { width: calc(100% - 48px); }.workspace{grid-template-columns:minmax(0,1.12fr) minmax(302px,1fr);gap:24px}.steps {gap:9px}
}
@media(max-width:760px) {
  .shell { width: min(560px,calc(100% - 32px)); }.bar-inner {min-height:55px}.brand span{font-size:1.56rem}.brand img{width:28px;height:28px}.top-actions{gap:10px}.help-button{font-size:.77rem}
  .main-shell{padding-top:21px}.mast{display:grid;gap:11px;margin-bottom:14px}.mast p{margin-top:5px;font-size:.88rem}.steps{gap:13px}.steps li{font-size:.75rem}.steps li span{width:17px;height:17px;font-size:.68rem}
  h1{font-size:clamp(2.6rem,10vw,3.7rem)}.workspace{grid-template-columns:minmax(0,1fr);gap:12px}.sample-board{height:clamp(225px,67vw,340px);padding:15px 6% 9px;gap:4px}.proof-output canvas{transform:rotate(-3deg) scale(.94)}.preview-switch button{min-height:28px;padding:4px 12px;font-size:.75rem}
  .preview-foot{min-height:34px;font-size:.76rem}.panel{padding-top:12px}.panel-title{margin-bottom:14px}h2{font-size:1.55rem}.field-group{margin-bottom:16px}.choice{font-size:.78rem}.site-foot{margin-top:18px}
  .result-board{height:340px}.cut-picker{gap:4px}.cut-button{width:33px;height:27px}.cut-inspector{gap:4px}.preview-switch{padding:2px}.custom-dialog{padding:16px}
}
@media(max-width:360px) {
  .shell{width:calc(100% - 24px)}.brand{gap:5px}.brand span{max-width:32vw}.top-actions{gap:7px}.help-button{gap:4px}.theme-choice{font-size:.7rem}.layout-options,.themes{column-gap:5px}.theme-actions{gap:4px}
}
@media(max-width:760px) {
  .setup-panel .action-stack {
    position: sticky;
    bottom: 0;
    z-index: 2;
    grid-template-columns: 1.05fr 1fr;
    background: var(--paper);
    border-top: 1px solid var(--line);
    padding-block: 8px max(8px,env(safe-area-inset-bottom));
  }
  .setup-panel .action-stack:has(#importSetup[hidden]) { grid-template-columns: 1fr; }
  .setup-panel .action-stack .btn { padding-inline: 6px; font-size: .88rem; }
  .theme-choice { scroll-margin-bottom: 74px; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}
}

/* 12판 — 학생 공유 칸, 부서 운영 화면, 칠판 화면 */
a.brand,a.help-button,a.utility-btn,a.btn.secondary { color: var(--ink); text-decoration: none; }
a.btn { text-decoration: none; }
a.help-button { font-size: .9rem; font-weight: 600; }
a.help-button:hover { color: var(--blue); }
.site-foot a { white-space: nowrap; }
#dialogBody .share-caution { color: var(--blue); font-weight: 600; }
.share-setup { display: grid; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.share-heading { font: 700 1.15rem/1.3 var(--display); }
.share-lead { margin-top: -4px; color: var(--muted); font-size: .84rem; line-height: 1.6; }
.share-card { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--wash); }
.share-card h4 { margin: 0; font-size: .95rem; }
.share-card p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.6; }
.share-card > .btn { width: 100%; min-height: 44px; margin-top: 2px; }
.share-card > label[for=studentPrinting] { font-weight: 650; font-size: .9rem; }
.share-card #shareLockHint { margin-top: -4px; }
.desk-main.shell { max-width: none; padding: clamp(18px,4vw,40px) 0 5rem; }
.desk-head { display: grid; gap: .35rem; margin-bottom: 1.25rem; }
.desk-main h1 { margin: 0; }
#deskIntro { max-width: 46em; color: var(--muted); }
.desk-preset { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: .45rem; padding: 10px 14px; background: var(--wash); border-radius: 6px; font-size: .92rem; }
.preset-label { color: var(--muted); font-size: .8rem; font-weight: 650; }
.desk-grid { display: grid; gap: 20px; align-items: start; counter-reset: desk-step; }
.desk-column { display: grid; gap: 20px; align-content: start; }
.desk-grid .desk-panel { margin: 0; }
.desk-step { counter-increment: desk-step; }
.desk-step h2 { display: flex; align-items: center; gap: 10px; font: 700 1.35rem/1.25 var(--display); }
.desk-step h2::before { content: counter(desk-step); display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: white; font: 700 .9rem/1 var(--body); }
.desk-controls { display: grid; gap: .6rem; }
.desk-controls > label:first-child,#ticketForm label,.desk-add form label,#departmentQrResult > label { font-weight: 650; font-size: .9rem; }
.desk-add summary { width: max-content; padding: 4px 0; color: var(--blue); font-size: .9rem; font-weight: 650; cursor: pointer; }
.desk-add[open] summary { margin-bottom: .55rem; }
.desk-add.first-desk summary { display: none; }
.desk-add form,#ticketForm { display: grid; gap: .45rem; }
.desk-register { display: flex; flex-wrap: wrap; gap: 8px; }
.desk-register input { flex: 1 1 13rem; min-height: 48px; }
.desk-register .btn { flex: none; }
#ticketInput { font-size: 1.3rem; letter-spacing: .05em; font-variant-numeric: tabular-nums; }
.desk-status { padding: 9px 12px; border-radius: 5px; background: var(--soft); font-size: .9rem; }
.desk-status:empty { display: none; }
#departmentQrResult { display: grid; gap: 12px; }
#departmentQrResult > input { width: 100%; margin: 0; font-size: .82rem; color: var(--muted); }
.desk-qr { display: grid; justify-items: center; gap: 6px; padding: 14px; background: white; border: 1px solid var(--line); border-radius: 6px; }
.desk-qr .student-qr-preview { width: min(220px,100%); }
.desk-tip { padding: 10px 12px; border-left: 3px solid var(--blue); border-radius: 0 5px 5px 0; background: var(--wash); color: var(--muted); font-size: .84rem; line-height: 1.7; }
kbd { padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: white; color: var(--ink); font: 600 .78rem var(--body); }
.desk-preview { display: grid; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
#deskPhoto { max-height: 56vh; padding: 10px; background: var(--wash); border-radius: 6px; }
@media (min-width: 980px) {
  .desk-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .desk-work { position: sticky; top: 16px; }
}
.board-fullscreen { position: fixed; top: 14px; right: 14px; z-index: 2; min-height: 36px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 5px; background: var(--white); color: var(--muted); font-size: .85rem; }
.department-board h1 { font-family: var(--display); }
.board-qr-instructions .board-brand { margin: 0 0 .35em; color: var(--blue); font-size: clamp(1rem,1.6vw,1.8rem); font-weight: 700; }
.board-steps { display: grid; gap: .45em; margin: 1em 0 0; padding-left: 1.3em; font-size: clamp(1rem,1.9vw,2.2rem); line-height: 1.35; }
.board-steps li::marker { color: var(--blue); font-weight: 700; }
.board-qr-instructions .board-about { margin: 1.2em 0 0; color: var(--muted); font-size: clamp(.9rem,1.3vw,1.5rem); }
@media (orientation: portrait) { .board-steps { display: inline-grid; text-align: left; } }
.step-wait { display: none; color: var(--muted); font-size: .86rem; }
.desk-step.waiting .step-wait { display: block; }
.desk-step.waiting { background: transparent; border-style: dashed; }
.desk-step.waiting h2 { color: var(--muted); }
.desk-step.waiting h2::before { background: var(--line); color: var(--ink); }
.desk-step.waiting > .tool-hint,.desk-step.waiting #makeDepartmentQr { display: none; }
.student-booth .setup-panel .action-stack { border-top: 0; }
.rescue-panel { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 16px; align-items: center; margin: 0 0 22px; padding: 14px; border: 1px solid var(--blue); border-radius: 8px; background: var(--soft); }
.rescue-panel img { width: 92px; max-height: 140px; object-fit: contain; background: white; border-radius: 4px; box-shadow: 0 1px 4px #45342d30; }
.rescue-copy { display: grid; gap: 6px; }
.rescue-copy h2 { font: 700 1.2rem/1.3 var(--display); }
.rescue-copy p { color: var(--muted); font-size: .88rem; line-height: 1.6; }
.rescue-copy .btn { min-height: 42px; }
/* The rescue card belongs to the first screen; a new shoot keeps the camera view at the top. */
.main-shell:has(> #setup[hidden]) > #rescuePanel { display: none; }
@media(max-width:480px){ .rescue-panel { grid-template-columns: 72px minmax(0,1fr); gap: 12px; } .rescue-panel img { width: 72px; } }
#deskRetry { justify-self: start; margin-top: .3rem; }
#dialogBody .queue-note { color: var(--ink); font-weight: 600; padding: 10px 12px; border-radius: 6px; background: var(--soft); }
.save-state { margin: -2px 0 2px; color: var(--blue); font-size: .84rem; font-weight: 600; text-align: center; }
.save-state::before { content: "●"; margin-right: 6px; font-size: .7em; vertical-align: 2px; }
.save-state.done { color: var(--muted); font-weight: 500; }
.save-state.done::before { content: "✓"; font-size: 1em; vertical-align: 0; }
.save-state:empty { display: none; }
#dialogBody .link-weight { color: var(--muted); font-size: .84rem; }
#dialogBody .link-weight.heavy { color: #8a301f; padding: 8px 10px; border-radius: 6px; background: #ffede1; }
/* Small maker credit and contact under the booth and desk pages. */
.site-foot { flex-wrap: wrap; }
.site-credit { flex-basis: 100%; margin: 2px 0 0; color: var(--muted); font-size: .74rem; }
.site-foot .site-credit a, .site-credit a { margin-left: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.desk-credit { padding-bottom: 28px; }
.desk-page .desk-main.shell { padding-bottom: 2.5rem; }
.site-foot #privacyNote { flex: 1 1 0; min-width: 0; }
