:root {
  --ink: #0d1b35;
  --muted: #5a6b82;
  --paper: #f4f6fa;
  --surface: rgba(255, 255, 255, 0.90);
  --surface-strong: #ffffff;
  --surface-soft: #f0f3f8;
  --line: rgba(26, 58, 110, 0.08);
  --line-strong: rgba(26, 58, 110, 0.15);
  --accent: #1a3a6e;
  --sand: #b08968;
  --border: rgba(26, 58, 110, 0.12);
  --shadow: 0 12px 34px rgba(26, 58, 110, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.92), transparent 34%),
    linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 46%, #f2f2f4 100%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 44px);
  background: rgba(245, 245, 247, 0.78);
  border-bottom: 1px solid rgba(17, 17, 17, 0.06);
  backdrop-filter: blur(22px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(17, 17, 17, 0.08);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand small {
  color: var(--muted);
  font-size: 13px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 15px;
}

.site-nav a,
.site-nav button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  text-decoration: none;
  font-weight: 600;
}

.site-nav a:hover,
.site-nav a.is-active,
.site-nav button:hover,
.site-nav button.is-active {
  color: var(--ink);
}

.site-nav .support-link {
  padding: 9px 14px;
  color: #fff;
  background: var(--accent);
  border-radius: 8px;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(17, 17, 17, 0.12);
}

.site-nav .support-link:hover {
  color: #fff;
  background: #2b2b2e;
}

.site-nav .admin-link,
.site-nav .logout-link {
  padding: 9px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 700;
}

.site-nav .admin-link:hover,
.site-nav .admin-link.is-active,
.site-nav .logout-link:hover,
.site-nav .logout-link.is-active {
  color: var(--ink);
  background: #ffffff;
  border-color: var(--line-strong);
}

.site-nav .logout-link {
  cursor: pointer;
  font: inherit;
}

/* ── Nav menu links ─────────────────────────────────────────── */
.nav-menu-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nav-menu-link.is-active {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: var(--muted);
  background: rgba(90, 107, 130, 0.12);
  border-radius: 999px;
  letter-spacing: 0;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--sand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin: 14px 0 10px;
  font-size: 26px;
  line-height: 1.14;
  letter-spacing: 0;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(42px, 7vw, 88px) clamp(20px, 5vw, 32px);
}

.section-heading {
  max-width: 820px;
  margin-bottom: 28px;
}

.section-heading p:not(.eyebrow),
.article-card p,
.donation p,
.post-date,
.all-post-group time {
  color: var(--muted);
}

.post-body p,
.post-body li {
  color: var(--ink);
}

.articles {
  max-width: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.12) 100%);
  padding-top: clamp(10px, 3vw, 22px);
}

