* { box-sizing: border-box; }

:root {
  --bg: #eef2f5;
  --surface: #ffffff;
  --text: #101418;
  --muted: #5d6a76;
  --line: #d7dde5;
  --accent: #1f4f7a;
}

body {
  margin: 0;
  font-family: "Pretendard", "SUIT", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f2f5f8 0%, #e9edf2 100%);
}

.page-bg { background: transparent; }

.container {
  max-width: 1260px;
  margin: 0 auto;
  padding: 20px 18px 28px;
}

.issue-page .issue-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 22px;
}

.issue-page h1 {
  margin: 0;
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.week-label {
  font-size: 16px;
  font-weight: 700;
  color: #223143;
  background: #dde7f1;
  border: 1px solid #c6d3e1;
  border-radius: 999px;
  padding: 6px 12px;
}

.intro {
  margin: 0 0 30px;
  font-size: 14px;
  color: var(--muted);
}

.archive-nav {
  margin: 0 0 18px;
  padding: 12px;
  border: 1px solid #d2d9e2;
  border-radius: 14px;
  background: #f5f8fb;
}

.archive-nav-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: #4d5b68;
}

.archive-empty-note {
  margin: 10px 0 0;
  font-size: 12px;
  color: #607182;
}

.archive-chip-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.archive-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid #c4d1df;
  background: #fff;
  color: #2f4052;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.archive-chip.active {
  background: #2b5f88;
  border-color: #2b5f88;
  color: #fff;
}

.signature-footer {
  margin: 30px 0 4px;
  text-align: center;
}

.signature-image {
  width: 140px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.news-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 128px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.news-card:hover {
  transform: translateY(-1px);
  border-color: #b9c6d5;
  box-shadow: 0 5px 16px rgba(16, 20, 24, .09);
}

.thumb-wrap {
  width: 100%;
  align-self: start;
}

.thumb,
.placeholder {
  width: 100%;
  height: 104px;
  object-fit: cover;
  display: block;
  border-radius: 10px;
  background: #d5dae1;
}

.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #56606b;
}

.card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 2px 2px 2px 0;
}

.card-title {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -0.015em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta {
  margin: 0 0 6px;
  font-size: 12px;
  color: #6a7480;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.5;
  color: #37414c;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more {
  align-self: flex-start;
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
}

.origin-btn,
button,
.preview-link {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 10px;
  background: #111;
  color: #fff;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
}

.detail-page { max-width: 860px; }
.back-link { display: inline-block; margin-bottom: 18px; color: #22698f; text-decoration: none; }
.detail-card { background: #fff; padding: 28px; border-radius: 16px; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.detail-title { font-size: 34px; line-height: 1.35; margin: 8px 0 18px; }
.detail-image { width: 100%; max-height: 420px; object-fit: cover; border-radius: 12px; margin-bottom: 20px; }
.detail-summary { font-size: 18px; line-height: 1.7; }
.notice-box { background: #f6f8fb; border: 1px solid #d8e3ec; padding: 16px; border-radius: 12px; margin: 24px 0; color: #334; }

.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-header h1 { margin: 0; font-size: 48px; font-weight: 800; }
.admin-panel { background: #fff; border-radius: 16px; padding: 18px; margin-bottom: 16px; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.stack-form { display: grid; gap: 14px; }
.inline-form { margin-top: 10px; }
.auto-week-hint { margin: -6px 0 0; font-size: 12px; color: #6b7784; }
.source-support-hint { margin: -6px 0 0; font-size: 12px; color: #647586; }
label { display: grid; gap: 6px; font-weight: 700; }
input[type=text], input[type=url], input[type=number], textarea { width: 100%; padding: 12px; border: 1px solid #cfd6dd; border-radius: 10px; font-size: 15px; }
.checkbox { display: flex; align-items: center; gap: 8px; }
.admin-section-head { margin-bottom: 10px; }
.admin-section-head h2 { margin: 0 0 4px; }
.admin-section-sub { margin: 0; font-size: 13px; color: #5f6c79; }
.article-admin-list { display: grid; gap: 10px; }
.article-admin-item { border: 1px solid #dfe5ed; border-radius: 12px; background: #fafbfd; overflow: hidden; }
.article-row-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
}
.article-row-summary::-webkit-details-marker { display: none; }
.article-row-main { min-width: 0; }
.article-row-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-row-meta { margin: 6px 0 0; font-size: 12px; color: #66717d; }
.article-row-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.article-edit-wrap { border-top: 1px solid #e2e8f0; padding: 12px 14px 14px; background: #fff; }
.compact-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.field-span-2 { grid-column: 1 / -1; }
.button-row { display: flex; gap: 10px; }
.ingestion-meta { margin: 0 0 12px; color: #444; font-size: 14px; }
.ingestion-error { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: #fff1f1; color: #8b1a1a; font-size: 13px; }
.status-pill { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 12px; text-transform: lowercase; }
.status-pill.success { background: #ddf6e5; color: #0b6f36; }
.status-pill.failed { background: #ffe0e0; color: #9a1f1f; }
.status-pill.pending { background: #f3f3f3; color: #444; }
.split-actions form { margin: 0; }
.danger { background: #a31d1d; }
.subtle-btn {
  background: #eef3f8;
  color: #22374a;
}
.subtle-link {
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid #ccd6e2;
  background: #fff;
  color: #1f3e58;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}
.source-url { word-break: break-all; color: #555; }
.login-hint { max-width: 700px; }
code { background: #fff; padding: 3px 6px; border-radius: 6px; }

@media (max-width: 980px) {
  .cards { grid-template-columns: 1fr; }
  .news-card { min-height: 116px; grid-template-columns: 100px 1fr; }
  .thumb, .placeholder { height: 92px; }
}

@media (max-width: 800px) {
  .container { padding: 16px 14px 24px; }
  .issue-page h1 {
    font-size: clamp(19px, 5.6vw, 22px);
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
  }
  .issue-page .issue-header { align-items: flex-start; flex-direction: column; }
  .archive-nav { margin-bottom: 14px; }
  .news-card { grid-template-columns: 92px 1fr; gap: 10px; }
  .thumb, .placeholder { height: 84px; }
  .card-title { font-size: 15px; }
  .summary { display: none; }
  .admin-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .admin-header h1 { font-size: 36px; }
  .article-row-summary { flex-direction: column; }
  .article-row-badges { justify-content: flex-start; }
  .compact-fields { grid-template-columns: 1fr; }
  .field-span-2 { grid-column: auto; }
  .split-actions { flex-wrap: wrap; }
}
