/* ==========================================================
   도구 공통 + 도구별 스타일 (패널 크기에 맞춰 커지고 작아짐)
   pane-body 가 size container 이므로 cqw / cqh / cqmin 사용
   Copyright (c) 2026 황성재 (@hirame.ki). All rights reserved.
   상업적 이용·개작·무단 재배포 금지 — LICENSE 참고
   ========================================================== */
.t {
  min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(10px, 2.6cqmin, 22px); padding: clamp(14px, 3.6cqmin, 32px); text-align: center;
}
.t.top { justify-content: flex-start; }
.t .row { justify-content: center; }
.muted { color: var(--ink-3); }

.pills { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pill {
  height: 34px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
  background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); transition: all .18s var(--ease);
}
.pill:hover { background: #fff; color: var(--ink); border-color: var(--line-2); transform: translateY(-1px); }
.pill.on { background: var(--c-soft); color: var(--c); border-color: color-mix(in srgb, var(--c) 35%, transparent); }

.stepper { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.stepper button { width: 36px; height: 36px; border-radius: 10px; font-size: 20px; font-weight: 600; color: var(--ink-2); display: grid; place-items: center; }
.stepper button:hover { background: #fff; color: var(--ink); box-shadow: var(--shadow-1); }
.stepper input { width: 52px; text-align: center; font-family: var(--num); font-size: 20px; font-weight: 700; border: 0; background: transparent; outline: none; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stepper .unit { font-size: 13px; font-weight: 700; color: var(--ink-3); padding-right: 8px; }
.label-sm { font-size: 13.5px; font-weight: 700; color: var(--ink-2); }

.switch { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch i { width: 38px; height: 22px; border-radius: 22px; background: var(--line-2); position: relative; transition: background .2s; flex-shrink: 0; }
.switch i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .25s var(--spring); }
.switch input:checked + i { background: var(--c, var(--brand)); }
.switch input:checked + i::after { transform: translateX(16px); }

.t-btn { background: var(--c); color: #fff; box-shadow: 0 8px 18px color-mix(in srgb, var(--c) 30%, transparent); }
.t-btn:hover { filter: brightness(1.04); box-shadow: 0 12px 24px color-mix(in srgb, var(--c) 36%, transparent); }
.t-big { height: clamp(46px, 8cqmin, 60px); padding: 0 clamp(22px, 5cqmin, 36px); font-size: clamp(15px, 2.8cqmin, 19px); border-radius: 16px; }

.empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 22px; border-radius: 16px;
  background: var(--bg); border: 1px dashed var(--line-2); color: var(--ink-2); font-size: 14px; line-height: 1.5;
}

/* ---------------- 타이머 ---------------- */
.timer { --ring: max(140px, min(calc(100cqh - 250px), 82cqw, 580px)); }
.timer-ctrl { display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 2.2cqmin, 18px); }
@container (max-height: 520px) {
  .timer .time-edit { display: none; }
  .timer { --ring: max(130px, min(calc(100cqh - 170px), 82cqw)); }
}
@container (max-height: 560px) and (min-width: 600px) {
  .timer { flex-direction: row; gap: 5cqw; }
  .timer .time-edit { display: flex; }
  .timer { --ring: max(140px, min(calc(100cqh - 48px), 48cqw, 560px)); }
}
.ring-wrap { position: relative; width: var(--ring); height: var(--ring); }
.ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { stroke: var(--time-soft); }
.ring-fill { stroke: var(--time); stroke-linecap: round; transition: stroke-dashoffset .95s linear, stroke .3s; }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.big-time { font-family: var(--num); font-weight: 600; font-size: calc(var(--ring) * .25); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; color: var(--ink); }
.ring-sub { font-size: calc(var(--ring) * .055); font-weight: 700; color: var(--ink-3); margin-top: calc(var(--ring) * .04); }
.timer.warn .ring-fill { stroke: var(--danger); }
.timer.warn .big-time { color: var(--danger); animation: blink 1s ease-in-out infinite; }
.timer.done .ring-fill { stroke: var(--ok); }
.timer.done .big-time { color: var(--ok); }
.timer.done .ring-wrap { animation: doneBump .7s var(--spring); }
@keyframes blink { 50% { opacity: .45; } }
@keyframes doneBump { 40% { transform: scale(1.05); } }
.time-edit { display: flex; gap: 8px; align-items: center; }

/* ---------------- 스톱워치 ---------------- */
.sw-display { font-family: var(--num); font-weight: 600; font-size: min(17cqw, 26cqh, 150px); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.sw-display small { font-size: .45em; color: var(--ink-3); }
.laps { width: min(420px, 100%); max-height: 30cqh; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.lap { display: flex; justify-content: space-between; padding: 8px 14px; border-radius: 10px; background: var(--bg); font-size: 14px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; animation: homeIn .4s var(--ease) both; }
.lap b { font-family: var(--num); color: var(--ink); font-weight: 600; }

/* ---------------- 알림 종 ---------------- */
.bells { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(8px, 2.4cqmin, 16px); width: min(560px, 100%); }
.bell {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: clamp(14px, 5cqmin, 30px) 12px; border-radius: 20px; background: var(--bg); border: 1px solid var(--line);
  transition: all .2s var(--ease);
}
.bell:hover { background: #fff; box-shadow: var(--shadow-2); transform: translateY(-2px); }
.bell .ico { font-size: clamp(26px, 8cqmin, 46px); color: var(--c); }
.bell b { font-size: clamp(14px, 3.2cqmin, 19px); font-weight: 800; }
.bell span { font-size: 12.5px; color: var(--ink-3); }
.bell.ring .ico { animation: shake .6s ease; }
@keyframes shake { 20% { transform: rotate(-14deg); } 40% { transform: rotate(12deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(4deg); } }
.attention { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, #FFFFFF, var(--time-soft) 70%); animation: fade .25s ease; cursor: pointer; }
.attention .msg { display: flex; flex-direction: column; align-items: center; animation: pop .5s var(--spring); }
.attention .msg b { font-size: min(14cqw, 22cqh); font-weight: 900; letter-spacing: -0.05em; line-height: 1.1; color: var(--time); }
.attention .msg span { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink-2); margin-top: 14px; }

/* ---------------- 1명 뽑기 ---------------- */
.pick-stage {
  width: min(100%, 720px); padding: clamp(20px, 6cqmin, 56px) 16px; border-radius: 26px;
  background: radial-gradient(circle at 50% 0%, #fff, var(--pick-soft)); border: 1px solid color-mix(in srgb, var(--pick) 18%, transparent);
  position: relative; overflow: hidden;
}
.pick-name { font-size: min(15cqw, 22cqh, 150px); font-weight: 900; letter-spacing: -0.05em; line-height: 1.1; color: var(--ink); min-height: 1.1em; }
.pick-name.rolling { color: var(--pick); filter: blur(.4px); }
.pick-name.win { animation: winPop .6s var(--spring); }
.pick-name.beat { animation: pickBeat .34s ease-in-out infinite alternate; }
@keyframes winPop { 0% { transform: scale(.7); } 100% { transform: scale(1); } }
@keyframes pickBeat { from { transform: scale(1); } to { transform: scale(1.07); } }
.pick-sub { margin-top: 10px; font-size: clamp(13px, 2.6cqmin, 17px); font-weight: 700; color: var(--ink-3); }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: 40%; left: 50%; width: 8px; height: 12px; border-radius: 2px; opacity: 0; animation: conf 1.1s var(--ease) forwards; }
@keyframes conf { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); } }

/* ---------------- N명 뽑기 ---------------- */
.chips { position: relative; display: flex; flex-wrap: wrap; gap: clamp(8px, 1.8cqmin, 14px); justify-content: center; width: min(100%, 900px); min-height: 60px; }
.name-chip {
  display: inline-flex; align-items: center; gap: 10px; padding: clamp(8px, 1.8cqmin, 14px) clamp(14px, 3cqmin, 24px);
  border-radius: 999px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-1);
  font-size: clamp(15px, 3.6cqmin, 28px); font-weight: 800; letter-spacing: -0.03em; animation: pop .45s var(--spring) both;
}
.name-chip i { font-style: normal; font-family: var(--num); font-size: .7em; width: 1.6em; height: 1.6em; border-radius: 50%; display: grid; place-items: center; background: var(--pick-soft); color: var(--pick); }
.name-chip .nm { display: inline-block; min-width: calc(var(--nw, 3) * 1em); text-align: center; }
.name-chip.rolling { color: var(--pick); border-color: color-mix(in srgb, var(--pick) 30%, var(--line)); filter: blur(.3px); }
.name-chip.win { animation: winPop .5s var(--spring); }

/* ---------------- 룰렛 ---------------- */
.wheel { --wheel: max(170px, min(calc(100cqh - 250px), 88cqw, 620px)); position: relative; width: var(--wheel); height: var(--wheel); }
.wheel canvas { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 16px 40px rgba(60, 44, 20, .14); }
.wheel-pointer { position: absolute; left: 50%; top: -6px; width: 34px; height: 40px; transform: translateX(-50%); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .2)); z-index: 2; }
.wheel-hub { position: absolute; left: 50%; top: 50%; width: 18%; height: 18%; transform: translate(-50%, -50%); border-radius: 50%; background: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .12); display: grid; place-items: center; color: var(--pick); }
.wheel-hub .ico { width: 45%; height: 45%; }
.wheel-side { display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 2.4cqmin, 18px); }
@container (max-height: 560px) and (min-width: 560px) {
  .roulette { display: grid; grid-template: auto auto / auto auto; align-content: center; justify-content: center; column-gap: 5cqw; }
  .roulette .wheel { grid-column: 1; grid-row: 1 / span 2; --wheel: max(170px, min(calc(100cqh - 56px), 50cqw, 560px)); }
  .roulette .wheel-side:first-child { grid-column: 2; grid-row: 1; align-self: end; }
  .roulette .wheel-side:last-child { grid-column: 2; grid-row: 2; align-self: start; }
}
.result-line { font-size: clamp(18px, 4.4cqmin, 34px); font-weight: 900; letter-spacing: -0.04em; min-height: 1.3em; color: var(--pick); }
.custom-list { width: min(100%, 420px); }
.custom-list .textarea { min-height: 90px; font-size: 13.5px; }

