:root {
  /* Warm pastel theme (offline-friendly, low visual noise) */
  --white: #ffffff;
  --ink: #1f2430;
  --ink-soft: rgba(31, 36, 48, 0.78);

  --peach: #ffb7a7;
  --apricot: #ffd3a6;
  --butter: #ffe9b3;
  --mint: #bfeadf;
  --sky: #b7d7ff;
  --lavender: #d8ccff;

  --blue: #5b8cff;
  --green: #38b2a6;
  --red: #ff6b6b;

  --bg0: #fff7f4;
  --bg1: #fffdf9;
  --card: rgba(255, 255, 255, 0.78);
  --card-solid: #ffffff;

  --gray-50: #fbfbfd;
  --gray-100: #f3f4f8;
  --gray-200: #e7e9f2;
  --gray-300: #d8dbe7;
  --gray-500: #6b7280;

  --highlight: rgba(255, 245, 210, 0.75);
  --focus: rgba(91, 140, 255, 0.35);

  --line: 1px solid rgba(31, 36, 48, 0.10);
  --line-2: 1px solid rgba(31, 36, 48, 0.16);
  --shadow-3d:
    0 10px 30px rgba(31, 36, 48, 0.08),
    0 2px 10px rgba(31, 36, 48, 0.06);
  --shadow-lift:
    0 16px 40px rgba(31, 36, 48, 0.12),
    0 2px 12px rgba(31, 36, 48, 0.08);
  --nav-h: 48px;
  --font: "Noto Sans KR", "Noto Sans", system-ui, sans-serif;
  --fs-xs: 10px;
  --fs-sm: 12px;
  --fs-base: 13px;
  --fs-md: 14px;
  --fs-input: 12px;
  --fs-ui: 13px;
  --fs-label: 11px;
  --lh-ui: 1.52;
  --lh-tight: 1.38;
  --student-cols: 38px 34px minmax(64px, 1fr) minmax(48px, 0.7fr) minmax(40px, 0.45fr)
    minmax(76px, 0.85fr) minmax(70px, 0.8fr) minmax(78px, 0.7fr)
    minmax(62px, 0.65fr) minmax(70px, 0.8fr) minmax(70px, 0.8fr) minmax(58px, 0.72fr) 42px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-ui);
  font-weight: 400;
  line-height: var(--lh-ui);
  letter-spacing: -0.012em;
  background:
    radial-gradient(1200px 420px at 15% -10%, rgba(255, 183, 167, 0.32), transparent 60%),
    radial-gradient(900px 380px at 88% 0%, rgba(216, 204, 255, 0.30), transparent 55%),
    radial-gradient(900px 520px at 70% 110%, rgba(191, 234, 223, 0.34), transparent 60%),
    linear-gradient(180deg, var(--bg1), var(--bg0));
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: transparent;
}

/* —— 네비게이션 —— */
.app-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.72) 100%);
  border-bottom: var(--line-2);
  box-shadow: 0 10px 30px rgba(31, 36, 48, 0.10);
  backdrop-filter: blur(10px);
}

.nav-inner {
  max-width: 1320px;
  height: 100%;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav-logo {
  position: relative;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  animation: logo-glow 3.6s ease-in-out infinite;
}

@keyframes logo-glow {
  0%, 100% { filter: drop-shadow(0 2px 10px rgba(91, 140, 255, 0.25)); }
  50% { filter: drop-shadow(0 6px 18px rgba(216, 204, 255, 0.35)); }
}

.logo-core {
  position: absolute;
  inset: 8px;
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(31, 36, 48, 0.92) 0%, rgba(31, 36, 48, 0.74) 100%);
  box-shadow: 0 10px 22px rgba(31, 36, 48, 0.18);
}

.logo-ring {
  position: absolute;
  border-radius: 50%;
  opacity: 0.85;
}

.logo-ring--b {
  width: 10px;
  height: 10px;
  top: 0;
  right: 0;
  background: linear-gradient(180deg, var(--sky), var(--blue));
  box-shadow: 0 10px 18px rgba(91, 140, 255, 0.22);
}

.logo-ring--r {
  width: 8px;
  height: 8px;
  bottom: 2px;
  left: 0;
  background: linear-gradient(180deg, var(--peach), var(--red));
  box-shadow: 0 10px 16px rgba(255, 107, 107, 0.18);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 4px 6px;
  margin: -4px -6px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 10px;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: background 0.15s;
}

.nav-brand:hover {
  background: rgba(255, 255, 255, 0.55);
}

.nav-brand-text { min-width: 0; }

.nav-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: var(--lh-tight);
  color: var(--ink);
}

