.settings-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 16px;
}
.settings-section h2 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
}
.settings-section h2 .hint-small {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 8px;
}
.settings-field {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--muted);
}
.settings-field input {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}

.settings-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}
.settings-table th,
.settings-table td {
  padding: 8px;
  border-bottom: 1px solid #f3f4f6;
  text-align: left;
  font-size: 13px;
  vertical-align: middle;
}
.settings-table thead th {
  background: var(--header-bg);
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
}
.settings-table input[type="text"],
.settings-table input[type="number"] {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
}
.settings-table .col-id { width: 70px; }
.settings-table .col-color {
  width: 40px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px;
  cursor: pointer;
}

.holiday-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.holiday-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 999px;
  color: #92400e;
  font-size: 13px;
  font-weight: 600;
}
.holiday-chip .chip-x {
  background: transparent;
  border: none;
  color: #b45309;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
}
.holiday-chip .chip-x:hover { color: var(--danger); }

.holiday-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.holiday-add-row input[type="date"] {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
}
.hint-small {
  font-size: 12px;
  color: var(--muted);
}

/* ----- 상단 공지 에디터 ----- */
.notice-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, #fafafa, #f5f5f5);
}
.notice-toolbar button {
  min-width: 32px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}
.notice-toolbar button:hover {
  background: #fff;
  border-color: var(--primary);
  color: var(--primary);
}
.notice-toolbar button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.notice-toolbar button[data-size] {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.notice-toolbar button[data-size]:hover {
  color: var(--primary);
}
.notice-toolbar .tb-sep {
  width: 1px;
  height: 22px;
  margin: 0 4px;
  background: var(--border);
}
.notice-toolbar .tb-color {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 30px;
  padding: 0 8px 0 4px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}
.notice-toolbar .tb-color:hover {
  border-color: var(--primary);
}
.notice-toolbar .tb-color input[type="color"] {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
}

.notice-editor {
  min-height: 100px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 0 0 10px 10px;
  background: #fff;
  font-size: 15px;
  line-height: 1.65;
  outline: none;
  overflow-wrap: break-word;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.notice-editor:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
.notice-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  font-style: italic;
}
.notice-editor.hidden { display: none; }

.notice-source {
  width: 100%;
  margin-top: 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 0 0 10px 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  resize: vertical;
  background: #fafafa;
}
.notice-source:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}
.notice-source.hidden { display: none; }

/* ----- 공모전 자동 수집 ----- */
.contest-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.ci-cell {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  padding: 12px 14px;
  text-align: center;
}
.ci-num {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: #4338ca;
  line-height: 1.1;
}
.ci-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.contest-refresh-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.contest-refresh-row .btn-primary {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}
.contest-refresh-row .btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}
.contest-refresh-row .btn-primary:disabled { opacity: 0.6; cursor: wait; }

.contest-result {
  font-size: 13px;
}
.src-count {
  display: inline-block;
  padding: 2px 8px;
  margin-right: 4px;
  background: var(--header-bg);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text);
}
.contest-err {
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--danger);
  font-size: 12px;
}