/* ---------------- 사다리 ---------------- */
.ladder-setup { width: min(100%, 780px); }
.ladder-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; text-align: left; }
.ladder-inputs .textarea { min-height: 84px; height: clamp(84px, 30cqh, 220px); font-size: 13px; line-height: 1.6; }
.ladder-canvas-wrap { width: min(100%, 980px); flex: 1; min-height: 200px; position: relative; }
.ladder-canvas-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ladder-starts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.ladder-starts button:disabled { opacity: .5; cursor: default; }
.ladder-results { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.ladder-results span { padding: 6px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 700; color: #fff; animation: pop .4s var(--spring) both; }
.ladder-setup[hidden] { display: none; }

/* ---------------- 모둠 편성 ---------------- */
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(150px, 22cqw), 1fr)); gap: 12px; width: 100%; }
.group-card { text-align: left; padding: 14px 16px 16px; border-radius: 18px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-1); animation: homeIn .5s var(--ease) both; position: relative; overflow: hidden; }
.group-card::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 5px; background: var(--gc); }
.group-card h4 { display: flex; align-items: center; justify-content: space-between; font-size: clamp(15px, 2.8cqmin, 19px); font-weight: 800; margin: 4px 0 10px; }
.group-card h4 span { font-size: 12px; font-weight: 700; color: var(--gc); background: color-mix(in srgb, var(--gc) 12%, #fff); padding: 3px 8px; border-radius: 999px; }
.group-card ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.group-card li { font-size: clamp(13.5px, 2.4cqmin, 17px); font-weight: 700; padding: 5px 10px; border-radius: 9px; background: var(--bg); }

/* ---------------- 점수판 ---------------- */
.score-add { display: flex; gap: 8px; width: min(100%, 640px); }
.score-add .input { flex: 1; }
.teams { width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(max(140px, 20cqw), 1fr)); gap: clamp(8px, 1.8cqmin, 14px); }
.team {
  position: relative; padding: clamp(12px, 2.6cqmin, 20px); border-radius: 20px; background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow-1); display: flex; flex-direction: column; align-items: center; gap: 6px; transition: box-shadow .2s, transform .3s var(--ease), border-color .2s;
  cursor: pointer; overflow: hidden;
}
.team::before { content: ''; position: absolute; inset: 0 0 auto; height: 5px; background: var(--tc); }
.team.sel { border-color: var(--tc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tc) 22%, transparent), var(--shadow-2); }
.team-top { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.team-rank { font-family: var(--num); font-size: 12px; font-weight: 700; color: var(--ink-3); display: flex; align-items: center; gap: 4px; }
.team-rank.r1 { color: #D99A0B; }
.team-rank .ico { font-size: 16px; }
.team-del { width: 26px; height: 26px; border-radius: 8px; color: var(--ink-3); display: grid; place-items: center; opacity: 0; transition: opacity .2s; }
.team:hover .team-del { opacity: 1; }
.team-del:hover { background: #FDECEA; color: var(--danger); }
.team-del .ico { font-size: 14px; }
.team-name { font-size: clamp(15px, 3cqmin, 22px); font-weight: 800; letter-spacing: -0.03em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; outline: none; border-radius: 6px; padding: 0 4px; }
.team-name:focus { background: var(--bg); }
.team-score { font-family: var(--num); font-size: clamp(38px, 11cqmin, 96px); font-weight: 600; line-height: 1; letter-spacing: -0.04em; color: var(--tc); font-variant-numeric: tabular-nums; }
.team-score.bump { animation: bump .45s var(--spring); }
@keyframes bump { 40% { transform: scale(1.18); } }
.team-ctrl { display: flex; gap: 6px; margin-top: 4px; }
.team-ctrl button { width: clamp(36px, 7cqmin, 48px); height: clamp(36px, 7cqmin, 48px); border-radius: 12px; font-size: clamp(18px, 3.6cqmin, 24px); font-weight: 700; display: grid; place-items: center; transition: transform .12s; }
.team-ctrl button:active { transform: scale(.9); }
.team-ctrl .minus { background: var(--bg); color: var(--ink-2); }
.team-ctrl .plus { background: color-mix(in srgb, var(--tc) 14%, #fff); color: var(--tc); }
.score-foot { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; align-items: center; }

/* ---------------- 소음 측정 ---------------- */
.meter { display: flex; align-items: center; gap: clamp(16px, 5cqmin, 48px); flex-wrap: wrap; justify-content: center; }
.face { --face: max(120px, min(calc(100cqh - 250px), 46cqw, 300px)); width: var(--face); height: var(--face); border-radius: 50%; display: grid; place-items: center; background: var(--fc, var(--team-soft)); transition: background .35s; position: relative; }
.face svg { width: 62%; height: 62%; }
.face::after { content: ''; position: absolute; inset: -10px; border-radius: 50%; border: 3px solid var(--fs, var(--team)); opacity: .25; transform: scale(var(--pulse, 1)); transition: transform .1s linear, border-color .35s; }
.meter-side { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; text-align: left; min-width: 200px; }
.meter-state { font-size: clamp(22px, 6cqmin, 44px); font-weight: 900; letter-spacing: -0.04em; color: var(--fs, var(--team)); }
.meter-bar { width: min(320px, 70cqw); height: 14px; border-radius: 14px; background: var(--bg-2); position: relative; overflow: visible; }
.meter-bar .fill { position: absolute; inset: 0 auto 0 0; width: 0%; border-radius: 14px; background: linear-gradient(90deg, #7ED9BE, #F5C85B 60%, #F2766A); transition: width .1s linear; }
.meter-bar .limit { position: absolute; top: -5px; bottom: -5px; width: 3px; border-radius: 3px; background: var(--ink); }
.range { width: min(320px, 70cqw); --c: var(--mood); }

/* ---------------- 집중 소리 ---------------- */
.sounds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 2cqmin, 16px); width: min(100%, 720px); }
.sound {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: clamp(14px, 5cqmin, 32px) 10px; border-radius: 22px;
  background: var(--bg); border: 1.5px solid var(--line); transition: all .25s var(--ease);
}
.sound:hover { background: #fff; box-shadow: var(--shadow-2); }
.sound .wave { height: clamp(28px, 8cqmin, 48px); display: flex; align-items: center; gap: 3px; }
.sound .wave i { width: 4px; border-radius: 4px; background: var(--sc); height: 30%; opacity: .55; }
.sound.on { background: #fff; border-color: var(--sc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sc) 14%, transparent), var(--shadow-2); }
.sound.on .wave i { opacity: 1; animation: eq 1s ease-in-out infinite alternate; }
.sound .wave i:nth-child(2n) { animation-delay: -.3s; }
.sound .wave i:nth-child(3n) { animation-delay: -.6s; }
@keyframes eq { from { height: 20%; } to { height: 100%; } }
.sound b { font-size: clamp(14px, 3cqmin, 18px); font-weight: 800; }
.sound span { font-size: 12.5px; color: var(--ink-3); }
.volume { display: flex; align-items: center; gap: 12px; width: min(100%, 380px); color: var(--ink-3); }
.volume .ico { font-size: 20px; flex-shrink: 0; }
.volume input { flex: 1; --c: var(--mood); }

/* ---------------- QR ---------------- */
.qr-row { display: flex; gap: 8px; width: min(100%, 560px); }
.qr-row .input { flex: 1; }
.qr-box { --qr: max(160px, min(calc(100cqh - 200px), 80cqw, 520px)); width: var(--qr); height: var(--qr); padding: calc(var(--qr) * .07); border-radius: 26px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-2); display: grid; place-items: center; }
.qr-box canvas, .qr-box img { width: 100% !important; height: 100% !important; image-rendering: pixelated; }
.qr-box .empty { border: 0; background: none; }
.qr-text { font-size: 13.5px; color: var(--ink-3); max-width: min(100%, 520px); word-break: break-all; }

/* ---------------- 남은 날 (디데이) ---------------- */
.dday-add { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; width: min(100%, 640px); }
.dday-add .dt { width: auto; font-family: var(--num); font-weight: 600; }
.dday-list { width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(max(150px, 22cqw), 1fr)); gap: clamp(8px, 1.8cqmin, 14px); }
.dday-card {
  position: relative; padding: clamp(12px, 2.6cqmin, 20px); border-radius: 20px; background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow-1); display: flex; flex-direction: column; align-items: center; gap: 2px; overflow: hidden;
  animation: homeIn .5s var(--ease) both;
}
.dday-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 5px; background: var(--time); }
.dday-card.lead { grid-column: 1 / -1; border-color: color-mix(in srgb, var(--time) 34%, transparent); box-shadow: var(--shadow-2); background: radial-gradient(circle at 50% 0%, #fff, var(--time-soft)); }
.dday-card.today::before { background: var(--ok); }
.dday-card.past::before { background: var(--line-2); }
.dd-name { font-size: clamp(14px, 2.8cqmin, 20px); font-weight: 800; letter-spacing: -0.03em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-num { font-family: var(--num); font-weight: 600; letter-spacing: -0.04em; line-height: 1; color: var(--time); font-size: clamp(30px, 8cqmin, 62px); }
.dday-card.lead .dd-num { font-size: min(18cqw, 16cqh, 132px); }
.dday-card.today .dd-num { color: var(--ok); }
.dday-card.past .dd-num { color: var(--ink-3); }
.dd-sub { font-size: clamp(12.5px, 2cqmin, 15px); font-weight: 700; color: var(--ink-2); }
.dd-date { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.dd-del { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 8px; color: var(--ink-3); display: grid; place-items: center; opacity: 0; transition: opacity .2s; }
.dday-card:hover .dd-del { opacity: 1; }
.dd-del:hover { background: #FDECEA; color: var(--danger); }
.dd-del .ico { font-size: 14px; }

/* ---------------- 순서 정하기 ---------------- */
.order-stage {
  width: min(100%, 760px); padding: clamp(16px, 5cqmin, 46px) 16px; border-radius: 26px; position: relative; overflow: hidden;
  background: radial-gradient(circle at 50% 0%, #fff, var(--pick-soft)); border: 1px solid color-mix(in srgb, var(--pick) 18%, transparent);
}
.order-step { font-family: var(--num); font-size: clamp(12px, 2.2cqmin, 16px); font-weight: 700; letter-spacing: .06em; color: var(--pick); min-height: 1.2em; }
.order-now { font-size: min(13cqw, 19cqh, 130px); font-weight: 900; letter-spacing: -0.05em; line-height: 1.15; min-height: 1.15em; }
.order-next { margin-top: 6px; font-size: clamp(13px, 2.6cqmin, 19px); font-weight: 700; color: var(--ink-3); }
.order-clock { margin-top: 10px; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.ck-time { font-family: var(--num); font-variant-numeric: tabular-nums; font-size: clamp(20px, 5cqmin, 40px); font-weight: 600; line-height: 1; color: var(--ink-2); transition: color .3s; }
.order-clock.running .ck-time { color: var(--pick); }
.order-clock.over .ck-time { color: var(--danger); animation: blink 1s ease-in-out infinite; }
.ck-ctrl { display: flex; gap: 6px; }
.ck-btn { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 13px; border-radius: 999px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-1); font-size: 12.5px; font-weight: 700; color: var(--ink-2); transition: all .18s var(--ease); }
.ck-btn .ico { font-size: 14px; }
.ck-btn:hover { color: var(--ink); border-color: var(--line-2); transform: translateY(-1px); }
.ck-btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.order-clock.running .ck-go { background: var(--pick); border-color: var(--pick); color: #fff; }
.order-stage.done .order-now { color: var(--ok); }
.order-queue { width: 100%; max-height: 26cqh; overflow: auto; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.q-item { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 6px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--ink-2); transition: all .18s var(--ease); }
.q-item i { font-style: normal; font-family: var(--num); font-size: 11px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--ink-3); }
.q-item:hover { background: #fff; border-color: var(--line-2); }
.q-item.past { opacity: .45; text-decoration: line-through; }
.q-item.on { background: var(--pick); border-color: var(--pick); color: #fff; }
.q-item.on i { background: rgba(255, 255, 255, .28); color: #fff; }

/* ---------------- 주사위·숫자 ---------------- */
.dice-stage { position: relative; width: min(100%, 720px); flex: 1; min-height: clamp(110px, 30cqh, 340px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(6px, 1.6cqmin, 14px); }
.dice-row { display: flex; flex-wrap: wrap; gap: clamp(8px, 2cqmin, 18px); justify-content: center; }
.die { width: clamp(52px, 15cqmin, 118px); }
.die svg { width: 100%; height: auto; filter: drop-shadow(0 8px 18px rgba(60, 44, 20, .14)); }
.die.win { animation: winPop .5s var(--spring); }
.dice-sum { font-size: clamp(13px, 2.6cqmin, 20px); font-weight: 700; color: var(--ink-3); }
.dice-sum b { font-family: var(--num); font-size: 1.3em; font-weight: 600; color: var(--pick); }
.big-num { font-family: var(--num); font-size: min(26cqw, 28cqh, 220px); font-weight: 600; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.big-num.win { color: var(--pick); animation: winPop .5s var(--spring); }
.coin { width: clamp(88px, 24cqmin, 210px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; border: 4px solid color-mix(in srgb, var(--pick) 34%, transparent); background: radial-gradient(circle at 34% 28%, #fff, var(--pick-soft)); box-shadow: var(--shadow-2); }
.coin span { font-size: clamp(28px, 9cqmin, 74px); font-weight: 900; letter-spacing: -0.04em; color: var(--pick); }
.coin.tail { border-color: color-mix(in srgb, var(--share) 45%, transparent); background: radial-gradient(circle at 34% 28%, #fff, var(--share-soft)); }
.coin.tail span { color: #D99A0B; }
.coin.win { animation: winPop .5s var(--spring); }
.dice-t .opt-num input { width: 68px; }

/* ---------------- 이어서 하기 안내 (모둠 편성 → 역할 나누기) ---------------- */
.next-step {
  display: flex; align-items: center; gap: 10px; width: min(100%, 640px);
  padding: 8px 8px 8px 16px; border-radius: 999px;
  background: var(--team-soft); border: 1px solid color-mix(in srgb, var(--team) 26%, transparent);
  animation: pop .4s var(--spring) both;
}
.next-step .ns-msg { flex: 1; display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); text-align: left; }
.next-step .ns-msg .ico { font-size: 18px; color: var(--team); flex-shrink: 0; }
.next-step .ns-no { width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0; }
.next-step .ns-no .ico { font-size: 15px; }
.link-note {
  display: flex; align-items: center; gap: 8px; width: min(100%, 700px);
  padding: 9px 14px; border-radius: 14px; background: var(--bg); border: 1px dashed var(--line-2);
  font-size: 12.5px; font-weight: 600; color: var(--ink-2); text-align: left; line-height: 1.5;
}
.link-note .ico { font-size: 16px; color: var(--team); flex-shrink: 0; }

/* ---------------- 역할 나누기 ---------------- */
.roles-body { width: 100%; flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(140px, 200px) 1fr; gap: clamp(10px, 2cqmin, 18px); text-align: left; }
.roles-input { display: flex; flex-direction: column; min-height: 0; }
.roles-input .textarea { min-height: 90px; height: 100%; font-size: 13.5px; }
.roles-out { min-width: 0; overflow: auto; }
.role-list { flex-direction: column; align-items: stretch; gap: 5px; }
.role-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.role-list li b { font-size: .84em; font-weight: 800; color: var(--gc); white-space: nowrap; }
.role-list li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- 수업 신호등 ---------------- */
.signal { justify-content: center; gap: clamp(12px, 3cqmin, 30px); }
.signal-msg { font-size: clamp(20px, 7cqmin, 66px); font-weight: 900; letter-spacing: -0.04em; line-height: 1.15; color: var(--sc, var(--ink-3)); min-height: 1.2em; transition: color .3s; }
.lamps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 2cqmin, 18px); width: min(100%, 760px); }
.lamp { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: clamp(12px, 3.4cqmin, 28px) 10px; border-radius: 22px; background: var(--bg); border: 1.5px solid var(--line); transition: all .25s var(--ease); }
.lamp .bulb { width: clamp(40px, 12cqmin, 104px); aspect-ratio: 1; border-radius: 50%; background: var(--lc); opacity: .2; transition: opacity .3s, box-shadow .35s, transform .35s var(--spring); }
.lamp b { font-size: clamp(14px, 3cqmin, 19px); font-weight: 800; }
.lamp .ld { font-size: 12.5px; color: var(--ink-3); }
.lamp:hover { background: #fff; box-shadow: var(--shadow-2); }
.lamp.on { background: #fff; border-color: var(--lc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lc) 16%, transparent), var(--shadow-2); }
.lamp.on .bulb { opacity: 1; transform: scale(1.04); box-shadow: 0 0 0 8px color-mix(in srgb, var(--lc) 18%, transparent), 0 10px 26px color-mix(in srgb, var(--lc) 45%, transparent); }

/* ---------------- 화면 칠판 ---------------- */
.board { gap: clamp(8px, 1.8cqmin, 14px); }
.board-bar { width: 100%; }
.board-sheet {
  width: 100%; flex: 1; min-height: clamp(140px, 40cqh, 560px); padding: clamp(16px, 4cqmin, 40px);
  border-radius: 24px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-1);
  text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.35; white-space: pre-wrap; word-break: break-word;
  overflow: auto; outline: none; transition: background .3s, color .3s;
}
.board-sheet:focus { border-color: color-mix(in srgb, var(--share) 45%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--share) 14%, transparent); }
.board-sheet.blank::before { content: '여기를 눌러 오늘의 학습 문제를 적어 보세요'; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink-3); }
/* 슬라이더 값(--bs)이 그대로 글자 크기 — 칸이 커지면 글씨도 같이 커져요 */
.board .board-sheet { font-size: clamp(15px, calc(var(--bs, 10) * 1cqmin), 260px); }
.board-size { display: inline-flex; align-items: center; gap: 9px; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.board-size .range { width: clamp(80px, 16cqw, 180px); --c: var(--share); }
.bs-mark { font-weight: 800; color: var(--ink-3); line-height: 1; }
.bs-mark.sm { font-size: 12px; }
.bs-mark.lg { font-size: 18px; }
.board[data-skin="dark"] .board-sheet { background: #1F3B33; border-color: #16302A; color: #F4FBF7; box-shadow: inset 0 0 60px rgba(0, 0, 0, .25); }
.board[data-skin="dark"] .board-sheet.blank::before { color: rgba(244, 251, 247, .5); }

/* ---------------- 낱말 카드 ---------------- */
.cards-setup { width: min(100%, 640px); display: flex; flex-direction: column; gap: 10px; text-align: left; }
.cards-setup .textarea { min-height: 100px; height: clamp(100px, 32cqh, 260px); font-size: 13.5px; }
.cards-setup .t-btn { align-self: center; }
.cards-stage { width: 100%; display: flex; flex-direction: column; align-items: center; gap: clamp(8px, 2cqmin, 18px); flex: 1; min-height: 0; }
.card-step { font-family: var(--num); font-size: clamp(12px, 2.2cqmin, 16px); font-weight: 700; letter-spacing: .06em; color: var(--share); }
.card-face {
  width: 100%; flex: 1; min-height: clamp(120px, 34cqh, 520px); padding: clamp(14px, 4cqmin, 40px);
  border-radius: 26px; background: radial-gradient(circle at 50% 0%, #fff, var(--share-soft));
  border: 1px solid color-mix(in srgb, var(--share) 22%, transparent); box-shadow: var(--shadow-2);
  display: grid; place-items: center; cursor: pointer; transition: transform .2s var(--ease), background .3s;
}
.card-face:hover { transform: translateY(-2px); }
.card-face.back { background: radial-gradient(circle at 50% 0%, #fff, var(--bg-2)); }
.card-text { font-weight: 900; letter-spacing: -0.045em; line-height: 1.2; word-break: break-word; animation: pop .35s var(--spring) both; }
.cards[data-len="xs"] .card-text { font-size: min(34cqw, 40cqh, 300px); }
.cards[data-len="s"] .card-text { font-size: min(18cqw, 30cqh, 180px); }
.cards[data-len="m"] .card-text { font-size: min(11cqw, 20cqh, 108px); }
.cards[data-len="l"] .card-text { font-size: min(6.5cqw, 13cqh, 64px); }

@container (max-width: 380px) {
  .bells, .sounds { grid-template-columns: 1fr 1fr; }
  .ladder-inputs { grid-template-columns: 1fr; }
  .lamps { grid-template-columns: 1fr; }
  .dday-add { grid-template-columns: 1fr; }
}
@container (max-width: 520px) {
  .roles-body { grid-template-columns: 1fr; }
  .roles-input .textarea { height: auto; min-height: 74px; }
}
