.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 14px;
  margin-bottom: 12px;
}

.soft { background: var(--soft); box-shadow: none; }

.toolbar, .row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* 카드제작 — 제목 / 폴더 / 플래그 (플래그 8색 한 줄) */
.create-meta-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  margin-top: 12px;
}

.create-meta-flag .flag-picker {
  flex-wrap: nowrap;
}

@media (max-width: 720px) {
  .create-meta-row {
    grid-template-columns: 1fr;
  }
  .create-meta-flag .flag-picker {
    flex-wrap: wrap;
  }
}

/* 이어서 학습 — 사이드바·학습 setup 공통 (js/ui/resume-panel.js) */
.resume-panel-mount:not(.hidden) {
  margin-top: 14px;
}

.resume-panel-mount--study:not(.hidden) {
  margin: 18px 0 20px;
}

.resume-panel {
  padding: 14px 14px 12px;
  border: 1px solid var(--resume-pink-border);
  border-radius: 14px;
  background: linear-gradient(165deg, var(--resume-pink-soft) 0%, #fff 72%);
  box-shadow: 0 4px 14px rgba(157, 61, 107, 0.06);
}

.resume-panel--sidebar {
  margin-bottom: 4px;
}

.resume-panel__eyebrow {
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--resume-pink-text);
  opacity: 0.85;
}

.resume-panel__btn {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--resume-pink-border);
  border-radius: 11px;
  background: #fff;
  color: var(--resume-pink-text);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.resume-panel__btn:hover {
  background: var(--resume-pink-soft);
  border-color: var(--resume-pink);
}

.resume-panel__btn:active {
  background: var(--resume-pink);
  border-color: var(--resume-pink);
  color: #fff;
}

.resume-panel__detail {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--resume-pink-border);
  line-height: 1.45;
  word-break: break-word;
  color: var(--muted);
}

.sidebar-menu-tools {
  margin-top: 12px;
}

/* 선택 카드 — 전체선택/해제 50:50, 학습시작 오른쪽 */
.selection-select-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.selection-select-row .selection-half {
  flex: 1;
  justify-content: center;
}

.selection-study-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.selection-study-row #startSelectedBtn {
  margin-left: auto;
  flex-shrink: 0;
}

.study-setup-head { margin-bottom: 0; }

/* 학습 카드 이동(이전/다음)은 회독·유사도 등과 성격이 달라 오른쪽 끝으로 분리 */
.study-step-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 이전/다음보다 조금 왼쪽으로 띄운 수정 진입 */
.study-step-nav .study-edit-jump {
  margin-right: 10px;
}

.study-play-bar {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.study-play-threshold {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-left: 4px;
}

.study-play-threshold > label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1;
}

.study-play-threshold .setup-threshold {
  display: flex;
  align-items: center;
  gap: 8px;
}

.study-play-threshold .setup-threshold input[type="range"] {
  width: 110px;
}

/* ── 학습 세트 구성(setup) ── */
.study-setup-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-top: 12px;
}

