:root {
  color-scheme: light;
  --bg: #f2f6f2; --surface: #fff; --text: #24352d; --muted: #68796f; --line: #e0e9e1;
  --accent: #145b3c; --accent-hover: #0d4630; --soft: #f1f7f2; --gold: #d6b643; --danger: #a33838;
  --shadow: 0 12px 34px rgb(26 67 43 / 7%);
  --vs: .75;
  --input: #fff; --soft2: #e6eee8; --line2: #cfdcd2; --text2: #3c5246; --on-accent: #fff; --topbar: rgb(255 255 255 / 94%); --glow: rgb(220 235 219 / 50%);
}
/* ── 앱 테마 (설정 탭 → 앱 테마) ── */
:root[data-theme="sakura"] { --bg: #fff3f7; --text: #4a2a36; --text2: #6a3d4e; --muted: #9a6f80; --line: #f6d8e3; --line2: #efc3d3; --accent: #d6457f; --accent-hover: #b8336a; --soft: #fff0f5; --soft2: #ffe2ec; --gold: #f0a020; --glow: rgb(255 205 222 / 55%); --shadow: 0 12px 34px rgb(214 69 127 / 9%); }
:root[data-theme="sky"] { --bg: #eef6ff; --text: #1f3550; --text2: #2e4a6b; --muted: #64809e; --line: #d9e7f7; --line2: #bfd3ec; --accent: #2a6fc9; --accent-hover: #1d56a1; --soft: #eaf3ff; --soft2: #d9e9ff; --gold: #f2b632; --glow: rgb(190 220 255 / 55%); --shadow: 0 12px 34px rgb(42 111 201 / 9%); }
:root[data-theme="grape"] { --bg: #f6f1ff; --text: #2e2347; --text2: #44345f; --muted: #7f6f9c; --line: #e5daf5; --line2: #cdbbea; --accent: #7a3fc4; --accent-hover: #5f2fa0; --soft: #f1e9ff; --soft2: #e3d6fa; --gold: #f0b429; --glow: rgb(220 200 250 / 55%); --shadow: 0 12px 34px rgb(122 63 196 / 9%); }
:root[data-theme="sunny"] { --bg: #fff8e6; --text: #4a3510; --text2: #62481a; --muted: #8f7640; --line: #f4e4b8; --line2: #e8cf8e; --accent: #d97100; --accent-hover: #b25b00; --soft: #fff3d1; --soft2: #ffe8b0; --gold: #2f9e6a; --glow: rgb(255 226 150 / 55%); --shadow: 0 12px 34px rgb(217 113 0 / 9%); }
:root[data-theme="coral"] { --bg: #fff3ee; --text: #4a2a22; --text2: #66392e; --muted: #946a60; --line: #f7dbd1; --line2: #ecbfb1; --accent: #e04a35; --accent-hover: #bd3724; --soft: #ffebe4; --soft2: #ffd9cd; --gold: #2fb59a; --glow: rgb(255 210 195 / 55%); --shadow: 0 12px 34px rgb(224 74 53 / 9%); }
:root[data-theme="mint"] { --bg: #eefaf5; --text: #1f4a3f; --text2: #2d6355; --muted: #5f8f80; --line: #d3efe4; --line2: #b5dfd0; --accent: #1aa683; --accent-hover: #118568; --soft: #e6f8f1; --soft2: #cfeee1; --gold: #ff8aa6; --glow: rgb(190 240 220 / 55%); --shadow: 0 12px 34px rgb(26 166 131 / 9%); }
:root[data-theme="lemon"] { --bg: #fffbe0; --text: #4a4410; --text2: #675c15; --muted: #8f873f; --line: #f3eab0; --line2: #e6da85; --accent: #b38f00; --accent-hover: #8f7200; --soft: #fff8c4; --soft2: #fff0a0; --gold: #ff7a5c; --glow: rgb(255 240 150 / 55%); --shadow: 0 12px 34px rgb(179 143 0 / 9%); }
:root[data-theme="peach"] { --bg: #fff1e8; --text: #4f2e22; --text2: #6c4030; --muted: #a07260; --line: #fadccb; --line2: #f0c3a8; --accent: #e8693a; --accent-hover: #c94f26; --soft: #ffe9dc; --soft2: #ffd9c4; --gold: #7a5cd6; --glow: rgb(255 215 190 / 55%); --shadow: 0 12px 34px rgb(232 105 58 / 9%); }
:root[data-theme="ocean"] { --bg: #e8f7f9; --text: #123e4a; --text2: #1c5668; --muted: #52808e; --line: #cdebf0; --line2: #a9d8e1; --accent: #0e8fa8; --accent-hover: #0a6e83; --soft: #def3f7; --soft2: #c4e8ef; --gold: #ff9a52; --glow: rgb(180 230 240 / 55%); --shadow: 0 12px 34px rgb(14 143 168 / 9%); }
:root[data-theme="strawberry"] { --bg: #fff0f3; --text: #52202e; --text2: #722f43; --muted: #a8707f; --line: #f9d5de; --line2: #f1b8c6; --accent: #e8456b; --accent-hover: #c62f54; --soft: #ffe6ec; --soft2: #ffd2dd; --gold: #3aa57a; --glow: rgb(255 205 218 / 55%); --shadow: 0 12px 34px rgb(232 69 107 / 9%); }
:root[data-theme="choco"] { --bg: #f6ede6; --text: #3b2418; --text2: #54362a; --muted: #8e6e5e; --line: #e8d6c8; --line2: #d7bfae; --accent: #7a4a2e; --accent-hover: #5e3720; --soft: #f1e3d8; --soft2: #e6d0c0; --gold: #d98a1c; --glow: rgb(235 215 200 / 55%); --shadow: 0 12px 34px rgb(122 74 46 / 10%); }
:root[data-theme="mono"] { --bg: #f3f3f4; --text: #1d1d1f; --text2: #3a3a3c; --muted: #77777b; --line: #e2e2e4; --line2: #cacace; --accent: #2b2b30; --accent-hover: #000000; --soft: #ececee; --soft2: #dedee2; --gold: #ff3b6b; --glow: rgb(225 225 230 / 60%); --shadow: 0 12px 34px rgb(0 0 0 / 7%); }
:root[data-theme="christmas"] { --bg: #fff6f4; --text: #3b1e1e; --text2: #5a2d2d; --muted: #9a6b6b; --line: #f6d3d0; --line2: #eab5b1; --accent: #c62f3a; --accent-hover: #a02029; --soft: #ffeceb; --soft2: #ffd8d8; --gold: #2f8f55; --glow: rgb(255 214 210 / 55%); --shadow: 0 12px 34px rgb(198 47 58 / 9%); }
:root[data-theme="aurora"] { color-scheme: dark; --bg: #0d1f2d; --surface: #14303f; --input: #1a3a4b; --text: #e8fbff; --text2: #cdeef6; --muted: #8fbccc; --line: #1f4a5e; --line2: #2c6178; --accent: #5ef0c8; --accent-hover: #3dd8ae; --on-accent: #05241c; --soft: #173a4a; --soft2: #1f4a5e; --gold: #b78cff; --danger: #ff8a8a; --topbar: rgb(15 36 50 / 94%); --glow: rgb(60 200 170 / 28%); --shadow: 0 12px 34px rgb(0 0 20 / 40%); }
:root[data-theme="night"] { color-scheme: dark; --bg: #11153a; --surface: #1c2150; --input: #252b63; --text: #eef0ff; --text2: #d8dcff; --muted: #a9afdc; --line: #323a78; --line2: #444d94; --accent: #ffd24a; --accent-hover: #ffc21a; --on-accent: #1b1b3a; --soft: #232a60; --soft2: #2c346e; --gold: #ffd24a; --danger: #ff8a8a; --topbar: rgb(24 29 72 / 94%); --glow: rgb(90 80 190 / 40%); --shadow: 0 12px 34px rgb(0 0 20 / 35%); }
:root[data-theme="halloween"] { color-scheme: dark; --bg: #1a1024; --surface: #281838; --input: #321f46; --text: #f6ecff; --text2: #e5d3f7; --muted: #b9a2d3; --line: #43295c; --line2: #5a3a79; --accent: #ff8a1f; --accent-hover: #ff9d45; --on-accent: #1a1024; --soft: #2f1c42; --soft2: #3a2452; --gold: #ffd24a; --danger: #ff8a8a; --topbar: rgb(34 20 48 / 94%); --glow: rgb(120 60 160 / 38%); --shadow: 0 12px 34px rgb(0 0 0 / 40%); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; min-height: 100vh;
  background: radial-gradient(ellipse at 85% 3%, var(--glow), transparent 29rem), var(--bg);
  color: var(--text);
  font-family: var(--font, "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif);
  line-height: 1.55; -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
button, input, select { font: inherit; }
button { cursor: pointer; }

.topbar {
  position: sticky; z-index: 5; top: 0; height: 64px; padding: 0 max(16px, calc((100vw - 1100px) / 2));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid var(--line); background: var(--topbar); backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); font-size: 1.05rem; font-weight: 800; letter-spacing: -.04em; }
.school-mark { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; object-fit: cover; }
.tabs { display: flex; gap: 6px; padding: 4px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px 7px 8px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-weight: 750; font-size: .95rem; }
.tab[aria-selected="true"] { background: var(--accent); color: var(--on-accent); box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 28%, transparent); }
.tab:disabled { opacity: .45; cursor: not-allowed; }

main { width: min(100% - 28px, 1100px); margin: 0 auto; padding: 22px 0 60px; }
h2 { margin: 0 0 8px; font-size: 1.12rem; letter-spacing: -.03em; }
h3 { margin: 0 0 10px; font-size: 1rem; letter-spacing: -.03em; color: var(--accent); }
h4 { margin: 14px 0 6px; font-size: .88rem; color: var(--muted); }
.card { margin: 0 0 14px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: var(--shadow); }
.hint { margin: 6px 0 12px; color: var(--muted); font-size: .84rem; }
.status { min-height: 1.4em; margin: 8px 0 0; font-size: .88rem; color: var(--accent); font-weight: 650; }
.status.err { color: var(--danger); }

.row { display: grid; grid-template-columns: 120px 1fr; gap: 10px; align-items: center; margin: 9px 0; }
.row label { font-size: .88rem; font-weight: 700; color: var(--text2); }
input[type="text"], input[type="email"], input:not([type]), input[inputmode], select {
  width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line2); border-radius: 11px; background: var(--input); color: var(--text);
}
input:focus-visible, select:focus-visible, button:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 32%, transparent); outline-offset: 1px; }
.check { display: flex; gap: 9px; align-items: flex-start; margin: 10px 0; font-size: .88rem; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--accent); }
.link-btn { padding: 2px 4px; border: 0; background: none; color: var(--accent); text-decoration: underline; font-size: .86rem; }

.btn { min-height: 46px; padding: 10px 18px; border: 1px solid var(--line2); border-radius: 12px; background: var(--input); color: var(--accent); font-weight: 750; transition: background .15s, transform .1s; }
.btn:hover { background: var(--soft); }
.btn:active { transform: scale(.98); }
.btn.primary { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.big { min-height: 58px; font-size: 1.08rem; border-radius: 15px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.btn-col { display: grid; gap: 10px; }

/* 프레임 목록 / 선택 */
.frame-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 10px 0 16px; }
.frame-item { padding: 10px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); text-align: center; }
.frame-item.on { border-color: var(--accent); background: var(--soft); }
.frame-item canvas { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }
.frame-item .nm { margin: 8px 0 6px; font-weight: 750; font-size: .9rem; }
.frame-item .acts { display: flex; gap: 6px; justify-content: center; }
.frame-item .acts .btn { min-height: 36px; padding: 4px 12px; font-size: .82rem; }
.upload-box { padding: 14px 16px; border: 1px dashed var(--line2); border-radius: 14px; background: var(--soft); }
.frame-choices { display: flex; gap: 10px; overflow-x: auto; padding: 14px 4px 8px; }
.frame-choice { flex: 0 0 82px; padding: 5px; border: 2px solid var(--line); border-radius: 11px; background: var(--surface); }
.frame-choice.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.frame-choice canvas { display: block; width: 100%; height: auto; border-radius: 6px; }
.frame-choice span { display: block; margin-top: 4px; font-size: .72rem; font-weight: 700; text-align: center; color: var(--text); }

/* 촬영 레이아웃 */
.shoot-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.stage { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.stage-box { position: relative; width: min(calc(100% * var(--vs)), calc(560px * var(--vs))); aspect-ratio: 1200 / 1776; max-height: calc(100vh - 190px); border-radius: 16px; overflow: hidden; background: #0e1b14; box-shadow: 0 18px 42px color-mix(in srgb, var(--accent) 26%, transparent); }
.stage-actions { width: min(100%, max(calc(560px * var(--vs)), 260px)); display: grid; gap: 8px; }
.vs-row { display: flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 700; color: var(--muted); }
.vs-row input { flex: 1; accent-color: var(--accent); }
.vs-row output { min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.vs-row.big { font-size: .95rem; max-width: 420px; }
.stage-box canvas { display: block; width: 100%; height: 100%; object-fit: cover; }
#video { position: absolute; width: 2px; height: 2px; opacity: 0; pointer-events: none; }
.count { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: clamp(6rem, 22vw, 11rem); font-weight: 900; text-shadow: 0 6px 30px rgb(0 0 0 / 55%); pointer-events: none; }
.count.small { font-size: clamp(2rem, 7vw, 3.4rem); }
.count.pop { animation: pop .9s ease-out; }
@keyframes pop { from { transform: scale(1.5); opacity: .2; } 35% { opacity: 1; } to { transform: scale(1); opacity: 1; } }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.flash.go { animation: flash .45s ease-out; }
@keyframes flash { from { opacity: .95; } to { opacity: 0; } }
.cam-msg { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; background: rgb(14 27 20 / 88%); color: #fff; font-weight: 650; }
.side .btn.big { width: 100%; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 46px; padding: 8px 20px; border: 2px solid var(--line); border-radius: 999px; background: var(--input); color: var(--text); font-weight: 750; font-size: 1rem; }
.chips.small .chip { min-height: 38px; padding: 4px 14px; font-size: .88rem; }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.manual-box { display: grid; gap: 10px; margin: 10px 0 4px; padding: 12px 14px; border-radius: 12px; background: var(--soft); }
.manual-box label { display: grid; grid-template-columns: 1fr 1.3fr 42px; gap: 8px; align-items: center; font-size: .84rem; font-weight: 700; }
.manual-box input[type="range"] { width: 100%; accent-color: var(--accent); }
.manual-box output { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

.shot-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.shot-thumbs .t { position: relative; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: var(--soft2); border: 2px solid var(--line); }
.shot-thumbs .t.now { border-color: var(--gold); }
.shot-thumbs canvas { width: 100%; height: 100%; display: block; }
.shot-thumbs .n { position: absolute; left: 6px; top: 4px; font-weight: 800; color: #fff; text-shadow: 0 1px 4px rgb(0 0 0 / 60%); }

/* 고르기 / 결과 */
.pick-view { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 18px; align-items: start; }
.pick-preview { display: flex; justify-content: center; }
.pick-preview canvas { width: min(100%, calc(586px * var(--vs))); height: auto; border-radius: 6px; background: #fff; box-shadow: 0 18px 42px color-mix(in srgb, var(--accent) 26%, transparent); }
.pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0 14px; }
.pick-item { position: relative; aspect-ratio: 3 / 4; padding: 0; border: 3px solid transparent; border-radius: 12px; overflow: hidden; background: var(--soft2); }
.pick-item canvas { width: 100%; height: 100%; display: block; }
.pick-item.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(214 182 67 / 70%); }
.pick-item .badge { position: absolute; right: 6px; top: 6px; display: none; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 850; }
.pick-item.on .badge { display: grid; }
.mail-form { margin: 14px 0 0; padding: 14px; border-radius: 14px; background: var(--soft); }
.reset-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: .86rem; }

.toast { position: fixed; z-index: 20; left: 50%; bottom: 28px; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 12px 20px; border-radius: 999px; background: #1d2a23; color: #fff; font-weight: 650; box-shadow: 0 10px 30px rgb(0 0 0 / 25%); }


/* 탭 3개 · 미션 · 카메라 전환 · 글자색 · 인기 배지 */
.tab { white-space: nowrap; }
.tab .ti { width: 24px; height: 24px; flex: none; filter: drop-shadow(0 2px 3px rgb(0 0 0 / 18%)); }
.mode-note { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--soft2); color: var(--accent); font-size: .9rem; }
.card.opts { padding: 8px 18px; }
.card.opts .check { margin: 8px 0; }
.mission { position: absolute; left: 10px; right: 10px; bottom: 12px; padding: 12px 14px; border-radius: 14px; background: rgb(255 255 255 / 92%); color: #b0366a; font-weight: 850; font-size: clamp(1rem, 3.2vw, 1.4rem); text-align: center; box-shadow: 0 6px 20px rgb(0 0 0 / 25%); pointer-events: none; }
.flip { position: absolute; top: 10px; right: 10px; width: 46px; height: 46px; border: 0; border-radius: 50%; background: rgb(255 255 255 / 85%); font-size: 1.3rem; box-shadow: 0 4px 12px rgb(0 0 0 / 25%); }
.swatches { display: flex; gap: 8px; margin: 4px 0 8px; }
.font-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-top: 10px; }
.font-item { padding: 10px 12px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); text-align: left; }
.font-item[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.font-item small { display: block; color: var(--muted); font: 700 .74rem "Malgun Gothic", sans-serif; }
.font-item b { display: block; font-size: 1.35rem; line-height: 1.3; font-weight: 400; }
.font-item span { display: block; font-size: .9rem; }
.adj { margin-top: 2px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); font-size: .84rem; }
.adj summary { cursor: pointer; font-weight: 800; color: var(--accent); }
.adj[open] > div { max-height: 32vh; overflow: auto; padding-top: 6px; display: grid; gap: 6px; }
.adj .vs-row { font-size: .8rem; }
.adj .link-btn { justify-self: end; }
.mark-box { display: flex; align-items: center; gap: 16px; margin: 6px 0 10px; }
#mark-preview { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line2); background: #fff; }
.file-btn { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.date-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 2px 0 6px; }
.date-row input[type="date"] { width: auto; min-width: 150px; min-height: 42px; padding: 6px 10px; border: 1px solid var(--line2); border-radius: 11px; background: var(--input); color: var(--text); font: inherit; }
.date-row .btn { min-height: 42px; padding: 6px 14px; }
.date-out { font-weight: 800; color: var(--accent); }
.swatch { width: 34px; height: 34px; border: 3px solid var(--surface); border-radius: 50%; box-shadow: 0 0 0 1px var(--line2); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--accent); }
.frame-choice { position: relative; }
.frame-choice .hot { position: absolute; left: 50%; top: -9px; transform: translateX(-50%); padding: 1px 8px; border-radius: 999px; background: #ff5a3c; color: #fff; font-size: .68rem; font-style: normal; font-weight: 800; white-space: nowrap; }
textarea { background: var(--input); color: var(--text); width: 100%; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 11px; font: inherit; resize: vertical; }

.manual-box .sub { margin-top: 4px; font-size: .78rem; color: var(--muted); }
.manual-box .chips { margin-bottom: 4px; }

/* 스티커 / 인쇄 장수 / QR / 프린터 */
.sticker-pal { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; margin: 8px 0 12px; max-height: 190px; overflow-y: auto; padding: 4px; border-radius: 12px; background: var(--soft); }
.sticker-pal button { min-height: 52px; border: 1px solid var(--line); border-radius: 10px; background: var(--input); font-size: 1.7rem; line-height: 1; }
.sticker-pal button:active { transform: scale(.92); }
.text-sticker { grid-template-columns: 1fr auto; }
.tools .btn { min-height: 44px; padding: 6px 12px; font-size: .88rem; }
#decor-canvas { touch-action: none; cursor: grab; }
.print-line { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: stretch; }
.copies { background: var(--input); display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 4px 12px; border: 1px solid var(--line2); border-radius: 15px; background: var(--input); font-size: .78rem; font-weight: 700; color: var(--muted); }
.copies select { min-height: 32px; padding: 2px 6px; font-size: 1rem; font-weight: 800; }
.qr-box { margin: 14px 0 0; padding: 14px; border-radius: 14px; background: var(--soft); text-align: center; }
.qr-box canvas { width: min(100%, 260px); height: auto; border-radius: 10px; background: #fff; padding: 8px; }
.qr-box p { margin: 8px 0 0; font-size: .88rem; }
.how { margin-top: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); font-size: .88rem; }
.how summary { cursor: pointer; font-weight: 750; color: var(--accent); }
.how ul { margin: 8px 0; padding-left: 18px; }
.print-page { width: 100mm; height: 148mm; break-after: page; page-break-after: always; overflow: hidden; }
.print-page:last-child { break-after: auto; page-break-after: auto; }
.print-page img { display: block; width: 100mm; height: 148mm; }

/* 인쇄: 완성된 네컷만, 10 x 14.8cm */
#print-area { display: none; }
@page { size: 100mm 148mm; margin: 0; }
@media print {
  body { background: #fff; min-height: 0; }
  .topbar, main, .toast { display: none !important; }
  #print-area { display: block; }
  }

@media (max-width: 860px) {
  .topbar { height: auto; flex-wrap: wrap; padding: 6px 10px 8px; gap: 6px; }
  .brand { flex: 1 0 100%; font-size: 1.05rem; }
  .brand span { display: inline; }
  .school-mark { width: 30px; height: 30px; }
  .tabs { flex: 1 0 100%; justify-content: space-between; }
  .tab { flex: 1; justify-content: center; }
  .tabs { gap: 2px; padding: 3px; }
  .tab { padding: 5px 8px 5px 5px; gap: 4px; font-size: .78rem; }
  .tab .ti { width: 20px; height: 20px; }
  .shoot-layout { display: block; }
  .stage { position: sticky; top: var(--tb, 98px); z-index: 4; padding: 6px 0 8px; margin: 0 -14px 6px; background: var(--bg); }
  .stage { gap: 8px; }
  .stage-box { width: auto; height: calc(min(60vh, 660px) * var(--vs)); max-height: none; margin: 0 auto; aspect-ratio: 1200 / 1776; border-radius: 14px; }
  .stage-actions { width: min(100% - 28px, 380px); }
  .stage-actions .btn.big { min-height: 50px; }
  .count { font-size: clamp(4.5rem, 24vw, 8rem); }
  .mission { font-size: .95rem; padding: 9px 10px; bottom: 8px; }
  .shoot-layout, .pick-view { grid-template-columns: 1fr; }
  .stage-box { max-height: none; }
  .row { grid-template-columns: 1fr; gap: 4px; }
  .brand span { font-size: .95rem; }
  .tab { padding: 8px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .count.pop, .flash.go { animation: none; }
}

.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 10px; }
.theme-item { padding: 10px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); text-align: center; font-weight: 800; }
.theme-item[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.theme-item .dots { display: flex; justify-content: center; gap: 6px; margin: 0 0 8px; }
.theme-item .dots i { display: block; width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgb(0 0 0 / 8%); }