.articles > * {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.article-list,
.all-post-list {
  display: grid;
  gap: 20px;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 1180px;
  margin: -4px auto 22px;
}

.category-tabs button,
.tag-filters button,
.all-post-group button,
.copy-link,
.read-post,
.close-detail,
.map-link {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.category-tabs button {
  color: var(--ink);
}

.category-tabs button.is-active,
.tag-filters button.is-active,
.read-post {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.article-tools {
  display: grid;
  gap: 10px;
  margin: 0;
}

.search-field {
  display: grid;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
}

.search-field input {
  min-height: 46px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.empty-state {
  margin: 0;
  padding: 24px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.all-posts {
  padding-top: clamp(34px, 6vw, 56px);
}

.all-post-group {
  padding: clamp(22px, 4vw, 30px);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.all-post-group h2,
.all-post-group h3 {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 700;
}

.all-post-group a {
  text-decoration: none;
  color: var(--ink);
}

.all-post-group a:hover {
  color: var(--accent);
  text-decoration: none;
}

.all-post-group ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.all-post-group li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid rgba(17, 17, 17, 0.06);
}

.all-post-group li:first-child {
  border-top: 0;
}

.all-post-group li > span {
  font-weight: 700;
}

.all-post-group button {
  border-radius: 10px;
}

.all-post-group button:hover,
.copy-link:hover,
.close-detail:hover,
.map-link:hover {
  border-color: var(--line-strong);
}

.all-post-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-edit-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(17, 17, 17, 0.04);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.admin-edit-link:hover {
  border-color: var(--line-strong);
}

.article-card {
  display: grid;
  grid-template-columns: minmax(260px, 38%) 1fr;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.article-card img {
  width: 100%;
  height: 320px;
  min-height: 320px;
  max-height: 320px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.article-card > div {
  padding: clamp(24px, 4vw, 36px);
}

.post-title-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
}

.post-title-link:hover {
  color: var(--accent);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.tag,
.pin-badge,
.post-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.tag {
  color: var(--ink);
  background: rgba(17, 17, 17, 0.05);
}

.pin-badge {
  color: #fff;
  background: var(--sand);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.post-tags span {
  color: var(--muted);
  background: rgba(17, 17, 17, 0.04);
}

.article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
}

.read-post {
  border-radius: 10px;
}

.copy-link,
.close-detail,
.map-link,
.copy-address-button {
  border-radius: 10px;
}

.map-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.detail-wrap {
  padding-top: clamp(28px, 4vw, 48px);
}

@media (min-width: 900px) {
  .detail-wrap {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    align-items: start;
  }
}

/* ── 사이드바 컨테이너 ───────────────────────────────── */
.detail-sidebar {
  display: none;
}

@media (min-width: 900px) {
  .detail-sidebar {
    display: block;
    position: sticky;
    top: 88px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 10px 8px 16px;
    box-shadow: 0 2px 16px rgba(26, 58, 110, 0.06);
    -webkit-overflow-scrolling: touch;
  }
}

/* ── 메뉴 섹션 ───────────────────────────────────────── */
.sidebar-menu-group {
  margin-bottom: 2px;
}

.sidebar-menu-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 14px 12px 4px;
  margin: 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2px;
}

.sidebar-menu-group:first-child .sidebar-menu-label {
  padding-top: 6px;
}

/* 원형 뱃지 */
.sidebar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  font-size: 9.5px;
  font-weight: 800;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
  letter-spacing: 0;
  line-height: 1;
}

/* ── 글 목록 ─────────────────────────────────────────── */
.sidebar-posts {
  list-style: none;
  padding: 3px 0 4px;
  margin: 0;
}

.sidebar-post-item {
  display: block;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.12s ease;
}

.sidebar-post-item:hover {
  background: rgba(26, 58, 110, 0.05);
  text-decoration: none;
}

.sidebar-post-item.is-active {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: none;
  text-decoration: none;
}

.post-detail {
  max-width: 1120px;
  margin: 0 auto;
  min-width: 0;
  padding: clamp(28px, 5vw, 46px);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.post-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.post-head-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.edit-post-btn {
  padding: 7px 13px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.edit-post-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.post-detail h3 {
  margin-top: 18px;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.06;
}


.detail-map-link {
  margin: 0 0 20px;
}

.detail-map-embed-wrap {
  display: grid;
  gap: 12px;
  margin: 28px 0 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
}

.detail-map-embed-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.detail-map-embed-head strong {
  font-size: 16px;
}

.copy-address-button {
  min-height: 34px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.92);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.copy-address-button:hover {
  border-color: var(--line-strong);
}

.detail-map-embed-frame {
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.92);
}

.detail-map-embed-frame iframe {
  display: block;
  width: 100%;
  height: 360px;
  border: 0;
}

.post-body {
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink);
}

.post-body p,
.post-body ul {
  margin: 0 0 1.4em;
}

.post-body ul {
  padding-left: 24px;
}

.support-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: clamp(28px, 5vw, 40px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.74) 100%);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.donation-button {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 16px 28px rgba(17, 17, 17, 0.12);
}

.site-footer {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 32px 40px;
  color: var(--muted);
}

.site-footer-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-copyright { margin: 0; }

.footer-bottom-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-version { opacity: 0.6; }

.footer-top-link {
  margin-left: auto;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s;
}

.footer-top-link:hover { color: var(--accent); }

@media (max-width: 900px) {
  .article-card,
  .support-panel,
  .all-post-group li {
    grid-template-columns: 1fr;
  }

  .article-card img {
    height: 260px;
    min-height: 260px;
    max-height: 260px;
  }

  .support-panel,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .menu-button {
    display: inline-block;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 18px;
    left: 18px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    width: 100%;
  }
}


.admin-shell {
  display: grid;
  gap: 24px;
}

.admin-heading {
  margin-bottom: 8px;
}

.admin-status-card,
.admin-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.admin-status-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.admin-status-card p,
.admin-card-head p,
.admin-post-item p,
.admin-notes {
  margin: 0;
  color: var(--muted);
}

.admin-status-actions,
.admin-form-actions,
.admin-post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-primary {
  color: #fff;
  background: var(--accent);
}

.admin-secondary {
  color: var(--ink);
  background: rgba(255,255,255,0.78);
  border: 1px solid var(--line);
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 20px;
}

.admin-card-head {
  margin-bottom: 18px;
}

.post-form,
.admin-row {
  display: grid;
  gap: 14px;
}

.admin-row.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.post-form label {
  display: grid;
  gap: 8px;
}

.post-form span,
.checkbox-row {
  font-weight: 700;
}

.post-form input,
.post-form select,
.post-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,0.9);
  color: var(--ink);
  font: inherit;
}

.checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
}

.admin-message {
  min-height: 24px;
  margin: 0;
  font-weight: 600;
}

.admin-message[data-tone="success"] {
  color: #0f7b49;
}

.admin-message[data-tone="error"] {
  color: #c73a3a;
}

.admin-post-list {
  display: grid;
  gap: 12px;
}

.admin-post-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.admin-post-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.admin-post-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
}