.study-setup-bar .setup-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.study-setup-bar .setup-field > label {
  font-size: 12px;
  color: var(--muted, #64748b);
  font-weight: 600;
}

.study-setup-bar select {
  min-width: 140px;
}

.study-setup-bar .setup-threshold {
  display: flex;
  align-items: center;
  gap: 8px;
}

.study-setup-bar .setup-threshold input[type="range"] { width: 130px; }

.study-setup-bar #startStudyBtn { margin-left: auto; align-self: flex-end; }

.study-scope-detail {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.study-scope-detail:empty { display: none; }

.study-summary {
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink, #1e293b);
}

.study-summary.warn { color: var(--red, #dc2626); }

/* ── 학습 범위 선택 모달 (폴더 트리 / 카드 목록) ── */
.pick-folder-tree,
.pick-card-list {
  max-height: 50vh;
  overflow-y: auto;
  margin-top: 10px;
  padding: 4px;
}

.pick-folder-node { margin-bottom: 6px; }

.pick-folder-children {
  margin: 4px 0 4px 12px;
  padding-left: 10px;
  border-left: 2px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pick-folder-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
  cursor: pointer;
}

.pick-folder-row:hover { background: rgba(37, 99, 235, 0.06); border-color: #93c5fd; }
.pick-folder-row.active { background: var(--green-soft); border-color: var(--green); font-weight: 700; }
.pick-folder-cnt { font-size: 12px; color: var(--muted, #64748b); flex-shrink: 0; }

.pick-card-list {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
}

/* ── 학습 setup 미리보기 카드 목록 ── */
.study-preview { margin-top: 12px; }
.study-preview:empty { display: none; }
.study-preview-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-weight: 600;
}
.study-preview-head-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 4px;
}
.study-preview-head-actions .small {
  padding: 3px 8px;
  font-size: 12px;
  line-height: 1.2;
}
.study-preview-list {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.study-preview-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.study-preview-item:last-child { border-bottom: none; }
.study-preview-item:hover { background: #f8fafc; }
.study-preview-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
  margin: 0;
}
.study-preview-item input[type="checkbox"] {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  margin: 0;
  cursor: pointer;
}
.study-preview-title { flex: 1; min-width: 0; font-weight: 600; }
.study-preview-meta { font-size: 12px; color: var(--muted, #64748b); flex-shrink: 0; }
.study-preview-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 4px;
}
.study-preview-actions .small {
  padding: 3px 8px;
  font-size: 12px;
  line-height: 1.2;
}

/* ── 카드관리 — 폴더·목록 | 상세 (폴더 쪽 넓게) ── */
.manage-split {
  display: grid;
  grid-template-columns: 5.5fr 4.5fr;
  gap: 14px;
  margin-top: 12px;
}

/* ── 카드관리 폴더 빵부스러기 ── */
.folder-root-title { cursor: pointer; }
.folder-root-title:hover { color: var(--blue, #2563eb); }

.folder-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 13px;
}

.folder-breadcrumb .crumb {
  border: none;
  background: transparent;
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--muted, #64748b);
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.folder-breadcrumb .crumb-label { font-size: 13px; }
.folder-breadcrumb .crumb:hover { background: rgba(37, 99, 235, 0.08); color: var(--blue, #2563eb); }
.folder-breadcrumb .crumb:hover .tree-meta { color: var(--muted); }
.folder-breadcrumb .crumb.active .crumb-label { color: var(--ink, #1e293b); font-weight: 700; }
.folder-breadcrumb .crumb-sep { color: #cbd5e1; }

.folder-breadcrumb .folder-study-btn {
  margin-left: 8px;
  flex-shrink: 0;
}

.folder-breadcrumb .folder-study-btn.is-disabled,
.folder-breadcrumb .folder-study-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.35);
}

.between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.col { display: flex; flex-direction: column; gap: 8px; }

h1, h2, h3 { margin: 0 0 6px; }

label {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  display: block;
  margin-bottom: 4px;
}

input[type="text"]:not(.blank-field):not(.outline-tree-title),
select,
textarea,
input[type="number"]:not(.outline-tree-line-input) {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
}

textarea { resize: vertical; line-height: 1.8; font-family: inherit; }
.xl {
  height: 420px;
  min-height: 260px;
  max-height: 1000px;
  overflow-y: auto;
  font-size: 15px;
  resize: vertical;
}
.sm { min-height: 88px; max-height: 320px; overflow-y: auto; resize: vertical; }

button {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  background: #e5e7eb;
  color: #111827;
}

button.primary { background: var(--blue); color: #fff; }
button.pink { background: var(--pink); color: #fff; }
button.secondary { background: #eef2ff; color: #3730a3; }
button.success { background: #dcfce7; color: #166534; }
button.danger { background: #fee2e2; color: #991b1b; }
button.warn { background: #ffedd5; color: #9a3412; }
button.ghost { background: #fff; border: 1px solid var(--line); }
.study-prompt-panel [data-action="toggle-study-prompt"].ghost {
  background: #eff6ff;
  border-color: #93c5fd;
  color: var(--blue);
}
.study-prompt-panel [data-action="toggle-study-prompt"].ghost:hover {
  background: #dbeafe;
  border-color: var(--blue);
}
button.small { padding: 7px 10px; font-size: 12px; }
button.folder-add { background: #ecfccb; color: #3f6212; border: 1px solid #d9f99d; font-weight: 700; }
button.folder-add:hover { background: #d9f99d; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.folder-head-left { display: flex; align-items: center; gap: 8px; }
.sidebar-patch-btn { width: 100%; margin-bottom: 12px; margin-top: 12px; text-align: center; }
.sel-inline { width: auto; flex: 0 0 auto; padding: 7px 10px; font-size: 12px; }

.patch-modal { max-width: 760px; width: 92vw; }
.patch-body { max-height: 70vh; overflow: auto; padding-right: 6px; line-height: 1.65; }
.patch-body h1 { font-size: 20px; margin: 4px 0 12px; }
.patch-body h2 { font-size: 16px; margin: 18px 0 8px; }
.patch-body h3 { font-size: 14px; margin: 12px 0 6px; }
.patch-body p { margin: 6px 0; }
.patch-body ul { margin: 6px 0; padding-left: 20px; }
.patch-body li { margin: 3px 0; }
.patch-body code { background: #f3f4f6; padding: 1px 5px; border-radius: 5px; font-size: 90%; }
.patch-body hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.patch-entry { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; background: #fff; }
.patch-summary { cursor: pointer; padding: 12px 14px; font-weight: 700; list-style: none; user-select: none; }
.patch-summary::-webkit-details-marker { display: none; }
.patch-summary::before { content: '▸ '; color: var(--muted); }
.patch-entry[open] .patch-summary::before { content: '▾ '; }
.patch-summary:hover { background: #f8fafc; }
.patch-content { padding: 0 16px 12px; }
.patch-content h1 { font-size: 18px; margin: 6px 0 10px; }
button.nav-btn.active { outline: 2px solid var(--blue); }
button.nav-btn.pink-nav { background: var(--pink-soft); color: #9d174d; }
button.nav-btn.pink-nav.active { background: var(--pink); color: #fff; }

.muted { color: var(--muted); font-size: 13px; }
.caption { color: var(--muted); font-size: 12px; line-height: 1.5; }

#createSaveStamp {
  margin-right: 6px;
  white-space: nowrap;
}
.hidden { display: none !important; }

.list {
  max-height: 480px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.list-item {
  padding: 10px 12px;
  border-bottom: 1px solid #edf2f7;
  cursor: pointer;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.list-item:last-child { border-bottom: 0; }
.list-item.active { background: #eff6ff; }
.list-item.dragging { opacity: 0.5; }

/* 카드 끌기 — 글자 선택 대신 드래그 */
#cardList .list-item[draggable="true"] {
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.item-title { font-size: 13px; font-weight: 700; }
.item-sub { font-size: 12px; color: var(--muted); }

.preview {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  white-space: pre-wrap;
  line-height: 2;
  font-size: 16px;
}

.preview-scroll {
  height: 520px;
  overflow-y: auto;
  overflow-x: hidden;
}

.preview-tall {
  min-height: 480px;
  max-height: 900px;
  overflow-y: auto;
}

/* 카드관리 상세 — 본문만 스크롤, 액션 버튼은 하단 고정 */
.manage-detail {
  display: flex;
  flex-direction: column;
  height: 600px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.manage-detail .detail-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
  line-height: 2;
  font-size: 16px;
  white-space: pre-wrap;
}
.manage-detail .detail-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.manage-detail .detail-empty {
  padding: 16px;
  color: #6b7280;
}

.blank-inline {
  display: inline;
  margin: 0 2px;
  padding: 0 2px 4px;
  border-bottom: 3px solid #94a3b8;
  font-weight: 700;
  color: #475569;
  border-radius: 6px 6px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.blank-inline.blank-shape,
.blank-field-shape {
  letter-spacing: normal;
  color: #64748b;
}

.blank-inline.blank-shape {
  font-weight: 600;
  border-bottom-style: dashed;
  border-bottom-width: 2px;
}

.blank-inline.study { cursor: pointer; border-bottom-color: var(--blue); background: #eff6ff; }
.blank-inline.revealed { color: var(--green); background: var(--green-soft); border-bottom-color: var(--green); }
.blank-inline.wrong-revealed { color: var(--green); background: #ecfccb; }
.blank-inline.current { outline: 3px solid #bfdbfe; }
.empty { color: var(--muted); font-style: italic; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  margin: 2px 4px 2px 0;
}

.flag { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.flag-0 { background: #d1d5db; }
.flag-1 { background: #ef4444; }
.flag-2 { background: #f97316; }
.flag-3 { background: #f59e0b; }
.flag-4 { background: #22c55e; }
.flag-5 { background: #06b6d4; }
.flag-6 { background: #3b82f6; }
.flag-7 { background: #8b5cf6; }

select.folder-select {
  width: 100%;
  font-size: 13px;
  line-height: 1.45;
  margin-top: 4px;
}

.filter-result-hint {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.35;
}

.filter-flag-picker { margin-top: 4px; margin-bottom: 4px; }
.filter-flag-picker .flag-pick.filter-flag-all {
  width: auto;
  min-width: 40px;
  height: 28px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
}

.flag-picker { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.flag-pick {
  padding: 0;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.flag-pick .flag { width: 16px; height: 16px; }
.flag-pick .flag-0 { box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px #d1d5db; background: #f3f4f6; }
.flag-pick:hover { border-color: #94a3b8; }
.flag-pick.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px #bfdbfe;
}

/* 칩(chip) 빈칸 에디터 */
.chip-editor {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  line-height: 1.9;
  background: #fff;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  overflow-x: hidden;
  overflow-y: auto;
  outline: none;
}
.chip-editor:empty::before {
  content: attr(data-placeholder);
  color: #9ca3af;
}
.chip-editor:focus { border-color: var(--blue); box-shadow: 0 0 0 2px #eff6ff; }

.cz-chip {
  display: inline;
  background: #eff6ff;
  color: #1d4ed8;
  border-bottom: 2px solid var(--blue);
  border-radius: 4px;
  padding: 1px 2px;
  font-weight: 700;
  /* 긴 칩이 칸을 밀지 않도록 줄바꿈만 허용 */
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.cz-chip-x {
  all: unset;
  cursor: pointer;
  color: #93c5fd;
  font-weight: 700;
  margin-left: 2px;
  padding: 0 2px;
}
.cz-chip-x:hover { color: var(--red); }
.cz-chip-active {
  background: #fde68a;
  border-bottom-color: #d97706;
  color: #92400e;
}

/* 호버 정답 엿보기 */
.blank-peek-gauge {
  position: absolute;
  z-index: 999;
  width: 20px;
  height: 20px;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.blank-peek-gauge.show {
  opacity: 1;
  transform: scale(1);
}

.blank-peek-gauge.ready {
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 0.1s ease, transform 0.1s ease;
}

.blank-peek-gauge svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.blank-peek-gauge__track {
  fill: none;
  stroke: #dbe4ef;
  stroke-width: 2.5;
}

.blank-peek-gauge__fill {
  fill: none;
  stroke: var(--blue);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 50.27;
  stroke-dashoffset: 50.27;
}

.blank-peek {
  position: absolute;
  z-index: 1000;
  padding: 4px 10px;
  background: #111827;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .18s ease, transform .18s ease;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.45;
  max-width: min(34rem, calc(100vw - 24px));
}
.blank-peek.show { opacity: .96; transform: translateY(0); }

/* 회독 자동 +1 알림 — 마지막 채점 빈칸 옆에서 위로 증발 */
.round-toast {
  position: absolute;
  z-index: 1001;
  padding: 4px 12px;
  background: var(--green);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.2px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(22, 163, 74, .35);
  pointer-events: none;
  white-space: nowrap;
  animation: round-toast-rise 1.2s ease-out forwards;
}

@keyframes round-toast-rise {
  0% { opacity: 0; transform: translateY(6px) scale(.9); }
  15% { opacity: 1; transform: translateY(0) scale(1); }
  70% { opacity: 1; transform: translateY(-4px) scale(1); }
  100% { opacity: 0; transform: translateY(-26px) scale(.96); }
}

@media (prefers-reduced-motion: reduce) {
  .round-toast { animation-duration: 1s; }
}

.slot {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fbfdff;
  margin-bottom: 8px;
}

.blank-chip-wrap {
  display: inline-flex;
  align-items: center;
  margin: 0 6px 6px 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  overflow: hidden;
}

.blank-chip-wrap .blank-chip {
  border: 0;
  border-radius: 0;
  margin: 0;
  cursor: pointer;
}

.blank-chip-wrap .blank-chip:hover { background: #eff6ff; }

.blank-slot-jump {
  border: 0;
  background: none;
  padding: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blank-slot-jump:hover { color: #1d4ed8; }

.blank-chip-remove {
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  padding: 5px 8px;
  font-size: 14px;
  line-height: 1;
  background: #fff;
  color: #991b1b;
  cursor: pointer;
}

.blank-chip-remove:hover { background: #fee2e2; }

.blank-toolbar { margin-top: 8px; }

.blank-slot { margin-bottom: 8px; }

.answer-readonly {
  padding: 6px 10px;
  border: 1px dashed var(--border, #d1d5db);
  border-radius: 8px;
  background: var(--bg-subtle, #f8fafc);
  color: var(--text, #111827);
  font-size: 14px;
  word-break: break-word;
}
.answer-readonly .empty { color: var(--muted, #9ca3af); font-style: italic; }

/* 빈칸별 동의어 — 주 정답 아래에 덧붙이는 보조 입력 */
.alias-input {
  width: 100%;
  margin-top: 4px;
  padding: 5px 10px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
}
.alias-input::placeholder { color: var(--muted, #9ca3af); }
.alias-input:focus {
  outline: none;
  border-color: var(--primary, #4f46e5);
}

.blank-chip {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  margin: 0 4px 4px 0;
}

.tree-root { display: flex; flex-direction: column; gap: 4px; min-height: 64px; }
.tree-node { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 6px 8px; }
.tree-node.active { background: #eff6ff; border-color: #93c5fd; }
.tree-node.drop-target { outline: 2px dashed var(--blue); background: #eff6ff; }
.tree-node.folder-dragging { opacity: 0.5; }
.folder-panel.drop-target-root {
  outline: 2px dashed var(--blue);
  background: rgba(239, 246, 255, 0.55);
}
.folder-breadcrumb .crumb.drop-target {
  background: rgba(37, 99, 235, 0.08);
  color: var(--blue, #2563eb);
  border-radius: 6px;
}
.tree-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tree-left { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; }
.tree-left[data-action="select-folder"] { cursor: pointer; }
.tree-left[data-drag-folder] { cursor: grab; }
.tree-label { min-width: 0; flex: 1; }
.tree-toggle { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line); background: #fff; font-size: 11px; cursor: pointer; flex-shrink: 0; }
.tree-title { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-meta { font-size: 11px; color: var(--muted); }
.tree-root,
.folder-breadcrumb { user-select: none; -webkit-user-select: none; }
.tree-children { margin: 4px 0 0 16px; display: flex; flex-direction: column; gap: 4px; }

.study-prompt { white-space: pre-wrap; line-height: 2.1; font-size: 17px; padding-bottom: 16px; }
.study-answer-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fbfdff; margin-bottom: 10px; scroll-margin-top: 12px; }
.study-answer-item.ok { background: var(--green-soft); border-color: #86efac; }
.study-answer-item.bad { background: var(--red-soft); border-color: #fca5a5; }
.study-answer-item.focus { outline: 3px solid #bfdbfe; }
.score-line { font-size: 12px; color: var(--muted); margin-top: 4px; }
.result-box { border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; padding: 10px 12px; font-size: 14px; font-weight: 700; margin: 8px 0; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow: auto;
  box-shadow: var(--shadow);
}

.modal h3 { margin-bottom: 12px; }

/* 확인·선택 모달 */
.choice-modal { max-width: 420px; text-align: center; }
.choice-modal h3 { margin-bottom: 6px; }
.choice-message { margin-bottom: 14px; white-space: pre-line; }
.choice-items {
  text-align: left;
  max-height: 220px;
  overflow: auto;
  margin: 0 0 14px;
  padding: 8px 12px 8px 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  font-size: 13px;
  line-height: 1.5;
}
.choice-items li { margin: 2px 0; }
.choice-actions { justify-content: center; gap: 8px; }
.choice-actions button { min-width: 96px; }
.choice-actions button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .45);
  outline-offset: 2px;
}

.outline-panel {
  margin: 10px 0 8px;
}

.outline-panel > label {
  display: block;
  margin-bottom: 6px;
}

.outline-summary-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

.outline-summary-panel--empty {
  padding: 14px 12px;
  background: var(--soft, #f8fafc);
  text-align: center;
}

.outline-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 13px;
}

.outline-summary-head-title {
  color: var(--text, #111827);
}

.outline-summary-tree {
  border: 1px solid #eef2f7;
  border-radius: 10px;
  padding: 6px 4px;
  background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
  max-height: none;
  overflow: auto;
}

.outline-summary-tree.is-collapsed {
  max-height: 220px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 75%, transparent);
  mask-image: linear-gradient(to bottom, #000 75%, transparent);
}

.outline-summary-tree.is-expanded {
  max-height: min(420px, 55vh);
  overflow: auto;
  -webkit-mask-image: none;
  mask-image: none;
}

.outline-summary-row {
  font-size: 13px;
}

.outline-summary-toggle {
  display: block;
  width: 100%;
  margin-top: 8px;
  text-align: center;
}

.outline-summary-actions {
  margin-top: 10px;
  flex-wrap: wrap;
  gap: 6px;
}

.outline-summary-pick {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
}

.outline-summary-status {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  min-width: 2.2em;
  text-align: center;
}

.outline-summary-status.is-blank {
  color: #166534;
  background: #dcfce7;
  border-radius: 6px;
  padding: 2px 6px;
}

.outline-help { line-height: 1.5; margin-bottom: 12px; }

.modal-wide { max-width: 880px; }

.outline-modal { max-height: 88vh; display: flex; flex-direction: column; }

.outline-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  flex: 1;
  min-height: 0;
}

@media (max-width: 720px) {
  .outline-split { grid-template-columns: 1fr; }
}

.outline-pane {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.outline-pane-preview {
  background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
  border-color: #c7d9f5;
}

.outline-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}

.outline-pane-hint {
  margin: 0 0 8px;
  line-height: 1.4;
}

.outline-tree-scroll {
  flex: 1;
  overflow: auto;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  padding: 6px 4px;
  background: rgba(255, 255, 255, 0.7);
  min-height: 160px;
}

.outline-tree-empty {
  padding: 12px 8px;
  text-align: center;
}

.outline-tree-node {
  padding-left: calc(var(--ol-level, 0) * 18px + 4px);
}

.outline-tree-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 4px;
  border-radius: 8px;
  font-size: 13px;
}

.outline-tree-check {
  flex-shrink: 0;
}

.outline-tree-line-num {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 11px;
  font-weight: 800;
  color: #7c3aed;
  background: #f3e8ff;
  padding: 2px 7px;
  border-radius: 6px;
  min-width: 3.2em;
  text-align: center;
}

.outline-tree-row:hover { background: rgba(37, 99, 235, 0.05); }

.outline-tree-row.is-new { background: #f0fdf4; }
.outline-tree-row.is-removed { opacity: 0.55; text-decoration: line-through; }

.outline-tree-badge {
  flex-shrink: 0;
  font-weight: 800;
  font-size: 12px;
  color: #1d4ed8;
  min-width: 2.2em;
}

.outline-tree-title-read {
  flex: 1;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}

.outline-tree-title {
  flex: 1 1 0;
  min-width: 3rem;
  width: auto;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #111827);
  background: #fff;
}

.outline-tree-line-input {
  flex-shrink: 0;
  width: 3.4em;
  padding: 2px 4px;
  border: 1px solid #e9d5ff;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #7c3aed;
  background: #f3e8ff;
  text-align: center;
  -moz-appearance: textfield;
}

.outline-tree-line-input::-webkit-outer-spin-button,
.outline-tree-line-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.outline-tree-check {
  flex-shrink: 0;
}

.outline-tree-del {
  flex-shrink: 0;
  padding: 2px 8px !important;
  line-height: 1;
}

.outline-pane-tools {
  margin-top: 10px;
  flex-wrap: wrap;
}

.outline-modal-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  justify-content: flex-end;
}

.candidate-list { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.candidate-row { display: flex; align-items: center; gap: 8px; padding: 6px 4px; font-size: 13px; border-bottom: 1px solid #f1f5f9; }

.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.stat .k { font-size: 11px; color: var(--muted); }
.stat .v { font-size: 22px; font-weight: 800; margin-top: 4px; }
code { background: #eef2ff; padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* 카드제작 — 문제/해설 분리 */
.create-split {
  display: grid;
  grid-template-columns: minmax(0, 4.5fr) minmax(0, 5.5fr);
  gap: 14px;
  margin-top: 12px;
}

.create-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: var(--soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.create-panel-foot {
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.create-panel-head {
  font-size: 15px;
  font-weight: 800;
  color: var(--blue);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 4px;
}
.create-panel-head.explanation { color: #7c3aed; }

.create-explanation-workspace,
.create-explanation-aside {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.create-explanation-label-row {
  align-items: center;
}

.create-explanation-label-row .create-explanation-label {
  margin: 0;
}

.create-explanation-focus-open {
  flex-shrink: 0;
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #c4b5fd;
}

.create-explanation-focus-open:hover {
  background: #ddd6fe;
}

.create-explanation-focus-close,
.create-explanation-focus-save {
  display: none;
}

/* 해설 집중 편집 — 기존 #explanationTemplate 를 화면 전체로 키운다 */
body.create-explanation-focus {
  overflow: hidden;
}

body.create-explanation-focus .create-explanation-panel {
  position: fixed;
  inset: 0;
  z-index: 400;
  border-radius: 0;
  border: 0;
  margin: 0;
  padding: 14px 16px 16px;
  background: var(--panel, #fff);
  box-sizing: border-box;
}

body.create-explanation-focus .create-explanation-focus-open {
  display: none;
}

body.create-explanation-focus .create-explanation-focus-close,
body.create-explanation-focus .create-explanation-focus-save {
  display: inline-block;
}

body.create-explanation-focus .create-explanation-aside,
body.create-explanation-focus .create-explanation-label-row {
  display: none;
}

body.create-explanation-focus .create-explanation-workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body.create-explanation-focus #explanationTemplate.xl {
  flex: 1;
  height: auto;
  min-height: 0;
  max-height: none;
  resize: none;
}

.explanation-prose {
  line-height: 1.65;
  margin-bottom: 14px;
  white-space: pre-wrap;
}

.blank-answer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.blank-answer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.blank-row-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  min-width: 52px;
}

/* 해설 인라인 빈칸 — 입력부 + 남은 ○○○ 마스크 (본문과 함께 줄바꿈) */
.explanation-body {
  position: relative;
  white-space: pre-wrap;
  line-height: 2.2;
  font-size: 16px;
  padding-bottom: 16px;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.blank-wrap {
  display: inline;
  white-space: normal;
  vertical-align: baseline;
  cursor: text;
  padding: 0 1px 4px 0;
  border-bottom: 2px dashed #94a3b8;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.blank-wrap:hover {
  background: rgba(37, 99, 235, 0.08);
  border-bottom-color: #93c5fd;
}

.blank-wrap:focus-within {
  background: #eff6ff;
  border-bottom: 2px solid var(--blue);
}

.blank-wrap:has(.blank-field.ok) {
  background: var(--green-soft);
  border-bottom: 2px solid var(--green);
}

.blank-wrap:has(.blank-field.bad) {
  background: var(--red-soft);
  border-bottom: 2px solid var(--red);
}

.blank-wrap:has(.blank-field.ok) .blank-field {
  color: var(--green);
}

.explanation-body .blank-field,
.blank-field {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: inherit;
  font-style: normal;
  font-weight: 600;
  letter-spacing: normal;
  line-height: inherit;
  vertical-align: baseline;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  outline: none;
  cursor: text;
  caret-color: var(--blue);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.blank-field.blank-field-shape {
  color: inherit;
}

.blank-rest {
  display: inline;
  color: #64748b;
  font-weight: 600;
  letter-spacing: normal;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  pointer-events: none;
  user-select: none;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/*
 * 채점 후 정답 표시 — 빈칸 아래 줄에 깐다.
 * 정답을 흐름 속 block 으로 두면 빈칸 뒤에 이어지던 본문("…입니다.")까지 다음 줄로 밀린다.
 * inline-flex 세로 배치는 첫 항목(빈칸)의 baseline 을 바깥에 물려주므로,
 * 정답은 아래로 내려가면서 본문은 빈칸 오른쪽에 그대로 남는다.
 */
/*
 * 정답이 놓일 자리만 흐름에 남기는 폭 0 자리표시자.
 * 정답을 흐름 속 block 으로 두면 빈칸 뒤에 이어지던 본문("…입니다.")까지 다음 줄로 밀리고,
 * 빈칸과 세로 flex 로 묶으면 빈칸이 원자 인라인이 되어 앞 문장과 줄이 끊긴다.
 * 폭이 0 이라 뒤 본문을 밀지 않고, 빈칸 끝에 붙으므로 여러 줄짜리 빈칸에서도 마지막 줄에 따라붙는다.
 * in-flow 줄상자가 없는 inline-block 은 아래 모서리가 baseline 이므로,
 * vertical-align 을 높이만큼 내리면 딱 그만큼만 줄 아래로 자리를 벌린다. 아랫줄과 겹치지 않는다.
 */
.blank-answer-holder {
  display: inline-block;
  width: 0;
  height: 28px;
  vertical-align: -28px;
  user-select: none;
  pointer-events: none;
}

/*
 * 배경은 두지 않는다. 빈칸이 색 배경을 쓰고 있어 둘이 같은 것으로 보인다.
 * 자리표시자가 폭 0 이라 그냥 두면 글자마다 줄이 바뀐다. max-content 로 한 줄을 기본으로 잡고,
 * layoutBlankAnswers 가 실제 남은 폭에 맞춰 left·max-width 를 다시 잡는다.
 */
.blank-answer {
  position: absolute;
  left: 0;
  top: 0;
  width: max-content;
  max-width: min(30rem, 100%);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--green);
  word-break: break-word;
  overflow-wrap: anywhere;
  pointer-events: none;
  visibility: hidden;
}

.blank-answer.is-placed {
  visibility: visible;
}

/* 채점 후 입력칸 안 글자 단위 대조 — 어긋난 글자만 빨강, 맞은 글자는 초록 */
/* 패널용 --green-soft 는 글자 단위 강조로는 너무 옅어 같은 계열을 진하게 깐다.
   좌우 패딩을 두면 「제2조」가 「제 2 조」처럼 벌어져 보이므로 세로만 준다. */
.bd-same,
.bd-diff,
.bd-extra,
.bd-space-extra {
  padding: 1px 0;
  border-radius: 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.bd-same { color: var(--green); background: rgba(22, 163, 74, 0.16); }
.bd-diff { color: var(--red); background: rgba(220, 38, 38, 0.16); }
.bd-extra {
  color: var(--red);
  background: rgba(220, 38, 38, 0.16);
  text-decoration: line-through;
  text-decoration-thickness: 0.9px;
}
.bd-skip { color: inherit; }

/* 첨삭: 띄어쓰기 빠짐 = ∧, 잘못 띈 곳 = 찡긋(호). 글자 폭은 차지하지 않는다. */
.bd-space-miss {
  display: inline-block;
  width: 0;
  position: relative;
  overflow: visible;
  vertical-align: baseline;
}

.bd-space-miss::before {
  content: '∧';
  position: absolute;
  left: -0.45em;
  bottom: -0.35em;
  color: var(--red);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}

.bd-space-extra {
  position: relative;
  color: inherit;
  background: rgba(220, 38, 38, 0.12);
}

.bd-space-extra::after {
  content: '‿';
  position: absolute;
  left: 50%;
  top: -0.7em;
  transform: translateX(-50%);
  color: var(--red);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

/* 정답 칸 전체를 초록으로 칠하는 위쪽 :has() 규칙(0,4,0)을 이겨야 빨강이 살아남는다 */
.blank-wrap:has(.blank-field.ok) .blank-field .bd-diff,
.blank-wrap:has(.blank-field.ok) .blank-field .bd-extra { color: var(--red); }

/* ── 알파 테스터 관문 (로그인보다 위) ── */
.alpha-gate-overlay {
  z-index: 3200;
}

.alpha-gate-card .auth-lead {
  margin-bottom: 4px;
}

body.alpha-locked {
  overflow: hidden;
}

/* ── 인증 오버레이 ── */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

.auth-overlay.hidden { display: none !important; }

.auth-card {
  width: min(100%, 440px);
  max-height: min(92vh, 720px);
  overflow: auto;
  background: #fff;
  border: 2px solid var(--primary);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
  padding: 28px 28px 24px;
}

.auth-header { margin-bottom: 18px; text-align: center; }

.auth-header h2 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
}

.auth-lead {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.auth-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 10px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.auth-tab:hover { border-color: #93c5fd; transform: translateY(-1px); }

.auth-tab-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.auth-tab-desc {
  font-size: 12px;
  color: var(--muted);
}

.auth-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.auth-tab.active .auth-tab-title,
.auth-tab.active .auth-tab-desc {
  color: #fff;
}

.auth-feedback {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.auth-feedback.hidden { display: none !important; }

.auth-feedback-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.auth-feedback-success {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.auth-panel-guide {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.55;
}

.auth-panel-guide-accent {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.auth-panel-guide ol {
  margin: 8px 0 0;
  padding-left: 20px;
}

.auth-panel-guide li { margin-bottom: 4px; }

.auth-empty-hint {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 13px;
}

.auth-empty-hint.hidden { display: none !important; }

.auth-security-note {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.auth-name-block {
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 14px;
  background: #fff;
  border: 2px solid #bfdbfe;
}

.auth-name-block label {
  margin-top: 0 !important;
}

.auth-saved-accounts {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.auth-card label {
  display: block;
  margin-top: 10px;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.auth-card input,
.auth-card select {
  width: 100%;
  font-size: 15px;
  padding: 10px 12px;
}

.auth-submit { width: 100%; margin-top: 16px; }

.auth-submit-lg {
  padding: 14px 16px !important;
  font-size: 16px !important;
  font-weight: 800 !important;
}

.auth-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.user-badge {
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--soft);
  border: 1px solid var(--line);
}

body.auth-locked .app,
body.auth-locked .topbar,
body.auth-locked .sidebar-toggle {
  pointer-events: none;
  user-select: none;
  filter: blur(3px) saturate(0.85);
}

@media (max-width: 1100px) {
  .create-split { grid-template-columns: 1fr; }
}
