/* 스쿨툴 화면 꾸미기 — 색은 :root 토큰에서만 정해요
   바탕·글자·선·글꼴·둥글기는 Leapinity 공통(leapinity-brand.css 의 --lp-*)을 따라가요. 스쿨툴 고유 색은 파랑 하나 */
:root {
  --lp-accent: #2563eb; --lp-accent-ink: #1d4ed8; --lp-on-accent: #ffffff;
  --bg: var(--lp-bg-soft);
  --surface: var(--lp-card);
  --surface-2: #eef1f8;
  --line: var(--lp-line);
  --line-strong: #c9cedb;
  --text: var(--lp-ink);
  --text-2: var(--lp-soft);
  --text-3: var(--lp-mute);
  --primary: #2563eb;
  --primary-ink: #ffffff;
  --danger: #c92a2a;
  --ok: #1f6b34;
  --shadow: var(--lp-shadow);
  --radius: var(--lp-r);
  --radius-s: var(--lp-r-sm);
  --font: var(--lp-font);
  /* 도구 색 (흰 글씨와 대비 4.5:1 이상). --on-tc 는 도구 색 위 글자 */
  --c-seat: #237a55;
  --c-pick: #c2410c;
  --c-group: #6741d9;
  --c-timer: #1864ab;
  --c-roulette: #c2255c;
  --on-tc: #ffffff;
  --tc: var(--primary);
  --tc-soft: color-mix(in srgb, var(--tc) 10%, var(--surface));
  /* 모둠 색 */
  --g0: #d6336c; --g1: #1971c2; --g2: #2b8a3e; --g3: #e8590c; --g4: #7048e8;
  --g5: #0c8599; --g6: #c2255c; --g7: #5c940d; --g8: #9c36b5; --g9: #a35b00;
  color-scheme: light;
}
/* 어두운 화면: 기기 설정이 어둡고 '밝게'를 고르지 않았을 때 + 🌙 버튼으로 '어둡게'를 골랐을 때 (두 곳 값은 같게) */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --lp-accent-ink: #8fb3ff;
  --surface-2: #1d2552;
  --line-strong: #3b4680;
  --primary: #8fb3ff;
  --primary-ink: #0b1030;
  --danger: #ff8aa6;
  --ok: #6ee7c4;
  --on-tc: #0b1030;
  --c-seat: #51cf66;
  --c-pick: #ff922b;
  --c-group: #b197fc;
  --c-timer: #4dabf7;
  --c-roulette: #f783ac;
  --g0: #f783ac; --g1: #74c0fc; --g2: #8ce99a; --g3: #ffa94d; --g4: #b197fc;
  --g5: #66d9e8; --g6: #faa2c1; --g7: #c0eb75; --g8: #e599f7; --g9: #ffd43b;
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --lp-accent-ink: #8fb3ff;
  --surface-2: #1d2552;
  --line-strong: #3b4680;
  --primary: #8fb3ff;
  --primary-ink: #0b1030;
  --danger: #ff8aa6;
  --ok: #6ee7c4;
  --on-tc: #0b1030;
  --c-seat: #51cf66;
  --c-pick: #ff922b;
  --c-group: #b197fc;
  --c-timer: #4dabf7;
  --c-roulette: #f783ac;
  --g0: #f783ac; --g1: #74c0fc; --g2: #8ce99a; --g3: #ffa94d; --g4: #b197fc;
  --g5: #66d9e8; --g6: #faa2c1; --g7: #c0eb75; --g8: #e599f7; --g9: #ffd43b;
  color-scheme: dark;
}
.c-seat { --tc: var(--c-seat); }
.c-pick { --tc: var(--c-pick); }
.c-group { --tc: var(--c-group); }
.c-timer { --tc: var(--c-timer); }
.c-roulette { --tc: var(--c-roulette); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  word-break: keep-all; overflow-wrap: anywhere;
}
a { color: var(--primary); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { top: 8px; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.center { text-align: center; }
.print-only { display: none; }

/* ── 머리 ── */
.site-header { z-index: 20; }
.header-inner { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.logo { flex: none; }
.nav { display: flex; gap: 4px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav-link { display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; text-decoration: none; color: var(--text-2); padding: 0 13px; border-radius: 999px; font-size: .92rem; font-weight: 600; }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.is-active { background: color-mix(in srgb, var(--lp-accent) 12%, var(--surface)); color: var(--lp-accent-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lp-accent) 40%, transparent); }
.theme-btn { flex: none; width: 44px; padding: 0; font-size: 1.1rem; }
@media (max-width: 760px) {
  .header-inner { flex-wrap: wrap; gap: 6px 10px; padding-top: 8px; padding-bottom: 6px; }
  .nav { order: 3; flex-basis: 100%; }
  .logo { flex: 1; }
}

/* ── 버튼 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 8px 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font-weight: 700; text-decoration: none; white-space: nowrap; transition: transform .2s var(--lp-ease), background .15s;
}
.btn:hover { background: var(--lp-ghost-hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-main { background: var(--tc); border-color: var(--tc); color: var(--on-tc); font-size: 1.08rem; padding: 10px 22px; }
.btn-main:hover { background: color-mix(in srgb, var(--tc) 88%, #000); }
.btn-ghost { background: transparent; }
.btn-small { min-height: 44px; padding: 6px 14px; font-size: .9rem; }
.btn-danger-text { color: var(--danger); background: transparent; border-color: transparent; align-self: flex-start; padding-left: 4px; }

/* ── 첫 화면 ── */
.hero { text-align: center; padding: 44px 16px 20px; }
.hero-kicker { display: inline-block; margin: 0 0 14px; padding: 6px 16px; border-radius: 999px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--lp-vio) 22%, transparent); color: var(--lp-chip-ink); font-size: .88rem; font-weight: 700; }
.hero h1 { font-size: clamp(1.9rem, 5.6vw, 3.2rem); font-weight: 800; letter-spacing: -.03em; }
.hl { color: var(--lp-accent-ink); }
.lead { color: var(--text-2); font-size: clamp(1rem, 2.2vw, 1.12rem); margin: 0 auto; max-width: 720px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 14px; margin: 24px 0; }
.card {
  display: flex; flex-direction: column; gap: 6px; padding: 22px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  text-decoration: none; color: var(--text); border-top: 6px solid var(--tc); transition: transform .15s;
}
.card:hover { transform: translateY(-3px); }
.card-emoji { font-size: 2.6rem; line-height: 1.1; }
.card-title { font-size: 1.3rem; font-weight: 800; }
.card-desc { color: var(--text-2); font-size: .95rem; flex: 1; }
.card-go { color: var(--tc); font-weight: 800; }
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; margin-bottom: 12px; }
.trust div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 16px 18px; display: flex; flex-direction: column; }
.trust span { color: var(--text-2); font-size: .93rem; }