.admin-post-actions button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.86);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.admin-notes {
  padding-left: 20px;
}

.admin-notes li + li {
  margin-top: 10px;
}

@media (max-width: 900px) {
  .admin-status-card,
  .admin-grid,
  .admin-row.two-up,
  .admin-post-item {
    grid-template-columns: 1fr;
  }

  .admin-status-card,
  .admin-post-item {
    display: grid;
    justify-content: stretch;
  }
}


.admin-upload-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,0.72);
}

.admin-upload-copy strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
}

.admin-upload-copy p {
  margin: 0;
  color: var(--muted);
}

.admin-upload-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.admin-upload-controls input[type="file"] {
  flex: 1 1 260px;
  min-width: 220px;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: rgba(255,255,255,0.88);
}

.admin-image-preview {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.78);
}

.admin-image-preview img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
}


.uploaded-gallery {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.uploaded-gallery-head {
  display: grid;
  gap: 4px;
}

.uploaded-gallery-head strong {
  font-size: 15px;
}

.uploaded-gallery-head small {
  color: var(--muted);
}

.uploaded-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.uploaded-thumb {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.82);
}

.uploaded-thumb img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.uploaded-thumb-copy {
  display: grid;
  gap: 2px;
}

.uploaded-thumb-copy strong {
  font-size: 14px;
}

.uploaded-thumb-copy small {
  color: var(--muted);
  line-height: 1.4;
}

.uploaded-thumb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.uploaded-thumb-actions button {
  flex: 1 1 120px;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}


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

.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4 {
  margin: 32px 0 14px;
  color: var(--ink);
  line-height: 1.16;
}

.post-body h1 {
  font-size: 32px;
}

.post-body h2 {
  font-size: 28px;
}

.post-body h3 {
  font-size: 24px;
}

.post-body h4 {
  font-size: 20px;
}

.post-body a {
  color: #0a66d9;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-body ol,
.post-body blockquote,
.post-body pre,
.post-body hr,
.post-body img {
  margin: 0 0 20px;
}

.post-body ol,
.post-body ul {
  padding-left: 24px;
}

.post-body li + li {
  margin-top: 8px;
}

.post-body blockquote {
  margin: 1.5em 0;
  padding: 1em 1.4em;
  border-left: 4px solid var(--accent);
  background: rgba(26, 58, 110, 0.05);
  border-radius: 0 10px 10px 0;
  color: var(--ink);
  font-style: italic;
}

.post-body code {
  padding: 0.16em 0.4em;
  border-radius: 8px;
  background: rgba(17,17,17,0.06);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
}

.post-body pre {
  overflow: auto;
  padding: 16px;
  border-radius: 16px;
  background: #111111;
  color: #f5f5f7;
}

.post-body pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.9em;
  overflow-x: auto;
  display: block;
}

