:root {
  color-scheme: light;
  --ink: #1d1c1d;
  --muted: #616061;
  --line: #d7d4d8;
  --panel: #ffffff;
  --page: #f6f4f1;
  --green: #007a5a;
  --green-dark: #00664f;
  --blue: #1264a3;
  --gold: #e8a700;
  --rose: #d92d62;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: Arial, "Noto Sans KR", sans-serif;
}

@keyframes spring-in-modal {
  0%   { opacity: 0; transform: scale(0.88) translateY(-20px); }
  55%  { transform: scale(1.035) translateY(4px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes card-spring-in {
  0%   { opacity: 0; transform: translateY(14px) scale(0.96); }
  55%  { transform: translateY(-3px) scale(1.008); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.notice-preview-block {
  margin-top: 12px;
}

.notice-preview {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notice-preview[hidden] {
  display: none;
}

.notice-preview-msg {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--muted);
}

.notice-preview.warn .notice-preview-msg {
  color: var(--gold);
}

.notice-preview.error .notice-preview-msg {
  color: var(--rose);
}

.notice-preview-warn {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--gold);
  background: color-mix(in srgb, var(--gold) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
  border-radius: 6px;
  padding: 6px 10px;
}

.notice-preview-stale-banner {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  padding: 7px 12px;
}

.notice-preview-stale-banner[hidden] { display: none; }

.notice-preview-info {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
  background: color-mix(in srgb, var(--muted) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--muted) 20%, transparent);
  border-radius: 6px;
  padding: 6px 10px;
}

.notice-preview-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px 12px;
  animation: card-spring-in 0.35s var(--spring) both;
}

.notice-preview .notice-preview-card:nth-child(1) { animation-delay: 0ms; }
.notice-preview .notice-preview-card:nth-child(2) { animation-delay: 60ms; }
.notice-preview .notice-preview-card:nth-child(3) { animation-delay: 120ms; }
.notice-preview .notice-preview-card:nth-child(4) { animation-delay: 180ms; }
.notice-preview .notice-preview-card:nth-child(5) { animation-delay: 240ms; }
.notice-preview .notice-preview-card:nth-child(6) { animation-delay: 300ms; }
.notice-preview .notice-preview-card:nth-child(7) { animation-delay: 360ms; }
.notice-preview .notice-preview-card:nth-child(8) { animation-delay: 420ms; }

.notice-preview-card header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.notice-preview-ch {
  font-weight: 700;
  color: var(--blue);
}

.notice-preview-title {
  font-weight: 600;
}

.notice-preview-pin-toggle {
  font-size: 11px;
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 7px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.notice-preview-pin-toggle:hover {
  background: var(--panel);
  color: var(--ink);
}

.notice-preview-pin-toggle.is-pinned {
  background: var(--green-light, #e8f5f0);
  border-color: var(--green);
  color: var(--green-dark, #006644);
  font-weight: 600;
}

.notice-preview-badge {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 8px;
}

.notice-preview-card header .notice-preview-reset {
  margin-left: auto;
}

.button-link {
  background: none;
  border: none;
  color: var(--blue);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

/* "더 보기" 안내 옵션 — 드롭다운 목록 안에 자연스럽게 끼워 넣어(별도 버튼 대신) 실제
   워크스페이스와 구분되도록 스타일만 다르게 준다(선택 시 로직에서 원래 값으로 되돌림). */
option.workspace-more-option {
  color: var(--blue, #2563eb);
  font-style: italic;
}

.notice-preview-edit {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  font-family: "Noto Sans KR", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  min-height: 120px;
}

.notice-preview-edit:focus {
  outline: 2px solid var(--blue);
  background: var(--panel);
}

.runner-progress {
  margin: 12px 0 8px;
}

.runner-progress[hidden] {
  display: none;
}

.runner-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.runner-progress-head #runnerProgressPercent {
  color: var(--green);
}

.notice-preview-extra-section {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.notice-preview-extra-label {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 10px;
}

.notice-preview-extra-label small {
  font-weight: 400;
  color: var(--muted);
}

.notice-preview-card-extra {
  border-style: dashed;
  background: transparent;
  opacity: 0.75;
  transition: opacity 0.15s;
}

.notice-preview-card-extra:focus-within {
  opacity: 1;
  border-style: solid;
  background: var(--panel);
}

.notice-preview-card-extra .notice-preview-edit {
  min-height: 80px;
}

.runner-progress-eta {
  margin-left: auto;
  margin-right: 10px;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-muted, #888);
}

.runner-progress-track {
  width: 100%;
  height: 14px;
  background: #e9e6e2;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.runner-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--green), #00a37a);
  border-radius: 999px;
  transition: width 0.5s ease;
}

.runner-progress.is-complete .runner-progress-fill {
  background: linear-gradient(90deg, var(--green-dark), var(--green));
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--page);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 28px 40px;
  background: #3f0e40;
  color: #fff;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.topbar-guide-btn {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.topbar-guide-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ── 사용 가이드 dialog ── */

.manual-dialog {
  border: none;
  border-radius: 12px;
  padding: 0;
  width: min(780px, 95vw);
  max-height: 88vh;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.22);
}

.manual-dialog[open] {
  display: flex;
  flex-direction: column;
  animation: spring-in-modal 0.4s var(--spring) both;
}

.manual-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.manual-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.manual-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 24px 16px;
  background: #3f0e40;
  color: #fff;
  flex-shrink: 0;
}

.manual-eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #f4c430;
  letter-spacing: 0.04em;
}

.manual-title {
  margin: 0;
  font-size: 20px;
  color: #fff;
}

.manual-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.manual-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.manual-nav {
  display: flex;
  gap: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
  flex-shrink: 0;
}

.manual-nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.manual-nav-link:hover {
  color: var(--ink);
  border-bottom-color: var(--line);
}

.manual-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px 28px 36px;
  background: var(--page);
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.manual-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.manual-section-title {
  margin: 0;
  font-size: 17px;
  color: var(--ink);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--line);
}

.manual-section-lead {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.manual-steps-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: manual-step;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.manual-steps-list > li {
  counter-increment: manual-step;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  position: relative;
  padding-left: 52px;
}

.manual-steps-list > li::before {
  content: counter(manual-step);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 24px;
  height: 24px;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.manual-steps-list > li h4 {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--ink);
}

.manual-steps-list > li p {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

.manual-steps-list > li ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.manual-steps-list > li ul li {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
}

.manual-role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 580px) {
  .manual-role-grid {
    grid-template-columns: 1fr;
  }
}

.manual-role-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
}

.manual-role-card h4 {
  margin: 0 0 2px;
  font-size: 14px;
  color: var(--ink);
}

.manual-role-sub {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--blue);
  font-weight: 600;
}

.manual-role-card ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.manual-role-card ul li {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
}

.manual-role-bot {
  border-top: 3px solid var(--green);
}

.manual-role-ops {
  border-top: 3px solid var(--blue);
}

.manual-notice-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.manual-notice-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  padding: 12px 14px;
}

.manual-notice-item--highlight {
  background: color-mix(in srgb, #4a154b 6%, transparent);
  border-color: color-mix(in srgb, #4a154b 25%, transparent);
  border-left-color: #4a154b;
}

.manual-notice-item dt {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.manual-notice-item dd {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.topbar .eyebrow {
  color: #f4c430;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 34px;
  line-height: 1.2;
}

h2 {
  margin-bottom: 12px;
  font-size: 24px;
  line-height: 1.25;
}

h3 {
  margin-bottom: 8px;
  font-size: 17px;
}

p {
  color: var(--muted);
  line-height: 1.6;
}

.page-layout {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
}


.layout {
  flex: 1;
  min-width: 0;
  padding: 28px 0 56px 20px;
}

.panel,
.step {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 1px 8px rgba(0,0,0,0.03);
}

.panel {
  padding: 28px;
  margin-bottom: 18px;
}

.intro {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.install-guard {
  display: grid;
  gap: 7px;
  max-width: 720px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #ead58b;
  border-radius: 8px;
  background: #fff8db;
}

.install-guard label {
  color: var(--ink);
  font-weight: 800;
}

.install-guard input {
  width: 100%;
  min-height: 42px;
  padding: 10px 11px;
  border: 1px solid #d6d1c7;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.install-guard small {
  color: #7c5b00;
  line-height: 1.45;
}

.bot-install-row {
  margin-top: 16px;
}

.bot-install-panel > summary {
  font-weight: 700;
  cursor: pointer;
  color: var(--ink);
  list-style: none;
  user-select: none;
}
.bot-install-panel > summary::-webkit-details-marker { display: none; }
.bot-install-panel > summary::before { content: '▶ '; font-size: 11px; color: var(--muted, #888); }
.bot-install-panel[open] > summary::before { content: '▼ '; }

/* 보안 탭의 "사용할 때만 펼치는" 섹션들(라벨 관리, 워크스페이스 선택+비밀번호) 공용 — 내용이
   많은 기능을 기본은 접어두고, 열면 기존 크기 그대로 보이게 한다(사용자 요청: 평소엔 접어둬서
   화면을 덜 차지하고, 필요할 때만 펼쳐 쓰게). */
.collapsible-panel > summary {
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
  color: var(--ink);
  list-style: none;
  user-select: none;
}
.collapsible-panel > summary::-webkit-details-marker { display: none; }
.collapsible-panel > summary::before { content: '▶ '; font-size: 12px; color: var(--muted, #888); }
.collapsible-panel[open] > summary::before { content: '▼ '; }
.collapsible-panel > summary + * {
  margin-top: 16px;
}

/* .button의 display:inline-flex가 [hidden] 속성보다 우선순위가 높아, .button 요소를
   JS로 .hidden = true 해도 안 사라지는 문제 방지(같은 클래스명+속성 조합이라 specificity가
   더 높은 [hidden] 규칙으로 항상 이겨야 함). */
.button[hidden] {
  display: none;
}

.button {
  appearance: none;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid #8d8d8d;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s,
              transform 0.28s var(--spring), box-shadow 0.28s var(--spring);
}

.button:hover:not(:disabled) {
  transform: none;
  background: #f6f4f1;
  box-shadow: none;
}

.button:active:not(:disabled) {
  transform: scale(0.94);
  transition: transform 0.09s ease, box-shadow 0.09s ease,
              background 0.18s, border-color 0.18s, color 0.18s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.button.primary {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.button.primary:hover {
  background: var(--green-dark);
}

.button.ghost {
  color: var(--blue);
}

.button.danger {
  background: var(--rose);
  color: #fff;
  border-color: var(--rose);
}
.button.danger:hover { background: #b5224f; border-color: #b5224f; }

.button.small {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 14px;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

/* ── 입력 필드 공통 ──────────────────────────────────── */
.text-input {
  appearance: none;
  display: block;
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #8d8d8d;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.text-input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.07);
}

select.text-input {
  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 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

textarea.text-input {
  min-height: unset;
  resize: vertical;
  line-height: 1.5;
}

.status {
  min-width: 132px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.status.ok {
  background: #def7ec;
  color: #03543f;
}

.status.warn {
  background: #fff8db;
  color: #7c5b00;
}

.steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.step {
  min-height: 160px;
  padding: 16px 18px;
}

.step span {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 50%;
  background: #e8f5ff;
  color: var(--blue);
  font-weight: 800;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.deadline {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff8db;
  color: #7c5b00;
  font-size: 14px;
  font-weight: 800;
}

.template-note {
  margin: -6px 0 18px;
  color: var(--muted);
}

.runner-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

/* display:grid는 [hidden] 속성보다 우선순위가 높아 hidden=true여도 안 사라지므로,
   더 높은 [hidden] 규칙으로 항상 이겨야 함(다른 [hidden] 오버라이드와 동일 패턴). */
.runner-form label[hidden] {
  display: none;
}

.runner-form label {
  display: grid;
  gap: 7px;
  align-self: start;
  align-content: start;
  grid-auto-rows: min-content;
  color: var(--ink);
  font-weight: 700;
}

.optional-label {
  display: inline-block;
  margin-left: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field-help {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

.runner-form label.is-disabled {
  color: #7c5b00;
}

.runner-form label.is-disabled input {
  border-color: #ead58b;
  background: #f4f1e8;
  color: #8a8172;
  cursor: not-allowed;
}

.runner-form label.is-disabled .field-help {
  color: #7c5b00;
}

.auto-link-note {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #bfdccf;
  border-radius: 8px;
  background: #f0fff7;
  color: #03543f;
}

.auto-link-note span {
  color: #03543f;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

.decision-pill {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid #d6d1c7;
  border-radius: 999px;
  background: #f8f6f1;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.decision-pill.include {
  border-color: #bfdccf;
  background: #def7ec;
  color: #03543f;
}

.decision-pill.exclude {
  border-color: #ead58b;
  background: #fff8db;
  color: #7c5b00;
}

.runner-form input,
.runner-form select,
.runner-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

.runner-form textarea {
  resize: vertical;
}

.runner-form .span-2 {
  grid-column: span 2;
}

@media (max-width: 640px) {
  .runner-form .span-2 {
    grid-column: 1 / -1;
  }
}

.runner-form .wide,
.runner-details {
  grid-column: 1 / -1;
}

.operator-access {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid #bfdccf;
  border-radius: 8px;
  background: #f7fffb;
}

.operator-access legend {
  padding: 0 4px;
  color: #03543f;
  font-weight: 800;
}

.operator-access .field-help {
  margin: 0;
}

.operator-access-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.operator-input-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.operator-input-line {
  display: flex;
  gap: 10px;
  align-items: center;
}

.operator-input-line input {
  flex: 1 1 auto;
  width: auto;
  min-height: 42px;
}

.operator-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 42px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.operator-list-empty {
  color: var(--muted);
  font-size: 13px;
}

.operator-chip {
  display: inline-flex;
  overflow: hidden;
  align-items: center;
  border: 1px solid #c9d8d1;
  border-radius: 999px;
  background: #edfdf5;
}

.operator-chip code {
  margin: 0;
  border-radius: 999px 0 0 999px;
  background: transparent;
  color: #03543f;
  font-weight: 800;
}

.operator-chip button {
  min-height: 28px;
  padding: 0 9px;
  border: 0;
  border-left: 1px solid #c9d8d1;
  background: #fff;
  color: #03543f;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.operator-chip button:hover {
  background: #def7ec;
}

.operator-access-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.invite-group {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 10px;
}

.invite-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.invite-group-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.invite-group-emails {
  width: 100%;
}

.invite-group-email-preview {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 0;
}

.invite-group-email-preview[hidden] {
  display: none;
}

.invite-group-channels {
  margin-top: 8px;
}

.invite-group-channel-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 4px;
}

.bookmark-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 8px;
}

.bookmark-row .bookmark-channel { flex: 1 1 150px; min-height: 40px; }
.bookmark-row .bookmark-emoji { flex: 0 0 130px; min-height: 40px; }
.bookmark-row .bookmark-title { flex: 1 1 180px; min-height: 40px; }
.bookmark-row .bookmark-link { flex: 2 1 240px; min-height: 40px; }
.bookmark-row .bookmark-link.link-invalid { border-color: var(--warn, #d29922); background: rgba(210,153,34,0.06); }
.bookmark-row .bookmark-link.link-valid { border-color: var(--green); background: var(--green-light, #e8f5f0); }

.operator-add-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.operator-add-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.operator-add-label {
  font-size: 13px;
  color: var(--muted);
  min-width: 56px;
}

.operator-role-group {
  margin-bottom: 16px;
}

.operator-role-group h4 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.operator-course-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  margin-right: 4px;
  background: #e6f0ff;
  color: #2451b8;
}

.bookmark-row-empty {
  color: var(--muted);
  font-size: 13px;
  padding: 6px 0;
}

.operator-status.ok {
  color: #03543f;
  font-weight: 700;
}

.operator-status.warn {
  color: #7c5b00;
  font-weight: 700;
}

.operator-status.error {
  color: #8a1238;
  font-weight: 700;
}

/* ── 강사/리더 다중 입력 ── */
.instructor-list-field {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfb;
}

.instructor-list-field legend {
  padding: 0 4px;
  font-weight: 800;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}

.instructor-list-field legend .optional-label {
  font-weight: 400;
  font-size: 12px;
}

#instructorList {
  display: grid;
  gap: 6px;
}

.instructor-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.instructor-row .instructor-name-input {
  flex: 1;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
}

.instructor-row .instructor-name-input:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.instructor-remove-btn {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  border: 1px solid #e0b4c0;
  border-radius: 6px;
  background: #fff5f7;
  color: var(--rose);
  cursor: pointer;
  transition: background 0.15s;
}

.instructor-remove-btn:hover:not(:disabled) {
  background: #ffe4eb;
}

.instructor-remove-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.channel-picker {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfb;
}

.channel-picker legend {
  padding: 0 4px;
  font-weight: 800;
}

.channel-picker .field-help {
  margin: 0;
}

.channel-option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.runner-form .channel-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 78px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.runner-form .channel-option input {
  width: auto;
  min-height: auto;
  margin-top: 3px;
}

.channel-option strong,
.channel-option small {
  display: block;
}

.channel-option strong {
  line-height: 1.35;
}

.channel-option small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}

.runner-details {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfb;
}

.runner-details summary {
  cursor: pointer;
  font-weight: 800;
}

.runner-details label {
  margin-top: 12px;
}

.run-keep-open-notice {
  display: grid;
  gap: 6px;
  padding: 13px 15px;
  border: 1px solid #efc24a;
  border-radius: 8px;
  background: #fff7d8;
  color: #5f4600;
  line-height: 1.55;
}

.run-keep-open-notice strong {
  font-size: 15px;
}

.run-keep-open-notice ul {
  margin: 0;
  padding-left: 19px;
  color: #6d5200;
}

.run-keep-open-notice li + li {
  margin-top: 2px;
}

.runner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.inline-check {
  display: inline-flex !important;
  gap: 8px !important;
  align-items: center;
  align-self: center !important;
  color: var(--muted) !important;
}

.inline-check input {
  width: auto;
  min-height: auto;
}

.session-recovery-banner {
  margin-top: 14px;
  margin-bottom: 20px; /* 아래 칸(실행 키 등)과 정상 필드 간격(20px)만큼 띄운다 — 붙어 보이던 문제 해결 */
  padding: 14px 16px;
  border: 1px solid #ecc94b;
  border-left: 4px solid #d69e2e;
  border-radius: 10px;
  background: #fffbeb;
  color: #5f4600;
  font-size: 13px;
  line-height: 1.6;
}
/* ⚠️ display:flex는 반드시 :not([hidden])에만 붙인다 — base 셀렉터에 두면 hidden 속성을 덮어써
   JS가 hidden=true로 정확히 설정해도 화면엔 계속 보인다("불러오기/닫기 눌러도 안 사라짐" 근본원인).
   같은 실수를 <dialog>에서도 한 적 있음(전역 CLAUDE.md 피드백 메모 참고). */
.session-recovery-banner:not([hidden]) {
  /* 텍스트(문구+안내)는 왼쪽, 버튼은 오른쪽. 좁으면 세로로 자동 전환. */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 20px;
  flex-wrap: wrap;
}

.session-recovery-body {
  flex: 1 1 340px;
  min-width: 0;
}

.session-recovery-title {
  margin: 0 0 4px;
  font-weight: 700;
  font-size: 13px;
}

.session-recovery-body #lastPayloadMsg {
  margin: 0;
  font-weight: 500;
}

.session-recovery-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
  align-items: center;
}

/* 안내문은 문구 아래 각주처럼. 노란 배경엔 회색 대신 갈색이 잘 읽힌다. */
.session-recovery-banner .field-help {
  display: block;
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid #f0dfa0;
  color: #8a6d1f;
  font-size: 12px;
  line-height: 1.6;
}

.runner-result {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfb;
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-wrap;
}

.runner-result.ok {
  border-color: #b7e4d1;
  background: #f0fff7;
  color: #03543f;
}

.runner-result.warn {
  border-color: #f5d46b;
  background: #fff8db;
  color: #5f4600;
}

.runner-result.error {
  border-color: #f3b5c7;
  background: #fff1f5;
  color: #8a1238;
}

.template-groups {
  display: grid;
  gap: 16px;
}

.template-group {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.template-group.secondary {
  background: #fbfbfb;
}

.template-group-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: baseline;
  margin-bottom: 12px;
}

.template-group-head strong,
.template-group-head span {
  display: block;
}

.template-group-head strong {
  font-size: 17px;
}

.template-group-head span {
  color: var(--muted);
  line-height: 1.5;
}

.template-card-grid {
  display: grid;
  gap: 12px;
}

.template-card-grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.template-card-grid.template-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.template-paths {
  display: grid;
  gap: 12px;
}

.template-path {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.template-path.active {
  border-color: var(--ink);
}

.path-label strong,
.path-label span {
  display: block;
}

.path-label strong {
  margin-bottom: 6px;
  font-size: 16px;
}

.path-label span {
  color: var(--muted);
  line-height: 1.5;
}

.path-body {
  display: grid;
  gap: 12px;
}

.subtemplate-group {
  padding: 12px;
  border: 1px solid #e8e6e8;
  border-radius: 8px;
  background: #fff;
}

.subtemplate-group > strong {
  display: block;
  margin-bottom: 10px;
}

.future-note {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed #b7b1bb;
  border-radius: 8px;
  background: #fff;
}

.future-note strong {
  color: var(--blue);
}

.future-note span {
  color: var(--muted);
  line-height: 1.5;
}

.handoff-item {
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfb;
}

.handoff-item.active {
  border-color: var(--ink);
}

.handoff-item strong,
.handoff-item span {
  display: block;
}

.handoff-item strong {
  margin-bottom: 8px;
}

.handoff-item span {
  color: var(--muted);
  line-height: 1.5;
}

.handoff-checks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.check-card {
  min-height: 126px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfb;
}

.check-card strong,
.check-card span {
  display: block;
}

.check-card strong {
  margin-bottom: 10px;
}

.archive-group {
  margin-bottom: 20px;
}
.archive-group:last-child {
  margin-bottom: 0;
}
.archive-group-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted, #888);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.check-card span {
  color: var(--muted);
  line-height: 1.55;
}

/* 기수 아카이브 항목은 한 줄 정보(회차+저장일시)라 기본 check-card의 큰 높이(126px)가 과하다 → 축소 */
.archive-group .check-card {
  min-height: 0;
  padding: 10px 14px;
}
.archive-group .check-card strong {
  margin-bottom: 2px;
}

.notice {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #f5d46b;
  border-radius: 8px;
  background: #fff8db;
  color: #5f4600;
  line-height: 1.6;
}

.console-help {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid #cfe4f5;
  border-radius: 8px;
  background: #f7fbff;
}

.console-help strong {
  display: block;
  margin-bottom: 8px;
}

.console-help p {
  margin-bottom: 12px;
}

.console-help ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.55;
}

.console-help li + li {
  margin-top: 6px;
}

.operator-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.operator-link-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 210px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfb;
}

.operator-link-card strong,
.operator-link-card span {
  display: block;
}

.operator-link-card strong {
  font-size: 17px;
}

.operator-link-card span {
  color: var(--muted);
  line-height: 1.55;
}

.operator-link-card .button {
  align-self: end;
}

.oauth-warning {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #f5d46b;
  border-radius: 8px;
  background: #fff8db;
}

.oauth-warning strong {
  margin: 0;
  color: #5f4600;
  font-size: 15px;
}

.oauth-warning span {
  color: #5f4600;
  font-size: 14px;
}

.oauth-warning code {
  display: block;
  padding: 10px;
  border: 1px solid #edd482;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-details {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-details summary {
  cursor: pointer;
  font-weight: 800;
}

.admin-details p {
  margin: 12px 0;
}

.admin-actions {
  margin-bottom: 12px;
}

.flow-diagram {
  display: grid;
  gap: 12px;
}

.flow-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr) 24px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.flow-node {
  min-height: 84px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.flow-node.accent {
  border-color: #8ac4f2;
  background: #eef7ff;
}

.flow-node strong,
.flow-node span {
  display: block;
}

.flow-node strong {
  margin-bottom: 6px;
}

.flow-node span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.flow-arrow {
  color: var(--blue);
  text-align: center;
  font-weight: 900;
}

.settings-list {
  display: grid;
  gap: 12px;
}

.setting-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1.1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfb;
}

.setting-row strong,
.setting-row span {
  display: block;
}

.setting-row strong {
  margin-bottom: 6px;
}

.setting-row span {
  color: var(--muted);
  line-height: 1.45;
}

.execution-log-date-group {
  display: grid;
  gap: 8px;
}

.execution-log-date-group + .execution-log-date-group {
  margin-top: 20px;
}

.execution-log-date-heading {
  font-weight: 800;
  margin: 0;
  color: var(--muted);
}

.execution-log-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfb;
}

.execution-log-row strong,
.execution-log-row span {
  display: block;
}

.execution-log-row strong {
  margin-bottom: 6px;
}

.execution-log-row span {
  color: var(--muted);
  line-height: 1.45;
}

code {
  display: block;
  padding: 10px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #f6f8fa;
  color: #24292f;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.scope-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.scope-card {
  min-height: 250px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfb;
}

.scope-card-muted {
  background: #f6f4f1;
}

.scope-card-accent {
  border-color: #cfe4f5;
  background: #f7fbff;
}

.feedback-item {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 8px;
  background: #fff;
}
.feedback-item.resolved {
  opacity: 0.7;
  border-left: 3px solid var(--ok, #4caf50);
  padding-left: 9px;
}
.feedback-item-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.feedback-item-content {
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-word;
}
.feedback-item-resolution {
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--ok-bg, #eef8ef);
  color: var(--ok-ink, #2e6b34);
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}
/* .feedback-resolve-form도 display:flex를 직접 갖고 있어 [hidden]보다 우선순위가 높다 —
   .button과 같은 원인의 같은 버그. 이 규칙이 없으면 클릭 전부터 코멘트 입력창이 이미
   펼쳐진 채로 보인다. */
.feedback-resolve-form[hidden] {
  display: none;
}
.feedback-resolve-form {
  margin-top: 8px;
  width: 100%;
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.feedback-resolve-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.badge-ok { background: #d4f5e9; color: var(--green-dark); }

.scope-title {
  margin-bottom: 12px;
}

.scope-title strong,
.scope-title span {
  display: block;
}

.scope-title strong {
  margin-bottom: 5px;
  font-size: 17px;
}

.scope-title span {
  color: var(--blue);
  font-weight: 800;
}

.scope-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.55;
}

.scope-card li + li {
  margin-top: 5px;
}

.item {
  min-height: 108px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfb;
}

.item strong,
.item span {
  display: block;
}

.item strong {
  margin-bottom: 8px;
}

.item span {
  color: var(--muted);
  line-height: 1.5;
}

table {
  width: 100%;
  border-collapse: collapse;
}

.reference-table-wrap {
  overflow-x: auto;
}

code {
  display: inline-block;
  margin: 0 4px 5px 0;
  padding: 2px 5px;
  border-radius: 4px;
  background: #f4f4f4;
  color: #454245;
  font-size: 13px;
}

.channel-chip {
  display: inline-block;
  margin: 0 6px 7px 0;
  padding: 4px 8px;
  border: 1px solid #d8dee4;
  border-radius: 6px;
  background: #f6f8fa;
  color: #24292f;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

th,
td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: #454245;
  font-size: 14px;
}

td {
  color: var(--muted);
  line-height: 1.5;
}

td:first-child {
  color: var(--ink);
  font-weight: 700;
}

dl {
  margin: 0;
}

dl div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

dl div:last-child {
  border-bottom: 0;
}

dt {
  font-weight: 700;
}

dd {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

@media (max-width: 880px) {
  .layout {
    padding-left: 0;
  }

  .topbar,
  .intro,
  .section-head {
    display: block;
  }

  .status {
    margin-top: 16px;
  }

  .actions {
    justify-content: flex-start;
  }

  .steps,
  .grid,
  .scope-grid,
  .runner-form,
  .channel-option-grid,
  .template-card-grid.template-list,
  .handoff-checks,
  .operator-link-grid {
    grid-template-columns: 1fr 1fr;
  }

  .console-help {
    grid-template-columns: 1fr;
  }

  .operator-input-line {
    flex-wrap: wrap;
  }

  .setting-row {
    grid-template-columns: 1fr;
  }

  .topbar-actions { flex-wrap: wrap; row-gap: 8px; }
}

@media (max-width: 640px) {
  .topbar {
    padding: 22px 18px;
  }

  .layout {
    padding: 18px 12px 36px;
  }

  h1 {
    font-size: 28px;
  }

  .panel {
    padding: 20px;
  }

  .steps,
  .grid,
  .scope-grid,
  .runner-form,
  .channel-option-grid,
  .template-card-grid.two-up,
  .template-card-grid.template-list,
  .handoff-checks,
  .operator-link-grid {
    grid-template-columns: 1fr;
  }

  .template-group-head {
    display: block;
  }

  .template-path {
    grid-template-columns: 1fr;
  }

  .flow-row {
    grid-template-columns: 1fr;
  }

  .flow-arrow {
    transform: rotate(90deg);
  }

  dl div {
    grid-template-columns: 1fr;
  }
}

/* ── 채널-공지 라우팅 (고급 설정) ── */
.routing-details {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfb;
}

/* 공지별 게시 채널(라우팅) — 고급 설정으로 접어둠(보통 자동 기본값이면 충분). */
.notice-routing-advanced {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfb;
}
.notice-routing-summary {
  cursor: pointer;
  display: block;            /* summary 기본 list-item 마커 제거(브라우저 호환) — 커스텀 ▸ 화살표 사용 */
  padding: 10px 12px;
  font-size: 0.9em;
  font-weight: 600;
  color: var(--text, #333);
  list-style: none;
  user-select: none;
}
.notice-routing-summary::-webkit-details-marker { display: none; }
.notice-routing-summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  color: var(--muted, #888);
  transition: transform 0.15s ease;
}
.notice-routing-advanced[open] > .notice-routing-summary::before { transform: rotate(90deg); }
.notice-routing-summary .routing-adv-hint { font-weight: 400; color: var(--muted, #888); font-size: 0.92em; }
/* 접기 안에서는 내부 박스의 테두리/배경/여백을 제거(이중 박스 방지). */
.notice-routing-advanced > .notice-routing-inline {
  border: 0;
  background: transparent;
  border-radius: 0;
  margin-bottom: 0;
  padding: 0 12px 12px;
}

.notice-routing-inline {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfb;
  margin-bottom: 12px;
}

.notice-routing-inline > .field-help {
  margin: 0 0 10px;
}

.routing-details summary {
  cursor: pointer;
  font-weight: 800;
}

.routing-details .field-help {
  margin: 8px 0 10px;
}

.routing-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.routing-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.routing-row select {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
  font-size: 14px;
}

/* ── 실행 키 도움말 아이콘 & 툴팁 ── */
.field-label-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.help-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.help-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--line);
  border: none;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  vertical-align: middle;
  margin-left: 4px;
}
.help-icon-btn:hover { background: var(--blue); color: #fff; }

.help-tooltip {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 200;
  min-width: 260px;
  padding: 8px 12px;
  background: #fff8e1;
  border: 1px solid var(--gold);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  font-weight: 400;
}

/* ── 링크 배치 안내 ── */
.link-guide-details {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfb;
}

.link-guide-details summary {
  cursor: pointer;
  font-weight: 800;
  padding: 0 4px;
}

.link-guide-details summary::-webkit-details-marker {
  margin-right: 8px;
}

.link-guide-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.link-guide-table thead {
  background: #f8f6f1;
}

.link-guide-table th {
  padding: 12px 10px;
  border-bottom: 2px solid var(--line);
  text-align: left;
  font-weight: 700;
  color: var(--ink);
}

.link-guide-table td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.link-guide-table td:first-child {
  color: var(--ink);
  font-weight: 700;
  width: 40%;
}

.link-guide-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

.link-guide-table td:last-child {
  color: var(--muted);
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 6px;
}

.placement-item {
  display: inline-block;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg, #f6f8fa);
  color: var(--ink);
  font-size: 13px;
  word-break: keep-all;
}

@media (max-width: 768px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 16px;
  }
  .topbar-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .layout {
    padding: 0 12px;
  }
  .panel {
    padding: 16px;
  }
  table {
    font-size: 12px;
  }
  table th, table td {
    padding: 6px 8px;
  }
  .link-guide-table th,
  .link-guide-table td {
    padding: 10px 8px;
  }
  .placement-item {
    font-size: 12px;
  }
  .manual-inner {
    width: 95vw;
    max-height: 90vh;
    padding: 16px;
  }
  select, input[type="text"], input[type="password"], input[type="search"], textarea {
    font-size: 16px;
  }
}

/* ── 실행 결과 카드 ── */
.result-card {
  border-radius: 8px;
  padding: 16px;
  margin: 8px 0;
  border: 1px solid var(--color-border, #ddd);
  /* 부모 .runner-result의 pre-wrap이 HTML 템플릿의 줄바꿈·들여쓰기를
     빈 줄로 렌더해 카드가 과도하게 길어지는 문제 방지(평문 결과는 pre-wrap 유지). */
  white-space: normal;
}
.result-card.ok { background: #f0faf5; border-color: #007a5a; }
.result-card.warn { background: #fffbf0; border-color: #e8a000; }
.result-card.error { background: #fff0f4; border-color: #e01e5a; }
.result-card-title { font-weight: 700; font-size: 1.05em; margin-bottom: 10px; }
.result-counts { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.result-count-item { display: flex; flex-direction: column; align-items: center; min-width: 48px; }
.result-count-item strong { font-size: 1.5em; line-height: 1; }
.result-count-item span { font-size: 0.75em; color: var(--color-text-secondary, #666); margin-top: 2px; }
.result-deferred-box { background: var(--color-bg-secondary, #f8f8f8); border-radius: 6px; padding: 10px 12px; margin-top: 8px; font-size: 0.9em; }
.result-deferred-box ul { margin: 4px 0 0; padding-left: 16px; }
details.result-raw summary { cursor: pointer; font-size: 0.85em; color: var(--color-text-secondary, #888); margin-top: 8px; }
details.result-raw pre { font-size: 0.8em; max-height: 200px; overflow: auto; background: #f5f5f5; padding: 8px; border-radius: 4px; margin-top: 4px; }

/* 화면 하단 중앙 확인 토스트 — 불러오기 등 즉시 피드백이 필요한 동작에 사용 */
.kdt-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  z-index: 9999;
  max-width: min(92vw, 560px);
  padding: 12px 18px;
  background: #1d6f47;
  color: #fff;
  font-size: 0.95em;
  font-weight: 600;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.kdt-toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (prefers-color-scheme: dark) {
  .kdt-toast { background: #2f9d6b; color: #08130d; }
}

/* ── 실행 확인 모달 ── */
dialog#confirmRunModal {
  border: none;
  border-radius: 10px;
  padding: 24px;
  max-width: 460px;
  width: 90vw;
  box-sizing: border-box;      /* padding을 width 안에 포함 — 내부 표가 밖으로 밀려 가로 스크롤 나던 것 방지 */
  overflow-x: hidden;          /* 안전장치: 어떤 콘텐츠도 모달 밖으로 가로로 넘치지 않게 */
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
dialog#confirmRunModal::backdrop { background: rgba(0,0,0,0.4); }
.confirm-modal-title { margin: 0 0 16px; font-size: 1.1em; font-weight: 700; }
.confirm-modal-body { margin-bottom: 20px; }
.confirm-modal-body table { width: 100%; border-collapse: collapse; font-size: 0.92em; table-layout: fixed; }
.confirm-modal-body td { padding: 6px 8px; border-bottom: 1px solid var(--color-border, #eee); word-break: break-word; overflow-wrap: anywhere; }
.confirm-modal-body td:first-child { color: var(--color-text-secondary, #666); width: 40%; }
.confirm-modal-warn { margin-top: 10px; padding: 8px 10px; background: #fff8e1; border-radius: 6px; font-size: 0.88em; color: #7a5000; }

/* 실행 확인창 "변경 사항"(불러온 값 대비) 섹션 */
.confirm-modal-changes { margin-top: 12px; padding: 10px 12px; background: #eef6ff; border: 1px solid #bcdcff; border-radius: 8px; font-size: 0.9em; overflow-wrap: anywhere; }
.confirm-changes-title { margin: 0 0 8px; font-weight: 700; color: #1d4ed8; font-size: 0.92em; }
.confirm-changes-none { margin: 0; color: var(--color-text-secondary, #666); }
.confirm-changes-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.confirm-changes-table td { padding: 4px 6px; border-bottom: 1px solid #d6e6fb; vertical-align: top; word-break: break-word; overflow-wrap: anywhere; }
.confirm-changes-table td:first-child { color: #445; width: 34%; }
.confirm-changes-table .diff-from { color: #999; text-decoration: line-through; }
.confirm-changes-table .diff-arrow { color: #1d4ed8; margin: 0 2px; }
.confirm-changes-table .diff-to { color: #0b6b3a; }
.confirm-changes-notice { margin: 8px 0 0; color: #6b4e00; }
.confirm-modal-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ── 실행 키 뱃지 ── */
.key-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.78em; font-weight: 600; white-space: nowrap; vertical-align: middle; margin-left: 6px; }
.key-badge--required { background: #fde8ef; color: #c0143c; }

/* ── 운영자 칩 삭제 버튼 포커스 ── */
.operator-chip button:focus-visible {
  outline: 2px solid var(--blue, #007a5a);
  outline-offset: 1px;
  border-radius: 2px;
}

/* ── Tab Navigation ───────────────────────────────── */
.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: none;
  background: #efece7;
  padding: 4px;
  border-radius: 10px;
  width: fit-content;
  margin-bottom: 24px;
}

.tab-btn {
  padding: 10px 20px;
  border: none;
  border-bottom: none;
  margin-bottom: 0;
  background: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.tab-btn:hover {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.04);
}

.tab-btn.is-active,
.tab-btn[aria-selected="true"] {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  font-weight: 600;
}

.tab-btn:focus-visible {
  outline: 2px solid var(--blue, #1264a3);
  outline-offset: 1px;
  border-radius: 4px;
}

.tab-panel[hidden] {
  display: none;
}

.invite-tab-nav {
  margin-bottom: 16px;
}

#inviteStepError {
  color: var(--rose, #c0392b);
  font-size: 13px;
  margin: 0 0 12px;
  padding: 6px 10px;
  background: rgba(192, 57, 43, 0.08);
  border-radius: 4px;
}

#inviteStepError[hidden] {
  display: none;
}
/* ────────────────────────────────────────────────── */
.key-badge--optional { background: #e8f5e9; color: #2e7d32; }

/* ── Wizard ───────────────────────────────────────── */
.wizard-step[hidden] {
  display: none;
}

.wizard-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 24px;
  flex-wrap: nowrap;
  grid-column: 1 / -1;
}

.wizard-step {
  grid-column: 1 / -1;
}

#wizardError {
  grid-column: 1 / -1;
}

.wizard-step-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  min-width: 72px;
  transition: background 0.15s, color 0.15s;
}

.wizard-step-num {
  font-size: 20px;
  line-height: 1.2;
}

.wizard-step-label {
  font-size: 11px;
}

.wizard-step-btn.is-active {
  color: var(--blue, #1264a3);
  background: rgba(18, 100, 163, 0.10);
  font-weight: 600;
}

.wizard-step-btn.is-done {
  color: var(--green, #007a5a);
}

.wizard-step-btn.is-done .wizard-step-num::after {
  content: " ✓";
  font-size: 14px;
  vertical-align: top;
}

.wizard-step-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.wizard-step-btn:focus-visible {
  outline: 2px solid var(--blue, #1264a3);
  outline-offset: 1px;
}

.wizard-step-sep {
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  padding: 0 2px;
  user-select: none;
}

#wizardError {
  color: var(--rose, #c0392b);
  font-size: 13px;
  margin: -12px 0 12px;
  padding: 6px 10px;
  background: rgba(192, 57, 43, 0.08);
  border-radius: 4px;
}

#wizardError[hidden] {
  display: none;
}

.wizard-nav {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 2px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.wizard-nav .button {
  min-width: 120px;
  padding: 10px 20px;
}

#wizardPrev { margin-right: auto; }

.wizard-nav button[hidden] {
  display: none;
}


/* ────────────────────────────────────────────────── */

/* ── 피드백 폼 ────────────────────────────────── */
.feedback-form {
  display: grid;
  gap: 14px;
}

.feedback-label {
  display: grid;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
}

.feedback-label .text-input {
  font-size: 14px;
}

.feedback-label-note {
  font-weight: 400;
  color: var(--muted, #888);
}

.feedback-textarea {
  resize: vertical;
}

.feedback-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.feedback-actions #feedbackStatus {
  margin: 0;
  font-size: 13px;
}

.feedback-list-wrap {
  margin-top: 28px;
}

.feedback-refresh-btn {
  margin-bottom: 8px;
}

.feedback-divider {
  border: none;
  border-top: 1px solid var(--line, #ddd);
  margin-bottom: 16px;
}

.feedback-admin-toggle {
  margin-bottom: 16px;
}

.feedback-admin-summary {
  font-size: 12px;
  color: var(--muted, #888);
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.feedback-admin-summary::-webkit-details-marker { display: none; }
.feedback-admin-summary::before { content: '▶ '; font-size: 10px; }
.feedback-admin-toggle[open] .feedback-admin-summary::before { content: '▼ '; }

.feedback-admin-row {
  margin-top: 10px;
}

.feedback-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.feedback-list-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.feedback-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted, #888);
  margin-left: 4px;
}

.feedback-filter-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.feedback-filter-btn {
  padding: 3px 10px;
  border: 1px solid var(--line, #ddd);
  border-radius: 12px;
  background: transparent;
  font-size: 12px;
  cursor: pointer;
  color: var(--muted, #555);
}

.feedback-filter-btn.active {
  background: var(--ink, #111);
  color: #fff;
  border-color: var(--ink, #111);
}

.feedback-item-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.feedback-list {
  font-size: 13px;
}

/* ── UI additions ──────────────────────────────── */
.required-mark {
  color: var(--rose, #c03a2b);
  font-weight: 700;
  margin-left: 2px;
  font-size: 0.9em;
}

.invite-panel {
  background: var(--bg, #f9f9f9);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 12px;
}
.invite-panel:last-child { margin-bottom: 0; }

.invite-panel-title {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 6px;
}

.invite-panel-desc {
  margin: 0 0 12px;
}

.invite-email-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  font: inherit;
  resize: vertical;
  margin-bottom: 8px;
}

.operator-access-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  background: rgba(192, 57, 43, 0.10);
  color: var(--rose, #c03a2b);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
}

/* 세팅 실행 게이트: 워크스페이스 비밀번호 + 실행 담당자 사전 확인(마법사 2~4단계 진입 전 필수).
   기본(잠김) 상태는 operator-access-badge와 같은 경고색 계열, 잠금 해제 시 초록 계열로 바뀐다. */
.run-gate {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid #f3c6cf;
  border-radius: 8px;
  background: #fff7f8;
}

.run-gate legend {
  padding: 0 4px;
  color: #b91c1c;
  font-weight: 800;
}

.run-gate .field-help {
  margin: 0;
}

.run-gate--unlocked {
  border-color: #bfdccf;
  background: #f7fffb;
}

.run-gate--unlocked legend {
  color: #03543f;
}

.step4-summary {
  background: var(--bg, #f8f8f8);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 13px;
}
.step4-summary dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  margin: 0;
}
.step4-summary dt { color: var(--muted); font-weight: 500; white-space: nowrap; }
.step4-summary dd { margin: 0; color: var(--ink); }

/* ── 전체 간격 개선 (2025-07) ──────────────────────────── */

/* wizard step 내 요소 간격 */
.wizard-step > label,
.wizard-step > fieldset,
.wizard-step > details,
.wizard-step > .notice-preview-block,
.wizard-step > .run-keep-open-notice,
.wizard-step > .auto-link-note {
  margin-bottom: 20px;
}
.wizard-step > label:last-child,
.wizard-step > fieldset:last-child,
.wizard-step > details:last-child,
.wizard-step > .notice-preview-block:last-child {
  margin-bottom: 0;
}

/* runner-details (collapsible) 내부 요소 간격 */
.runner-details > label,
.runner-details > .routing-row {
  margin-bottom: 14px;
}
.runner-details > label:last-child,
.runner-details > .routing-row:last-child {
  margin-bottom: 0;
}
.runner-details > p.field-help {
  margin-bottom: 14px;
}
.runner-details > .auto-link-note {
  margin-top: 16px;
}

/* details summary 클릭 영역 개선 */
details.runner-details > summary,
details.routing-details > summary {
  padding: 10px 0;
  cursor: pointer;
}

/* notice-preview-block 내 controls 행 */
.notice-preview-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

/* wizard-step 섹션 내 wide label 간격 유지 */
.wizard-step > label.wide + label.wide {
  margin-top: -6px;
}

/* runner-actions (실행 버튼 영역) 상단 여백 */
.runner-actions {
  padding-top: 8px;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}

/* 단계별 section padding 내부 정렬 */
.wizard-step {
  padding: 20px 0 4px;
}

.field-label { display: flex; align-items: center; gap: 2px; }

/* 워크스페이스 멤버 관리 패널 */
.member-manager { margin-top: 16px; border-top: 1px dashed var(--border, #d0d7de); padding-top: 12px; }
.member-manager-summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 4px 0; }
.member-manager-body { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.member-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.member-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--border, #d0d7de); border-radius: 6px; background: var(--surface, #fff); }
.member-info { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13px; min-width: 0; }
.member-email { color: var(--muted, #57606a); font-size: 12px; word-break: break-all; }
.member-role { color: var(--muted, #57606a); font-size: 12px; }
.member-added { color: var(--green, #007a5a); font-size: 13px; font-weight: 600; white-space: nowrap; }
.member-row .button.small { white-space: nowrap; }

/* 초대 링크 설정 안내 */
.invite-once-badge { display: inline-block; font-size: 11px; font-weight: 600; color: var(--green, #007a5a); background: rgba(0,122,90,0.10); border-radius: 10px; padding: 2px 8px; margin-left: 6px; vertical-align: middle; }
.invite-steps { margin: 8px 0 12px; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text, #24292f); }
.invite-steps li { line-height: 1.5; }
.invite-steps code { background: var(--code-bg, #f0f2f5); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* 이메일 자동발송 파킹 영역 (도메인 인증 대기로 준비 중) */
.invite-email-parked { margin-top: 14px; border: 1px dashed var(--border, #d0d7de); border-radius: 10px; background: var(--code-bg, #f6f8fa); }
.invite-email-parked > summary { cursor: pointer; padding: 12px 16px; font-weight: 600; font-size: 14px; color: var(--muted, #57606a); list-style: revert; }
.invite-email-parked > summary:hover { color: var(--text, #24292f); }
.invite-email-parked[open] > summary { border-bottom: 1px dashed var(--border, #d0d7de); }
.invite-email-parked > *:not(summary) { margin-left: 16px; margin-right: 16px; }
.invite-email-parked .invite-parked-note { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: rgba(210,153,34,0.10); border: 1px solid var(--warn, #d29922); color: var(--text, #24292f); line-height: 1.6; }
.invite-email-parked > *:last-child { margin-bottom: 16px; }

/* 권한자 칩: 이메일(pending) vs 멤버 ID 구분 */
.operator-chip { display: inline-flex; align-items: center; gap: 6px; }
.operator-chip.pending { border-color: var(--warn, #d29922); background: rgba(210,153,34,0.08); }
.operator-chip-badge { font-size: 11px; color: var(--muted, #57606a); white-space: nowrap; }
.operator-chip-badge.ok { color: var(--green, #007a5a); }
.operator-chip.pending .operator-chip-badge { color: var(--warn, #d29922); font-weight: 600; }

/* 캔버스 미리보기 서식 툴바 + 렌더링 뷰 */
.notice-preview-tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.notice-preview-toggle { margin-left: auto; font-size: 12px; padding: 3px 10px; border: 1px solid var(--accent, #4a6cf7); border-radius: 6px; background: rgba(74,108,247,0.08); color: var(--accent, #4a6cf7); cursor: pointer; font-weight: 600; }
.notice-preview-render { border: 1px solid var(--border, #d0d7de); border-radius: 6px; padding: 12px 14px; background: var(--surface, #fff); font-size: 14px; line-height: 1.6; max-height: 360px; overflow-y: auto; }
.notice-preview-render .md-h { margin: 10px 0 4px; font-weight: 700; line-height: 1.3; }
.notice-preview-render h3.md-h { font-size: 20px; }
.notice-preview-render h4.md-h { font-size: 17px; }
.notice-preview-render h5.md-h { font-size: 15px; }
.notice-preview-render .md-p { margin: 4px 0; }
.notice-preview-render .md-ul { margin: 4px 0; padding-left: 20px; }
.notice-preview-render .md-ul li { margin: 2px 0; }
.notice-preview-render .md-sp { height: 8px; }
.notice-preview-render .md-empty { color: var(--muted, #57606a); }
.notice-preview-render .md-ph { display: inline-block; font-size: 12px; color: var(--accent, #4a6cf7); background: rgba(74,108,247,0.10); border-radius: 4px; padding: 0 6px; }
.notice-preview-render a { color: var(--accent, #4a6cf7); }

/* 공지 미리보기 리치 편집기(WYSIWYG) */
.rt-toolbar { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.rt-btn { font-size: 12px; min-width: 30px; padding: 4px 9px; border: 1px solid var(--border, #d0d7de); border-radius: 6px; background: var(--surface, #fff); cursor: pointer; line-height: 1; }
.rt-btn:hover { background: var(--code-bg, #f0f2f5); }
.rt-editor { border: 1px solid var(--border, #d0d7de); border-radius: 6px; padding: 12px 14px; min-height: 140px; max-height: 420px; overflow-y: auto; background: var(--surface, #fff); font-size: 14px; line-height: 1.6; }
.rt-editor:focus { outline: 2px solid var(--accent, #4a6cf7); outline-offset: -1px; }
.rt-editor h1 { font-size: 20px; font-weight: 700; margin: 10px 0 4px; }
.rt-editor h2 { font-size: 17px; font-weight: 700; margin: 10px 0 4px; }
.rt-editor h3 { font-size: 15px; font-weight: 700; margin: 8px 0 4px; }
.rt-editor p { margin: 4px 0; }
.rt-editor ul, .rt-editor ol { margin: 4px 0; padding-left: 22px; }
.rt-editor li { margin: 2px 0; }
.rt-editor blockquote { margin: 6px 0; padding: 2px 0 2px 12px; border-left: 3px solid var(--border, #d0d7de); color: var(--muted, #57606a); }
.rt-editor code { background: var(--code-bg, #f0f2f5); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.rt-editor a { color: var(--accent, #4a6cf7); text-decoration: underline; cursor: pointer; }
.rt-editor .rt-ph { display: inline-block; font-size: 12px; color: var(--accent, #4a6cf7); background: rgba(74,108,247,0.10); border-radius: 4px; padding: 0 6px; margin: 0 1px; user-select: none; }
/* 직접 입력(extra) 리치 편집기의 빈 상태 안내 문구 */
.rt-editor[data-placeholder]:empty:before,
.rt-editor[data-placeholder].rt-empty:before { content: attr(data-placeholder); color: var(--muted, #8a94a6); pointer-events: none; }
.rt-editor.rt-extra { min-height: 90px; }
/* 채널 단위 공지 그룹 */
.notice-channel-group { border: 1px solid var(--border, #d0d7de); border-radius: 10px; padding: 12px 14px; margin: 14px 0; background: var(--panel-2, rgba(0,0,0,0.015)); }
.notice-channel-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.notice-channel-head .notice-preview-ch { font-weight: 700; }
.notice-channel-cards { display: flex; flex-direction: column; gap: 10px; }
.notice-channel-cards .notice-preview-card { margin: 0; }
/* 채널 그룹 하단 "공지 추가" 버튼 */
.notice-extra-add { margin-top: 10px; }
.notice-extra-add .button { font-size: 12px; }
/* 사용자가 추가한 공지 카드(자동/직접입력과 시각 구분) */
.notice-preview-card-extra { border-style: dashed; }
.notice-preview-card-extra > header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.notice-preview-badge-extra { background: rgba(74,108,247,0.12); color: var(--accent, #4a6cf7); border-radius: 6px; padding: 1px 8px; font-size: 12px; font-weight: 600; }
.notice-remove-notice { margin-left: auto; color: var(--danger, #d1242f); font-size: 12px; }

/* 비밀번호 입력칸 눈 아이콘(표시/숨기기) */
.password-input-wrap { position: relative; }
.password-input-wrap input { width: 100%; padding-right: 36px; }
.password-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 15px; line-height: 1;
  padding: 4px 6px; color: var(--muted, #888);
}
.password-toggle:hover { color: var(--ink, #1d1c1d); }

/* ── 워크스페이스 라벨 관리 테이블 ────────────────────────────────────── */
.wl-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
.wl-search {
  flex: 1 1 220px;
  min-width: 180px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
}
.wl-filter {
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
}
.wl-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.wl-bulk-apply-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.wl-bulk-apply-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.wl-bulk-course-select {
  flex: 1 1 200px;
  min-width: 160px;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
}
.wl-bulk-course-new {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: -2px 0 10px;
}
.wl-bulk-course-new[hidden] {
  display: none;
}
.wl-bulk-course-new-input {
  flex: 1 1 220px;
  min-width: 160px;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
}
.wl-bulk-apply-hint {
  margin: 4px 0 14px;
}

.wl-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.wl-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.wl-badge.manual {
  background: color-mix(in srgb, var(--green) 14%, transparent);
  color: var(--green-dark);
}
.wl-badge.none {
  background: color-mix(in srgb, var(--muted) 16%, transparent);
  color: var(--muted);
}

.wl-table-wrap {
  overflow-x: auto;
}

.wl-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
.wl-table thead {
  background: #f8f6f1;
}
.wl-table th {
  padding: 10px 10px;
  border-bottom: 2px solid var(--line);
  text-align: left;
  font-weight: 700;
  color: var(--ink);
  font-size: 13px;
  white-space: nowrap;
}
.wl-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.wl-col-check {
  width: 36px;
  text-align: center;
}
.wl-col-manage {
  width: 120px;
}
.wl-name {
  font-weight: 700;
  color: var(--ink);
}
.wl-status {
  font-size: 13px;
  white-space: nowrap;
}
.wl-status-none {
  color: var(--muted);
}
.wl-status-partial {
  color: #8a6d1f;
}
.wl-status-done {
  color: var(--green-dark);
}
.wl-current-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 220px;
}
.wl-label-input {
  flex: 1 1 auto;
  min-width: 120px;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
}
.wl-empty-row {
  text-align: center;
  color: var(--muted);
  padding: 24px 10px;
}
/* 검색/필터/페이지 전환 시 행을 지우지 않고 hidden만 토글하므로, tr 자체가 display:table-row를
   유지하는 브라우저 기본값을 [hidden] 규칙이 확실히 이기게 명시(이 프로젝트의 기존 [hidden] 규칙과
   동일한 이유 — table/tr에도 같은 패턴이 필요). */
.wl-table tbody tr[hidden] {
  display: none;
}
.wl-table tbody tr.wl-row-dirty {
  background: color-mix(in srgb, var(--gold) 10%, transparent);
}
.wl-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.02);
}
.wl-table tbody tr.wl-row-dirty:hover {
  background: color-mix(in srgb, var(--gold) 16%, transparent);
}

.wl-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
}
.wl-page-indicator {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 640px) {
  .wl-toolbar-actions {
    margin-left: 0;
    width: 100%;
  }
  .wl-current-cell {
    min-width: 160px;
  }
}