/* ── 도구 화면 공통 ── */
.page-head { padding: 26px 16px 14px; }
.page-head h1 { font-size: clamp(1.6rem, 4.4vw, 2.3rem); font-weight: 800; letter-spacing: -.03em; margin-bottom: .25em; }
.page-head .lead { margin: 0; }
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; border-top: 6px solid var(--tc); }
.tool-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.spacer { flex: 1; }
.tool-grid { display: grid; gap: 16px; }
@media (min-width: 960px) {
  .tool-grid { grid-template-columns: 330px minmax(0, 1fr); align-items: start; }
}
.tool-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.stage { min-width: 0; background: var(--surface-2); border-radius: var(--radius-s); padding: 16px; min-height: 320px; }
.panel { display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 14px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.panel-head h2 { font-size: 1.05rem; margin: 0; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--tc-soft); color: var(--tc); font-weight: 800; font-size: .85rem; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; font-weight: 600; color: var(--text-2); }
label.inline { flex-direction: row; align-items: center; gap: 6px; flex-wrap: wrap; }
label.inline input { width: 4.5em; }
label.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 600; color: var(--text); cursor: pointer; min-height: 44px; }
label.check input { width: 20px; height: 20px; accent-color: var(--tc); flex: none; }
.grow { flex: 1; min-width: 0; }
input[type="text"], input[type="number"], select, textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface);
  padding: 9px 12px; font-size: 1rem; color: var(--text); min-height: 44px;
}
textarea { resize: vertical; line-height: 1.5; min-height: 140px; }
.field-row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.field-row.wrap-row { align-items: center; }
.hint { margin: 0; font-size: .87rem; color: var(--text-3); }
.privacy-note { margin: 0; font-size: .87rem; font-weight: 700; color: var(--ok); background: color-mix(in srgb, var(--ok) 9%, var(--surface)); padding: 10px 12px; border-radius: 12px; }
.status { margin: 0 0 12px; font-weight: 700; color: var(--text-2); min-height: 1.6em; text-align: center; }
.status.is-bad { color: var(--danger); }
.seg { display: flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; }
.seg label { flex: 1; flex-direction: row; justify-content: center; align-items: center; gap: 6px; min-height: 44px; padding: 0 8px; cursor: pointer; color: var(--text); }
.seg label:has(input:checked) { background: var(--tc); color: var(--on-tc); }
.seg input { accent-color: var(--tc); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 220px; overflow: auto; padding: 2px; }
.chip { min-height: 44px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 0 14px; cursor: pointer; font-size: .9rem; font-weight: 600; }
.chip.is-on { background: var(--tc); border-color: var(--tc); color: var(--on-tc); }
.front-pick summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; gap: 6px; }
.front-pick[open] summary { margin-bottom: 6px; }
.front-pick .hint { margin-bottom: 8px; }

