* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  background-color: #f4f6f9;
  color: #1f2937;
  line-height: 1.65;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* 헤더 */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 14px 0;
  margin-bottom: 24px;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 20px;
  font-weight: 800;
  color: #111827;
  text-decoration: none;
}

.logo span {
  color: #2563eb;
}

.main-nav {
  display: flex;
  gap: 20px;
}

.main-nav a {
  text-decoration: none;
  color: #4b5563;
  font-size: 14px;
  font-weight: 500;
}

.main-nav a.active,
.main-nav a:hover {
  color: #2563eb;
}

/* 카드 공통 */
.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* 광고 슬롯 예약 영역 (CLS 레이아웃 밀림 방지) */
.ad-slot {
  min-height: 90px;
  background: #eef2f6;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 13px;
  margin-bottom: 24px;
}

/* 도구 영역 */
.tool-header h1 {
  margin: 0 0 6px 0;
  font-size: 24px;
  color: #111827;
}

.subtitle {
  margin: 0 0 20px 0;
  color: #6b7280;
  font-size: 14px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

button, select {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #374151;
  cursor: pointer;
}

button.primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

button.primary:hover {
  background: #1d4ed8;
}

button.secondary:hover {
  background: #f3f4f6;
}

button.danger {
  color: #dc2626;
  border-color: #fecaca;
}

button.danger:hover {
  background: #fef2f2;
}

/* 상태 배너 */
.status-bar {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
  font-weight: 500;
}

.status-bar.neutral {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
}

.status-bar.success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.status-bar.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* 에디터 2단 그리드 */
.editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .editor-grid {
    grid-template-columns: 1fr;
  }
}

.editor-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.editor-label span {
  font-weight: 400;
  color: #6b7280;
}

textarea {
  width: 100%;
  height: 380px;
  padding: 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
  background: #fafafa;
  color: #111827;
}

textarea:focus {
  outline: none;
  border-color: #2563eb;
  background: #ffffff;
}

textarea[readonly] {
  background: #f8fafc;
}

.security-note {
  margin: 14px 0 0 0;
  font-size: 13px;
  color: #4b5563;
}

/* 가이드 및 FAQ 섹션 */
.guide-section h2 {
  font-size: 19px;
  color: #111827;
  margin-top: 28px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f3f4f6;
}

.guide-section h2:first-child {
  margin-top: 0;
}

.guide-section h3 {
  font-size: 15px;
  color: #1f2937;
  margin: 16px 0 4px 0;
}

.guide-section p, .guide-section li {
  font-size: 14px;
  color: #374151;
}

.guide-section code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 13px;
  color: #be123c;
}

.faq-list details {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 10px;
}

.faq-list summary {
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  color: #111827;
}

.faq-list details p {
  margin: 10px 0 0 0;
}

/* 푸터 */
.site-footer {
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  padding: 28px 0;
  margin-top: 40px;
}

.footer-inner {
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 12px;
}

.footer-links a {
  text-decoration: none;
  color: #4b5563;
  font-size: 13px;
}

.footer-links a:hover {
  text-decoration: underline;
  color: #111827;
}

.copyright {
  margin: 0;
  font-size: 12px;
  color: #9ca3af;
}

.lang-switch {
  padding: 4px 10px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  font-size: 12px !important;
  background: #f8fafc;
}

.lang-switch:hover {
  border-color: #2563eb;
  background: #eff6ff;
}