.nav-sub {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--gray-500);
  letter-spacing: 0.01em;
  text-transform: none;
  text-decoration: none;
  transition: color 0.15s;
}

a.nav-sub {
  color: rgba(91, 140, 255, 0.95);
}

a.nav-sub:hover {
  color: var(--blue);
  text-decoration: underline;
}

.nav-tabs {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.92) 100%);
  border: var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-3d);
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.nav-tab-icon {
  font-size: var(--fs-sm);
  opacity: 0.75;
}

.nav-tab:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.65);
}

.nav-tab.is-active {
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(183, 215, 255, 0.30) 100%);
  border: 1px solid rgba(91, 140, 255, 0.20);
  box-shadow: 0 14px 26px rgba(31, 36, 48, 0.10), 0 2px 10px rgba(91, 140, 255, 0.10);
  transform: translateY(-1px);
}

.nav-tab.is-active::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 183, 167, 0.95), rgba(216, 204, 255, 0.95), rgba(191, 234, 223, 0.95));
}

.nav-tab { position: relative; }

/* —— 메인 —— */
.app-main {
  flex: 1;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 12px 16px 24px;
}

.view[hidden] { display: none !important; }

.panel-3d {
  background: var(--card);
  border: var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-3d);
  backdrop-filter: blur(10px);
}

/* 홈 화면 스타일 → docs/css/home.css */
/* —— 툴바 —— */
.view-forms {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.forms-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 10px 12px 5px;
}

.forms-settings {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 300px;
}

.field-3d {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 3px 2px 7px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.72) 100%);
  border: var(--line);
  border-radius: 6px;
  box-shadow: 0 10px 22px rgba(31, 36, 48, 0.08);
  transition: box-shadow 0.15s, transform 0.12s;
}

.field-3d:focus-within {
  transform: translateY(-1px);
  box-shadow:
    0 16px 30px rgba(31, 36, 48, 0.10),
    0 0 0 4px var(--focus);
}

.field-label {
  font-size: var(--fs-label);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.field-input {
  min-width: 0;
  padding: 4px 8px;
  border: 1px solid rgba(31, 36, 48, 0.14);
  border-radius: 4px;
  font-family: var(--font);
  font-size: var(--fs-input);
  font-weight: 500;
  line-height: var(--lh-tight);
  background: var(--highlight);
  color: var(--ink);
}

.field-3d--year .field-input { width: 4.8em; min-width: 54px; }
.field-3d--school .field-input { width: 12em; min-width: 128px; }
.field-3d--receipt .field-input { width: 7em; min-width: 76px; }
.field-3d--form .field-input { width: 6em; min-width: 68px; }
.field-3d--grade {
  background: linear-gradient(180deg, #f4faff 0%, #d7eefe 100%);
  border-color: rgba(120, 168, 210, 0.35);
}
.field-3d--grade .field-input {
  width: 4.6em;
  min-width: 52px;
  background: transparent;
}
.field-3d--grade .field-label { color: #4a6f8c; }

.grade-hint {
  align-self: flex-end;
  flex: 1 1 200px;
  margin: 0;
  max-width: 26em;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: rgba(92, 100, 112, 0.62);
}

.grade-hint-em {
  font-weight: 600;
  color: rgba(74, 88, 104, 0.78);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(110, 140, 168, 0.55);
}

.field-input:focus {
  outline: none;
  background: #fffef5;
}

/* —— 미리보기 독 + 인쇄 —— */
.forms-output {
  display: flex;
  align-items: center;
  align-self: center;
  gap: 12px;
  flex-shrink: 0;
}

.preview-dock {
  display: flex;
  padding: 3px;
  gap: 3px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.92) 100%);
  border: var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-3d);
}

.dock-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 56px;
  padding: 5px 7px 4px;
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(243, 244, 248, 0.92) 100%);
  border: var(--line);
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(31, 36, 48, 0.08);
  transition: transform 0.16s, box-shadow 0.16s, background 0.16s, border-color 0.16s;
}

.dock-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dock-icon svg {
  width: 14px;
  height: 14px;
}

.dock-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  line-height: 1.12;
  text-align: center;
}

.dock-line1 {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 700;
}

.dock-line2 {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 600;
  opacity: 0.88;
}

.dock-btn:focus-visible {
  outline: none;
  box-shadow: 0 16px 34px rgba(31, 36, 48, 0.12), 0 0 0 4px rgba(216, 204, 255, 0.28);
}