/* ── 🪑 자리 바꾸기 ── */
.seat-room { display: flex; flex-direction: column; gap: 14px; }
.seat-room.is-flip { flex-direction: column-reverse; }
.board {
  align-self: center; width: min(70%, 520px); text-align: center; padding: 8px; border-radius: 8px;
  background: #2f5d46; color: #fff; font-weight: 800; letter-spacing: .3em; box-shadow: inset 0 0 0 4px #8b6b45;
}
.seat-grid { display: flex; flex-direction: column; gap: 10px; --seat-font: clamp(.72rem, calc((100vw - 64px) / var(--cols) / 4.6), 1.35rem); }
@media (min-width: 960px) {
  .seat-grid { --seat-font: clamp(.8rem, calc((min(100vw, 1240px) - 460px) / var(--cols) / 4.4), 1.7rem); }
}
.seat-row { display: flex; gap: clamp(6px, 1.6vw, 18px); justify-content: center; }
.desk { display: flex; gap: 3px; flex: 1 1 0; min-width: 0; max-width: 300px; }
.seat {
  flex: 1 1 0; min-width: 0; position: relative; cursor: pointer;
  min-height: max(2.9em, 44px); padding: .45em .25em; border-radius: 9px; font-size: var(--seat-font);
  background: var(--surface); border: 2px solid var(--line-strong); color: var(--text); font-weight: 800; line-height: 1.15;
  display: flex; align-items: center; justify-content: center; text-align: center;
}
.seat:hover { border-color: var(--tc); }
.seat-name { overflow-wrap: anywhere; }
.seat.is-empty { background: transparent; border-style: dashed; color: var(--text-3); font-weight: 500; cursor: default; }
.seat.is-empty .seat-name { font-size: .78em; }
.seat.is-pin { border-color: var(--tc); background: var(--tc-soft); }
.pin { position: absolute; top: -.55em; right: -.3em; font-size: .8em; }
.is-mixing .seat:not(.is-empty):not(.is-pin) { color: var(--text-3); }
.pop { animation: pop .35s cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── 🎯 이름 뽑기 ── */
.pick-stage { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 22px 16px; }
.pick-label { margin: 0; font-weight: 800; color: var(--text-2); font-size: clamp(1rem, 2.4vw, 1.4rem); }
.pick-names { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; min-height: 1.3em; width: 100%; }
.pick-name {
  font-size: clamp(2.6rem, 10vw, 6rem); font-weight: 900; line-height: 1.2; padding: .1em .45em; border-radius: 18px;
  background: var(--surface); border: 3px solid var(--line); min-width: 2.2em; max-width: 100%;
}
.pick-names.is-many .pick-name { font-size: clamp(1.6rem, 5vw, 3.2rem); }
.pick-name.is-spin { color: var(--text-3); }
.pick-name.is-hit { border-color: var(--tc); color: var(--tc); animation: pop .4s cubic-bezier(.3, 1.5, .5, 1) both; }
.pick-left { margin: 0; color: var(--text-2); font-weight: 700; }
.order-box { width: 100%; margin-top: 10px; text-align: left; }
.order-box.is-empty { display: none; }
.order-title { font-size: 1rem; color: var(--text-2); }
.order-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.order-list li { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 4px; font-weight: 700; }
.order-list .num { display: inline-grid; place-items: center; min-width: 1.8em; height: 1.8em; border-radius: 999px; background: var(--surface-2); font-size: .85em; }
.order-list li.is-new { border-color: var(--tc); }
.order-list li.is-new .num { background: var(--tc); color: var(--on-tc); }

/* ── 👥 모둠 나누기 ── */
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 12px; }
.gcard { background: var(--surface); border-radius: 14px; border: 1px solid var(--line); border-top: 8px solid var(--g); padding: 12px 14px; }
.gcard-title { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.2rem; color: var(--g); margin: 0 0 6px; }
.gcard-n { font-size: .85rem; color: var(--text-3); }
.gcard-list { list-style: none; margin: 0; padding: 0; font-weight: 700; font-size: 1.08rem; }
.gcard-list li { padding: 3px 0; border-bottom: 1px dashed var(--line); }
.gcard-list li:last-child { border-bottom: 0; }
.g0 { --g: var(--g0); } .g1 { --g: var(--g1); } .g2 { --g: var(--g2); } .g3 { --g: var(--g3); } .g4 { --g: var(--g4); }
.g5 { --g: var(--g5); } .g6 { --g: var(--g6); } .g7 { --g: var(--g7); } .g8 { --g: var(--g8); } .g9 { --g: var(--g9); }