.post-body th {
  background: var(--accent);
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

.post-body td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
}

.post-body tr:last-child td { border-bottom: none; }

.post-body tr:nth-child(even) td {
  background: rgba(26, 58, 110, 0.03);
}

.post-body img {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.editor-embed {
  margin: 24px 0;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.92);
}

.post-body iframe,
.editor-embed iframe {
  display: block;
  width: 100%;
  min-height: 360px;
  border: 0;
}

.post-body figure {
  margin: 24px 0;
}

.post-body figcaption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted, #6b7280);
  margin-top: 8px;
}


.editor-shell {
  display: grid;
  gap: 10px;
}

.editor-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.editor-head > span {
  font-weight: 700;
}

.editor-head .field-hint {
  max-width: 340px;
  text-align: right;
}

.editor-pane {
  display: grid;
  gap: 8px;
}

.editor-pane[hidden],
.editor-pane:not(.is-active) {
  display: none !important;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.editor-toolbar button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.9);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 760px) {
  .editor-head {
    flex-direction: column;
  }

  .editor-head .field-hint {
    max-width: none;
    text-align: left;
  }
}


.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  padding-top: 8px;
}

.pagination-numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pagination-ellipsis {
  min-width: 24px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

.pagination button {
  min-width: 42px;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.88);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.pagination button.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pagination button:hover:not(:disabled):not(.is-active) {
  border-color: var(--line-strong);
  background: #ffffff;
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: default;
}


.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.compact-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  max-width: none;
}

.compact-heading h2 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.04;
}

.compact-heading p {
  max-width: 420px;
  margin: 0;
}

.article-topbar {
  max-width: 1180px;
  margin: 0 auto 18px;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(17, 17, 17, 0.06);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(18px);
}

.category-tabs {
  margin: 0;
}

.tag-filters {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 8px;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.tag-filters::-webkit-scrollbar {
  display: none;
}

.article-card {
  border-radius: 28px;
}

.article-card > div {
  padding: clamp(22px, 3vw, 32px);
}

.all-post-group {
  padding: clamp(20px, 3vw, 28px);
  border-radius: 24px;
}

.support-panel {
  border-radius: 28px;
}

@media (max-width: 900px) {
  .compact-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}


main {
  padding-bottom: 36px;
}

.articles {
  padding-top: clamp(8px, 2vw, 16px);
}

.article-topbar {
  margin: 0 auto 22px;
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(17, 17, 17, 0.06);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.58) 100%);
  box-shadow: 0 10px 30px rgba(17, 17, 17, 0.04);
  backdrop-filter: blur(22px);
}

.article-tools {
  gap: 12px;
}

.search-field input {
  min-height: 50px;
  border-radius: 16px;
}

.tag-filters {
  flex-wrap: wrap;
  overflow: visible;
  padding-bottom: 0;
}

.article-list {
  gap: 24px;
}

.all-posts {
  padding-top: clamp(22px, 4vw, 34px);
}

.compact-heading {
  margin-bottom: 18px;
}

.compact-heading h2 {
  font-size: clamp(22px, 3vw, 32px);
}

.compact-heading p {
  max-width: 360px;
  font-size: 14px;
}

.all-post-list {
  gap: 18px;
}

.support-panel {
  margin-top: 4px;
}

@media (min-width: 980px) {
  .article-topbar {
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  }
}

@media (max-width: 760px) {
  .articles {
    padding-top: 6px;
  }

  .article-topbar {
    padding: 12px;
    border-radius: 20px;
  }

  .tag-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .compact-heading {
    gap: 8px;
    margin-bottom: 14px;
  }
}


.post-body .text-coral {
  color: #ff6f61;
}

.post-body .text-teal {
  color: #0f766e;
}

.post-body .text-gold {
  color: #b7791f;
}

.post-body .text-blue {
  color: #2563eb;
}

.post-body .text-violet {
  color: #7c3aed;
}

.post-body .text-rose {
  color: #e11d48;
}


.tag-filters button[data-tag="all"] {
  order: 999;
}