.dock-btn:hover {
  color: var(--ink);
  transform: translateY(-2px);
  border-color: rgba(91, 140, 255, 0.18);
  background: linear-gradient(
    135deg,
    rgba(255, 183, 167, 0.28) 0%,
    rgba(216, 204, 255, 0.22) 45%,
    rgba(191, 234, 223, 0.26) 100%
  );
  box-shadow: 0 22px 44px rgba(31, 36, 48, 0.14);
}

.dock-btn.is-active {
  color: var(--ink);
  transform: translateY(-2px);
  border: 1px solid rgba(91, 140, 255, 0.28);
  box-shadow: 0 16px 34px rgba(31, 36, 48, 0.12);
}

.dock-btn--ticket.is-active {
  background: linear-gradient(180deg, rgba(183, 215, 255, 0.65) 0%, rgba(216, 204, 255, 0.35) 100%);
  animation: none;
}

.dock-btn--ticket.is-active .dock-icon { color: var(--blue-dark); }

.dock-btn--scoring.is-active {
  background: linear-gradient(180deg, rgba(191, 234, 223, 0.70) 0%, rgba(255, 233, 179, 0.30) 100%);
  animation: none;
}

.dock-btn--scoring.is-active .dock-icon { color: var(--green); }

.dock-btn--duplex.is-active {
  background: linear-gradient(135deg, rgba(255, 183, 167, 0.55) 0%, rgba(216, 204, 255, 0.45) 45%, rgba(191, 234, 223, 0.55) 100%);
  animation: none;
}

.dock-btn--duplex.is-active .dock-icon svg {
  stroke: var(--ink);
  filter: none;
}

/* 인쇄 버튼 3D */
.btn-print-3d {
  position: relative;
  padding: 0;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(255, 255, 255, 0.62) 100%);
  box-shadow:
    0 16px 34px rgba(31, 36, 48, 0.14),
    0 2px 10px rgba(31, 36, 48, 0.08);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-print-3d:hover {
  transform: translateY(-2px);
  box-shadow:
    0 22px 46px rgba(31, 36, 48, 0.18),
    0 0 0 4px rgba(255, 183, 167, 0.22);
}

.btn-print-3d:active {
  transform: translateY(2px);
  box-shadow:
    0 10px 22px rgba(31, 36, 48, 0.14);
}

.btn-print-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.12) 45%,
    rgba(255, 255, 255, 0.22) 50%,
    rgba(255, 255, 255, 0.12) 55%,
    transparent 65%
  );
  background-size: 200% 100%;
  animation: print-shine 5.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes print-shine {
  0%, 100% { background-position: 200% 0; }
  50% { background-position: -100% 0; }
}

.btn-print-body {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  font-family: inherit;
  font-size: var(--fs-base);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  background: linear-gradient(135deg, rgba(255, 183, 167, 0.68) 0%, rgba(216, 204, 255, 0.62) 40%, rgba(191, 234, 223, 0.72) 100%);
  border: 1px solid rgba(31, 36, 48, 0.12);
  border-radius: 7px;
  margin: 1px;
  text-shadow: none;
}

.btn-print-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.btn-print-3d--sm .btn-print-body {
  padding: 5px 11px;
  font-size: var(--fs-sm);
}

.btn-print-3d--sm .btn-print-icon {
  width: 11px;
  height: 11px;
}

/* 미리보기 패널 — 컴팩트 3D 액션 */
.btn-action-3d {
  position: relative;
  padding: 0;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  font-family: inherit;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-action-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 38%,
    rgba(255, 255, 255, 0.2) 48%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0.2) 52%,
    transparent 62%
  );
  pointer-events: none;
}

.btn-action-face {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: -0.02em;
  border: 1px solid #000;
  border-radius: 5px;
  margin: 1px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.btn-action-icon {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

.btn-action-3d--print {
  background: linear-gradient(180deg, #334155 0%, #0f172a 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 2px 0 #020617,
    0 4px 10px rgba(15, 23, 42, 0.35);
}

.btn-action-3d--print .btn-action-face {
  color: #fff;
  background: linear-gradient(180deg, #60a5fa 0%, #2563eb 42%, #1d4ed8 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset;
}

.btn-action-3d--close {
  background: linear-gradient(180deg, #52525b 0%, #27272a 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 2px 0 #09090b,
    0 4px 10px rgba(24, 24, 27, 0.3);
}

.btn-action-3d--close .btn-action-face {
  color: #fafafa;
  background: linear-gradient(180deg, #a1a1aa 0%, #71717a 45%, #52525b 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset;
}

.btn-action-3d:hover {
  transform: translateY(-1px);
}

.btn-action-3d--print:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 2px 0 #020617,
    0 6px 14px rgba(37, 99, 235, 0.35);
}

.btn-action-3d--close:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.14) inset,
    0 2px 0 #09090b,
    0 6px 14px rgba(0, 0, 0, 0.25);
}

.btn-action-3d:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25) inset;
}

/* —— Excel 업로드 —— */
.excel-zone {
  padding: 10px 12px 12px;
  margin-bottom: 0;
}

.excel-zone-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.excel-zone-title {
  margin: 0;
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.btn-template {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--ink);
  background: linear-gradient(135deg, rgba(191, 234, 223, 0.82) 0%, rgba(216, 204, 255, 0.30) 55%, rgba(255, 233, 179, 0.55) 100%);
  border: var(--line);
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(31, 36, 48, 0.08);
  transition: transform 0.12s, box-shadow 0.12s;
}

.btn-template svg {
  width: 14px;
  height: 14px;
  color: var(--green);
}

.btn-template:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(31, 36, 48, 0.12), 0 0 0 4px rgba(191, 234, 223, 0.25);
}