/* ── ⏱️ 타이머 ── */
.timer-stage { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 20px 12px 24px; text-align: center; }
.timer-digits {
  font-size: clamp(4.5rem, 21vw, 15rem); font-weight: 800; line-height: 1; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; color: var(--text);
}
.timer-digits.is-long { font-size: clamp(3.2rem, 15vw, 11rem); }
.timer-digits.is-warn { color: var(--danger); }
.timer-bar { width: min(100%, 900px); height: 14px; border-radius: 99px; background: var(--line); overflow: hidden; }
.timer-bar span { display: block; height: 100%; background: var(--tc); transform-origin: left; transition: transform .2s linear; }
.timer-msg { margin: 0; min-height: 1.6em; font-weight: 800; font-size: clamp(1.1rem, 3vw, 2rem); color: var(--tc); }
.presets, .timer-set { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }
.preset { min-width: 76px; font-size: 1.1rem; }
.preset.is-on { background: var(--tc-soft); border-color: var(--tc); color: var(--tc); }
.tool-timer .tool-bar .btn-main { min-width: 130px; }
.tool-timer.is-done .timer-stage { animation: flash 1s steps(2) 6; }
.tool-timer.is-done .timer-digits { color: var(--danger); }
@keyframes flash { 50% { background: color-mix(in srgb, var(--danger) 22%, var(--surface-2)); } }

