:root {
  --bg: #F0EEE6;
  --sheet-ground:
    radial-gradient(ellipse 72% 48% at 12% -8%, rgba(201, 100, 66, 0.10), transparent 56%),
    radial-gradient(ellipse 48% 36% at 100% 0%, rgba(255, 255, 255, 0.75), transparent 52%),
    #F0EEE6;
  --card: #ffffff;
  --ink: #1f1e1d;
  --muted: #807d75;
  --line: #e5e0d5;
  --accent: #c96442;
  --accent-deep: #8c4022;
  --accent-soft: #fbefe7;
  --serif: "Noto Serif KR", "Source Serif 4", Georgia, serif;
  --sans: "Pretendard", "Noto Sans KR", -apple-system, BlinkMacSystemFont, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; min-height: 100dvh; }
body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--sheet-ground);
  background-size: auto;
  padding: calc(18px + var(--safe-top)) calc(16px + var(--safe-right)) calc(28px + var(--safe-bottom)) calc(16px + var(--safe-left));
  overscroll-behavior-y: contain;
  overflow-x: hidden;
  max-width: 100vw;
}
body.live-deck-open {
  overflow: hidden;
}

/* 4월·5월 테마: 본문 색만 남색으로, 배경은 메인과 같은 크림 */
body[data-session="6"],
body[data-session="7"],
body[data-session="8"],
body[data-session="9"],
body[data-session="10"],
body[data-session="11"],
body[data-session="12"],
body[data-session="13"],
body[data-session="14"],
body[data-session="15"],
body[data-session="16"],
body[data-session="28"],
body[data-session="29"],
body[data-session="30"],
body.is-apr-may {
  --bg: #F0EEE6;
  --ink: #333333;
  --muted: #5c6570;
  --line: #c5ced8;
  --accent: #1a3258;
  --accent-deep: #162d50;
  --accent-soft: #e7eff7;
  background: var(--sheet-ground);
  background-size: auto;
}
body[data-session="6"] .topbar,
body[data-session="7"] .topbar,
body[data-session="8"] .topbar,
body[data-session="9"] .topbar,
body[data-session="10"] .topbar,
body[data-session="11"] .topbar,
body[data-session="12"] .topbar,
body[data-session="13"] .topbar,
body[data-session="14"] .topbar,
body[data-session="15"] .topbar,
body[data-session="16"] .topbar,
body[data-session="28"] .topbar,
body[data-session="29"] .topbar,
body[data-session="30"] .topbar {
  background: rgba(240, 238, 230, 0.72);
}
body.is-apr-may .topbar {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
}
body.is-apr-may .topbar-start {
  grid-column: auto;
  flex-shrink: 0;
}
body.is-apr-may .topbar-actions {
  grid-column: auto;
  margin-left: 0;
}
body.is-apr-may .sheet-progress,
body.is-apr-may .prog {
  margin-left: auto;
}
.sheet-progress,
.prog {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font: 700 11px/1 var(--sans);
  color: #5c6570;
}
.sheet-progress-bar,
.prog-bar {
  width: 52px;
  height: 6px;
  border-radius: 99px;
  background: #c5ced8;
  overflow: hidden;
}
.sheet-progress-bar i,
.prog-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #1a4a6e, #1a3258);
  transition: width 0.35s ease;
}
@media print {
  .sheet-progress,
  .prog { display: none !important; }
}

/* 4월·5월: 7차시와 같은 남색 버튼·배지 */
body.is-apr-may .brand,
body[data-session="6"] .brand,
body[data-session="7"] .brand,
body[data-session="8"] .brand,
body[data-session="9"] .brand,
body[data-session="10"] .brand,
body[data-session="11"] .brand,
body[data-session="12"] .brand,
body[data-session="13"] .brand,
body[data-session="14"] .brand,
body[data-session="15"] .brand,
body[data-session="16"] .brand {
  background: linear-gradient(145deg, #3a5a86, #1a3258 55%, #162d50);
  color: #f5f8fb;
}
body.is-apr-may .top-meta .chip {
  background: #e7eff7;
  color: #162d50;
}
body.is-apr-may .hero-card,
body.is-apr-may .activity-card {
  border: 1px solid rgba(208, 199, 186, 0.9);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 12px 32px rgba(31, 30, 29, 0.06);
}
body.is-apr-may .hero-card .theme,
body.is-apr-may .hero .theme,
body[data-session="6"] .hero-card .theme,
body[data-session="7"] .hero-card .theme,
body[data-session="8"] .hero-card .theme,
body[data-session="9"] .hero-card .theme,
body[data-session="10"] .hero-card .theme,
body[data-session="11"] .hero-card .theme,
body[data-session="12"] .hero-card .theme,
body[data-session="13"] .hero-card .theme,
body[data-session="14"] .hero-card .theme,
body[data-session="15"] .hero-card .theme,
body[data-session="16"] .hero-card .theme {
  background: #fff2eb;
  color: #a3522e;
}
body.is-apr-may .submit-fab {
  color: #f5f8fb;
  background: linear-gradient(145deg, #3a5a86, #1a3258 50%, #162d50);
  box-shadow: 0 8px 18px rgba(26, 50, 88, 0.28);
}
body.is-apr-may .draft-fab:hover {
  background: #eef4f9;
}
body.is-apr-may .reset-fab {
  border-color: #a53c3b;
  color: #a53c3b;
}
body.is-apr-may .reset-fab:hover {
  background: #fdf1ef;
}
body.is-apr-may .sheet-tools,
body.is-apr-may .zoom-controls {
  border-color: #c5ced8;
  box-shadow: 0 4px 12px rgba(26, 50, 88, 0.08);
}
body.is-apr-may .tool-btn + .tool-btn {
  border-left-color: rgba(26, 50, 88, 0.12);
}
body.is-apr-may .tool-btn:hover {
  background: #eef4f9;
  color: #162d50;
}
body.is-apr-may .tool-btn:active {
  background: #e7eff7;
}
body.is-apr-may .tool-btn-live {
  border-color: #8aa8c4;
  background: linear-gradient(180deg, #eef5fb 0%, #d6e4f0 100%);
  color: #1a3258;
}
body.is-apr-may .btn-primary {
  color: #f5f8fb;
  background: linear-gradient(145deg, #3a5a86, #1a3258 55%, #162d50);
}
body.is-apr-may .btn-ghost {
  background: #e7eff7;
  color: #162d50;
}
body.is-apr-may .tool-btn-live.is-ready:not(:disabled) {
  box-shadow: 0 0 0 2px rgba(26, 50, 88, 0.16), 0 2px 8px rgba(26, 50, 88, 0.14);
}
body.is-apr-may .tool-btn-live.is-on {
  border-color: #1a3258;
  background: linear-gradient(180deg, #3a5a86 0%, #1a3258 100%);
  color: #fff;
}
body.is-apr-may .zoom-level {
  color: #162d50;
  background: #e7eff7;
  border-left-color: rgba(26, 50, 88, 0.12);
  border-right-color: rgba(26, 50, 88, 0.12);
}
body.is-apr-may .zoom-btn:hover:not(:disabled),
body.is-apr-may .zoom-level:hover {
  background: #eef4f9;
}
body.is-apr-may .zoom-level:hover {
  background: #d6e4f0;
}
body.is-apr-may .sheet-identity input:focus {
  border-color: #1a3258;
  box-shadow: 0 0 0 3px rgba(26, 50, 88, 0.12);
}
button, input, select, textarea { font: inherit; }
button, .submit-fab, a { touch-action: manipulation; }

.topbar {
  --shell-w: min(820px, 100%);
  position: sticky; top: 0; z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--shell-w) minmax(0, 1fr);
  align-items: center;
  column-gap: 0;
  margin: -18px -16px 18px; padding: 10px 16px;
  background: rgba(240, 238, 230, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: visible;
}
.topbar-start {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  justify-self: start;
}
.brand {
  flex-shrink: 0;
  width: 32px; height: 32px; border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #d88861, var(--accent) 55%, var(--accent-deep));
  color: #f7f1ea; font: 700 15px/1 Georgia, serif;
}
.top-meta {
  min-width: 0;
  flex: 1 1 auto;
  max-width: min(200px, 22vw);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
}
.top-meta .chip {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  max-width: 100%;
  height: auto;
  min-height: 22px;
  padding: 2px 8px;
  margin: 0;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font: 600 11px/1.25 var(--sans);
  white-space: nowrap;
}
.top-meta strong {
  display: block;
  width: 100%;
  margin: 0;
  font: 600 14px/1.35 var(--sans);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: keep-all;
}

.topbar-actions {
  grid-column: 3;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 8px;
  margin-left: 0;
  justify-self: end;
  max-width: 100%;
}
.submit-fab .label { display: inline; }

.submit-fab {
  flex-shrink: 0; height: 40px; padding: 0 14px 0 12px;
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; border-radius: 999px; cursor: pointer;
  color: #f7f1ea;
  background: linear-gradient(145deg, #d88861, var(--accent) 50%, var(--accent-deep));
  box-shadow: 0 8px 18px rgba(201, 100, 66, 0.28);
  font: 700 13px/1 var(--sans);
  transition: box-shadow 0.25s ease, outline-color 0.25s ease;
}
.submit-fab.is-vault-tip {
  outline: 2.5px solid #2563eb;
  outline-offset: 3px;
  box-shadow:
    0 0 0 4px rgba(37, 99, 235, 0.22),
    0 8px 22px rgba(37, 99, 235, 0.28);
  z-index: 40;
  position: relative;
}
.submit-fab svg {
  width: 18px; height: 18px; stroke: currentColor; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.draft-fab {
  flex-shrink: 0; height: 40px; padding: 0 14px 0 12px;
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px solid #1f1e1d; border-radius: 999px; cursor: pointer;
  color: #1f1e1d; background: #fff;
  box-shadow: 0 4px 12px rgba(31, 30, 29, 0.08);
  font: 700 13px/1 var(--sans);
}
.draft-fab svg {
  width: 17px; height: 17px; stroke: currentColor; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.draft-fab:hover { background: #f7f4ee; }
.draft-fab:active { transform: scale(0.98); }
.draft-fab.is-saved {
  border-color: #4f7a35;
  color: #3f6a2c;
  background: #eef6e8;
}
.reset-fab {
  border-color: #b23a2c;
  color: #8f2e22;
}
.reset-fab:hover {
  background: #fdf1ef;
}
.reset-fab[hidden] {
  display: none !important;
}
.student-autosave {
  margin: 0;
  padding: 0 6px;
  border: 0;
  background: none;
  color: #5c6570;
  font: 700 11px/1.3 var(--sans);
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.student-autosave.is-on {
  opacity: 1;
}
html[data-activity-teacher="1"] .student-autosave {
  display: none !important;
}
@media (max-width: 1024px) {
  html:not([data-activity-teacher="1"]) .student-autosave,
  html:not([data-activity-teacher="1"]) #sheetTools,
  html:not([data-activity-teacher="1"]) .zoom-controls,
  html:not([data-activity-teacher="1"]) #btnPrintSheet,
  html:not([data-activity-teacher="1"]) #btnSaveSheet,
  html:not([data-activity-teacher="1"]) #printBtn,
  html:not([data-activity-teacher="1"]) #printBtn2,
  html:not([data-activity-teacher="1"]) .btn-print,
  html:not([data-activity-teacher="1"]) .footer-actions + .note {
    display: none !important;
  }
  html:not([data-activity-teacher="1"]) .topbar-actions {
    width: max-content;
    max-width: calc(100% - 8px);
    margin-left: auto;
  }
}
.draft-toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + var(--safe-bottom));
  transform: translateX(-50%) translateY(12px);
  z-index: 50;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(31, 30, 29, 0.92);
  color: #f7f1ea;
  font: 700 13px/1.3 var(--sans);
  box-shadow: 0 10px 28px rgba(31, 30, 29, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: min(90vw, 360px);
  text-align: center;
}
.draft-toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* —— 보관함 (로컬 제출 아카이브) —— */
.vault-lightbox {
  --vault-font: "Noto Sans KR", Pretendard, sans-serif;
  --vault-ink: #1c1f24;
  --vault-muted: #8b919a;
  --vault-line: rgba(28, 31, 36, 0.08);
  --vault-green: linear-gradient(135deg, #e8f6ee 0%, #d9f0e4 48%, #eef8f2 100%);
  --vault-blue: linear-gradient(135deg, #eaf3ff 0%, #dcecff 50%, #f2f7ff 100%);
  --vault-red: linear-gradient(135deg, #fff0f0 0%, #ffe3e3 50%, #fff6f6 100%);
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  background: rgba(28, 31, 36, 0.36);
}
.vault-lightbox.is-open { display: flex; }
@media (min-width: 720px) {
  .vault-lightbox { align-items: center; padding: 24px; }
}
.vault-panel {
  width: min(560px, 100%);
  max-height: min(90dvh, 740px);
  display: flex;
  flex-direction: column;
  border-radius: 22px 22px 16px 16px;
  border: 1.5px solid rgba(55, 95, 78, 0.28);
  background: linear-gradient(180deg, #ffffff 0%, #f7faf8 42%, #f5f8fc 100%);
  color: var(--vault-ink);
  box-shadow: 0 20px 48px rgba(28, 31, 36, 0.16);
  overflow: hidden;
  font-family: var(--vault-font);
}
.vault-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 14px;
  background: var(--vault-green);
  border-bottom: 1.5px solid rgba(46, 125, 82, 0.32);
}
.vault-head-copy { flex: 1; min-width: 0; }
.vault-head-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: 8px;
  border-radius: 8px;
  border: 1px solid rgba(46, 125, 82, 0.22);
  background: rgba(255, 255, 255, 0.72);
  color: #2f7d52;
  vertical-align: middle;
}
.vault-head-badge svg { display: block; }
.vault-head h3 {
  display: inline;
  margin: 0;
  font: 800 17px/1.3 var(--vault-font);
  letter-spacing: -0.03em;
  color: var(--vault-ink);
  vertical-align: middle;
}
.vault-head p {
  margin: 6px 0 0;
  font: 500 12px/1.45 var(--vault-font);
  color: #5f6b66;
  word-break: keep-all;
}
.vault-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(58, 67, 64, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #3a4340;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}
.vault-close svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none; stroke-width: 2.2;
  stroke-linecap: round;
}
.vault-close:hover { background: #fff; }
.vault-close:active { transform: scale(0.96); }
.vault-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
  background: linear-gradient(180deg, #fbfcfe 0%, #f3f6fa 100%);
  border-bottom: 1.5px solid rgba(37, 99, 235, 0.22);
}
.vault-tab {
  height: 40px;
  border: 1px solid rgba(28, 31, 36, 0.1);
  border-radius: 999px;
  background: #f2f4f6;
  color: #6b737c;
  font: 700 13px/1 var(--vault-font);
  letter-spacing: -0.02em;
  cursor: pointer;
}
.vault-tab.is-on {
  background: var(--vault-blue);
  color: #1e4f8a;
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
}
.vault-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 10px 14px;
  background: #fff;
}
.vault-list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 6px 8px;
}
.vault-list-meta span {
  font: 600 12px/1.2 var(--vault-font);
  color: var(--vault-muted);
}
.vault-empty {
  margin: 36px 16px;
  text-align: center;
  font: 500 13.5px/1.55 var(--vault-font);
  color: var(--vault-muted);
  word-break: keep-all;
}
.vault-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  border-radius: 14px;
  background: #fff;
  border: 1.5px solid rgba(28, 31, 36, 0.14);
  box-shadow: none;
  overflow: hidden;
}
.vault-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px;
  border: 0;
  border-bottom: 1px solid rgba(28, 31, 36, 0.1);
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}
.vault-item:last-child { border-bottom: 0; }
.vault-item:active { background: linear-gradient(90deg, rgba(232, 246, 238, 0.55), rgba(234, 243, 255, 0.45)); }
.vault-item-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}
.vault-item-title {
  appearance: none;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font: 700 14px/1.35 var(--vault-font);
  letter-spacing: -0.025em;
  color: var(--vault-ink);
  text-align: left;
  cursor: pointer;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.vault-item-title:hover { color: #1d4ed8; }
.vault-item-title:active { opacity: 0.85; }
.vault-item-meta {
  margin: 0;
  padding: 0;
  font: 500 11.5px/1.4 var(--vault-font);
  color: var(--vault-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vault-item-side {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.vault-item-date {
  font: 600 11px/1 var(--vault-font);
  color: #a0a6ae;
  letter-spacing: -0.02em;
}
.vault-item-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
}
.vault-item-actions button {
  height: 32px;
  min-width: 48px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 700 12px/1 var(--vault-font);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none;
}
.vault-btn-primary,
.vault-btn-edit {
  background: var(--vault-blue);
  color: #1e4f8a;
  border-color: rgba(37, 99, 235, 0.28);
}
.vault-btn-primary:hover,
.vault-btn-edit:hover {
  filter: brightness(0.98);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.12);
}
.vault-btn-save {
  background: var(--vault-green);
  color: #2f6b45;
  border-color: rgba(46, 125, 82, 0.32);
}
.vault-btn-save:hover {
  filter: brightness(0.98);
  box-shadow: 0 0 0 1px rgba(46, 125, 82, 0.16);
}
.vault-btn-save:disabled,
.vault-btn-save.is-busy {
  opacity: 0.6;
  cursor: wait;
}
.vault-btn-danger,
.vault-btn-del {
  background: var(--vault-red);
  color: #a33a3a;
  border-color: rgba(185, 60, 60, 0.28);
}
.vault-btn-danger:hover,
.vault-btn-del:hover {
  filter: brightness(0.98);
  box-shadow: 0 0 0 1px rgba(185, 60, 60, 0.12);
}
.vault-form {
  display: grid;
  gap: 12px;
  padding: 12px 14px 16px;
}
.vault-form label {
  display: grid;
  gap: 6px;
  font: 700 12px/1.2 var(--vault-font);
  color: #4a525a;
}
.vault-form input {
  height: 46px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(28, 31, 36, 0.12);
  background: #f8fafb;
  color: var(--vault-ink);
  font: 600 15px/1 var(--vault-font);
  outline: none;
}
.vault-form input:focus {
  border-color: rgba(37, 99, 235, 0.35);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.vault-form-hint {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid rgba(46, 125, 82, 0.28);
  background: var(--vault-green);
  font: 500 12.5px/1.5 var(--vault-font);
  color: #3f5a4c;
  word-break: keep-all;
}
.vault-form-go {
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: var(--vault-blue);
  color: #1e4f8a;
  font: 800 14px/1 var(--vault-font);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.14);
}
.vault-form-go:hover { filter: brightness(0.98); }
.vault-form-go:disabled { opacity: 0.55; cursor: wait; }
.vault-status {
  margin: 0;
  min-height: 1.2em;
  font: 600 12.5px/1.4 var(--vault-font);
  color: #2f7d52;
}
.vault-status.is-err { color: #b23a2c; }
.draft-fab.is-vault {
  border-color: #1f1e1d;
  background: #fff;
  transition:
    background 0.45s ease,
    border-color 0.45s ease,
    color 0.45s ease,
    box-shadow 0.45s ease;
}
.draft-fab.is-vault.is-vault-filled {
  border-color: #4f9a6a;
  color: #2f6b45;
  background: linear-gradient(145deg, #f3fbf6 0%, #d9f2e4 48%, #c8ead8 100%);
  box-shadow:
    0 0 0 3px rgba(79, 154, 106, 0.18),
    0 6px 16px rgba(61, 130, 90, 0.18);
  animation: vaultFabFillPulse 1.35s ease-in-out 2;
}
@keyframes vaultFabFillPulse {
  0%, 100% {
    box-shadow:
      0 0 0 3px rgba(79, 154, 106, 0.16),
      0 6px 16px rgba(61, 130, 90, 0.16);
  }
  50% {
    box-shadow:
      0 0 0 6px rgba(79, 154, 106, 0.28),
      0 8px 20px rgba(61, 130, 90, 0.24);
  }
}
@media (prefers-reduced-motion: reduce) {
  .draft-fab.is-vault.is-vault-filled { animation: none; }
}
@media (max-width: 560px) {
  .vault-panel {
    max-height: 94dvh;
    border-radius: 20px 20px 12px 12px;
  }
  .vault-head { padding: 14px 14px 12px; }
  .vault-head h3 { font-size: 16px; }
  .vault-head p { font-size: 11.5px; }
  .vault-body { padding: 4px 2px 10px; }
  .vault-item {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px 10px;
    padding: 13px 12px;
  }
  .vault-item-main { flex: 1 1 calc(100% - 70px); }
  .vault-item-side {
    flex: 0 0 auto;
    align-items: flex-end;
  }
  .vault-item-actions {
    width: 100%;
    justify-content: flex-end;
    order: 3;
  }
  .vault-item-actions button {
    min-height: 38px;
    min-width: 52px;
    padding: 0 12px;
    font-size: 12px;
  }
  .vault-item-title { font-size: 13.5px; }
  .vault-item-meta { white-space: normal; }
}
@media (min-width: 561px) and (max-width: 900px) {
  .vault-panel { width: min(620px, 100%); }
  .vault-item-title { font-size: 14.5px; }
}

.sheet-tools {
  flex-shrink: 0;
  height: 40px;
  display: inline-flex;
  align-items: stretch;
  border: 1.5px solid #1f1e1d;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(31, 30, 29, 0.08);
  overflow: hidden;
}
.tool-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #1f1e1d;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-width: 40px;
  padding: 0;
  transition: background 0.12s ease, color 0.12s ease;
}
.tool-btn + .tool-btn {
  border-left: 1px solid rgba(31, 30, 29, 0.12);
}
.tool-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tool-btn:hover {
  background: #f7f4ee;
  color: var(--accent-deep);
}
.tool-btn:active {
  background: #efe8dc;
}
.tool-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  z-index: 1;
}
#btnLiveReport,
.tool-btn-live {
  display: none !important;
}
.tool-btn-live {
  width: auto !important;
  min-width: 44px;
  padding: 0 10px 0 8px !important;
  gap: 5px;
  border-color: #93c5fd;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1d4ed8;
}
.tool-btn-live .live-label {
  font: 800 11px/1 "Noto Sans KR", Pretendard, sans-serif;
  letter-spacing: -0.02em;
}
.tool-btn-live.is-ready:not(:disabled) {
  cursor: pointer;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2), 0 2px 8px rgba(37, 99, 235, 0.18);
  animation: livePulse 1.8s ease-in-out infinite;
}
.tool-btn-live:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.15);
}
.tool-btn-live.is-on {
  border-color: #2563eb;
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
  color: #fff;
  animation: none;
}
@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.18), 0 2px 8px rgba(37, 99, 235, 0.16); }
  50% { box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.32), 0 4px 12px rgba(37, 99, 235, 0.28); }
}

/* 활동지 열기 → 실시간 버튼 코치마크 */
.live-hint-coach,
.live-hint-ring,
.live-hint-label {
  display: none !important;
}
.live-hint-coach {
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.live-hint-coach.is-on { opacity: 1; }
.live-hint-coach.is-out {
  opacity: 0;
  transition: opacity 0.65s ease;
}
.live-hint-ring {
  position: fixed;
  box-sizing: border-box;
  border: 2.5px solid #ef4444;
  background: transparent;
  box-shadow:
    0 0 0 3px rgba(239, 68, 68, 0.18),
    0 8px 24px rgba(239, 68, 68, 0.2);
  animation: liveHintPulse 1.15s ease-in-out infinite;
}
.live-hint-label {
  position: fixed;
  z-index: 96;
  margin: 0;
  max-width: min(300px, calc(100vw - 24px));
  padding: 10px 12px 11px;
  border-radius: 12px;
  border: 1.5px solid #1e40af;
  background: #eff6ff;
  color: #1e3a8a;
  font: 800 13px/1.4 "Noto Sans KR", Pretendard, var(--sans);
  letter-spacing: -0.02em;
  word-break: keep-all;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 10px 28px rgba(30, 64, 175, 0.22),
    0 2px 8px rgba(15, 23, 42, 0.12);
}
.live-hint-label::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  background: #eff6ff;
  border-left: 1.5px solid #1e40af;
  border-top: 1.5px solid #1e40af;
  transform: rotate(45deg);
}
.live-hint-label.is-below::before {
  top: -6px;
  left: 22px;
}
.live-hint-label.is-above::before {
  bottom: -6px;
  left: 22px;
  transform: rotate(225deg);
}
.live-hint-label.is-right::before {
  top: 14px;
  left: -6px;
}
.live-hint-label.is-left::before {
  top: 14px;
  right: -6px;
  left: auto;
  transform: rotate(225deg);
}
.live-hint-label strong {
  color: #1d4ed8;
  font-weight: 900;
}
@keyframes liveHintPulse {
  0%, 100% {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.16), 0 8px 22px rgba(239, 68, 68, 0.16);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.28), 0 10px 28px rgba(239, 68, 68, 0.28);
  }
}
@media (max-width: 720px) {
  .live-hint-label {
    font-size: 12.5px;
    line-height: 1.35;
    max-width: min(260px, calc(100vw - 24px)) !important;
    width: auto !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .live-hint-ring { animation: none; }
  .live-hint-coach,
  .live-hint-coach.is-out { transition: opacity 0.2s ease; }
}

@media (max-width: 720px) {
  .tool-btn-live .live-label { display: none; }
  .tool-btn-live { width: 42px !important; min-width: 42px; padding: 0 !important; }
}

/* live report deck styles: see live-report-deck.css (injected) */

/* 활동지 첫 진입 — 제출하기 → 보관함 안내 */
.vault-submit-tip {
  position: fixed;
  inset: 0;
  z-index: 94;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.28s ease;
}
.vault-submit-tip.is-on { opacity: 1; }
.vault-submit-tip.is-out {
  opacity: 0;
  transition: opacity 0.45s ease;
}
.vault-submit-tip-ring {
  position: fixed;
  box-sizing: border-box;
  border: 2.5px solid #2563eb;
  background: transparent;
  box-shadow:
    0 0 0 4px rgba(37, 99, 235, 0.2),
    0 8px 22px rgba(37, 99, 235, 0.22);
  animation: vaultSubmitTipPulse 1.2s ease-in-out infinite;
}
.vault-submit-tip-label {
  position: fixed;
  z-index: 95;
  margin: 0;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1.5px solid #1d4ed8;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e3a8a;
  font: 800 13.5px/1.45 "Noto Sans KR", Pretendard, var(--sans);
  letter-spacing: -0.02em;
  word-break: keep-all;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 28px rgba(37, 99, 235, 0.22);
  box-sizing: border-box;
}
.vault-submit-tip-label::before {
  content: "";
  position: absolute;
  left: var(--tip-arrow-left, 50%);
  width: 10px;
  height: 10px;
  margin-left: -5px;
  background: #eff6ff;
  border-left: 1.5px solid #1d4ed8;
  border-top: 1.5px solid #1d4ed8;
  transform: rotate(45deg);
}
.vault-submit-tip-label.is-below::before { top: -6px; }
.vault-submit-tip-label.is-above::before {
  top: auto;
  bottom: -6px;
  border-left: 0;
  border-top: 0;
  border-right: 1.5px solid #1d4ed8;
  border-bottom: 1.5px solid #1d4ed8;
  background: #dbeafe;
}
@keyframes vaultSubmitTipPulse {
  0%, 100% {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18), 0 8px 20px rgba(37, 99, 235, 0.18);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(37, 99, 235, 0.28), 0 10px 26px rgba(37, 99, 235, 0.28);
  }
}
@media (max-width: 720px) {
  .vault-submit-tip-label {
    font-size: 12.5px;
    line-height: 1.4;
    padding: 10px 12px;
  }
}
@media (max-width: 420px) {
  .vault-submit-tip-label {
    font-size: 12px;
    padding: 9px 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .vault-submit-tip-ring { animation: none; }
  .vault-submit-tip,
  .vault-submit-tip.is-out { transition: opacity 0.2s ease; }
}
@media print {
  .vault-submit-tip { display: none !important; }
  .submit-fab.is-vault-tip { outline: none; box-shadow: none; }
}

/* 제출 후 HTML 저장 안내 — 비활성 */
.save-keep-hint,
.save-keep-hint-ring,
.save-keep-hint-card {
  display: none !important;
}
.save-keep-hint[hidden] { display: none !important; }
.save-keep-hint-ring {
  position: fixed;
  pointer-events: none;
  box-sizing: border-box;
  border: 2.5px solid #2563eb;
  border-radius: 12px;
  background: transparent;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
  animation: save-keep-pulse 1.6s ease-in-out infinite;
}
.save-keep-hint-card {
  position: fixed;
  pointer-events: auto;
  z-index: 56;
  width: min(340px, calc(100vw - 24px));
  margin: 0;
  padding: 14px 14px 12px;
  border-radius: 14px;
  border: 1.5px solid #93c5fd;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
}
.save-keep-hint-card::before {
  content: "";
  position: absolute;
  top: -6px;
  left: var(--hint-arrow-left, 50%);
  width: 12px;
  height: 12px;
  margin-left: -6px;
  background: #fff;
  border-left: 1.5px solid #93c5fd;
  border-top: 1.5px solid #93c5fd;
  transform: rotate(45deg);
}
.save-keep-hint-card.is-above::before {
  top: auto;
  bottom: -6px;
  border-left: 0;
  border-top: 0;
  border-right: 1.5px solid #93c5fd;
  border-bottom: 1.5px solid #93c5fd;
}
.save-keep-hint-msg {
  margin: 0;
  padding: 0;
  color: #1e3a8a;
  font: 700 14px/1.55 var(--sans);
  letter-spacing: -0.02em;
  word-break: keep-all;
  text-align: left;
}
.save-keep-hint-keep {
  white-space: nowrap;
}
.save-keep-hint-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.save-keep-hint-ok {
  appearance: none;
  border: 0;
  border-radius: 10px;
  min-height: 36px;
  padding: 0 16px;
  background: #2563eb;
  color: #fff;
  font: 700 13px/1 var(--sans);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.save-keep-hint-ok:hover { background: #1d4ed8; }
.save-keep-hint-ok:active { transform: scale(0.98); }
@keyframes save-keep-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16); }
  50% { box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.08); }
}
@media (max-width: 720px) {
  .save-keep-hint-card {
    width: min(300px, calc(100vw - 20px));
    padding: 12px 12px 10px;
    gap: 10px;
  }
  .save-keep-hint-msg { font-size: 13.5px; line-height: 1.5; }
  .save-keep-hint-ring { border-radius: 10px; }
}
@media (max-width: 420px) {
  .save-keep-hint-card {
    width: calc(100vw - 16px);
    padding: 12px;
  }
  .save-keep-hint-msg { font-size: 13px; }
  .save-keep-hint-ok { min-height: 40px; width: 100%; }
  .save-keep-hint-actions { justify-content: stretch; }
}
@media print {
  .save-keep-hint { display: none !important; }
}