.excel-dropzone {
  position: relative;
  border: 1px solid rgba(31, 36, 48, 0.14);
  border-radius: 14px;
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  background:
    radial-gradient(900px 220px at 20% 0%, rgba(255, 183, 167, 0.20), transparent 55%),
    radial-gradient(700px 220px at 85% 100%, rgba(191, 234, 223, 0.24), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.66) 100%);
  box-shadow: 0 14px 34px rgba(31, 36, 48, 0.08);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s, background 0.2s;
}

.excel-dropzone:hover,
.excel-dropzone:focus-visible {
  outline: none;
  border-color: rgba(91, 140, 255, 0.35);
  box-shadow: 0 18px 44px rgba(31, 36, 48, 0.12), 0 0 0 4px rgba(216, 204, 255, 0.22);
}

.excel-dropzone.is-dragover {
  border-color: rgba(91, 140, 255, 0.55);
  transform: translateY(-1px);
  box-shadow:
    0 22px 52px rgba(31, 36, 48, 0.16),
    0 0 0 6px rgba(183, 215, 255, 0.25);
}

.excel-dropzone-inner {
  pointer-events: none;
}

.excel-drop-icon {
  width: 28px;
  height: 28px;
  margin: 0 auto 6px;
  color: rgba(91, 140, 255, 0.95);
  filter: drop-shadow(0 10px 18px rgba(91, 140, 255, 0.18));
}

.excel-drop-main {
  margin: 0 0 4px;
  font-size: var(--fs-base);
  color: var(--ink);
}

.excel-drop-main strong {
  color: rgba(91, 140, 255, 0.95);
}

.excel-drop-link {
  text-decoration: none;
  color: rgba(91, 140, 255, 0.95);
  font-weight: 600;
  border-bottom: 1px solid rgba(91, 140, 255, 0.35);
}

.excel-drop-sub {
  margin: 0;
  font-size: var(--fs-xs);
  color: var(--gray-500);
}

.excel-drop-sub code {
  padding: 1px 4px;
  font-size: var(--fs-xs);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(31, 36, 48, 0.12);
  border-radius: 4px;
}

/* —— 학생 영역 —— */
.workspace {
  display: flex;
  flex-direction: column;
  min-height: 340px;
  overflow: hidden;
}

.workspace-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 8px 12px;
  border-bottom: var(--line);
  background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
}

.workspace-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.workspace-title h2 {
  margin: 0;
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.count-badge {
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  color: var(--blue);
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid rgba(37, 99, 235, 0.2);
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.1);
}

.workspace-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tool-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(243, 244, 248, 0.78) 100%);
  border: 1px solid rgba(31, 36, 48, 0.12);
  border-radius: 12px;
  box-shadow: 0 12px 26px rgba(31, 36, 48, 0.08);
}

.tool-group--student {
  background: linear-gradient(135deg, rgba(183, 215, 255, 0.22) 0%, rgba(255, 255, 255, 0.88) 55%, rgba(191, 234, 223, 0.18) 100%);
}

.tool-group .tool-chip {
  box-shadow: none;
  border-radius: 9px;
}

.tool-group .tool-chip:hover:not(:disabled) {
  box-shadow: 0 8px 18px rgba(31, 36, 48, 0.10);
}

.tool-group .tool-chip--add {
  background: linear-gradient(135deg, rgba(183, 215, 255, 0.55) 0%, rgba(216, 204, 255, 0.35) 100%);
}

.tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  font-family: inherit;
  font-size: var(--fs-base);
  font-weight: 600;
  color: rgba(31, 36, 48, 0.78);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(243, 244, 248, 0.88) 100%);
  border: 1px solid rgba(31, 36, 48, 0.12);
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(31, 36, 48, 0.08);
  transition: transform 0.14s, box-shadow 0.14s, border-color 0.14s, background 0.14s, color 0.14s;
}

.tool-chip svg {
  width: 11px;
  height: 11px;
}

.tool-chip:focus-visible {
  outline: none;
  box-shadow: 0 18px 40px rgba(31, 36, 48, 0.12), 0 0 0 4px rgba(216, 204, 255, 0.28);
}

.tool-chip:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 20px 44px rgba(31, 36, 48, 0.14);
}

.tool-chip:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.tool-chip--save:hover:not(:disabled) {
  border-color: rgba(91, 140, 255, 0.32);
  color: rgba(91, 140, 255, 0.95);
}

.tool-chip--reset:hover:not(:disabled) {
  border-color: rgba(255, 107, 107, 0.30);
  color: rgba(255, 107, 107, 0.95);
}

.tool-chip--undo:hover:not(:disabled) {
  border-color: rgba(56, 178, 166, 0.30);
  color: rgba(56, 178, 166, 0.95);
}

.tool-chip--add {
  color: rgba(91, 140, 255, 0.95);
  border-color: rgba(91, 140, 255, 0.22);
  background: linear-gradient(135deg, rgba(183, 215, 255, 0.55) 0%, rgba(216, 204, 255, 0.35) 100%);
}

.tool-chip--photo { cursor: pointer; }

/* —— 학생 표 —— */
.students-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  border-top: var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.55);
}

.students-head,
.student-line {
  display: grid;
  grid-template-columns: var(--student-cols);
  align-items: center;
  gap: 3px;
  padding: 0 8px;
  min-width: 0;
}

.students-head {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 32px;
  background:
    linear-gradient(90deg, rgba(255, 183, 167, 0.35), rgba(216, 204, 255, 0.25), rgba(191, 234, 223, 0.30));
  border-bottom: 1px solid rgba(31, 36, 48, 0.12);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: rgba(31, 36, 48, 0.88);
  letter-spacing: 0.01em;
  box-shadow: 0 10px 18px rgba(31, 36, 48, 0.10);
}

.students-head > span {
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.students-head > .h-no,
.students-head > .h-photo {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.students-body {
  flex: 1;
  overflow: auto;
  background: rgba(255, 255, 255, 0.55);
}

.student-line {
  min-height: 34px;
  padding: 1px 0;
  border-bottom: 1px solid rgba(31, 36, 48, 0.08);
  background: rgba(255, 255, 255, 0.72);
  transition: background 0.1s;
}

.student-line:nth-child(even) { background: rgba(255, 255, 255, 0.58); }

.student-line:hover {
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    inset 3px 0 0 rgba(91, 140, 255, 0.35),
    0 10px 18px rgba(31, 36, 48, 0.08);
}

.f-no {
  text-align: center;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--gray-500);
}

.f-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.f-field { min-width: 0; }

.student-line .f-fixed {
  display: block;
  padding: 4px 2px;
  text-align: center;
  font-weight: 700;
  color: #3d3a34;
  letter-spacing: -0.02em;
}

.f-act {
  display: flex;
  justify-content: center;
  gap: 3px;
}

.student-line input,
.student-line select {
  width: 100%;
  min-width: 0;
  padding: 4px 6px;
  border: 1px solid rgba(31, 36, 48, 0.14);
  border-radius: 8px;
  font-family: var(--font);
  font-size: var(--fs-input);
  font-weight: 500;
  line-height: var(--lh-tight);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 245, 210, 0.60) 100%);
  color: var(--ink);
  box-shadow: 0 8px 14px rgba(31, 36, 48, 0.06);
  transition: border-color 0.12s, box-shadow 0.12s;
}

.student-line select {
  padding-right: 16px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='4'%3E%3Cpath fill='%2364748b' d='M0 0l3 4 3-4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  cursor: pointer;
}

.student-line input:focus,
.student-line select:focus {
  outline: none;
  border-color: rgba(91, 140, 255, 0.50);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 4px rgba(183, 215, 255, 0.30), 0 12px 20px rgba(31, 36, 48, 0.10);
}