/* ── 🎡 룰렛 ── */
.roulette-stage { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 22px 12px; }
.wheel-box { position: relative; width: min(100%, 560px); aspect-ratio: 1; overflow: hidden; border-radius: 4px; }
.wheel { width: 100%; height: 100%; display: block; border-radius: 50%; will-change: transform; }
.wheel-pointer {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%); z-index: 2; width: 0; height: 0;
  border-left: 18px solid transparent; border-right: 18px solid transparent; border-top: 34px solid var(--text);
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.25));
}
.wheel-center {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2;
  width: 19%; aspect-ratio: 1; border-radius: 50%; border: 5px solid var(--surface); background: var(--text); color: var(--surface);
  font-weight: 900; font-size: clamp(.9rem, 3vw, 1.5rem); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.is-spinning .wheel-center { opacity: .8; cursor: default; }
.wheel-result { margin: 0; font-size: clamp(1.4rem, 4.6vw, 2.6rem); font-weight: 900; text-align: center; min-height: 1.4em; color: var(--text-2); }
.wheel-result.is-hit { color: var(--tc); animation: pop .4s cubic-bezier(.3, 1.5, .5, 1) both; }

/* ── 큰 화면 모드 ── */
.tool.is-stage {
  position: fixed; inset: 0; z-index: 100; border-radius: 0; border: 0; border-top: 8px solid var(--tc);
  margin: 0; overflow: auto; display: flex; flex-direction: column; padding: 12px 18px 18px;
}
body.has-stage { overflow: hidden; }
.is-stage .tool-grid { display: block; flex: 1; }
.is-stage .tool-side { display: none; }
.is-stage .stage { min-height: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; }
.is-stage .tool-bar { margin-bottom: 10px; }
.is-stage > .stage { flex: 1; height: auto; min-height: 0; }
.is-stage .seat-grid { --seat-font: clamp(1rem, min(calc(94vw / var(--cols) / 4.2), calc((100vh - 300px) / var(--rows) / 3.2)), 4.4rem); gap: 1.2vh; }
.is-stage .seat-row { gap: 1.6vw; }
.is-stage .desk { max-width: none; }
.is-stage .board { font-size: clamp(1rem, 2.4vh, 1.8rem); padding: 1vh; }
.is-stage .status { font-size: clamp(1rem, 2.2vh, 1.6rem); }
.is-stage .pick-name { font-size: min(16vw, 26vh); }
.is-stage .pick-names.is-many .pick-name { font-size: min(7vw, 12vh); }
.is-stage .pick-label, .is-stage .pick-left { font-size: clamp(1.2rem, 3vh, 2.2rem); }
.is-stage .order-list { font-size: clamp(1rem, 2.4vh, 1.8rem); }
/* 모둠: 모둠 수에 맞춘 고른 칸(--gcols × --grows, group.js 가 정함). 마지막 줄은 가운데로. 이름은 칸 너비·높이에 맞춰 크게 */
.is-stage .group-grid {
  --ggap: 1.6vh;
  display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: var(--ggap);
  --gname: clamp(1.1rem, min(calc(92vw / var(--gcols, 3) / 6.5), calc((100vh - 230px) / var(--grows, 2) / (var(--gmax, 4) + 1.6) / 1.45)), 4.6rem);
}
.is-stage .gcard { flex: 0 0 calc((100% - (var(--gcols, 3) - 1) * var(--ggap)) / var(--gcols, 3)); box-sizing: border-box; min-width: 0; padding: .5em .8em; font-size: var(--gname); }
.is-stage .gcard-title { font-size: .95em; margin-bottom: .2em; }
.is-stage .gcard-n { font-size: max(.62em, 15px); font-weight: 800; color: var(--text-2); }
.is-stage .gcard-list { font-size: 1em; line-height: 1.25; }
.is-stage .gcard-list li { padding: .1em 0; overflow-wrap: anywhere; }
.is-stage .timer-stage { justify-content: center; gap: 2vh; padding-top: 1vh; padding-bottom: 1vh; }
.is-stage .timer-digits { font-size: min(29vw, 46vh); }
.is-stage .timer-digits.is-long { font-size: min(19vw, 40vh); }
/* 큰 화면(TV)에서 끝났을 때: '시간이 끝났어요!' 를 아주 크게, 00:00 은 조금 작게 해서 자리를 내줌 */
.is-stage .timer-msg { font-size: clamp(1.6rem, 4.5vh, 3rem); }
.is-stage.is-done .timer-msg { font-size: min(8.5vw, 13vh); line-height: 1.15; min-height: 0; }
.is-stage.is-done .timer-digits, .is-stage.is-done .timer-digits.is-long { font-size: min(17vw, 28vh); }
.is-stage .wheel-box { width: min(100%, calc(100vh - 270px)); }
.is-stage .wheel-result { font-size: clamp(1.6rem, 5vh, 3.6rem); }

/* ── 설명·FAQ ── */
.content { margin-top: 36px; }
.content h2 { font-size: 1.35rem; }
.content h3 { font-size: 1.05rem; margin-top: 1.2em; }
.steps { padding-left: 1.3em; margin: 0; }
.steps li { margin-bottom: 6px; }
.keys { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
kbd { display: inline-block; min-width: 2em; text-align: center; padding: 1px 8px; border-radius: 6px; border: 1px solid var(--line-strong); border-bottom-width: 3px; background: var(--surface); font-family: inherit; font-weight: 700; font-size: .9em; }
.faq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 13px 16px; min-height: 44px; font-weight: 700; }
.faq p { margin: 0; padding: 0 16px 14px; color: var(--text-2); }
.mini-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 10px; }
.mini-card { display: flex; align-items: center; gap: 10px; padding: 14px; min-height: 44px; border-radius: var(--radius-s); background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--tc); text-decoration: none; color: var(--text); font-weight: 800; }
.mini-emoji { font-size: 1.5rem; }
.legal h2 { font-size: 1.12rem; margin-top: 1.4em; }
.legal p { color: var(--text-2); }
.nf { text-align: center; }
.nf-emoji { font-size: 3.5rem; margin: 0; }