.zoom-controls {
  flex-shrink: 0;
  height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0 4px 0 10px;
  border: 1.5px solid #1f1e1d;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(31, 30, 29, 0.08);
  overflow: hidden;
}
.zoom-controls input[type="range"] {
  width: 108px;
  height: 22px;
  margin: 0;
  accent-color: #1f1e1d;
  cursor: ew-resize;
}
.zoom-btn,
.zoom-level {
  appearance: none;
  border: 0;
  background: transparent;
  color: #1f1e1d;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 0;
  transition: background 0.12s ease, color 0.12s ease;
}
.zoom-btn {
  width: 40px;
}
.zoom-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.zoom-level {
  min-width: 48px;
  height: 30px;
  padding: 0 8px;
  border-left: 1px solid rgba(31, 30, 29, 0.12);
  border-radius: 999px;
  font: 700 12px/1 var(--sans);
  letter-spacing: -0.02em;
  color: var(--accent-deep);
  background: var(--accent-soft);
}
.zoom-btn:hover:not(:disabled),
.zoom-level:hover {
  background: #f7f4ee;
}
.zoom-level:hover {
  background: #f4e2d6;
}
.zoom-btn:active:not(:disabled),
.zoom-level:active {
  background: #efe8dc;
}
.zoom-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.zoom-btn:focus-visible,
.zoom-level:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  z-index: 1;
}