.post-tag-button {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.04);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.post-tag-button:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: rgba(17, 17, 17, 0.06);
}

/* Responsive article tile layout */
.article-list {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: stretch;
}

.article-card {
  grid-template-columns: 1fr;
  height: 100%;
}

.article-card img {
  height: clamp(220px, 24vw, 260px);
  min-height: clamp(220px, 24vw, 260px);
  max-height: clamp(220px, 24vw, 260px);
}

.article-card > div {
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
}

.article-card h3 {
  margin-top: 16px;
}

.article-actions {
  margin-top: auto;
  padding-top: 20px;
}

@media (max-width: 760px) {
  .article-list {
    grid-template-columns: 1fr;
  }

  .article-card img {
    height: 240px;
    min-height: 240px;
    max-height: 240px;
  }
}

.article-card-featured {
  grid-column: span 2;
}

.article-card-featured img {
  height: clamp(260px, 30vw, 340px);
  min-height: clamp(260px, 30vw, 340px);
  max-height: clamp(260px, 30vw, 340px);
}

.article-card-featured h3 {
  font-size: clamp(30px, 3vw, 38px);
  line-height: 1.08;
}

.article-card-featured > div {
  padding: clamp(26px, 4vw, 36px);
}

@media (max-width: 960px) {
  .article-card-featured {
    grid-column: span 1;
  }
}


.article-tag-filters {
  max-width: 1180px;
  margin: 18px auto 0;
  justify-content: flex-start;
}

.article-pagination {
  max-width: 1180px;
  margin: 18px auto 0;
}

@media (max-width: 760px) {
  .article-tag-filters {
    margin-top: 14px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }
}


.craft-import-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
  background: rgba(0, 122, 255, 0.05);
  border: 1px solid rgba(0, 122, 255, 0.18);
  border-radius: 14px;
}

.craft-import-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  flex: 1;
}

.craft-import-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.craft-import-bar .admin-message {
  width: 100%;
  margin: 0;
  font-size: 0.82rem;
}

.craft-import-bar select {
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
  font-size: 0.85rem;
  max-width: 240px;
}

.editor-embed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.editor-embed-actions .button {
  min-height: 40px;
  padding: 10px 14px;
}

.editor-shell .field-hint {
  display: block;
  color: var(--muted);
}

/* ── Jekyll-specific styles ── */

.post-detail h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
  color: var(--ink);
}

.post-nav {
  display: flex;
  gap: 12px;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.post-nav-prev,
.post-nav-next {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}

.post-nav-prev:hover,
.post-nav-next:hover {
  border-color: var(--accent);
}

.post-nav-next {
  text-align: right;
}

.post-nav-prev span,
.post-nav-next span {
  font-size: 0.75rem;
  color: var(--muted);
}

.post-nav-prev strong,
.post-nav-next strong {
  font-size: 0.9rem;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.site-nav .rss-link {
  font-size: 0.8rem;
  opacity: 0.7;
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.article-category {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.article-card-meta time {
  font-size: 0.78rem;
  color: var(--muted);
}

.post-views {
  font-size: 0.78rem;
  color: var(--muted);
}

.article-card h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 6px;
}

.article-card h2 a {
  text-decoration: none;
  color: inherit;
}

.article-card h2 a:hover {
  color: var(--accent);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1.5rem;
}

.post-tags a.tag {
  text-decoration: none;
  font-size: 0.8rem;
  padding: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted);
  transition: border-color 0.15s, color 0.15s;
}

.post-tags a.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Weather widget ── */
/* ── Footer sitemap ── */
.site-footer-sitemap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 32px 24px;
  padding: 40px 24px 40px;
  border-bottom: 2px solid var(--line-strong);
  margin-bottom: 28px;
}

.footer-col strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  width: fit-content;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col ul a {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-col ul a:hover {
  color: var(--accent);
}

/* ── Weather widget ── */
.weather-widget {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--muted);
  margin-left: auto;
  margin-right: 12px;
  white-space: nowrap;
}

.weather-widget span {
  display: flex;
  align-items: center;
  gap: 3px;
}

@media (max-width: 600px) {
  .weather-widget {
    display: none;
  }
}