/* ── 바닥 (Leapinity 공통 .lp-foot + 스쿨툴 안내) ── */
.site-footer { margin-top: 56px; }
.foot-site { width: 100%; }
.foot-logo { font-weight: 800; color: var(--lp-foot-hi); margin: 0 0 4px; }
.foot-logo span { font-weight: 600; color: var(--lp-foot-ink); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 0 18px; }
.foot-nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }
.foot-nav a:hover { color: var(--lp-foot-hi); }
.foot-note { margin: 6px 0 0; font-size: .9rem; }

/* ── 알림 ── */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; z-index: 300;
  background: var(--text); color: var(--surface); padding: 10px 18px; border-radius: 12px; font-weight: 700; max-width: calc(100% - 32px);
  transition: opacity .2s, transform .2s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ── 인쇄 (자리표) ── */
@media print {
  @page { size: landscape; margin: 12mm; }
  :root:root:root { --surface: #fff; --surface-2: #fff; --text: #000; --line-strong: #555; color-scheme: light; }
  body { background: #fff; }
  .site-header, .site-footer, .tool-bar, .tool-side, .content, .page-head .lead, .status, .skip, .toast, .lp-ad { display: none !important; }
  .tool, .stage { border: 0; box-shadow: none; padding: 0; background: #fff; }
  .tool-grid { display: block; }
  .page-head { padding: 0 0 8px; }
  .seat-grid { --seat-font: clamp(10pt, calc(240mm / var(--cols) / 4.2), 22pt); }
  .seat { border: 1.5pt solid #333; background: #fff; break-inside: avoid; }
  .seat.is-empty { border-style: dashed; }
  .pin { display: none; }
  .board { background: #fff; color: #000; box-shadow: inset 0 0 0 2pt #000; }
  .print-only { display: block; text-align: right; margin-top: 10px; }
}
/* ---------- Leapinity의 다른 도구 (아래쪽 바로 위, 다른 Leapinity 사이트 2곳, 첫 화면에만) ----------
   아이콘은 각 사이트 favicon.svg 를 HTML 안에 그대로 (다른 주소 그림은 CSP 가 막아요) */
.lp-more { width: 100%; max-width: var(--lp-wrap, 1160px); margin: 56px auto 0; padding: 0 16px; box-sizing: border-box; }
.lp-more-h { margin: 0 0 12px; font-size: 14px; font-weight: 800; letter-spacing: .01em; color: var(--lp-soft); }
.lp-more-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.lp-more-list li { margin: 0; padding: 0; }
.lp-more-card { display: flex; align-items: center; gap: 12px; height: 100%; min-height: 64px; padding: 12px 14px; box-sizing: border-box;
  border-radius: 18px; border: 1px solid var(--lp-line); background: var(--lp-card); color: var(--lp-ink); text-decoration: none;
  transition: transform .25s var(--lp-ease, ease), border-color .25s, box-shadow .25s; }
.lp-more-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--lp-vio) 45%, var(--lp-line)); box-shadow: var(--lp-shadow); }
.lp-more-card:focus-visible { outline: 3px solid var(--lp-focus); outline-offset: 2px; }
.lp-more-card svg { flex: none; width: 40px; height: 40px; }
.lp-more-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lp-more-t b { font-size: 15px; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; color: var(--lp-ink); }
.lp-more-t span { font-size: 13px; line-height: 1.4; color: var(--lp-soft); word-break: keep-all; }
@media (max-width: 720px) {
  .lp-more { margin-top: 40px; }
  .lp-more-list { grid-template-columns: 1fr; gap: 8px; }
  .lp-more-card { min-height: 56px; padding: 10px 12px; border-radius: 16px; }
  .lp-more-card svg { width: 36px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) { .lp-more-card { transition: none; } .lp-more-card:hover { transform: none; } }
.lp-more { max-width: 1240px; }

/* 글자 모양 v2 (2026-11-08): 허브·FicePal 과 같게 — 큰 제목 800·-0.035em, 설명 600, 카드 제목 800·-0.02em (값은 lp-brand 의 var) */
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
.hero h1, .page-head h1 { font-weight: var(--lp-title-w, 800); letter-spacing: var(--lp-hero-track, -.035em); line-height: var(--lp-hero-lh, 1.15); }
.lead { font-weight: var(--lp-lead-w, 600); letter-spacing: var(--lp-lead-track, -.01em); }
.card-title { letter-spacing: var(--lp-card-track, -.02em); line-height: 1.3; }

/* ===================== 흰 배경 v3 (2026-11-08) =====================
   기준: 웹사이트 모음/_leapinity-style/흰배경-기준.md · 견본: 흰배경-견본.html
   순수한 흰 바탕, 그림자 대신 1px 테두리, 주 단추는 검정, 그러데이션은 큰 제목 뒷말·그림 선에만.
   값은 leapinity-brand.css 의 --lpw-… 를 따라가요. 이모지 자리는 lp-icons 그림(빌드 때 HTML 안에 넣음). */
:root {
  --bg: var(--lpw-bg); --surface: var(--lpw-card); --surface-2: var(--lpw-bg2);
  --line: var(--lpw-line); --line-strong: #d9dce5;
  --text: var(--lpw-text); --text-2: var(--lpw-sub); --text-3: var(--lpw-mute); /* 기준 mute #6b7385 (흰 바탕 4.76:1) */
  --shadow: none; --radius: 18px; --radius-s: 12px;
  --lp-accent-ink: var(--lpw-text);
  --lp-bar-bg: color-mix(in srgb, var(--lpw-bg) 86%, transparent); --lp-bar-line: var(--lpw-line);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --line-strong: #2c3660; --text-3: var(--lpw-mute); --lp-accent-ink: var(--lpw-text);
  --lp-bar-bg: color-mix(in srgb, var(--lpw-bg) 86%, transparent); --lp-bar-line: var(--lpw-line);
} }
:root[data-theme="dark"] {
  --line-strong: #2c3660; --text-3: var(--lpw-mute); --lp-accent-ink: var(--lpw-text);
  --lp-bar-bg: color-mix(in srgb, var(--lpw-bg) 86%, transparent); --lp-bar-line: var(--lpw-line);
}
body { background: var(--bg); }
.grad { background: var(--lpw-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* 그림 칸 (견본 .ico) */
.ico { flex: none; width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; background: var(--lpw-tint); }
.ico svg { width: 28px; height: 28px; display: block; }

/* 위쪽 줄: 64px, 왼쪽에 사이트 그림 + 이름 */
.header-inner { min-height: 64px; }
.lp-brand { font-size: 17px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.lp-brand .ico { width: 36px; height: 36px; border-radius: 11px; }
.lp-brand .ico svg { width: 22px; height: 22px; }
.nav-link { gap: 6px; border-radius: 12px; color: var(--text-2); }
.nav-link svg { width: 18px; height: 18px; flex: none; }
.nav-link:hover { background: var(--surface-2); }
.nav-link.is-active { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.lp-theme-btn { border-radius: 12px; border-color: var(--line); background: var(--surface); }
.lp-theme-btn:hover { background: var(--surface-2); }

/* 단추: 주 단추는 검정, 보조는 흰 바탕 + 테두리 */
.btn { border-radius: 12px; border-color: var(--line); }
.btn:hover { background: var(--surface-2); }
.btn-main, .btn-pri { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn-main:hover, .btn-pri:hover { background: color-mix(in srgb, var(--text) 86%, var(--bg)); }
.btn-ghost { background: var(--surface); }
.btn-danger-text, .btn-danger-text:hover { background: transparent; border-color: transparent; }

/* 첫 화면 */
.hero { padding: 56px 16px 36px; }
.hero-kicker { padding: 6px 14px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); font-size: 13px; }
.hero h1 { margin: 16px 0 0; font-size: clamp(34px, 6vw, 58px); line-height: 1.1; }
.hero-cta { margin-top: 24px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.sec-h { font-size: 20px; font-weight: 800; letter-spacing: -.025em; margin: 8px 0 0; }
.cards { gap: 12px; margin: 16px 0 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.card { flex-direction: row; align-items: flex-start; gap: 14px; padding: 18px; border-radius: 18px; border: 1px solid var(--line); border-top: 1px solid var(--line);
  box-shadow: none; transition: border-color .2s; }
.card:hover { transform: none; border-color: var(--lpw-hover-line); }
.card-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; align-self: stretch; }
.card-title { font-size: 16px; font-weight: 800; }
.card-desc { font-size: 14px; line-height: 1.5; font-weight: 500; }
.card-go { margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--text-3); }
.trust { gap: 12px; }
.trust div { flex-direction: row; align-items: flex-start; gap: 14px; padding: 18px; border-radius: 18px; }
.trust p { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.trust b { font-weight: 800; letter-spacing: -.02em; }
.trust span { font-size: 14px; line-height: 1.5; }

/* 도구 화면 */
.page-head { padding: 32px 16px 16px; }
.page-head-row { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.page-head-row h1 { margin: 0; }
.page-head .lead { margin-top: 0; }
.hero .lead { margin-top: 14px; }
.tool { border: 1px solid var(--line); border-top: 1px solid var(--line); box-shadow: none; border-radius: 18px; padding: 20px; }
.stage { border-radius: 14px; background: var(--surface-2); }
.stage .seat.is-empty, .stage .pick-name.is-spin { color: var(--text-2); } /* 옅은 칸(bg2) 위라 mute 대신 sub (대비 4.5:1) */
.panel { border-radius: 14px; padding: 16px; }
.badge { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
input[type="text"], input[type="number"], select, textarea { border-color: var(--line-strong); border-radius: 12px; background: var(--bg); min-height: 48px; padding: 10px 14px; }
input[type="number"] { min-height: 44px; }
.seg { border-color: var(--line); border-radius: 12px; }
.seg label:has(input:checked) { background: var(--text); color: var(--bg); }
.chip { border-color: var(--line-strong); border-radius: 12px; }
.chip.is-on { background: var(--text); border-color: var(--text); color: var(--bg); }
.preset.is-on { background: var(--text); border-color: var(--text); color: var(--bg); }
.order-list li.is-new .num { background: var(--text); color: var(--bg); }
.pick-name { border-width: 2px; border-color: var(--line); }
.pick-name.is-hit { border-color: var(--tc); }
.gcard { border-radius: 14px; }
.tool.is-stage { border: 0; border-top: 0; }
.wheel-pointer { filter: none; }
.wheel-center { box-shadow: none; }

/* 설명·FAQ·다른 도구 */
.faq { border-radius: 14px; }
.mini-card { border-left: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; transition: border-color .2s; }
.mini-card:hover { border-color: var(--lpw-hover-line); }
.mini-card .ico { width: 40px; height: 40px; border-radius: 12px; }
.mini-card .ico svg { width: 22px; height: 22px; }
.lp-more-card { border-color: var(--line); border-radius: 18px; background: var(--surface); }
.lp-more-card:hover { transform: none; box-shadow: none; border-color: var(--lpw-hover-line); }
.lp-more-card .ico svg { width: 28px; height: 28px; }
@media (max-width: 720px) { .lp-more-card .ico { width: 44px; height: 44px; } }

/* 큰 제목 밑 설명은 작고 얇게 (흰 배경 기준: 15~17px · 400 · sub · 줄 간격 1.6) */
.lead { font-size: clamp(15px, 2vw, 17px); font-weight: 400; line-height: 1.6; color: var(--text-2); letter-spacing: -.005em; }
@media (max-width: 560px) { .ico { width: 44px; height: 44px; border-radius: 13px; } .ico svg { width: 24px; height: 24px; } .card { padding: 16px; } }

/* ---------- 광고 자리 (lp-ads.js · 승인 전엔 hidden 이라 자리를 차지하지 않아요) ---------- */
.lp-ad[hidden] { display: none !important; }
.lp-ad { display: block; width: calc(100% - 32px); max-width: 728px; margin: 32px auto; text-align: center; min-height: 0; }
.lp-ad::before { content: '광고'; display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); }