.photo-thumb {
  width: 26px;
  height: 30px;
  border: 1px solid var(--gray-300);
  border-radius: 5px;
  overflow: hidden;
  background: var(--gray-100);
  box-shadow: 0 1px 3px rgba(15, 20, 25, 0.08) inset;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-photo-mini {
  border: none;
  background: none;
  color: rgba(91, 140, 255, 0.95);
  font-size: var(--fs-xs);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.row-btn {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid rgba(31, 36, 48, 0.12);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(243, 244, 248, 0.92) 100%);
  color: rgba(31, 36, 48, 0.70);
  font-size: var(--fs-md);
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(31, 36, 48, 0.08);
  transition: all 0.12s;
}

.row-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(91, 140, 255, 0.25);
  color: var(--ink);
}

.row-btn--danger:hover {
  color: var(--red);
  border-color: rgba(220, 38, 38, 0.35);
  background: var(--red-soft);
}

.photo-folder-btn { cursor: pointer; }

/* —— 미리보기 —— */
.preview-panel {
  overflow: hidden;
}

.preview-panel.hidden { display: none; }

.preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-200);
  background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
}

.preview-head h2 {
  margin: 0;
  font-size: var(--fs-md);
  font-weight: 700;
}

.preview-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.preview-output {
  max-height: 52vh;
  overflow: auto;
  background: var(--gray-200);
}