.shell {
  width: min(820px, 100%);
  max-width: 100%;
  margin: 0 auto;
  zoom: var(--page-zoom, 1);
  transform-origin: top center;
}
.hero-card, .activity-card {
  border: 1px solid rgba(208, 199, 186, 0.9);
  border-radius: 22px;
  background:
    radial-gradient(ellipse 70% 80% at 14% 0%, rgba(201, 100, 66, 0.07), transparent 56%),
    rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.78) inset,
    0 12px 32px rgba(31, 30, 29, 0.06);
}
.hero-card {
  padding: 18px 18px;
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 18px;
  row-gap: 12px;
}
.hero-card .hero-copy { min-width: 0; grid-column: 1; }
.hero-card .theme {
  display: inline-flex;
  max-width: 100%;
  margin-bottom: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font: 600 11px/1.35 var(--sans);
  white-space: normal;
  word-break: keep-all;
}
.hero-card h1 {
  margin: 0;
  font: 600 clamp(20px, 4.5vw, 28px)/1.35 var(--serif);
  letter-spacing: -0.02em;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.hero-card p {
  margin: 6px 0 0; color: var(--muted);
  font: 400 13px/1.55 var(--serif);
  word-break: keep-all;
}
.hero-card .hero-side {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}
.hero-qr-wrap > .hero-code,
.hero-card .hero-code {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 5px 10px;
  border-radius: 6px;
  background: #1c2433;
  color: #fff;
  white-space: nowrap;
  line-height: 1;
  max-width: 100%;
  text-align: center;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.hero-qr-wrap > .hero-code[hidden],
.hero-card .hero-code[hidden] { display: none !important; }
.hero-qr-wrap .hero-code-label,
.hero-card .hero-code-label {
  font: 700 12px/1 var(--sans);
  letter-spacing: -0.02em;
  color: #fff;
}
.hero-qr-wrap .hero-code-value,
.hero-card .hero-code-value {
  font: 800 13px/1 var(--sans);
  letter-spacing: 0.04em;
  color: #fff;
  word-break: keep-all;
}
.hero-code .code-digit { color: #F5C451; font-weight: 800; }
.hero-code .code-letter { color: #9ECAF6; font-weight: 800; }
.code-digit {
  color: #7a1f2b;
  font-weight: 800;
}
.hero-card .hero-qr-wrap {
  grid-column: auto;
  grid-row: auto;
  align-self: center;
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
}
.hero-card .hero-qr,
.hero-card a.hero-qr {
  width: 112px;
  height: 112px;
  box-sizing: border-box;
  border: 1px solid #d5dbe3;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6px;
  margin: 0;
  line-height: 0;
  text-decoration: none; color: inherit;
  cursor: pointer; touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 2px rgba(22, 35, 59, 0.08);
}
.hero-card a.hero-qr:hover { border-color: #16233b; }
.hero-card a.hero-qr:active { transform: none; }
.hero-card .hero-qr canvas,
.hero-card .hero-qr img,
.hero-card .hero-qr table,
.hero-card .hero-qr .qr-img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  display: block;
  border: 0 !important;
  border-collapse: collapse;
  pointer-events: none;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.hero-card .hero-qr table td { border: 0 !important; padding: 0 !important; line-height: 0; }
.hero-card .hero-qr-cap {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
  font: 700 10px/1.2 var(--sans);
  color: var(--muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.hero-card .hero-qr-cap:hover { color: var(--ink); }
.hero-card .hero-qr-cap:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

body.qr-lightbox-open { overflow: hidden; }
.qr-lightbox {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 18, 16, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: qrFadeIn 0.18s ease;
}
.qr-lightbox.is-open { display: flex; }
.qr-lightbox-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 22px 22px 16px;
  border: 2px solid #111110;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  animation: qrPopIn 0.2s ease;
}
.qr-lightbox-code {
  width: min(360px, 62vw, 62vh);
  height: min(360px, 62vw, 62vh);
  box-sizing: border-box;
  padding: 14px;
  border: 2px solid #111110;
  border-radius: 16px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qr-lightbox-code canvas,
.qr-lightbox-code img {
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  pointer-events: none;
}
.qr-lightbox-hint {
  font: 700 13px/1.3 var(--sans);
  color: #57534e;
}
@keyframes qrFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes qrPopIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.activity-card { padding: 16px 16px 20px; overflow: visible; }
.activity-card h2 {
  margin: 0 0 14px;
  font: 600 16px/1.35 var(--serif);
}
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { font: 600 12px/1.3 var(--sans); color: #4a4845; }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid var(--line); border-radius: 12px;
  background: #faf9f5; color: var(--ink); outline: none;
  font: 500 14px/1.45 var(--sans); padding: 12px 14px;
}
.field input, .field select { height: 46px; }
.field textarea {
  min-height: 120px;
  height: auto;
  max-height: none;
  overflow: hidden;
  resize: none;
  font-family: var(--serif);
  line-height: 1.65;
  field-sizing: content;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201, 100, 66, 0.12);
}
.reflect-field {
  display: grid;
  gap: 6px;
  margin-top: 28px;
  margin-bottom: 4px;
  padding-top: 22px;
  border-top: 1.5px dashed #d8d0c2;
}
.activity-card > .reflect-field:first-child,
.na-manual + .reflect-field,
.lesson-part + .reflect-field,
.bingo > .reflect-field {
  margin-top: 32px;
}
.reflect-field label {
  color: var(--accent-deep);
  font-size: 13px;
  margin-top: 2px;
}
.reflect-field textarea {
  min-height: 110px;
  background: #fffaf5;
  border-color: #e2c8b4;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* 구버전 PDF용 학번/이름·컨트롤만 숨김 */
.na-manual-info,
.na-info-box,
.na-manual .student-info,
.na-manual .info-box,
.profile-info,
.control-panel,
.control-bar,
.action-bar,
.btn-pdf,
#studentId,
#studentName,
.html-forge,
.html-forge--fold,
.html-forge-code,
#htmlCodeOut,
.lesson-part-tools .html-forge-badge,
.lesson-part-tools .html-forge-copy {
  display: none !important;
}

.sheet-identity[hidden],
body.has-native-identity .sheet-identity,
body[data-session="9"] .sheet-identity,
body[data-session="11"] .sheet-identity,
body[data-session="12"] .sheet-identity,
body[data-session="13"] .sheet-identity,
body[data-session="14"] .sheet-identity,
body[data-session="15"] .sheet-identity,
body[data-session="16"] .sheet-identity,
body[data-session="17"] .sheet-identity,
body[data-session="18"] .sheet-identity,
body[data-session="19"] .sheet-identity,
body[data-session="20"] .sheet-identity,
body[data-session="21"] .sheet-identity,
body[data-session="22"] .sheet-identity,
body[data-session="23"] .sheet-identity,
body[data-session="24"] .sheet-identity,
body[data-session="25"] .sheet-identity,
body[data-session="26"] .sheet-identity,
body[data-session="27"] .sheet-identity,
body[data-session="7"] .activity-sheet-bar,
body[data-session="8"] .activity-sheet-bar,
body[data-session="28"] .sheet-identity,
body[data-session="28"] .activity-sheet-bar,
body[data-session="28"] .sheet-dept-row,
body[data-session="29"] .activity-sheet-bar,
body[data-session="29"] .sheet-dept-row,
body[data-session="30"] .activity-sheet-bar,
body[data-session="30"] .sheet-dept-row {
  display: none !important;
}
.activity-sheet-bar-title[hidden] { display: none !important; }

.activity-sheet-bar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  min-height: 58px;
  margin: 0 0 12px;
  /* 위·아래 패딩 동일 → 테두리~구분선 사이 시각 중앙 */
  padding: 14px 12px 14px 0;
  border-bottom: 1.5px solid rgba(31, 30, 29, 0.1);
  overflow: visible;
}
.activity-sheet-bar-left {
  position: relative;
  z-index: 1;
  justify-self: start;
  align-self: center;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: min(42vw, 220px);
}
.print-lesson-title {
  display: none;
  margin: 0;
  padding: 0;
  font: 700 13px/1.3 var(--serif);
  letter-spacing: -0.02em;
  color: var(--ink);
  word-break: keep-all;
}
.activity-sheet-bar-title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  margin: 0;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  line-height: 1.3;
}
.activity-sheet-bar h2 {
  margin: 0 !important;
  font: 700 calc(22px + 2pt)/1.3 var(--serif);
  letter-spacing: -0.02em;
  overflow: visible;
}
.activity-sheet-bar-left > .sheet-dept {
  margin-left: 0;
  max-width: min(38vw, 180px);
}
.sheet-identity {
  position: relative;
  z-index: 1;
  justify-self: end;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  padding-top: 0;
  margin-right: 6px;
}
.sheet-identity label {
  display: grid;
  gap: 3px;
  margin: 0;
}
.sheet-identity label span {
  font: 700 11px/1.2 var(--sans);
  color: #4a4845;
}
.sheet-identity input {
  width: 100px;
  height: 36px;
  border: 1px solid rgba(208, 199, 186, 0.85);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  padding: 0 10px;
  font: 600 13px/1 var(--sans);
  color: var(--ink);
  outline: none;
}
.sheet-identity input#sheetDisplayName { width: 88px; }
.sheet-identity input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 100, 66, 0.12);
}

/* 1차시 · 나 사용 설명서 */
.activity-card:has(.na-manual),
.activity-card:has(.activity-sheet-bar) {
  /* 상단 여백을 바에 맡겨 제목이 위 테두리~구분선 사이 중앙에 오도록 */
  padding: 10px 22px 16px 14px;
}

body.has-activity-toc .activity-sheet-bar {
  margin-bottom: 4px;
}
body.has-activity-toc .imported-sheet .page,
body.has-activity-toc .imported-sheet .sheet {
  padding-top: 8px !important;
}
body.has-activity-toc .imported-sheet .stack {
  padding-top: 4px !important;
}
body.has-activity-toc .imported-sheet .checklist-wrapper {
  padding-top: 8px !important;
}
.activity-toc-fixed {
  position: fixed !important;
  margin: 0 !important;
}
@media print {
  .activity-toc-fixed,
  #toc,
  .imported-sheet .toc,
  .imported-sheet .toc-sidebar {
    display: none !important;
  }
}

body[data-session="10"] .student-info-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  max-width: 100%;
  min-width: 0;
}
body[data-session="10"] .student-info-grid .info-group,
body[data-session="10"] .student-info-grid .info-group input {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}
.na-manual {
  margin: 0;
}
.na-manual-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  padding: 0 2px 10px;
  margin-bottom: 10px;
  border-bottom: 2px solid rgba(74, 96, 122, 0.35);
}
.na-manual-head strong {
  font: 700 17px/1.25 var(--sans);
  color: #2c3e50;
  letter-spacing: -0.02em;
  padding-left: 2ch; /* 앞에 2칸 */
  min-width: 0;
}
.na-manual-head span:not(.sheet-dept) {
  font: 500 12px/1.4 var(--sans);
  color: #7f8c8d;
}
.sheet-dept {
  margin-left: 0;
  flex-shrink: 0;
  max-width: min(46vw, 220px);
  padding: 4px 10px;
  border: 1.5px solid #c5a57a;
  border-radius: 999px;
  background: linear-gradient(180deg, #fffaf3 0%, #f3e6d4 100%);
  color: #6b4a2a;
  font: 700 12.5px/1.2 "Noto Sans KR", var(--sans);
  letter-spacing: -0.02em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sheet-dept[hidden] { display: none !important; }
.sheet-dept-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: -2px 0 10px;
  min-height: 0;
}
.sheet-dept-row[hidden] { display: none !important; }
.na-manual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.na-card {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  padding: 9px 10px 8px;
  background: rgba(255, 255, 255, 0.36);
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 8px 18px rgba(31, 30, 29, 0.04);
}
.na-card-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  min-width: 0;
}
.na-card-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: #3d5f80;
  display: grid;
  place-items: center;
  font-size: 14px;
  line-height: 1;
}
.na-card-head label {
  margin: 0;
  min-width: 0;
  font: 700 13px/1.3 var(--sans);
  color: #243447;
  letter-spacing: -0.01em;
}
.na-card textarea,
.activity-card .na-card textarea {
  width: 100%;
  flex: 0 0 auto;
  min-height: 84px;
  height: auto;
  max-height: none;
  overflow: hidden;
  border: 0 !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.5) !important;
  resize: none;
  padding: 6px 8px !important;
  font: 500 13px/1.45 var(--sans) !important;
  color: #2c3e50;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(208, 199, 186, 0.55);
  field-sizing: content;
}
.na-card textarea::placeholder,
.activity-card .na-card textarea::placeholder {
  color: #93a0b0;
  font-size: 12px;
  line-height: 1.4;
}
.na-card textarea:focus,
.activity-card .na-card textarea:focus {
  background: rgba(255, 255, 255, 0.82) !important;
  box-shadow: inset 0 0 0 1.5px rgba(201, 100, 66, 0.4);
}

/* 공란: 연한 하늘색 그라데이션 제외 (보고서·인쇄·제출본) */
.na-card textarea.is-blank,
.activity-card .na-card textarea.is-blank,
.na-card textarea[data-blank="1"],
.activity-card .na-card textarea[data-blank="1"],
.q-item input.is-blank,
.bingo-cell textarea.is-blank,
.reflect-field textarea.is-blank,
.swot-cell input.is-blank,
.swot-cell textarea.is-blank,
.swot-step input.is-blank,
.swot-card textarea.is-blank,
.swot-plan textarea.is-blank,
.field input.is-blank,
.field textarea.is-blank {
  background: #fff !important;
  box-shadow: inset 0 0 0 1px #e5e7eb !important;
  color: #94a3b8;
}
.psy-card input.is-blank,
.psy-card textarea.is-blank,
.psy-cell input.is-blank,
.psy-cell textarea.is-blank,
.psy-q textarea.is-blank,
.psy-table input.is-blank,
.psy-table textarea.is-blank,
.psy-pledge.is-blank,
.debate-cell input.is-blank,
.debate-cell textarea.is-blank,
.debate-topic-input.is-blank,
.debate-block > input.is-blank {
  background: #fff !important;
  box-shadow: inset 0 0 0 1px #e5e7eb !important;
}