/* 응시 현황표 → css/status.css */
/* —— 첫 방문 안내 —— */
.welcome-pop {
  position: fixed;
  inset: 0;
  z-index: 4500;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 20, 26, 0.42);
}
.welcome-pop[hidden] { display: none !important; }
.welcome-card {
  width: min(92vw, 420px);
  padding: 26px 32px 20px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(31, 36, 48, 0.10);
  box-shadow: 0 18px 40px rgba(31, 36, 48, 0.16);
  text-align: center;
}
.welcome-card p {
  margin: 0 0 18px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.7;
  letter-spacing: -0.02em;
  color: #1f2430;
  word-break: keep-all;
}
.welcome-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.welcome-btn {
  min-width: 96px;
  padding: 8px 22px;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.welcome-btn--yes {
  border: 2px solid #e2b53a;
  color: #5a4210;
  background: linear-gradient(180deg, #fff8e4 0%, #f3d27a 55%, #e4b94a 100%);
}
.welcome-btn--no {
  border: 1px solid rgba(31, 36, 48, 0.14);
  color: #5c6470;
  background: #f6f6f8;
}
@media print {
  .welcome-pop { display: none !important; }
}

/* —— 하단 사용법 —— */
.app-credit {
  position: fixed;
  right: 14px;
  bottom: 12px;
  z-index: 180;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.app-howto-chip {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px 6px 6px;
  border: 2px solid #e2b53a;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff8e4 0%, #f3d27a 55%, #e4b94a 100%);
  color: #5a4210;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow:
    0 0 0 3px rgba(243, 210, 122, 0.35),
    0 8px 20px rgba(184, 140, 40, 0.28);
  cursor: pointer;
  opacity: 1;
  animation: howto-glow 1.8s ease-in-out infinite;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-howto-chip:hover,
.app-howto-chip:focus-visible {
  transform: translateY(-2px) scale(1.04);
  box-shadow:
    0 0 0 4px rgba(243, 210, 122, 0.5),
    0 12px 28px rgba(184, 140, 40, 0.4);
  outline: none;
}

.app-howto-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid #8a6a1a;
  font-size: 13px;
  font-weight: 900;
  color: #fff8e4;
  background: #1a1712;
  animation: howto-q 1.2s ease-in-out infinite;
}

@keyframes howto-glow {
  0%, 100% {
    box-shadow: 0 0 0 3px rgba(243, 210, 122, 0.28), 0 8px 18px rgba(184, 140, 40, 0.22);
    border-color: #e2b53a;
  }
  50% {
    box-shadow: 0 0 0 6px rgba(243, 210, 122, 0.18), 0 0 22px rgba(243, 210, 122, 0.55), 0 8px 18px rgba(184, 140, 40, 0.28);
    border-color: #fff1b0;
  }
}

@keyframes howto-q {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
  .app-howto-chip, .app-howto-icon { animation: none; }
}

@media (max-width: 640px) {
  .app-credit { right: 8px; bottom: 8px; }
}

.app-credit {
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

.app-visit {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(92vw, 340px);
  padding: 6px 7px 6px 12px;
  border-radius: 999px;
  font-family: "Noto Sans KR", "Noto Sans", sans-serif;
  background: linear-gradient(180deg, #ffffff 0%, #f4f7ff 48%, #eef2fb 100%);
  border: 1.5px solid rgba(88, 108, 148, 0.32);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 8px 18px rgba(31, 36, 48, 0.08);
}

.app-visit-line {
  margin: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: rgba(31, 36, 48, 0.62);
  line-height: 1.3;
  white-space: nowrap;
}

.app-visit-line strong {
  font-weight: 700;
  color: #2a3142;
}

.app-visit-sep {
  opacity: 0.35;
  font-weight: 400;
}

.app-visit-stats {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(88, 108, 148, 0.18);
  border-radius: 50%;
  background: linear-gradient(180deg, #fbfcff, #eef2fb);
  color: rgba(70, 84, 112, 0.42);
  cursor: pointer;
}

.app-visit-stats:hover,
.app-visit-stats:focus-visible {
  color: rgba(70, 84, 112, 0.78);
  border-color: rgba(88, 108, 148, 0.36);
  outline: none;
}

.visit-stats {
  position: fixed;
  inset: 0;
  z-index: 3600;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(24, 28, 38, 0.38);
}

.visit-stats[hidden] { display: none !important; }

.visit-stats-card {
  width: min(92vw, 440px);
  padding: 22px 22px 16px;
  border-radius: 18px;
  font-family: "Noto Sans KR", "Noto Sans", sans-serif;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 58%, #f3f0fb 100%);
  border: 1.5px solid rgba(88, 108, 148, 0.28);
  box-shadow: 0 18px 40px rgba(31, 36, 48, 0.14);
}

.visit-stats-title {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #2a3142;
}

.visit-bars {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.visit-bar-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.visit-bar-meta span {
  font-size: 12px;
  font-weight: 700;
  color: rgba(42, 49, 66, 0.58);
}

.visit-bar-meta strong {
  font-size: 15px;
  font-weight: 700;
  color: #2a3142;
}

.visit-bar-track {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(180deg, #eef1f7, #e6eaf3);
  border: 1px solid rgba(88, 108, 148, 0.16);
}

.visit-bar-fill {
  display: block;
  height: 100%;
  width: 6%;
  border-radius: 999px;
  transition: width 0.45s ease;
}

.visit-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 12px;
  padding: 10px 8px 8px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(238,242,251,0.9));
  border: 1px solid rgba(88, 108, 148, 0.14);
}

.visit-wd {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  height: auto;
}

.visit-wd-track {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 58px;
}

.visit-wd b {
  display: block;
  width: 100%;
  max-width: 16px;
  height: 8%;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #c9dbff 0%, #9bb8ef 100%);
  box-shadow: 0 4px 10px rgba(120, 150, 200, 0.18);
  transform-origin: bottom center;
  transition: height 0.55s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s ease, box-shadow 0.3s ease;
}

.visit-wd:nth-child(6) b,
.visit-wd:nth-child(7) b {
  background: linear-gradient(180deg, #ffd9c8 0%, #f3b89a 100%);
}

.visit-wd em {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: rgba(42, 49, 66, 0.48);
}

.visit-wd span {
  font-size: 10px;
  font-weight: 700;
  color: rgba(42, 49, 66, 0.72);
  line-height: 1;
}

.visit-wd.is-today em,
.visit-wd.is-today span {
  color: #3d4f7c;
}

.visit-wd.is-today b,
.visit-wd b.is-today {
  background: linear-gradient(180deg, #ffe9a8 0%, #f3c56a 100%);
  box-shadow: 0 0 0 2px rgba(243, 210, 122, 0.45), 0 8px 16px rgba(212, 175, 92, 0.28);
  animation: visit-wd-pulse 1.6s ease-in-out infinite;
}

@keyframes visit-wd-pulse {
  0%, 100% { filter: brightness(1); transform: scaleY(1); }
  50% { filter: brightness(1.08); transform: scaleY(1.04); }
}

.visit-bar-fill--day {
  background: linear-gradient(90deg, #dce8ff, #b7d0ff);
}
.visit-bar-fill--week {
  background: linear-gradient(90deg, #e4ddff, #c8b8ff);
}
.visit-bar-fill--month {
  background: linear-gradient(90deg, #d9f3ee, #b3e4da);
}
.visit-bar-fill--year {
  background: linear-gradient(90deg, #ffe9d4, #ffd0b0);
}

.visit-stats-close {
  display: block;
  width: 100%;
  padding: 9px 16px;
  border: 1.5px solid rgba(88, 108, 148, 0.22);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #eef2fb);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #5a6478;
  cursor: pointer;
}

@media (max-width: 640px) {
  .app-visit {
    max-width: calc(100vw - 16px);
    padding: 5px 6px 5px 10px;
  }
  .app-visit-line { font-size: 10px; }
  .app-visit-stats { width: 32px; height: 32px; }
  .visit-stats { padding: 16px; align-items: end; }
  .visit-stats-card { width: min(100%, 440px); }
  .visit-wd-track { height: 48px; }
  .visit-wd b { max-width: 12px; }
}

@media (max-width: 380px) {
  .app-visit-line { font-size: 10px; letter-spacing: -0.04em; }
}

@media print {
  .app-visit, .visit-stats { display: none !important; }
}



@media print {
  .app-credit { display: none !important; }
}

/* —— 토스트 —— */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  max-width: min(92vw, 420px);
  transform: translateX(-50%) translateY(10px);
  padding: 12px 18px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.02em;
  text-align: center;
  color: #f9fafb;
  background: #16181f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow:
    0 4px 6px rgba(15, 17, 23, 0.12),
    0 12px 32px rgba(15, 17, 23, 0.28);
  z-index: 300;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 960px) {
  .forms-toolbar { flex-direction: column; align-items: stretch; }
  .forms-output { flex-wrap: wrap; justify-content: center; }
  .preview-dock { flex: 1; justify-content: center; }
  .btn-print-3d { width: 100%; }
  .btn-print-body { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .btn-print-shine,
  .nav-logo,
  .nav-tab.is-active,
  .dock-btn--ticket.is-active,
  .dock-btn--scoring.is-active,
  .dock-btn--duplex.is-active,
  .excel-dropzone.is-dragover,
}


/* ?? ???? ? ??? ?? */
select.field-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231f2430' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 24px;
  cursor: pointer;
}

.field-3d--year .field-input { width: 6.2em; min-width: 72px; }
.field-3d--form .field-input { width: 7.2em; min-width: 86px; }

.students-wrap {
  overflow: auto;
}

.students-head,
.student-line {
  min-width: 1080px;
}

.app-nav {
  height: auto;
  min-height: var(--nav-h);
}

.nav-inner {
  flex-wrap: wrap;
  row-gap: 8px;
  padding: 6px 16px;
}

.nav-tabs {
  flex-wrap: wrap;
  max-width: 100%;
}

.nav-tab {
  white-space: nowrap;
}

.nav-title,
.nav-sub {
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  .nav-inner { gap: 10px; }
  .forms-settings { width: 100%; }
}

@media (max-width: 900px) {
  .students-head { display: none; }
  .students-head,
  .student-line { min-width: 0; }
  .student-line {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 72px;
    grid-template-areas:
      "no photo act"
      "fields fields fields";
    gap: 8px 6px;
    padding: 12px 10px;
    align-items: start;
  }
  .student-line .f-no { grid-area: no; padding-top: 8px; }
  .student-line .f-photo { grid-area: photo; }
  .student-line .f-act { grid-area: act; padding-top: 8px; }
  .student-line .f-field { grid-column: 1 / -1; }
  .student-line {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "no act"
      "photo photo"
      "fields fields";
  }
  .student-line .f-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    grid-column: auto;
  }
  .student-line .f-field::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
    color: rgba(31, 36, 48, 0.62);
  }
  .students-wrap,
  .students-body { overflow: visible; }
  .workspace { overflow: visible; }
}

@media (max-width: 720px) {
  .nav-brand-text { min-width: 0; }
  .nav-title { font-size: 13px; }
  .nav-tab { padding: 6px 10px; font-size: 12px; }
  .field-3d { width: 100%; }
  .field-3d .field-input { width: 100% !important; min-width: 0; }
  .excel-drop-main,
  .excel-drop-sub { overflow-wrap: anywhere; }
  .student-line { grid-template-columns: 1fr; }
  .student-line .f-field { grid-column: 1; }
}

@media (max-width: 480px) {
  .nav-inner { padding: 8px 10px; }
  .preview-dock { width: 100%; flex-wrap: wrap; }
  .dock-btn { flex: 1 1 30%; min-width: 96px; }
  .tool-group { flex-wrap: wrap; }
}


.student-line select[data-key="inquiry"] {
  min-width: 0;
  text-overflow: ellipsis;
}


/* mobile-fit */
@media (max-width: 900px) {
  .nav-tabs { width: 100%; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
  .nav-tab { flex: 0 0 auto; }
  .forms-toolbar, .excel-zone, .workspace { min-width: 0; }
  .workspace-head, .workspace-tools, .excel-zone-bar { flex-wrap: wrap; gap: 8px; }
  .preview-output, .students-wrap { max-width: 100%; }
}

@media (max-width: 640px) {
  .nav-brand-text { max-width: 46vw; }
  .nav-sub { display: none; }
  .excel-drop-main, .excel-drop-sub { font-size: 12px; }
  .tool-chip { font-size: 12px; }
}