/* 1차시 학번·이름·느낀점 입력칸도 동일 톤 */
.activity-card:has(.na-manual) .sheet-identity input {
  border-color: #b7d0e6;
  background: linear-gradient(180deg, #f5faff 0%, #e8f3fb 100%);
}
.activity-card:has(.na-manual) .sheet-identity input:focus {
  border-color: #5b9fd4;
  box-shadow: 0 0 0 3px rgba(91, 159, 212, 0.18);
}
.activity-card:has(.na-manual) .reflect-field textarea {
  border-color: #b7d0e6;
  background: linear-gradient(180deg, #f5faff 0%, #eaf4fb 100%);
}

/* 1차시 (2) · 100문 100답 */
.activity-card--session1 > h2 {
  margin: 0 0 10px;
  font: 700 16px/1.3 var(--sans);
  color: #1f1e1d;
}
.activity-part-title {
  margin: 22px 0 10px !important;
  padding-top: 18px;
  border-top: 2px solid rgba(31, 30, 29, 0.12);
  font: 700 16px/1.3 var(--sans) !important;
  color: #1f1e1d !important;
}
.q100-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  align-items: center;
  margin-bottom: 10px;
}
.q100-head strong {
  font: 700 16px/1.25 var(--sans);
  color: #312e81;
  letter-spacing: -0.02em;
  min-width: 0;
}
.q100-head > span:not(.sheet-dept) {
  grid-column: 1 / -1;
  font: 500 12px/1.4 var(--sans);
  color: #64748b;
}
.q100-head .sheet-dept {
  grid-column: 2;
  grid-row: 1;
}
.questions-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.q-item {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 7px 5px;
  border-radius: 8px;
  background: linear-gradient(180deg, #faf5ff 0%, #f5f3ff 100%);
  border: 1px solid #e9d5ff;
  border-left: 3px solid #8b5cf6;
}
.q-item .q-title,
.q-item label.q-title {
  margin: 0;
  font: 700 11px/1.25 var(--sans);
  color: #5b21b6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.q-item input,
.activity-card .q-item input {
  width: 100%;
  height: 28px !important;
  min-height: 28px !important;
  border: 0 !important;
  border-bottom: 1px dashed #ddd6fe !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 2px 0 !important;
  font: 500 12px/1.3 var(--sans) !important;
  color: #1f2937;
  outline: none;
  box-shadow: none !important;
}
.q-item input:focus,
.activity-card .q-item input:focus {
  border-bottom: 1.5px solid #7c3aed !important;
}
.q-item-top {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}
.q-item-top .q-title {
  flex: 1;
  min-width: 0;
}
.q-star-btn {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin: -2px -2px 0 0;
  padding: 0;
  border: 1.5px solid rgba(91, 33, 182, 0.28);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
  color: #7c3aed;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
.q-star-btn svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.q-star-btn:hover {
  background: #fff;
  border-color: #f59e0b;
  color: #d97706;
  transform: translateY(-1px);
}
.q-star-btn:active {
  transform: scale(0.94);
}
.q-item.is-starred {
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 55%, #fde68a 100%);
  border-color: #f59e0b;
  border-left-color: #d97706;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.28), 0 4px 12px rgba(217, 119, 6, 0.18);
}
.q-item.is-starred .q-title {
  color: #92400e;
}
.q-item.is-starred .q-star-btn {
  border-color: #d97706;
  background: linear-gradient(180deg, #fef3c7, #fbbf24);
  color: #78350f;
  box-shadow: 0 1px 0 rgba(255,255,255,0.55) inset;
}
.q-item.is-starred .q-star-btn svg {
  fill: currentColor;
  stroke: currentColor;
}
.q-item.is-starred input,
.activity-card .q-item.is-starred input {
  border-bottom-color: #f59e0b !important;
  color: #1c1917;
  font-weight: 700 !important;
}

/* 3차시 · 진로 빙고 */
.activity-card--bingo {
  padding: 14px !important;
}
.bingo-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(30, 58, 138, 0.28);
}
.bingo-head strong {
  font: 800 18px/1.25 var(--sans);
  color: #1e3a8a;
  letter-spacing: -0.02em;
  min-width: 0;
}
.bingo-head > span:not(.sheet-dept) {
  grid-column: 1 / -1;
  font: 500 12px/1.4 var(--sans);
  color: #6b7280;
}
.bingo-head .sheet-dept {
  grid-column: 2;
  grid-row: 1;
}
.bingo-guide {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 0 10px 10px 0;
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
}
.bingo-guide strong {
  display: block;
  margin-bottom: 4px;
  font: 700 12px/1.3 var(--sans);
  color: #1e40af;
}
.bingo-guide ol {
  margin: 0;
  padding-left: 18px;
  font: 500 12px/1.4 var(--sans);
  color: #1e293b;
}
.bingo-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.bingo-cell {
  min-width: 0;
  min-height: 108px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 7px 7px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
}
.bingo-cell.is-free {
  background: #f0f9ff;
  border-color: #0284c7;
}
.bingo-cell .cell-number {
  font: 700 10px/1 var(--sans);
  color: #94a3b8;
}
.bingo-cell.is-free .cell-number { color: #0284c7; }
.bingo-cell .cell-title,
.bingo-cell label.cell-title {
  margin: 0;
  font: 700 11px/1.25 var(--sans);
  color: #1e293b;
  text-align: center;
  word-break: keep-all;
}
.bingo-cell.is-free .cell-title { color: #0369a1; }
.bingo-cell textarea.cell-input,
.activity-card .bingo-cell textarea.cell-input {
  width: 100%;
  flex: 0 0 auto;
  min-height: 48px !important;
  height: auto !important;
  max-height: none !important;
  overflow: hidden;
  border: 0 !important;
  border-radius: 6px !important;
  background: rgba(248, 250, 252, 0.9) !important;
  resize: none;
  padding: 4px 4px !important;
  font: 500 12px/1.3 var(--sans) !important;
  text-align: center;
  color: #2563eb;
  outline: none;
  box-shadow: none !important;
  field-sizing: content;
}
.bingo-cell.is-free textarea.cell-input {
  color: #0369a1 !important;
  font-weight: 700 !important;
}
.bingo-cell textarea.cell-input::placeholder {
  color: #cbd5e1;
  font-weight: 400;
  font-size: 11px;
}
.bingo-cell textarea.cell-input:focus {
  background: #fff !important;
  box-shadow: inset 0 0 0 1.5px rgba(37, 99, 235, 0.35) !important;
}
.bingo-reflection {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  display: grid;
  gap: 6px;
}
.bingo-reflection label {
  margin: 0;
  font: 700 12px/1.35 var(--sans);
  color: #1e3a8a;
}
.bingo-reflection textarea,
.activity-card .bingo-reflection textarea {
  width: 100%;
  min-height: 72px !important;
  height: auto !important;
  max-height: none !important;
  overflow: hidden;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  background: #fff !important;
  resize: none;
  padding: 10px 12px !important;
  font: 500 13px/1.45 var(--sans) !important;
  color: #1e293b;
  field-sizing: content;
  outline: none;
  box-shadow: none !important;
}
.bingo-reflection textarea:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

/* 3차시 · 직업 월드컵 */
.activity-card--worldcup { padding: 14px !important; }
.activity-card--worldcup.is-wc-play {
  padding-bottom: 36px !important;
}
.wc-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(30, 58, 138, 0.28);
}
.wc-head strong {
  font: 800 18px/1.25 var(--sans);
  color: #1e3a8a;
  letter-spacing: -0.02em;
  min-width: 0;
}
.wc-head > span:not(.sheet-dept) {
  grid-column: 1 / -1;
  font: 500 12px/1.4 var(--sans);
  color: #6b7280;
}
.wc-head .sheet-dept {
  grid-column: 2;
  grid-row: 1;
}
.wc-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.wc-step {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 6px 4px;
  text-align: center;
}
.wc-step-num {
  width: 22px;
  height: 22px;
  margin: 0 auto 3px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 800 0.72rem/1 var(--sans);
  background: #f3f4f6;
  color: #6b7280;
}
.wc-step strong {
  display: block;
  font: 700 0.75rem/1.2 var(--sans);
}
.wc-step span {
  display: block;
  margin-top: 1px;
  font: 500 0.65rem/1.2 var(--sans);
  color: #6b7280;
}
.wc-step.is-active {
  border-color: #93c5fd;
  background: #eff6ff;
}
.wc-step.is-active .wc-step-num {
  background: #2563eb;
  color: #fff;
}
.wc-step.is-done .wc-step-num {
  background: #059669;
  color: #fff;
}
.wc-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.04);
}
.wc-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.wc-panel-title h3 {
  margin: 0;
  font: 800 1rem/1.3 var(--sans);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.wc-badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 7px;
  background: #2563eb;
  color: #fff;
  font: 800 0.72rem/1 var(--sans);
}
.wc-help {
  font: 500 0.75rem/1.3 var(--sans);
  color: #6b7280;
}
.wc-howto {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
@media (min-width: 700px) {
  .wc-howto { grid-template-columns: repeat(3, 1fr); }
}
.wc-howto-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}
.wc-howto-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.wc-howto-item strong {
  display: block;
  margin: 0 0 2px;
  font: 800 0.88rem/1.3 var(--sans);
}
.wc-howto-item p {
  margin: 0;
  font: 500 0.78rem/1.35 var(--sans);
  color: #6b7280;
  word-break: keep-all;
}
.wc-cats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  overflow: visible;
  padding-bottom: 2px;
  margin-bottom: 6px;
}
@media (min-width: 560px) {
  .wc-cats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.wc-cats-hint {
  margin: 0 0 10px;
  font: 500 0.78rem/1.45 var(--sans);
  color: #6b7280;
  word-break: keep-all;
}
.wc-cat {
  min-width: 0;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 999px;
  padding: 7px 8px;
  font: 700 0.78rem/1.2 var(--sans);
  color: #6b7280;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
}
.wc-cat.is-on {
  background: #111827;
  color: #fff;
  border-color: #111827;
}
.wc-job-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
@media (min-width: 480px) {
  .wc-job-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
}
@media (min-width: 768px) {
  .wc-job-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
}
@media (min-width: 1100px) {
  .wc-job-grid { gap: 9px; }
}
.wc-job-cell {
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 8px;
  background: #fff;
  min-height: 76px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.wc-job-cell:focus-within {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.wc-job-cell.is-checked {
  background: #eff6ff;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}
.wc-job-cell.is-dup {
  background: #fff1f2;
  border-color: #fb7185;
  box-shadow: 0 0 0 2px rgba(244, 63, 94, 0.16);
}
.wc-job-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.wc-job-emoji {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  background: var(--icon-bg, #eff6ff);
  cursor: pointer;
  position: relative;
  padding: 0;
  flex-shrink: 0;
}
.wc-job-cell.is-checked .wc-job-emoji::after {
  content: "✓";
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
  display: grid;
  place-items: center;
  line-height: 1;
}
.wc-job-idx {
  font: 800 0.68rem/1 var(--sans);
  color: #9ca3af;
}
.wc-job-name-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  min-height: 22px;
  min-width: 0;
}
.wc-job-cell input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  font: 700 0.84rem/1.35 var(--sans);
  color: #111827;
  padding: 0;
  overflow-wrap: anywhere;
  word-break: keep-all;
}
.wc-job-cell input::placeholder {
  color: #9ca3af;
  font-weight: 500;
}
.wc-job-cat {
  flex-shrink: 1;
  margin-left: auto;
  max-width: 46%;
  font: 700 0.66rem/1.2 var(--sans);
  color: #2563eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wc-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.wc-bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}
.wc-bar > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2563eb, #22c55e);
  border-radius: inherit;
  transition: width 0.25s ease;
}
.wc-bar-text {
  font: 800 0.82rem/1 var(--sans);
  min-width: 48px;
  text-align: right;
}
.wc-fill-hint {
  margin: 6px 0 0;
  font: 500 0.78rem/1.45 var(--sans);
  color: #6b7280;
}
.wc-howto-item em {
  font-style: normal;
  font-weight: 800;
  color: #1d4ed8;
}
.wc-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  border-radius: 12px;
  padding: 11px 14px;
  font: 700 0.9rem/1.2 var(--sans);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  user-select: none;
}
.wc-btn:active { transform: scale(0.98); }
.wc-btn-main {
  width: 100%;
  margin-top: 6px;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
  font-size: 1rem;
  padding: 13px;
}
.wc-btn-main:hover { background: #1d4ed8; }
.wc-btn-sub {
  background: #f3f4f6;
  color: #111827;
  border: 1px solid #e5e7eb;
}
.wc-btn-sub:hover { background: #e5e7eb; }
.wc-btn-submit {
  background: linear-gradient(145deg, #d88861, var(--accent, #c96442) 50%, var(--accent-deep, #8c4022));
  color: #f7f1ea;
  border: 0;
  box-shadow: 0 8px 18px rgba(201, 100, 66, 0.28);
  font-weight: 800;
}
.wc-btn-submit:hover { filter: brightness(1.04); }
.wc-btn-submit svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wc-btn-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: 8px;
}
.wc-btn-row--tools {
  grid-template-columns: 1fr 1fr;
}
.wc-btn-row--tools #wc-btn-undo {
  grid-column: 1 / -1;
}
.wc-btn-short { display: none; }
.wc-btn-long { display: inline; }
.wc-btn-clear {
  min-width: 0;
  color: #9f1239;
  background: #fff1f2;
  border-color: #fecdd3;
}
.wc-btn-clear:hover { background: #ffe4e6; }
.wc-btn-undo {
  min-width: 0;
  color: #1e3a8a;
  background: #eff6ff;
  border-color: #bfdbfe;
}
.wc-btn-undo:hover { background: #dbeafe; }
.wc-btn-undo:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  color: #64748b;
  background: #f8fafc;
  border-color: #e5e7eb;
}
@media (max-width: 719px) {
  .wc-btn-row--tools .wc-btn-long { display: none; }
  .wc-btn-row--tools .wc-btn-short { display: inline; }
}
@media (min-width: 560px) {
  .wc-btn-row--tools {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .wc-btn-row--tools #wc-btn-fill-remain { grid-column: 1; }
  .wc-btn-row--tools #wc-btn-pick-list { grid-column: 2; }
  .wc-btn-row--tools #wc-btn-shuffle { grid-column: 3; }
  .wc-btn-row--tools #wc-btn-clear-jobs { grid-column: 1; }
  .wc-btn-row--tools #wc-btn-undo { grid-column: 2 / 4; }
}
@media (min-width: 900px) {
  .wc-btn-row--tools {
    grid-template-columns: 1.25fr 1.1fr 0.95fr 0.75fr 0.85fr;
  }
  .wc-btn-row--tools #wc-btn-fill-remain,
  .wc-btn-row--tools #wc-btn-pick-list,
  .wc-btn-row--tools #wc-btn-shuffle,
  .wc-btn-row--tools #wc-btn-clear-jobs,
  .wc-btn-row--tools #wc-btn-undo {
    grid-column: auto;
  }
}
.wc-result-actions {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
@media (max-width: 420px) {
  .wc-result-actions {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 520px) {
  .wc-result-actions { grid-template-columns: 1fr 1fr; }
}

/* 직업 목록 피커 */
body.wc-picker-open { overflow: hidden; }
.wc-picker {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: end center;
}
.wc-picker[hidden] { display: none !important; }
.wc-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.wc-picker-sheet {
  position: relative;
  width: min(560px, 100%);
  max-height: min(88vh, 720px);
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  padding: 14px 14px 18px;
  animation: wc-picker-up 0.22s ease;
}
@keyframes wc-picker-up {
  from { transform: translateY(24px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}
.wc-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.wc-picker-head strong {
  display: block;
  font: 800 1.02rem/1.3 var(--sans);
  color: #111827;
}
.wc-picker-head p {
  margin: 4px 0 0;
  font: 500 0.78rem/1.4 var(--sans);
  color: #6b7280;
}
.wc-picker-x {
  appearance: none;
  border: none;
  background: #f3f4f6;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: #374151;
  flex-shrink: 0;
}
.wc-picker-search {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 11px 12px;
  font: 600 0.92rem/1.3 var(--sans);
  outline: none;
  margin-bottom: 8px;
}
.wc-picker-search:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.wc-picker-cats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  overflow: visible;
  padding-bottom: 8px;
  margin-bottom: 4px;
}
@media (min-width: 560px) {
  .wc-picker-cats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.wc-picker-cat {
  appearance: none;
  min-width: 0;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 999px;
  padding: 7px 8px;
  font: 700 0.74rem/1 var(--sans);
  color: #4b5563;
  text-align: center;
  cursor: pointer;
}
.wc-picker-cat.is-on {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
.wc-picker-list {
  flex: 1;
  min-height: 180px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 2px;
}
.wc-picker-empty {
  margin: 24px 0;
  text-align: center;
  color: #9ca3af;
  font: 600 0.88rem/1.4 var(--sans);
}
.wc-picker-item {
  appearance: none;
  border: 1px solid #eef2f7;
  background: #fff;
  border-radius: 12px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  text-align: left;
  cursor: pointer;
}
.wc-picker-item:hover { background: #f8fafc; border-color: #dbeafe; }
.wc-picker-item.is-taken,
.wc-picker-item:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  background: #f8fafc;
}
.wc-picker-item.is-taken:hover { background: #f8fafc; border-color: #e5e7eb; }

.wc-suggest {
  position: fixed;
  z-index: 11050;
  overflow: auto;
  padding: 6px;
  border: 1.5px solid #bfdbfe;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
}
.wc-suggest[hidden] { display: none !important; }
.wc-suggest-item {
  appearance: none;
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 8px 8px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  text-align: left;
  cursor: pointer;
}
.wc-suggest-item:hover,
.wc-suggest-item.is-on {
  background: #eff6ff;
}
.wc-suggest-emoji {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 1rem;
}
.wc-suggest-name {
  min-width: 0;
  font: 800 0.84rem/1.3 var(--sans);
  color: #111827;
}
.wc-suggest-name em {
  font-style: normal;
  color: #1d4ed8;
  background: #dbeafe;
  border-radius: 4px;
  padding: 0 2px;
}
.wc-suggest-tag {
  font: 700 0.66rem/1 var(--sans);
  color: #2563eb;
  white-space: nowrap;
}
.wc-picker-emoji {
  grid-row: 1 / span 2;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
}
.wc-picker-name {
  grid-column: 2;
  font: 800 0.9rem/1.3 var(--sans);
  color: #111827;
}
.wc-picker-tag {
  grid-column: 2;
  grid-row: 2;
  font: 600 0.68rem/1.2 var(--sans);
  color: #2563eb;
}
.wc-picker-taken {
  grid-column: 3;
  grid-row: 1 / span 2;
  font: 700 0.68rem/1 var(--sans);
  color: #9ca3af;
}
.wc-picker-more {
  appearance: none;
  border: 1px dashed #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 12px;
  padding: 12px;
  margin: 4px 0 2px;
  font: 800 0.86rem/1.2 var(--sans);
  cursor: pointer;
  touch-action: manipulation;
}
.wc-picker-more:active { transform: scale(0.98); }
@media (min-width: 640px) {
  .wc-picker { place-items: center; }
  .wc-picker-sheet {
    border-radius: 18px;
    max-height: min(80vh, 680px);
  }
}
.wc-match-head { text-align: center; margin-bottom: 8px; }
.wc-round-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #111827;
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font: 800 0.9rem/1.2 var(--sans);
  margin-bottom: 6px;
}
.wc-match-info {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.wc-pill {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 5px 10px;
  font: 700 0.78rem/1.2 var(--sans);
  color: #6b7280;
}
.wc-pill strong { color: #111827; }
.wc-track {
  height: 8px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
  margin: 0 0 8px;
}
.wc-track > i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ea580c, #f59e0b);
  transition: width 0.3s ease;
}
.wc-round-flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}
.wc-rf {
  text-align: center;
  padding: 7px 2px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
  font: 800 0.72rem/1.2 var(--sans);
  color: #9ca3af;
}
.wc-rf.is-on {
  background: #ea580c;
  border-color: #ea580c;
  color: #fff;
}
.wc-rf.is-passed {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #059669;
}
.wc-guide {
  text-align: center;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  border-radius: 12px;
  padding: 8px 10px;
  font: 700 0.86rem/1.35 var(--sans);
  margin-bottom: 8px;
  word-break: keep-all;
}
.wc-guide kbd {
  display: inline-block;
  min-width: 1.25em;
  padding: 1px 6px;
  margin: 0 2px;
  border: 1px solid #fdba74;
  border-radius: 6px;
  background: #fff;
  font: 800 0.8em/1.3 ui-monospace, monospace;
  color: #c2410c;
}
#wc-play {
  padding-bottom: 18px;
}
.wc-arena {
  position: relative;
  margin: 4px 0 8px;
  padding: 16px 12px 28px;
  border-radius: 22px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 247, 237, 0.95), rgba(255, 255, 255, 0.55) 55%, transparent 80%),
    linear-gradient(180deg, #fff8ef 0%, #fff 58%, #f8fafc 100%);
  border: 1.5px dashed #f0c9a0;
  overflow: visible;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}
.wc-arena.is-final {
  background:
    radial-gradient(90% 70% at 50% 100%, rgba(251, 191, 36, 0.22), transparent 58%),
    radial-gradient(120% 80% at 50% 0%, rgba(255, 247, 237, 0.95), rgba(255, 255, 255, 0.55) 55%, transparent 80%),
    linear-gradient(180deg, #fff7ed 0%, #fff 52%, #fffbeb 100%);
  box-shadow: inset 0 -18px 40px rgba(234, 88, 12, 0.08);
}
.wc-arena-spark {
  position: absolute;
  inset: 8px 10px auto 10px;
  height: 18px;
  pointer-events: none;
}
.wc-arena-spark i {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
  opacity: 0.55;
  animation: wc-sparkle 1.8s ease-in-out infinite;
}
.wc-arena-spark i:nth-child(1) { left: 8%; top: 4px; background: #f59e0b; }
.wc-arena-spark i:nth-child(2) { left: 24%; top: 0; background: #2563eb; animation-delay: 0.2s; }
.wc-arena-spark i:nth-child(3) { left: 46%; top: 6px; background: #10b981; animation-delay: 0.45s; }
.wc-arena-spark i:nth-child(4) { left: 62%; top: 1px; background: #f43f5e; animation-delay: 0.7s; }
.wc-arena-spark i:nth-child(5) { left: 78%; top: 5px; background: #8b5cf6; animation-delay: 0.9s; }
.wc-arena-spark i:nth-child(6) { left: 92%; top: 2px; background: #ea580c; animation-delay: 1.1s; }
@keyframes wc-sparkle {
  0%, 100% { transform: scale(0.6) translateY(0); opacity: 0.25; }
  50% { transform: scale(1.35) translateY(-3px); opacity: 0.9; }
}
.wc-versus {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: stretch;
  position: relative;
  z-index: 1;
}
@media (min-width: 720px) {
  .wc-versus {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
  }
}
.wc-play-floor {
  position: relative;
  z-index: 1;
  margin-top: 22px;
  padding: 18px 14px 16px;
  min-height: 196px;
  text-align: center;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(80% 70% at 50% 115%, rgba(251, 191, 36, 0.18), transparent 58%),
    linear-gradient(180deg, rgba(255, 247, 237, 0.55) 0%, rgba(255, 255, 255, 0.35) 42%, rgba(17, 24, 39, 0.04) 100%);
  border: 1px solid rgba(251, 146, 60, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.wc-play-floor[data-heat="4"],
.wc-play-floor[data-heat="5"] {
  background:
    radial-gradient(90% 80% at 50% 120%, rgba(234, 88, 12, 0.2), transparent 56%),
    linear-gradient(180deg, rgba(255, 237, 213, 0.7) 0%, rgba(255, 255, 255, 0.4) 40%, rgba(67, 20, 7, 0.06) 100%);
  border-color: rgba(234, 88, 12, 0.38);
}
.wc-play-floor.is-final {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 0 0 3px rgba(251, 191, 36, 0.18);
}
.wc-heat {
  margin: 0 auto 14px;
  max-width: 420px;
}
.wc-heat-lamps {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}
.wc-heat-lamps span {
  flex: 1;
  min-width: 0;
  padding: 6px 2px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #9ca3af;
  font: 800 0.72rem/1.15 var(--sans);
  letter-spacing: -0.02em;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.4);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.wc-heat-lamps span.is-on {
  background: #fff7ed;
  border-color: #fdba74;
  color: #c2410c;
}
.wc-heat-lamps span.is-now {
  background: #ea580c;
  border-color: #ea580c;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.16);
  animation: wc-lamp-pulse 1.15s ease-in-out infinite;
}
@keyframes wc-lamp-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.14); }
  50% { box-shadow: 0 0 0 7px rgba(251, 191, 36, 0.22); }
}
.wc-heat-track {
  height: 7px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}
.wc-heat-track > i {
  display: block;
  height: 100%;
  width: 6%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f59e0b, #ea580c 70%, #b45309);
  transition: width 0.35s ease;
}
.wc-cheer {
  margin: 0 0 6px;
  font: 800 clamp(1.05rem, 3.4vw, 1.28rem)/1.35 var(--sans);
  color: #9a3412;
  letter-spacing: -0.03em;
  word-break: keep-all;
}
.wc-cheer.is-pop {
  animation: wc-cheer-pop 0.38s ease;
}
@keyframes wc-cheer-pop {
  0% { transform: translateY(6px) scale(0.96); opacity: 0; }
  100% { transform: none; opacity: 1; }
}
.wc-floor-sub {
  margin: 0 0 14px;
  font: 600 0.86rem/1.45 var(--sans);
  color: #78716c;
  word-break: keep-all;
}
.wc-floor-stats {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(88px, 0.7fr);
  gap: 8px;
  margin: 0 auto 14px;
  max-width: 440px;
}
.wc-floor-chip {
  min-height: 58px;
  padding: 8px 10px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #fed7aa;
  text-align: left;
  box-shadow: 0 4px 12px rgba(154, 52, 18, 0.06);
}
.wc-floor-chip span {
  display: block;
  font: 800 0.68rem/1.2 var(--sans);
  color: #ea580c;
  letter-spacing: -0.01em;
}
.wc-floor-chip strong {
  display: block;
  margin-top: 3px;
  font: 800 0.92rem/1.3 var(--sans);
  color: #1c1917;
  letter-spacing: -0.03em;
  word-break: keep-all;
}
.wc-floor-chip.is-flash {
  animation: wc-chip-flash 0.55s ease;
}
@keyframes wc-chip-flash {
  0% { transform: scale(0.96); box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.28); }
  45% { transform: scale(1.03); box-shadow: 0 0 0 8px rgba(234, 88, 12, 0); }
  100% { transform: none; }
}
.wc-ticker {
  overflow: hidden;
  margin: 0 -4px 12px;
  padding: 4px 0;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.wc-ticker-track {
  display: flex;
  align-items: center;
  justify-content: center;
    gap: 10px;
  min-height: 34px;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  color: #78716c;
  font: 700 0.8rem/1.2 var(--sans);
}
.wc-ticker-track.is-run {
  max-width: none;
  justify-content: flex-start;
  animation: wc-ticker-move 22s linear infinite;
}
.wc-ticker-track em {
  font-style: normal;
  color: #a8a29e;
}
.wc-ticker-job {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e7e5e4;
  color: #44403c;
  white-space: nowrap;
}
@keyframes wc-ticker-move {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.wc-stands {
  position: relative;
  margin-top: 6px;
  padding: 14px 8px 8px;
  min-height: 92px;
  border-radius: 18px 18px 14px 14px;
  background:
    radial-gradient(70% 90% at 50% 120%, rgba(251, 191, 36, 0.28), transparent 55%),
    linear-gradient(180deg, rgba(255, 237, 213, 0.35), rgba(68, 64, 60, 0.08));
}
.wc-stand-row {
  height: 13px;
  margin: 4px 8%;
  border-radius: 999px;
  background-image: radial-gradient(circle closest-side, #fb923c 86%, transparent 88%);
  background-size: 13px 13px;
  background-repeat: repeat-x;
  background-position: center;
  opacity: 0.62;
  animation: wc-stand-wave 1.55s ease-in-out infinite;
}
.wc-stand-row:nth-child(2) {
  margin: 4px 12%;
  background-image: radial-gradient(circle closest-side, #fdba74 86%, transparent 88%);
  animation-delay: 0.16s;
  opacity: 0.72;
}
.wc-stand-row:nth-child(3) {
  margin: 4px 5%;
  background-image: radial-gradient(circle closest-side, #f97316 86%, transparent 88%);
  animation-delay: 0.32s;
  opacity: 0.55;
}
.wc-play-floor[data-heat="4"] .wc-stand-row,
.wc-play-floor[data-heat="5"] .wc-stand-row {
  animation-duration: 0.82s;
  opacity: 0.85;
}
@keyframes wc-stand-wave {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50% { transform: translateY(-4px) scaleY(1.15); }
}
.wc-crowd {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
  font-size: 1.28rem;
  line-height: 1;
  user-select: none;
}
.wc-crowd span {
  display: inline-block;
  animation: wc-crowd-bounce 1.4s ease-in-out infinite;
}
.wc-crowd span:nth-child(2) { animation-delay: 0.12s; }
.wc-crowd span:nth-child(3) { animation-delay: 0.24s; }
.wc-crowd span:nth-child(4) { animation-delay: 0.36s; }
.wc-crowd span:nth-child(5) { animation-delay: 0.48s; }
@keyframes wc-crowd-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.wc-pick {
  appearance: none;
  border: 2px solid #e5e7eb;
  background: #fff;
  border-radius: 18px;
  padding: 16px 12px 18px;
  text-align: center;
  cursor: pointer;
  min-height: 176px;
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.08);
  transition: transform 0.18s ease, border-color 0.15s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
  overflow: hidden;
}
.wc-pick::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.55;
  background: var(--pick-bg);
  pointer-events: none;
}
.wc-pick > * { position: relative; z-index: 1; }
.wc-pick:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: #2563eb;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.16);
}
.wc-pick:active {
  transform: translateY(-1px) scale(0.99);
}
.wc-pick.is-deal {
  animation: wc-deal 0.38s ease;
}
@keyframes wc-deal {
  0% { transform: translateY(12px) scale(0.96); opacity: 0; }
  100% { transform: none; opacity: 1; }
}
.wc-pick.is-win {
  border-color: #059669;
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.22), 0 12px 28px rgba(5, 150, 105, 0.18);
}
.wc-pick.is-pop {
  animation: wc-win-pop 0.42s cubic-bezier(0.22, 1.4, 0.36, 1);
}
@keyframes wc-win-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.06) rotate(-1deg); }
  100% { transform: scale(1); }
}
.wc-pick.is-win::after {
  content: "★";
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  color: #f59e0b;
  font-size: 1.05rem;
  animation: wc-star-pop 0.45s ease;
}
@keyframes wc-star-pop {
  0% { transform: scale(0) rotate(-30deg); opacity: 0; }
  70% { transform: scale(1.25) rotate(8deg); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.wc-pick.is-lose {
  opacity: 0.35;
  filter: grayscale(0.5);
  transform: scale(0.96);
}
.wc-pick-side {
  font: 800 0.72rem/1.2 var(--sans);
  color: #6b7280;
}
.wc-pick-emoji {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
}
.wc-pick-name {
  margin: 0;
  font: 800 clamp(1.1rem, 4vw, 1.4rem)/1.25 var(--sans);
  letter-spacing: -0.03em;
  word-break: keep-all;
  color: #111827;
  max-width: 14ch;
}
.wc-pick-tag {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e5e7eb;
  font: 700 0.74rem/1.2 var(--sans);
  color: #2563eb;
}
.wc-pick-cta {
  margin-top: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  font: 800 0.8rem/1.2 var(--sans);
  color: #ea580c;
}
.wc-vs {
  width: 52px;
  height: 52px;
  margin: 0 auto;
  border-radius: 50%;
  background: #111827;
  color: #fff;
  display: grid;
  place-items: center;
  font: 900 0.95rem/1 var(--sans);
  box-shadow: 0 0 0 6px rgba(234, 88, 12, 0.12);
  animation: wc-vs-pulse 1.2s ease-in-out infinite;
  position: relative;
  z-index: 2;
}
@keyframes wc-vs-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 6px rgba(234, 88, 12, 0.12); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 10px rgba(234, 88, 12, 0.08); }
}
@media (prefers-reduced-motion: reduce) {
  .wc-arena-spark i,
  .wc-crowd span,
  .wc-stand-row,
  .wc-heat-lamps span.is-now,
  .wc-ticker-track.is-run,
  .wc-floor-chip.is-flash,
  .wc-vs,
  .wc-pick.is-deal,
  .wc-pick.is-pop,
  .wc-pick.is-win::after,
  .wc-cheer.is-pop {
    animation: none !important;
  }
}
.wc-champ {
  text-align: center;
  padding: 14px 12px 12px;
  border-radius: 18px;
  background: linear-gradient(160deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
  margin-bottom: 8px;
}
.wc-champ-label {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 4px 10px;
  font: 700 0.78rem/1.2 var(--sans);
  margin-bottom: 8px;
}
.wc-champ-emoji {
  width: 56px;
  height: 56px;
  margin: 0 auto 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  border: 2px solid rgba(255, 255, 255, 0.25);
  display: grid;
  place-items: center;
  font-size: 1.8rem;
}
.wc-champ-name {
  margin: 0;
  font: 800 clamp(1.35rem, 5.5vw, 1.9rem)/1.2 var(--sans);
  letter-spacing: -0.03em;
  word-break: keep-all;
}
.wc-champ-sub {
  margin: 4px 0 0;
  opacity: 0.9;
  font: 500 0.84rem/1.35 var(--sans);
}
.wc-rank-row {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 6px;
  margin-top: 10px;
}
.wc-rank-box {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 8px 6px;
}
.wc-rank-box.is-top {
  background: rgba(251, 191, 36, 0.22);
  border-color: rgba(251, 191, 36, 0.45);
}
.wc-rank-r {
  font: 800 0.68rem/1.2 var(--sans);
  opacity: 0.85;
}
.wc-rank-n {
  margin-top: 3px;
  font: 800 0.78rem/1.25 var(--sans);
  word-break: keep-all;
}
.wc-board { display: flex; flex-direction: column; gap: 6px; }
.wc-round-panel {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.wc-round-panel summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  font: 800 0.88rem/1.3 var(--sans);
  background: #f9fafb;
}
.wc-round-panel summary::-webkit-details-marker { display: none; }
.wc-cnt {
  font: 800 0.7rem/1 var(--sans);
  padding: 3px 8px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #6b7280;
}
.wc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px 12px;
}
.wc-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  font: 700 0.78rem/1.2 var(--sans);
  color: #1e3a8a;
}
.wc-chip.is-champ {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}
.wc-q-list { display: flex; flex-direction: column; gap: 8px; }
.wc-q {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}
.wc-qlabel {
  display: inline-flex;
  font: 800 0.72rem/1.2 var(--sans);
  color: #2563eb;
  margin-bottom: 4px;
}
.wc-q label {
  display: block;
  font: 800 0.92rem/1.35 var(--sans);
  margin-bottom: 6px;
  word-break: keep-all;
  letter-spacing: -0.02em;
}
.wc-q textarea,
.activity-card .wc-q textarea {
  width: 100%;
  min-height: 72px !important;
  border: 1.5px solid #e5e7eb !important;
  border-radius: 10px !important;
  padding: 10px 12px !important;
  font: 500 0.9rem/1.45 var(--sans) !important;
  resize: none;
  overflow: hidden;
  background: #f9fafb !important;
  outline: none;
  color: #111827;
  field-sizing: content;
  box-shadow: none !important;
}
.wc-q textarea:focus {
  border-color: #2563eb !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}
.wc-hint {
  color: #ea580c;
  font-weight: 700;
  font-size: 0.84rem;
}
.wc-confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}
.wc-toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(24px);
  background: #111827;
  color: #fff;
  padding: 12px 18px;
  border-radius: 14px;
  font: 700 0.9rem/1.3 var(--sans);
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.22s ease, opacity 0.22s ease, visibility 0.22s ease;
  max-width: calc(100% - 28px);
  text-align: center;
  word-break: keep-all;
}
.wc-toast.is-show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.activity-card--worldcup.is-wc-done #wc-input,
.activity-card--worldcup.is-wc-done #wc-play {
  display: none !important;
}
.activity-card--worldcup.is-wc-done #wc-result {
  display: block !important;
}
@media (max-width: 600px) {
  .wc-step span { display: none; }
  .wc-help { display: none; }
  .wc-guide kbd { display: none; }
  .wc-pick { min-height: 148px; }
  .wc-pick-emoji { width: 48px; height: 48px; font-size: 1.5rem; }
  .wc-floor-stats {
    grid-template-columns: 1fr;
  }
  .wc-floor-chip {
    min-height: 52px;
  }
}

/* 월드컵 · 휴대폰 / 태블릿 터치·속도 */
@media (max-width: 1024px) {
  .activity-card--worldcup {
    padding: 12px !important;
  }
  .activity-card--worldcup.is-wc-play {
    padding-bottom: 40px !important;
  }
  .wc-play-floor {
    min-height: 210px;
    padding: 16px 10px 14px;
  }
  .wc-cats {
    position: sticky;
    top: 0;
    z-index: 6;
    margin: 0 -2px 8px;
    padding: 8px 2px 10px;
    background: linear-gradient(180deg, #fff 70%, rgba(255, 255, 255, 0.92));
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }
  .wc-cat {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 0.84rem;
    touch-action: manipulation;
  }
  .wc-btn {
    min-height: 48px;
    font-size: 0.95rem;
    touch-action: manipulation;
  }
  .wc-btn-row {
    gap: 8px;
  }
  .wc-job-cell {
    min-height: 84px;
    padding: 8px;
  }
  .wc-job-cell input {
    font-size: 16px; /* iOS 자동 줌 방지 */
    line-height: 1.35;
  }
  .wc-job-name-row {
    flex-wrap: wrap;
  }
  .wc-job-cat {
    max-width: 100%;
    margin-left: 0;
  }
  .wc-job-emoji {
    min-width: 36px;
    min-height: 36px;
  }
  .wc-picker-x {
    width: 44px;
    height: 44px;
  }
  .wc-picker-cat {
    min-height: 40px;
    padding: 10px 14px;
    font-size: 0.82rem;
  }
  .wc-picker-name,
  .wc-suggest-name {
    overflow-wrap: anywhere;
    word-break: keep-all;
  }
  .wc-suggest {
    left: 8px;
    right: 8px;
    width: auto;
    max-width: calc(100vw - 16px);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .wc-suggest-tag {
    white-space: normal;
    max-width: 7.5em;
    text-align: right;
  }
  #wc-input .wc-panel:last-of-type {
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .wc-pick {
    min-height: 168px;
    padding: 16px 12px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  .wc-pick:hover { transform: none; }
  .wc-pick:active {
    transform: scale(0.985);
    border-color: #2563eb;
  }
  .wc-pick-name {
    font-size: clamp(1.15rem, 4.8vw, 1.45rem);
    max-width: 16ch;
  }
  .wc-pick-cta {
    font-size: 0.9rem;
  }
  #wc-btn-start {
    position: sticky;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 7;
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.28);
  }
  .wc-picker-sheet {
    width: 100%;
    max-height: min(92dvh, 100%);
    padding: 12px 12px max(14px, env(safe-area-inset-bottom, 0px));
    border-radius: 18px 18px 0 0;
  }
  .wc-picker-search {
    font-size: 16px;
    min-height: 46px;
    padding: 12px 14px;
  }
  .wc-picker-item {
    min-height: 52px;
    padding: 11px 12px;
    touch-action: manipulation;
  }
  .wc-picker-name {
    font-size: 0.95rem;
  }
  .wc-picker-list {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .wc-suggest-item {
    min-height: 46px;
    padding: 10px 8px;
    touch-action: manipulation;
  }
  .wc-q textarea,
  .activity-card .wc-q textarea {
    font-size: 16px !important;
    min-height: 88px !important;
  }
  .wc-toast {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    font-size: 0.95rem;
    padding: 12px 16px;
  }
}

@media (max-width: 720px) {
  .wc-howto {
    grid-template-columns: 1fr;
  }
  .wc-howto-item p {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
  }
  .wc-panel {
    padding: 12px;
    border-radius: 14px;
  }
  .wc-panel-title h3 {
    font-size: 1rem;
  }
  .wc-steps {
    gap: 4px;
  }
  .wc-step {
    padding: 8px 6px;
  }
  .wc-step-num {
    width: 22px;
    height: 22px;
    font-size: 0.72rem;
  }
  .wc-versus {
    gap: 10px;
  }
  .wc-vs {
    width: 40px;
    height: 40px;
    font-size: 0.85rem;
  }
  .wc-rank-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .wc-rank-box {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px;
    text-align: left;
    padding: 10px 12px;
  }
  .wc-rank-n { margin-top: 0; font-size: 0.92rem; }
}

@media (max-width: 480px) {
  .activity-card--worldcup { padding: 8px !important; }
  .activity-card--worldcup.is-wc-play { padding-bottom: 28px !important; }
  .wc-steps {
    grid-template-columns: 1fr;
  }
  .wc-step {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
    text-align: left;
    padding: 10px 12px;
  }
  .wc-step-num { margin: 0; }
  .wc-step span { display: block; }
  .wc-head {
    flex-wrap: wrap;
    gap: 4px;
  }
  .wc-head strong { font-size: 1.05rem; }
  .wc-job-cell {
    min-height: 70px;
    padding: 6px;
    border-radius: 10px;
  }
  .wc-job-emoji {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
  }
  .wc-btn-row--tools {
    grid-template-columns: 1fr 1fr;
  }
  .wc-btn-row--tools #wc-btn-undo {
    grid-column: 1 / -1;
  }
  .wc-btn-row .wc-btn {
    width: 100%;
  }
  .wc-job-name-row {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }
  .wc-job-cat {
    align-self: flex-end;
  }
  .wc-pick { min-height: 132px; padding: 12px 10px; }
  .wc-champ { padding: 12px 10px; }
  .wc-champ-name { font-size: clamp(1.25rem, 6vw, 1.7rem); }
}

@media (min-width: 721px) and (max-width: 1024px) {
  .wc-versus {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
  .wc-pick { min-height: 200px; }
  .wc-pick-name { font-size: 1.35rem; max-width: 18ch; }
  .wc-job-grid { gap: 10px; }
  .wc-job-cell { min-height: 88px; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .wc-howto { display: none; }
  .wc-steps { margin-bottom: 6px; }
  .wc-job-cell { min-height: 64px; padding: 6px; }
  .wc-cats { position: static; padding: 4px 0 6px; }
  #wc-btn-start { position: static; }
  .wc-picker-sheet {
    max-height: 100dvh;
    border-radius: 12px;
  }
  .wc-versus { gap: 6px; }
  .wc-pick { min-height: 110px; padding: 10px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .wc-pick,
  .wc-picker-sheet,
  .wc-toast,
  .wc-job-cell {
    transition: none !important;
    animation: none !important;
  }
}

/* 태블릿: 본문 터치·가독성 */
@media (max-width: 1024px) and (min-width: 721px) {
  body { font-size: 16px; }
  .field input, .field textarea, .field select { font-size: 16px; }
  .hero-card { padding: 18px 16px; column-gap: 16px; }
  .submit-fab { min-height: 46px; font-size: 14px; padding: 0 16px; }
  .sheet-tools { height: 46px; }
  .tool-btn { width: 42px; min-width: 42px; }
  .zoom-controls { height: 46px; }
  .zoom-btn { width: 42px; min-width: 42px; }
  .btn { min-height: 48px; }
  .na-manual-grid { gap: 9px; }
  .na-card textarea,
  .activity-card .na-card textarea {
    min-height: 92px;
    height: auto;
    font-size: 15px !important;
  }
  .na-card-head label { font-size: 14px; }
  .questions-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .q-item { padding: 7px 8px; }
  .q-item .q-title { font-size: 12px; white-space: normal; }
  .q-item input,
  .activity-card .q-item input {
    height: 34px !important;
    min-height: 34px !important;
    font-size: 15px !important;
  }
  .bingo-board { gap: 7px; }
  .bingo-cell { min-height: 120px; }
  .bingo-cell .cell-title { font-size: 12px; }
  .bingo-cell textarea.cell-input,
  .activity-card .bingo-cell textarea.cell-input {
    min-height: 56px !important;
    font-size: 14px !important;
  }
  .bingo-reflection textarea,
  .activity-card .bingo-reflection textarea {
    font-size: 15px !important;
    min-height: 80px !important;
    height: auto !important;
  }
}
/* 태블릿·좁은 데스크톱: 상단바 세로 스택 (겹침 방지) */
@media (max-width: 1024px) {
  body { font-size: 16px; }
  html[data-activity-teacher="1"] .hero-card .hero-qr-wrap {
    display: flex !important;
  }
  .field input, .field textarea, .field select { font-size: 16px; } /* iOS 줌 방지 */
  .submit-fab { min-height: 44px; font-size: 14px; }
  .btn { min-height: 48px; font-size: 15px; }
  .modal h3 { font-size: 22px; }
  .modal .sub { font-size: 13px; }

  .topbar {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "start"
      "prog"
      "actions";
    row-gap: 8px;
    padding: 10px 14px;
  }
  body.is-apr-may .topbar {
    display: grid;
  }
  .topbar-start { grid-area: start; width: 100%; }
  body.is-apr-may .sheet-progress,
  body.is-apr-may .prog {
    grid-area: prog;
    margin-left: 0;
    justify-self: start;
  }
  .top-meta {
    max-width: none;
    gap: 5px;
  }
  .top-meta .chip {
    font-size: 11px;
    line-height: 1.3;
    padding: 3px 9px;
  }
  .top-meta strong {
    font-size: 15px;
    line-height: 1.4;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
  .topbar-actions {
    grid-area: actions;
    width: 100%;
    min-width: 0;
    justify-self: stretch;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .topbar-actions::-webkit-scrollbar { display: none; }
  .topbar-actions .reset-fab:not([hidden]),
  .topbar-actions .draft-fab {
    margin-left: auto;
  }
  .topbar-actions .reset-fab:not([hidden]) ~ .draft-fab {
    margin-left: 0;
  }
}
/* 폰·좁은 화면: 제목 아래 QR을 가운데 배치 */
@media (max-width: 720px) {
  body {
    background: var(--sheet-ground);
    background-size: auto;
    padding-left: calc(10px + var(--safe-left));
    padding-right: calc(10px + var(--safe-right));
  }
  body[data-session="6"],
  body[data-session="7"],
  body[data-session="8"],
  body[data-session="9"],
  body[data-session="10"],
  body[data-session="11"],
  body[data-session="12"],
  body[data-session="13"],
  body[data-session="14"],
  body[data-session="15"],
  body[data-session="16"] {
    background: var(--sheet-ground);
    background-size: auto;
  }
  .grid-2 { grid-template-columns: 1fr; }
  .topbar {
    margin-left: calc(-10px - var(--safe-left));
    margin-right: calc(-10px - var(--safe-right));
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    row-gap: 8px;
    column-gap: 8px;
  }
  .top-meta { gap: 4px; }
  .top-meta .chip { font-size: 10.5px; padding: 3px 8px; }
  .top-meta strong { font-size: 14px; line-height: 1.4; }
  .hero-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    padding: 16px 14px 14px;
    row-gap: 0;
  }
  .hero-card .hero-copy {
    grid-column: 1;
    grid-row: 1;
  }
  .hero-card .hero-side {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    width: 100%;
    margin-top: 8px;
  }
  html[data-activity-teacher="1"] .hero-card .hero-qr-wrap {
    display: flex !important;
    justify-self: start;
  }
  .hero-card h1 { font-size: clamp(20px, 5.5vw, 26px); }
  .hero-card p { font-size: 14px; line-height: 1.55; }
  .activity-card,
  .activity-card:has(.na-manual),
  .activity-card:has(.activity-sheet-bar) {
    padding: 12px 12px 14px;
    overflow: visible;
  }
  .activity-sheet-bar {
    grid-template-columns: 1fr;
    justify-items: stretch;
    align-items: center;
    row-gap: 10px;
    min-height: 0;
    padding: 12px 0;
    overflow: visible;
  }
  .print-lesson-title { display: none !important; }
  /* 좁은 화면: 제목·학번이 겹치지 않게 세로 배치, 제목은 해당 줄에서 가운데 */
  .activity-sheet-bar-title {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    width: 100%;
    pointer-events: auto;
    padding: 4px 0;
  }
  .activity-sheet-bar h2 {
    font-size: clamp(18px, 5vw, 20px);
    line-height: 1.4;
    text-align: center;
    overflow: visible;
  }
  .sheet-identity {
    justify-self: stretch;
    width: 100%;
    justify-content: stretch;
    gap: 10px;
    padding-top: 0;
  }
  .sheet-identity label { flex: 1; min-width: 0; }
  .sheet-identity input {
    width: 100%;
    max-width: none;
    height: 42px;
    font-size: 16px;
  }
  .sheet-identity input#sheetDisplayName { width: 100%; }
  .field label { font-size: 13px; }
  .na-manual-head { margin-bottom: 8px; padding-bottom: 8px; }
  .na-manual-head strong { font-size: 16px; }
  .na-manual-head span { font-size: 11.5px; }
  .na-manual-grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .na-card { padding: 9px 10px; }
  .na-card-icon { width: 28px; height: 28px; font-size: 15px; }
  .na-card-head label { font-size: 14px; }
  .na-card textarea,
  .activity-card .na-card textarea {
    min-height: 88px;
    height: auto;
    font-size: 16px !important; /* iOS 줌 방지 */
    padding: 8px 10px !important;
  }
  .na-card textarea::placeholder {
    font-size: 13px;
  }
  .activity-part-title { margin-top: 18px !important; padding-top: 14px; font-size: 15px !important; }
  .q100-head strong { font-size: 15px; }
  .questions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .q-item { padding: 8px; }
  .q-item .q-title {
    font-size: 12px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .q-item input,
  .activity-card .q-item input {
    height: 36px !important;
    min-height: 36px !important;
    font-size: 16px !important; /* iOS 줌 방지 */
  }
  .bingo-head strong { font-size: 16px; }
  .bingo-guide { font-size: 13px; }
  .bingo-guide ol { font-size: 13px; line-height: 1.45; }
  .bingo-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  .bingo-cell { min-height: 112px; padding: 8px; }
  .bingo-cell .cell-title { font-size: 12.5px; }
  .bingo-cell textarea.cell-input,
  .activity-card .bingo-cell textarea.cell-input {
    min-height: 52px !important;
    font-size: 16px !important; /* iOS 줌 방지 */
  }
  .bingo-reflection label { font-size: 13px; }
  .bingo-reflection textarea,
  .activity-card .bingo-reflection textarea {
    min-height: 88px !important;
    height: auto !important;
    font-size: 16px !important;
  }
  .topbar-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 1px;
  }
  .topbar-actions::-webkit-scrollbar { display: none; }
  .topbar-actions .reset-fab:not([hidden]),
  .topbar-actions .draft-fab {
    margin-left: auto;
  }
  .topbar-actions .reset-fab:not([hidden]) ~ .draft-fab {
    margin-left: 0;
  }
  .sheet-tools { height: 40px; flex-shrink: 0; }
  .tool-btn { width: 36px; min-width: 36px; }
  .tool-btn svg { width: 16px; height: 16px; }
  .zoom-controls { height: 40px; flex-shrink: 0; }
  .zoom-btn { width: 34px; min-width: 34px; }
  .zoom-btn svg { width: 16px; height: 16px; }
  .zoom-level { min-width: 40px; font-size: 11px; padding: 0 4px; }
  /* 제출·임시저장 라벨 유지, 한 줄로 정돈 */
  .submit-fab .label,
  .draft-fab .label {
    display: inline !important;
  }
  .submit-fab,
  .draft-fab {
    width: auto;
    height: 40px;
    min-height: 40px;
    padding: 0 12px 0 10px;
    border-radius: 999px;
    gap: 6px;
    flex-shrink: 0;
    font-size: 12px;
  }
  .submit-fab svg,
  .draft-fab svg {
    width: 16px;
    height: 16px;
  }
  .overlay { padding: 12px; }
  .modal { border-radius: 14px; border-width: 2.5px; width: min(100%, 440px); }
  .modal-actions { grid-template-columns: 1fr 1fr; gap: 10px; }
  .btn { min-height: 48px; }
}

/* 작은 핸드폰: 도구 한 줄 유지 */
@media (max-width: 480px) {
  .topbar {
    padding: 8px 10px;
    row-gap: 6px;
  }
  .brand { width: 28px; height: 28px; border-radius: 8px; font-size: 13px; }
  .top-meta .chip { font-size: 10px; padding: 2px 7px; }
  .top-meta strong { font-size: 13px; }
  .topbar-actions {
    gap: 5px;
    justify-content: flex-start;
    flex-wrap: nowrap;
  }
  .topbar-actions .reset-fab:not([hidden]),
  .topbar-actions .draft-fab {
    margin-left: auto;
  }
  .topbar-actions .reset-fab:not([hidden]) ~ .draft-fab {
    margin-left: 0;
  }
  .sheet-tools { height: 38px; }
  .tool-btn { width: 34px; min-width: 34px; }
  .zoom-controls { height: 38px; }
  .zoom-btn { width: 32px; min-width: 32px; }
  .zoom-level { min-width: 38px; font-size: 10.5px; }
  .submit-fab,
  .draft-fab {
    width: auto;
    height: 38px;
    min-height: 38px;
    padding: 0 10px 0 8px;
    font-size: 11.5px;
    gap: 5px;
    border-radius: 999px;
  }
  .submit-fab .label,
  .draft-fab .label {
    display: inline !important;
  }
  .submit-fab svg,
  .draft-fab svg {
    width: 15px;
    height: 15px;
  }
}

.overlay {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(31, 30, 29, 0.48);
  display: none; align-items: center; justify-content: center;
  padding: max(16px, var(--safe-top)) max(16px, var(--safe-right)) max(16px, var(--safe-bottom)) max(16px, var(--safe-left));
}
.overlay.is-open { display: flex; }
.modal {
  width: min(440px, 100%);
  max-height: min(88dvh, 640px);
  overflow: auto;
  border-radius: 16px;
  background: var(--card);
  border: 2.5px solid #111110;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
  padding: 20px 18px 18px;
  animation: rise 0.24s cubic-bezier(0.32, 0.72, 0, 1);
}
.modal h3 {
  margin: 0 0 6px;
  font: 600 20px/1.3 var(--serif);
}
.modal .sub {
  margin: 0 0 14px; color: var(--muted);
  font: 500 12px/1.5 var(--sans);
}
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.btn {
  height: 46px; border: 0; border-radius: 12px; cursor: pointer;
  font: 700 14px/1 var(--sans);
}
.btn-ghost { background: #efece4; color: var(--ink); }
.btn-primary {
  color: #f7f1ea;
  background: linear-gradient(145deg, #d88861, var(--accent) 55%, var(--accent-deep));
}
.msg {
  min-height: 18px; margin: 8px 0 0;
  text-align: center; font: 500 12px/1.4 var(--sans); color: var(--muted);
}
.msg.is-error { color: #b23a2c; }
.msg.is-ok { color: #c62828; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Ctrl+P 등 직접 인쇄 시 — 상단 툴바만 숨기고 차시 제목·QR·학번/이름 포함 */
@media print {
  @page {
    size: A4;
    margin: 7mm;
  }

  html, body {
    background: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  .topbar,
  .topbar-actions,
  .sheet-tools,
  .zoom-controls,
  .submit-fab,
  .draft-fab,
  .reset-fab,
  .draft-toast,
  .student-autosave,
  .overlay,
  .hero-qr-cap,
  .qr-lightbox,
  #activityPrintFrame {
    display: none !important;
  }

  /* 공란 입력칸의 예시문(placeholder)은 인쇄·보고에 노출하지 않음 */
  input::placeholder,
  textarea::placeholder {
    color: transparent !important;
    opacity: 0 !important;
    -webkit-text-fill-color: transparent !important;
  }
  /* 공란: 연한 하늘색 그라데이션 제외 */
  .na-card textarea:placeholder-shown,
  .activity-card .na-card textarea:placeholder-shown,
  .q-item input:placeholder-shown,
  .bingo-cell textarea:placeholder-shown,
  .reflect-field textarea:placeholder-shown,
  .swot-cell input:placeholder-shown,
  .swot-cell textarea:placeholder-shown,
  .swot-step input:placeholder-shown {
    background: #fff !important;
    box-shadow: inset 0 0 0 1px #e5e7eb !important;
  }

  .shell {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    zoom: 1 !important;
    transform: none !important;
  }

  /* 출력: 히어로(테마·QR·안내문구) 숨김 — 차시 제목은 활동지 바에만 표시 */
  .hero-card {
    display: none !important;
  }

  .activity-card,
  .na-card {
    background: #fff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .activity-card {
    margin: 0 !important;
    padding: 4px !important;
    border-width: 1.5px !important;
    box-shadow: none !important;
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  .activity-toc-fixed,
  #toc,
  nav.toc,
  .imported-sheet .toolbar,
  .imported-sheet .toc,
  .imported-sheet .toc-sidebar,
  .imported-sheet .btn-print,
  .imported-sheet .print-btn,
  .imported-sheet .no-print,
  .imported-sheet .noprint,
  .imported-sheet .action-panel {
    display: none !important;
  }
  .imported-sheet .workspace,
  .imported-sheet .page-shell,
  .imported-sheet .stack {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
  }
  .imported-sheet .page,
  .imported-sheet .sheet,
  .imported-sheet .checklist-wrapper {
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 0 3mm !important;
    padding: 3.5mm 4.5mm !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  .imported-sheet {
    font-size: 10.5px !important;
    line-height: 1.38 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  body[data-session="11"] .imported-sheet table.form:has([name="special"]),
  body[data-session="11"] .imported-sheet table.form.is-s11-special,
  body[data-session="11"] .activity-sheet-bar,
  body[data-session="11"] #sheetIdentity {
    display: none !important;
  }
  body[data-session="11"] .imported-sheet .rank-grid {
    display: grid !important;
    grid-template-columns: 28px 1.2fr 1.4fr .7fr .7fr .9fr !important;
    min-width: 0 !important;
  }
  body[data-session="11"] .imported-sheet table.score-tbl,
  body[data-session="11"] .imported-sheet table.jungsi-tbl {
    min-width: 0 !important;
  }

  .activity-sheet-bar {
    position: relative !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
    align-items: center !important;
    justify-items: stretch !important;
    column-gap: 10px !important;
    row-gap: 0 !important;
    min-height: 34px !important;
    margin-bottom: 8px !important;
    padding: 2px 0 6px !important;
  }
  .activity-sheet-bar-left {
    grid-column: 1 !important;
    justify-self: start !important;
    max-width: 100% !important;
    gap: 6px !important;
    min-width: 0 !important;
  }
  .activity-sheet-bar-left > .sheet-dept {
    display: inline-flex !important;
    max-width: 120px !important;
    padding: 2px 8px !important;
    font-size: 10px !important;
  }
  .print-lesson-title {
    display: block !important;
    grid-column: unset !important;
    justify-self: start !important;
    align-self: center !important;
    z-index: 1 !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    font: 700 10.5px/1.25 var(--serif) !important;
    letter-spacing: -0.02em !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    writing-mode: horizontal-tb !important;
  }
  .activity-sheet-bar-title {
    /* 절대배치 제거 → 가운데 그리드 칸에 배치해 학번/이름과 겹치지 않음 */
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    grid-column: 2 !important;
    justify-self: center !important;
    align-self: center !important;
    z-index: 1 !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
    text-align: center !important;
    white-space: nowrap !important;
    pointer-events: none !important;
  }
  .activity-sheet-bar h2 {
    font-size: calc(15px + 3pt) !important;
    line-height: 1.25 !important;
    text-align: center !important;
  }
  .sheet-identity {
    grid-column: 3 !important;
    justify-self: end !important;
    align-self: center !important;
    z-index: 1 !important;
    width: auto !important;
    flex-shrink: 0 !important;
    gap: 8px !important;
    padding-top: 0 !important;
  }
  .sheet-identity input {
    height: 28px !important;
    font-size: 11px !important;
  }

  .q100-head,
  .na-manual-head,
  .bingo-head,
  .wc-head {
    margin: 0 0 6px !important;
    padding: 0 0 5px !important;
  }

  .no-print {
    display: none !important;
  }

  .wc-steps,
  .wc-howto,
  .wc-cats,
  .wc-cats-hint,
  .wc-progress,
  .wc-fill-hint,
  .wc-btn,
  .wc-btn-row,
  .wc-confetti,
  .wc-toast,
  .wc-help,
  .wc-picker,
  .wc-suggest,
  #wc-play {
    display: none !important;
  }

  .activity-card--worldcup.is-wc-done #wc-input {
    display: none !important;
  }

  .activity-card--worldcup.is-wc-done #wc-result,
  #wc-result:not([hidden]) {
    display: block !important;
  }

  .wc-round-panel[open] > .wc-chips,
  .wc-round-panel > .wc-chips {
    display: flex !important;
  }
  .wc-round-panel summary {
    list-style: none !important;
  }
  .wc-round-panel summary::-webkit-details-marker,
  .wc-round-panel summary::marker {
    display: none !important;
    content: "" !important;
  }

  .wc-job-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 3px !important;
  }

  .wc-job-cell,
  .wc-q,
  .wc-champ,
  .wc-round-panel {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .questions-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 3px !important;
  }

  .q-item {
    break-inside: avoid;
    page-break-inside: avoid;
    padding: 4px 5px !important;
  }

  .q-item .q-title {
    font-size: 9px !important;
    white-space: normal !important;
    -webkit-line-clamp: unset !important;
  }

  .q-item input,
  .activity-card .q-item input {
    height: 18px !important;
    min-height: 18px !important;
    font-size: 10px !important;
    padding: 0 2px !important;
  }

  .na-manual-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
  }

  .na-manual-grid > .na-card {
    flex: 1 1 calc(50% - 5px);
    max-width: calc(50% - 5px);
    box-sizing: border-box;
  }

  .na-card {
    overflow: visible !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .bingo-board {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 3px !important;
  }

  .bingo-cell {
    break-inside: avoid;
    page-break-inside: avoid;
    min-height: 58px !important;
  }

  .grid-2 {
    grid-template-columns: 1fr 1fr !important;
  }

  body[data-session="5"] .toc,
  body[data-session="6"] .toc,
  body[data-session="9"] .toc,
  body[data-session="10"] .toc-sidebar,
  body[data-session="12"] .toc,
  body[data-session="13"] .toc,
  body[data-session="14"] .toc,
  body[data-session="15"] .toc,
  body[data-session="16"] .toc,
  body[data-session="5"] #toc,
  body[data-session="6"] #toc,
  body[data-session="9"] #toc,
  body[data-session="12"] #toc,
  body[data-session="13"] #toc,
  body[data-session="14"] #toc,
  body[data-session="15"] #toc,
  body[data-session="16"] #toc,
  body[data-session="5"] .activity-toc-fixed,
  body[data-session="6"] .activity-toc-fixed,
  body[data-session="9"] .activity-toc-fixed,
  body[data-session="10"] .activity-toc-fixed,
  body[data-session="12"] .activity-toc-fixed,
  body[data-session="13"] .activity-toc-fixed,
  body[data-session="14"] .activity-toc-fixed,
  body[data-session="15"] .activity-toc-fixed,
  body[data-session="16"] .activity-toc-fixed {
    display: none !important;
  }
  body[data-session="5"] .imported-sheet,
  body[data-session="6"] .imported-sheet,
  body[data-session="7"] .sheet,
  body[data-session="8"] .activity-card,
  body[data-session="9"] .imported-sheet,
  body[data-session="10"] .imported-sheet,
  body[data-session="11"] .imported-sheet,
  body[data-session="12"] .imported-sheet,
  body[data-session="13"] .imported-sheet,
  body[data-session="14"] .imported-sheet,
  body[data-session="15"] .imported-sheet,
  body[data-session="16"] .imported-sheet {
    font-size: 10px !important;
    line-height: 1.32 !important;
  }
  body[data-session="5"] .imported-sheet h1,
  body[data-session="6"] .imported-sheet h1,
  body[data-session="9"] .imported-sheet h1,
  body[data-session="10"] .imported-sheet h1,
  body[data-session="12"] .imported-sheet h1,
  body[data-session="13"] .imported-sheet h1,
  body[data-session="14"] .imported-sheet h1,
  body[data-session="15"] .imported-sheet h1,
  body[data-session="16"] .imported-sheet h1 {
    font-size: 15px !important;
    margin: 0 0 3px !important;
  }
  body[data-session="5"] .imported-sheet *,
  body[data-session="6"] .imported-sheet *,
  body[data-session="7"] .sheet *,
  body[data-session="9"] .imported-sheet *,
  body[data-session="10"] .imported-sheet *,
  body[data-session="11"] .imported-sheet *,
  body[data-session="12"] .imported-sheet *,
  body[data-session="13"] .imported-sheet *,
  body[data-session="14"] .imported-sheet *,
  body[data-session="15"] .imported-sheet *,
  body[data-session="16"] .imported-sheet * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }
  body[data-session="5"] .imported-sheet .page,
  body[data-session="6"] .imported-sheet .sheet,
  body[data-session="9"] .imported-sheet .sheet,
  body[data-session="10"] .imported-sheet .checklist-wrapper,
  body[data-session="11"] .imported-sheet .sheet,
  body[data-session="12"] .imported-sheet .sheet,
  body[data-session="13"] .imported-sheet .sheet,
  body[data-session="14"] .imported-sheet .sheet,
  body[data-session="15"] .imported-sheet .sheet,
  body[data-session="16"] .imported-sheet .sheet {
    padding: 1.5mm 2mm !important;
    min-height: 0 !important;
    width: 100% !important;
    break-after: auto !important;
    page-break-after: auto !important;
  }
  body[data-session="5"] .imported-sheet table,
  body[data-session="6"] .imported-sheet table,
  body[data-session="7"] .sheet table,
  body[data-session="9"] .imported-sheet table,
  body[data-session="10"] .imported-sheet table,
  body[data-session="11"] .imported-sheet table,
  body[data-session="12"] .imported-sheet table,
  body[data-session="13"] .imported-sheet table,
  body[data-session="14"] .imported-sheet table,
  body[data-session="15"] .imported-sheet table,
  body[data-session="16"] .imported-sheet table {
    width: 100% !important;
    min-width: 0 !important;
    border-collapse: collapse !important;
    font-size: 9.5px !important;
  }
  body[data-session="5"] .imported-sheet th,
  body[data-session="5"] .imported-sheet td,
  body[data-session="6"] .imported-sheet th,
  body[data-session="6"] .imported-sheet td,
  body[data-session="7"] .sheet th,
  body[data-session="7"] .sheet td,
  body[data-session="9"] .imported-sheet th,
  body[data-session="9"] .imported-sheet td,
  body[data-session="10"] .imported-sheet th,
  body[data-session="10"] .imported-sheet td,
  body[data-session="11"] .imported-sheet th,
  body[data-session="11"] .imported-sheet td,
  body[data-session="12"] .imported-sheet th,
  body[data-session="12"] .imported-sheet td,
  body[data-session="13"] .imported-sheet th,
  body[data-session="13"] .imported-sheet td,
  body[data-session="14"] .imported-sheet th,
  body[data-session="14"] .imported-sheet td,
  body[data-session="15"] .imported-sheet th,
  body[data-session="15"] .imported-sheet td,
  body[data-session="16"] .imported-sheet th,
  body[data-session="16"] .imported-sheet td {
    padding: 2px 4px !important;
    font-size: 9.5px !important;
    line-height: 1.3 !important;
  }
  body[data-session="10"] .imported-sheet .analysis-section {
    page-break-before: auto !important;
  }
}

/* —— 4차시 · 희망 직업 SWOT 분석 —— */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.activity-card--swot {
  padding: 16px !important;
}
.activity-card--swot .sheet-dept-row {
  margin: 0 0 14px;
  position: relative;
  z-index: 2;
}
.swot-report {
  --swot-ink: #111827;
  --swot-soft: #374151;
  --swot-muted: #4b5563;
  --swot-line: #9ca3af;
  --swot-teal: #0d7377;
  --swot-amber: #c2410c;
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: #1f2937;
}
.swot-hero {
  text-align: center;
  border-bottom: 3px solid var(--swot-ink);
  padding: 28px 0 18px;
  position: relative;
}
.swot-hero::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 5px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(90deg, var(--swot-teal) 0 60%, var(--swot-amber) 60% 100%);
}
.swot-hero h2 {
  margin: 0;
  font: 700 clamp(calc(18px + 3pt), 2.6vw, calc(22px + 3pt))/1.3 var(--sans);
  letter-spacing: -0.02em;
  color: var(--swot-ink);
}
.swot-hero-sub {
  margin: 8px 0 0;
  font: 500 13px/1.55 var(--sans);
  color: var(--swot-soft);
  word-break: keep-all;
}
.swot-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.swot-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
}
.swot-num {
  font: 800 17px/1.2 var(--sans);
  color: var(--swot-amber);
}
.swot-head h3 {
  margin: 0;
  font: 700 16px/1.35 var(--sans);
  color: var(--swot-ink);
  letter-spacing: -0.01em;
}
.swot-panel {
  border: 2px solid var(--swot-ink);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.swot-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.swot-cell {
  padding: 10px 12px;
  border-right: 1.5px solid #d1d5db;
  min-width: 0;
}
.swot-cell:last-child { border-right: none; }
.swot-cell--full {
  border-right: none;
  border-top: 1.5px solid #d1d5db;
}
.swot-lbl {
  display: block;
  margin: 0 0 6px;
  font: 700 12px/1.35 var(--sans);
  color: var(--swot-ink);
}
.swot-cell input,
.swot-cell textarea,
.swot-step input,
.swot-card textarea,
.swot-plan textarea {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  resize: vertical;
  font: 500 13px/1.45 var(--sans);
  color: var(--swot-ink);
  padding: 0;
  margin: 0;
  box-shadow: none !important;
}
.swot-cell textarea { min-height: 56px; }
.swot-cell input::placeholder,
.swot-cell textarea::placeholder,
.swot-step input::placeholder,
.swot-card textarea::placeholder,
.swot-plan textarea::placeholder {
  color: #6b7280;
  font-weight: 400;
}
.swot-salary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-top: 1.5px solid #d1d5db;
  border-bottom: 1.5px solid #d1d5db;
  background: linear-gradient(90deg, #ecfeff, #fff7ed);
}
.swot-salary-title {
  font: 700 12px/1.35 var(--sans);
  color: var(--swot-ink);
  white-space: nowrap;
}
.swot-track {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  position: relative;
}
.swot-track::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 8px;
  height: 3px;
  background: linear-gradient(90deg, var(--swot-teal), var(--swot-amber));
  z-index: 0;
}
.swot-step {
  position: relative;
  z-index: 1;
  text-align: center;
}
.swot-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--swot-teal);
  border: 2px solid #fff;
  margin: 0 auto 5px;
  box-shadow: 0 0 0 2px var(--swot-teal);
}
.swot-step:nth-child(2) .swot-dot {
  background: #ea580c;
  box-shadow: 0 0 0 2px #ea580c;
}
.swot-step:nth-child(3) .swot-dot {
  background: var(--swot-amber);
  box-shadow: 0 0 0 2px var(--swot-amber);
}
.swot-when {
  font: 600 11.5px/1.3 var(--sans);
  color: var(--swot-soft);
  margin-bottom: 4px;
}
.swot-step input {
  text-align: center;
  background: #fff !important;
  border: 1.5px solid var(--swot-line) !important;
  border-radius: 6px;
  padding: 6px 4px !important;
  min-height: 32px;
}
.swot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.swot-card {
  border-radius: 10px;
  padding: 10px 12px;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.swot-card.is-s { background: #ecfeff; border-color: #67e8f9; }
.swot-card.is-w { background: #fef2f2; border-color: #fca5a5; }
.swot-card.is-o { background: #f0fdf4; border-color: #86efac; }
.swot-card.is-t { background: #fff7ed; border-color: #fdba74; }
.swot-card-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.swot-badge {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font: 800 13px/1 var(--sans);
  color: #fff;
  flex-shrink: 0;
}
.swot-card.is-s .swot-badge { background: var(--swot-teal); }
.swot-card.is-w .swot-badge { background: #dc2626; }
.swot-card.is-o .swot-badge { background: #16a34a; }
.swot-card.is-t .swot-badge { background: #ea580c; }
.swot-tt {
  font: 700 13px/1.35 var(--sans);
  color: var(--swot-ink);
}
.swot-ss {
  margin-top: 2px;
  font: 500 11.5px/1.4 var(--sans);
  color: var(--swot-soft);
  word-break: keep-all;
}
.swot-card textarea {
  flex: 1;
  min-height: 88px;
  background: #fff !important;
  border: 1.5px solid #d1d5db !important;
  border-radius: 7px;
  padding: 8px 9px !important;
}
.swot-plans {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.swot-plan {
  display: grid;
  grid-template-columns: minmax(140px, 210px) 1fr;
  gap: 10px;
  align-items: stretch;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
  min-width: 0;
}
.swot-pl {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font: 700 12px/1.4 var(--sans);
  color: var(--swot-ink);
}
.swot-sn {
  font: 800 11px/1 var(--sans);
  color: #fff;
  background: var(--swot-teal);
  width: 20px;
  height: 20px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.swot-plan textarea {
  min-height: 64px;
  padding: 2px 0 !important;
}
.swot-footer {
  margin: 4px 0 0;
  padding-top: 10px;
  border-top: 2px solid var(--swot-ink);
  text-align: center;
  font: 500 12px/1.4 var(--sans);
  color: var(--swot-soft);
}
.activity-card--swot .reflect-field {
  margin-top: 4px;
}
.activity-card--swot .reflect-field textarea {
  min-height: 88px;
  font-size: 16px;
  line-height: 1.5;
}

/* 태블릿: SWOT 2열 유지 + 터치 입력 */
@media (max-width: 1024px) and (min-width: 721px) {
  .activity-card--swot {
    padding: 14px !important;
  }
  .swot-report { gap: 16px; }
  .swot-hero h2 { font-size: clamp(calc(17px + 3pt), 2.2vw, calc(20px + 3pt)); }
  .swot-hero-sub { font-size: 13.5px; }
  .swot-head h3 { font-size: 15px; }
  .swot-cell input,
  .swot-cell textarea,
  .swot-step input,
  .swot-card textarea,
  .swot-plan textarea,
  .activity-card--swot .reflect-field textarea {
    font-size: 16px !important;
  }
  .swot-cell input,
  .swot-step input {
    min-height: 44px;
  }
  .swot-card textarea { min-height: 100px; }
  .swot-plan {
    grid-template-columns: minmax(120px, 180px) 1fr;
    gap: 10px;
    padding: 10px;
  }
  .swot-plan textarea { min-height: 72px; }
  .swot-grid { gap: 12px; }
}

/* 핸드폰·좁은 태블릿: 1열 스택 */
@media (max-width: 720px) {
  .activity-card--swot {
    padding: 12px 10px 14px !important;
    overflow-x: clip;
  }
  .swot-report {
    gap: 14px;
    width: 100%;
    max-width: 100%;
  }
  .swot-hero {
    padding: 20px 4px 14px;
  }
  .swot-hero h2 {
    font-size: clamp(calc(16px + 3pt), 4.6vw, calc(19px + 3pt));
    line-height: 1.35;
    word-break: keep-all;
  }
  .swot-hero-sub {
    font-size: 12.5px;
    line-height: 1.55;
    margin-top: 6px;
    padding: 0 2px;
  }
  .swot-head {
    gap: 8px;
    align-items: flex-start;
  }
  .swot-num { font-size: 15px; margin-top: 1px; }
  .swot-head h3 {
    font-size: 14.5px;
    line-height: 1.4;
    word-break: keep-all;
  }
  .swot-panel { border-radius: 10px; }
  .swot-row2,
  .swot-grid {
    grid-template-columns: 1fr;
  }
  .swot-cell {
    border-right: none;
    border-bottom: 1.5px solid #d1d5db;
    padding: 12px;
  }
  .swot-row2 .swot-cell:last-child { border-bottom: none; }
  .swot-cell--full { border-top: 1.5px solid #d1d5db; }
  .swot-lbl { font-size: 12.5px; margin-bottom: 8px; }
  .swot-cell input,
  .swot-cell textarea,
  .swot-step input,
  .swot-card textarea,
  .swot-plan textarea,
  .activity-card--swot .reflect-field textarea {
    font-size: 16px !important; /* iOS 확대 방지 */
    line-height: 1.45 !important;
  }
  .swot-cell input,
  .swot-step input {
    min-height: 44px;
    padding: 8px 2px !important;
  }
  .swot-cell textarea { min-height: 72px; }
  .swot-salary {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }
  .swot-salary-title {
    white-space: normal;
    font-size: 12.5px;
  }
  /* 연봉 트랙은 가로 3칸 유지(좁은 화면에서도 비교 가능) */
  .swot-track {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .swot-track::before {
    display: block;
    top: 7px;
    height: 2px;
  }
  .swot-dot {
    width: 10px;
    height: 10px;
  }
  .swot-when { font-size: 10.5px; }
  .swot-step input {
    font-size: 13px !important;
    min-height: 40px;
    padding: 6px 2px !important;
  }
  .swot-grid { gap: 10px; }
  .swot-card {
    padding: 12px;
    border-radius: 12px;
  }
  .swot-tt { font-size: 13.5px; word-break: keep-all; }
  .swot-ss { font-size: 12px; }
  .swot-card textarea { min-height: 110px; padding: 10px !important; }
  .swot-plans { gap: 10px; }
  .swot-plan {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
    border-radius: 10px;
  }
  .swot-pl {
    font-size: 13px;
    line-height: 1.4;
  }
  .swot-pl br { display: none; }
  .swot-plan textarea {
    min-height: 88px;
    padding: 8px 0 0 !important;
    border-top: 1px dashed #e5e7eb !important;
  }
  .swot-footer {
    font-size: 11.5px;
    line-height: 1.45;
    padding: 10px 4px 0;
    word-break: keep-all;
  }
  .activity-card--swot .reflect-field label {
    font-size: 13px;
  }
  .activity-card--swot .reflect-field textarea {
    min-height: 100px;
    padding: 10px 12px;
  }
}

/* 아주 좁은 폰 */
@media (max-width: 420px) {
  .activity-card--swot { padding: 10px 8px 12px !important; }
  .swot-hero h2 { font-size: calc(15.5px + 3pt); }
  .swot-head h3 { font-size: 13.5px; }
  .swot-track {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .swot-track::before { display: none; }
  .swot-step {
    display: grid;
    grid-template-columns: 14px 72px 1fr;
    align-items: center;
    gap: 8px;
    text-align: left;
  }
  .swot-dot { margin: 0; }
  .swot-when { margin: 0; }
  .swot-step input { text-align: left; padding-left: 8px !important; }
}

@media print {
  .swot-card,
  .swot-salary,
  .swot-badge,
  .swot-sn,
  .swot-hero::before,
  .sheet-dept {
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
    color-adjust: exact !important;
  }
  .activity-card--swot {
    padding: 4px !important;
    border-width: 1.5px !important;
    box-shadow: none !important;
  }
  .activity-card--swot .sheet-dept-row {
    margin: 0 0 6px !important;
  }
  .swot-report { gap: 7px !important; }
  .swot-hero { padding: 8px 0 6px !important; }
  .swot-hero h2 { font-size: 14px !important; }
  .swot-hero-sub { font-size: 9px !important; margin-top: 3px !important; }
  .swot-head h3 { font-size: 11.5px !important; }
  .swot-head {
    break-after: avoid !important;
    page-break-after: avoid !important;
  }
  /* 섹션 통째 이동 금지 → 페이지 하단 큰 공백 제거 */
  .swot-block,
  .swot-panel,
  .swot-grid,
  .swot-plans {
    break-inside: auto !important;
    page-break-inside: auto !important;
  }
  .swot-row2,
  .swot-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .swot-salary {
    grid-template-columns: auto 1fr !important;
  }
  .swot-track {
    grid-template-columns: 1fr 1fr 1fr !important;
  }
  .swot-track::before { display: block !important; }
  .swot-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .swot-plan {
    grid-template-columns: minmax(100px, 140px) 1fr !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .swot-cell input,
  .swot-cell textarea,
  .swot-card textarea,
  .swot-plan textarea,
  .swot-step input {
    font-size: 9.5px !important;
  }
  .swot-card textarea { min-height: 36px !important; height: auto !important; }
  .swot-plan textarea { min-height: 28px !important; height: auto !important; }
  .swot-cell textarea { min-height: 28px !important; height: auto !important; }
  .swot-footer { font-size: 8.5px !important; padding-top: 4px !important; }
  .activity-card--swot .reflect-field textarea {
    min-height: 28px !important;
    height: auto !important;
  }
}

/* 1차시 HTML·캐릭터 포지: 01-forge.css */

/* ========== 6차시 · 진로심리 검사 ========== */
.activity-card--psy {
  padding: 14px 16px 18px !important;
}
.psy-report { display: flex; flex-direction: column; gap: 14px; }
.psy-hero {
  position: relative;
  padding: 4px 2px 10px;
  border-bottom: 2px solid #1e3a8a;
}
.psy-hero h2 {
  margin: 0;
  font: 800 clamp(18px, 2.4vw, 22px)/1.25 "Noto Serif KR", serif;
  color: #1e3a8a;
  letter-spacing: -0.03em;
}
.psy-hero-sub {
  margin: 6px 0 0;
  font: 500 12.5px/1.45 var(--sans);
  color: #64748b;
  word-break: keep-all;
}
.psy-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 8px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: linear-gradient(180deg, #eff6ff, #f8fbff);
}
.psy-banner p {
  margin: 0;
  flex: 1 1 220px;
  font: 600 12.5px/1.4 var(--sans);
  color: #1e40af;
  word-break: keep-all;
}
.psy-banner strong { font-weight: 800; color: #1d4ed8; }
.psy-banner-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  background: #2563eb;
  color: #fff !important;
  font: 700 12px/1 var(--sans);
  text-decoration: none;
  white-space: nowrap;
}
.psy-banner-btn:hover { background: #1d4ed8; }
.psy-block { display: flex; flex-direction: column; gap: 8px; }
.psy-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.psy-num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #1e3a8a;
  color: #fff;
  font: 800 11px/1 var(--sans);
}
.psy-head h3 {
  margin: 0;
  font: 800 15px/1.3 "Noto Serif KR", serif;
  color: #1e3a8a;
  letter-spacing: -0.02em;
}
.psy-test-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}
.psy-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 11px;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.psy-card-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-bottom: 5px;
  margin-bottom: 2px;
  border-bottom: 1.5px dashed #cbd5e1;
  font: 800 13px/1.25 var(--sans);
  color: #1e3a8a;
}
.psy-card-h em {
  font: 700 10px/1 var(--sans);
  font-style: normal;
  padding: 2px 6px;
  border-radius: 999px;
  background: #e0e7ff;
  color: #3730a3;
  white-space: nowrap;
}
.psy-lbl {
  display: block;
  margin-top: 3px;
  font: 700 11.5px/1.3 var(--sans);
  color: #334155;
}
.psy-card,
.psy-row2,
.psy-block {
  min-width: 0;
  max-width: 100%;
}
.psy-card input,
.psy-card textarea,
.psy-cell input,
.psy-cell textarea,
.psy-q textarea,
.psy-pledge,
.psy-table input,
.psy-table textarea {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  padding: 7px 9px;
  font: 500 13px/1.45 var(--sans);
  color: #1e293b;
  outline: none;
  resize: vertical;
  field-sizing: fixed;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  word-break: break-all;
  white-space: pre-wrap;
}
.psy-card textarea,
.psy-cell textarea,
.psy-q textarea,
.psy-pledge,
.psy-table textarea { min-height: 52px; }
.psy-table textarea { min-height: 44px; }
.psy-card input:focus,
.psy-card textarea:focus,
.psy-cell input:focus,
.psy-cell textarea:focus,
.psy-q textarea:focus,
.psy-table input:focus,
.psy-table textarea:focus,
.psy-pledge:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}
.psy-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.psy-cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.psy-cross {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.psy-table-wrap {
  overflow-x: hidden;
  max-width: 100%;
  min-width: 0;
}
.psy-table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  font: 500 12px/1.35 var(--sans);
}
.psy-table th,
.psy-table td {
  border: 1px solid #cbd5e1;
  padding: 6px;
  vertical-align: top;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.psy-table thead th {
  background: #f1f5f9;
  color: #1e3a8a;
  font-weight: 800;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}
.psy-table tbody th {
  width: 64px;
  background: #f8fafc;
  color: #1e3a8a;
  font-weight: 800;
  text-align: center;
}
.psy-table--road { min-width: 0; }
.psy-table--road tbody th { width: 72px; line-height: 1.25; }
.psy-q {
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
}
.psy-q-t {
  margin: 0 0 2px;
  font: 800 13px/1.35 var(--sans);
  color: #1e3a8a;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  word-break: keep-all;
}
.psy-q-t span {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 18px;
  padding: 0 5px;
  border-radius: 5px;
  background: #2563eb;
  color: #fff;
  font: 800 10px/1 var(--sans);
}
.psy-q-d {
  margin: 0 0 6px;
  font: 500 11.5px/1.4 var(--sans);
  color: #64748b;
  word-break: keep-all;
}
.psy-pledge {
  margin-top: 2px;
  border-color: #93c5fd !important;
  background: #eff6ff !important;
  font-weight: 700 !important;
}
.psy-footer {
  margin: 4px 0 0;
  text-align: center;
  font: 600 11px/1.4 var(--sans);
  color: #94a3b8;
}

/* ========== 5차시 · 찬반 토론 ========== */
.activity-card--debate {
  --db-font: "Noto Sans KR", Pretendard, var(--sans);
  --db-ink: #0f172a;
  --db-muted: #475569;
  --db-line: #94a3b8;
  --db-soft: #f1f5f9;
  padding: 16px 18px 20px !important;
  font-family: var(--db-font);
}
.debate-report {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: var(--db-font);
}
.debate-hero {
  padding: 2px 2px 12px;
  border-bottom: 2.5px solid #0f172a;
}
.debate-hero h2 {
  margin: 0;
  font: 800 clamp(20px, 2.6vw, 24px)/1.25 var(--db-font);
  color: var(--db-ink);
  letter-spacing: -0.03em;
}
.debate-hero-sub {
  margin: 7px 0 0;
  font: 500 13.5px/1.5 var(--db-font);
  color: var(--db-muted);
  word-break: keep-all;
}
.debate-meta {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 10px;
}
.debate-cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 10px 11px;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}
.debate-lbl {
  font: 700 13px/1.35 var(--db-font);
  color: #1e293b;
  letter-spacing: -0.01em;
}
.debate-cell input,
.debate-cell textarea,
.debate-cell select,
.debate-topic-input,
.debate-block > input {
  width: 100%;
  border: 1.5px solid #94a3b8;
  border-radius: 9px;
  background: #fff;
  padding: 9px 11px;
  font: 500 14.5px/1.45 var(--db-font);
  color: var(--db-ink);
  outline: none;
  resize: vertical;
  field-sizing: content;
}
.debate-cell select {
  min-height: 44px;
  cursor: pointer;
  font-weight: 600;
}
.debate-cell input:focus,
.debate-cell textarea:focus,
.debate-cell select:focus,
.debate-topic-input:focus,
.debate-block > input:focus {
  border-color: #2563eb;
  background: #f8fbff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}
.debate-topic {
  padding: 12px 14px;
  border: 2px solid #2563eb;
  border-radius: 12px;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fbff 100%);
  box-shadow: 0 1px 0 rgba(37, 99, 235, 0.08);
}
.debate-topic-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.debate-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 7px;
  background: #1d4ed8;
  color: #fff;
  font: 800 12.5px/1 var(--db-font);
  letter-spacing: -0.01em;
}
.debate-rand {
  border: 0;
  border-radius: 9px;
  min-height: 36px;
  padding: 0 12px;
  background: #2563eb;
  color: #fff;
  font: 700 13px/1 var(--db-font);
  cursor: pointer;
}
.debate-rand:hover { background: #1d4ed8; }
.debate-topic-input {
  border: 0 !important;
  border-bottom: 2px dashed #60a5fa !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font: 800 16px/1.4 var(--db-font) !important;
  color: #1e3a8a !important;
  padding: 6px 0 !important;
}
.debate-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
.debate-block > .debate-lbl { margin-top: 2px; }
.debate-block > input {
  border-color: #64748b;
}
.debate-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1.5px solid transparent;
}
.debate-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: #fff;
  font: 800 12px/1 var(--db-font);
  flex: 0 0 auto;
}
.debate-head h3 {
  margin: 0;
  font: 800 15.5px/1.3 var(--db-font);
  letter-spacing: -0.02em;
}
.debate-head p {
  margin: 3px 0 0;
  font: 500 12.5px/1.35 var(--db-font);
  word-break: keep-all;
}
/* 단계별 색 구분 */
.debate-block.is-1 {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #f8fbff 0%, #fff 28%);
}
.debate-block.is-1 .debate-head {
  background: #dbeafe;
  border-color: #93c5fd;
}
.debate-block.is-1 .debate-num { background: #1d4ed8; }
.debate-block.is-1 .debate-head h3 { color: #1e3a8a; }
.debate-block.is-1 .debate-head p { color: #3b82f6; }

.debate-block.is-2 {
  border-color: #86efac;
  background: linear-gradient(180deg, #f0fdf4 0%, #fff 28%);
}
.debate-block.is-2 .debate-head {
  background: #dcfce7;
  border-color: #86efac;
}
.debate-block.is-2 .debate-num { background: #15803d; }
.debate-block.is-2 .debate-head h3 { color: #14532d; }
.debate-block.is-2 .debate-head p { color: #16a34a; }

.debate-block.is-3 {
  border-color: #fdba74;
  background: linear-gradient(180deg, #fff7ed 0%, #fff 28%);
}
.debate-block.is-3 .debate-head {
  background: #ffedd5;
  border-color: #fdba74;
}
.debate-block.is-3 .debate-num { background: #c2410c; }
.debate-block.is-3 .debate-head h3 { color: #9a3412; }
.debate-block.is-3 .debate-head p { color: #ea580c; }

.debate-block.is-4 {
  border-color: #c4b5fd;
  background: linear-gradient(180deg, #f5f3ff 0%, #fff 28%);
}
.debate-block.is-4 .debate-head {
  background: #ede9fe;
  border-color: #c4b5fd;
}
.debate-block.is-4 .debate-num { background: #6d28d9; }
.debate-block.is-4 .debate-head h3 { color: #5b21b6; }
.debate-block.is-4 .debate-head p { color: #7c3aed; }

.debate-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.debate-row2 .debate-cell {
  background: #fafafa;
  border-color: #94a3b8;
}
.debate-footer {
  margin: 2px 0 0;
  text-align: center;
  font: 600 12px/1.4 var(--db-font);
  color: #64748b;
}
.activity-card--debate .reflect-field {
  margin-top: 4px;
  padding: 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  background: #fffbeb;
}
.activity-card--debate .reflect-field label {
  font: 700 13.5px/1.3 var(--db-font) !important;
  color: #92400e !important;
}
.activity-card--debate .reflect-field textarea {
  font: 500 14.5px/1.45 var(--db-font) !important;
  border: 1.5px solid #f59e0b !important;
  min-height: 88px;
}

@media (max-width: 820px) {
  .psy-test-grid,
  .psy-row2,
  .psy-cross,
  .debate-meta,
  .debate-row2 {
    grid-template-columns: 1fr;
  }
  .psy-table,
  .psy-table--road { min-width: 0; }
}

@media (max-width: 560px) {
  .activity-card--psy,
  .activity-card--debate { padding: 10px 10px 14px !important; }
  .psy-banner { flex-direction: column; align-items: stretch; }
  .psy-banner-btn { justify-content: center; width: 100%; }
  .psy-card-h { flex-wrap: wrap; }
  .debate-topic-top { flex-wrap: wrap; }
  .debate-rand { width: 100%; }
  .debate-topic-input { font-size: 15px !important; }
  .debate-head h3 { font-size: 14.5px; }
}

@media print {
  .psy-banner-btn,
  .debate-rand { display: none !important; }
  .psy-banner {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
  }
  .psy-test-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 4px !important;
  }
  .psy-cross {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 4px !important;
  }
  .psy-row2,
  .debate-row2,
  .debate-meta {
    grid-template-columns: 1fr 1fr !important;
    gap: 5px !important;
  }
  .psy-card,
  .psy-q,
  .debate-block,
  .debate-topic {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .psy-hero h2,
  .debate-hero h2 { font-size: 13px !important; }
  .psy-head h3,
  .debate-head h3 { font-size: 11.5px !important; }
  .psy-lbl,
  .debate-lbl { font-size: 9.5px !important; }
  .psy-card input,
  .psy-card textarea,
  .psy-cell input,
  .psy-cell textarea,
  .psy-q textarea,
  .psy-table input,
  .psy-table textarea,
  .psy-pledge,
  .debate-cell input,
  .debate-cell textarea,
  .debate-cell select,
  .debate-block > input,
  .debate-topic-input {
    font-size: 9.5px !important;
    padding: 3px 5px !important;
    min-height: 0 !important;
  }
  .psy-card textarea,
  .psy-cell textarea,
  .psy-q textarea,
  .debate-cell textarea { min-height: 30px !important; }
  .psy-table { min-width: 0 !important; font-size: 8.5px !important; }
  .psy-table th,
  .psy-table td { padding: 3px !important; }
  .psy-num,
  .debate-num { width: 18px; height: 18px; font-size: 9px; border-radius: 4px; }
  .activity-card--psy,
  .activity-card--debate {
    padding: 4px !important;
    box-shadow: none !important;
  }
  .psy-card,
  .debate-topic,
  .psy-q,
  .debate-block { padding: 6px 7px !important; }
  .debate-block.is-1,
  .debate-block.is-2,
  .debate-block.is-3,
  .debate-block.is-4,
  .debate-block .debate-head,
  .debate-topic,
  .debate-badge,
  .debate-num {
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }
  .psy-pledge { background: #fff !important; }
  .psy-card.is-blank,
  input.is-blank,
  textarea.is-blank {
    background: #fff !important;
  }
}

/* 전 차시 활동지 · 폰/태블릿 */
@media (max-width: 1024px) {
  html, body { overflow-x: clip; }
  .shell,
  .activity-card,
  .hero-card,
  .swot-report,
  .wc { max-width: 100%; }
  input,
  select,
  textarea { font-size: 16px; }
  button,
  .wc-btn,
  .chip,
  .submit-fab {
    min-height: 44px;
    touch-action: manipulation;
  }
}

@media (max-width: 1024px) and (min-width: 721px) {
  .grid-2,
  .questions-grid,
  .swot-grid,
  .swot-plan { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .hero-card,
  .activity-card {
    padding: 14px 12px;
    border-radius: 14px;
    max-width: 100%;
  }
  .hero-copy h1 {
    font-size: clamp(1.25rem, 6vw, 1.7rem);
    word-break: keep-all;
  }
  .grid-2,
  .questions-grid { grid-template-columns: 1fr; }
  .swot-grid,
  .swot-plan { grid-template-columns: 1fr 1fr; }
  .activity-card,
  .sheet,
  textarea,
  input,
  .field p,
  .na-card,
  .q-card,
  .slot {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  input, select, textarea { font-size: 16px; }
}
@media (max-width: 720px) and (orientation: landscape) {
  .grid-2,
  .questions-grid { grid-template-columns: 1fr 1fr; }
  body { padding-top: calc(10px + var(--safe-top)); }
}

@media (max-width: 480px) {
  .hero-qr-wrap { margin-top: 8px; }
  .activity-card h2 { font-size: 1.05rem; word-break: keep-all; }
  .swot-grid,
  .swot-plan { grid-template-columns: 1fr; }
}

@media (hover: none) and (pointer: coarse) {
  button:hover,
  .wc-btn:hover,
  .wc-pick:hover { transform: none; }
}

/* 활동지 참고 영상 — 썸네일·시간을 한 칸에, 제목은 단어 단위로 */
.imported-sheet .video-card,
.imported-sheet .vcard {
  min-width: 0;
}
.imported-sheet .thumb-wrap,
.imported-sheet .video-thumb,
.imported-sheet .video-thumb-wrap {
  position: relative;
}
.imported-sheet .thumb-wrap .dur,
.imported-sheet .thumb-wrap .vtime,
.imported-sheet .thumb-wrap .vdur,
.imported-sheet .thumb-wrap .duration,
.imported-sheet .thumb-wrap .video-duration,
.imported-sheet .video-thumb .vtime,
.imported-sheet .video-thumb .vdur,
.imported-sheet .video-thumb-wrap .video-duration {
  position: absolute;
  right: 5px;
  bottom: 5px;
  z-index: 1;
  margin: 0;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 3px 5px;
  border-radius: 2px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.imported-sheet .video-card .vtitle,
.imported-sheet .video-card .video-title,
.imported-sheet .video-card .vtitle-text,
.imported-sheet .vcard .vtitle {
  overflow-wrap: break-word !important;
  word-break: keep-all !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.imported-sheet .video-card .vchannel,
.imported-sheet .video-card .video-channel,
.imported-sheet .vcard .vch {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 학생 입장: QR·코드번호는 교사 화면에서만. 활동지는 한 칸으로 펼친다 */
html:not([data-activity-teacher="1"]) .hero-qr-wrap,
html:not([data-activity-teacher="1"]) .hero-card .hero-side {
  display: none !important;
}
html[data-activity-teacher="1"] .hero-qr-wrap,
html[data-activity-teacher="1"] .hero-card .hero-side {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
html:not([data-activity-teacher="1"]) .hero-card {
  grid-template-columns: minmax(0, 1fr);
}

