:root {
  --bg: #e9eef5;
  --bg-2: #f4f7fb;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --line: rgba(148, 163, 184, 0.22);
  --text: #122033;
  --muted: #617286;
  --nav: #0f1b2d;
  --nav-2: #162742;
  --blue: #2563eb;
  --blue-2: #1d4ed8;
  --blue-soft: rgba(37, 99, 235, 0.08);
  --danger: #cb3a2c;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.07);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --maxw: 1240px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 320px),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.06), transparent 380px),
    linear-gradient(to bottom, #dde6f0 0px, var(--bg) 280px, var(--bg-2) 100%);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(var(--maxw), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: linear-gradient(135deg, rgba(15, 27, 45, 0.92), rgba(22, 39, 66, 0.92));
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-row {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
}

.brand-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand {
  font-size: 1.95rem;
  font-weight: 850;
  letter-spacing: -0.04em;
  color: #fff;
}

.brand-subtitle {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.98rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.main-nav a {
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  transition: 0.18s ease;
}

.main-nav a:hover {
  background: rgba(255, 255, 255, 0.11);
}

.page-content {
  padding: 34px 0 54px;
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  margin-bottom: 28px;
}

.hero-rich {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.82), rgba(255,255,255,0.70)),
    linear-gradient(135deg, #f8fbff 0%, #eef5ff 45%, #f7fbff 100%);
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(37, 99, 235, 0.14), transparent 220px),
    radial-gradient(circle at 85% 25%, rgba(14, 165, 233, 0.10), transparent 260px),
    radial-gradient(circle at 70% 80%, rgba(37, 99, 235, 0.08), transparent 220px);
  pointer-events: none;
}

.hero-main {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px;
  padding: 38px;
}

.hero-copy {
  max-width: 780px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.10);
  color: #2551a3;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2.6rem, 4.8vw, 4.4rem);
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.hero p {
  margin: 0;
  max-width: 58rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-actions-stacked {
  flex-direction: column;
  min-width: 210px;
}

.hero-stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.hero-stat {
  min-width: 170px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.64);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
}

.hero-stat-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1;
}

.hero-stat-label {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 800;
  font-size: 0.96rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  appearance: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-lg {
  min-height: 50px;
  padding: 0 20px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-2) 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.btn-primary:hover {
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
}

.btn-secondary {
  background: rgba(255,255,255,0.9);
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.28);
}

.btn-glass {
  background: rgba(255,255,255,0.58);
  color: var(--text);
  border-color: rgba(255,255,255,0.7);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-sm {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 0.9rem;
}

.section-card,
.panel {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.65);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.section-card-rich {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.86), rgba(255,255,255,0.74));
}

.section-head,
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-head h2,
.panel-head h1,
.panel-head h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.section-head h2 {
  font-size: 1.9rem;
}

.section-subtitle,
.muted {
  color: var(--muted);
}

.count-badge,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #324861;
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}

.month-grid,
.card-grid,
.admin-grid,
.gallery,
.image-grid,
.image-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.month-card,
.card,
.admin-month-card,
.image-card,
.image-admin-card {
  border-radius: 22px;
}

.month-card-rich {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(250,252,255,0.88));
  border: 1px solid rgba(148, 163, 184, 0.18);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.month-card-rich::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(to bottom, #2563eb, #38bdf8);
  opacity: 0.9;
}

.month-card-rich:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.11);
  border-color: rgba(37, 99, 235, 0.22);
}

.month-card-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.month-card-title-wrap h3 {
  margin: 0 0 8px;
  font-size: 1.7rem;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.month-meta-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.month-meta-text {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
}

.meta-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #9aacbf;
}

.card-arrow {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(37, 99, 235, 0.08);
  color: #2557b8;
  font-size: 1.2rem;
  font-weight: 900;
}

.month-summary {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.chapter-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.chapter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #314154;
  font-size: 0.9rem;
  font-weight: 700;
}

.month-card-footer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer-label {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
}

.footer-link {
  color: #2557b8;
  font-weight: 800;
  font-size: 0.94rem;
}

.admin-month-card,
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(250,252,255,0.9));
  border: 1px solid rgba(148, 163, 184, 0.18);
  padding: 22px;
  box-shadow: var(--shadow-soft);
}

.admin-month-card:hover,
.card:hover {
  transform: translateY(-2px);
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  margin-bottom: 18px;
}

.stat-tile {
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  padding: 14px 16px;
}

.stat-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.04em;
}

.form-grid {
  display: grid;
  gap: 14px;
}

label {
  display: block;
  font-weight: 800;
  margin-bottom: 6px;
  color: #233144;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 14px;
  background: rgba(255,255,255,0.94);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: 0.15s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(37, 99, 235, 0.48);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

textarea {
  resize: vertical;
}

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

.inline-form {
  display: inline;
}

.image-card,
.image-admin-card {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(148, 163, 184, 0.18);
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.image-card img,
.image-admin-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  background: #edf2f7;
}

.empty-state {
  border: 2px dashed rgba(148, 163, 184, 0.28);
  border-radius: 22px;
  padding: 36px;
  text-align: center;
  background: rgba(255,255,255,0.62);
}

.empty-state h3 {
  margin: 0 0 8px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

.flash-wrap {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.flash {
  padding: 13px 16px;
  border-radius: 14px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.flash-ok {
  background: rgba(232, 247, 236, 0.84);
  color: #1d6b35;
  border: 1px solid rgba(191, 227, 200, 0.8);
}

.flash-error {
  background: rgba(253, 236, 236, 0.88);
  color: #9c2f2f;
  border: 1px solid rgba(240, 194, 194, 0.9);
}

@media (max-width: 960px) {
  .header-row,
  .hero-main,
  .section-head,
  .panel-head,
  .month-card-topline {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-actions-stacked {
    min-width: 0;
    width: 100%;
    flex-direction: row;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(var(--maxw), calc(100% - 20px));
  }

  .page-content {
    padding-top: 20px;
  }

  .hero-main,
  .section-card,
  .panel {
    padding: 20px;
  }

  .month-grid,
  .card-grid,
  .admin-grid,
  .gallery,
  .image-grid,
  .image-admin-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 2.3rem;
  }

  .main-nav a {
    padding: 8px 10px;
  }
}
/* ===== Admin dashboard only ===== */

.hero-admin {
  margin-bottom: 26px;
}

.admin-shell {
  background: linear-gradient(180deg, rgba(255,255,255,0.86), rgba(255,255,255,0.72));
  border: 1px solid rgba(255,255,255,0.66);
  backdrop-filter: blur(12px);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.10);
}

.admin-shell-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.admin-shell-head h2 {
  margin: 0;
  font-size: 1.9rem;
  letter-spacing: -0.04em;
}

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.admin-month-panel {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,251,255,0.90));
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.admin-month-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(to bottom, #2563eb, #38bdf8);
}

.admin-month-panel-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.admin-month-heading {
  max-width: 760px;
}

.admin-month-kicker {
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5c6e84;
}

.admin-month-heading h3 {
  margin: 0 0 10px;
  font-size: 2rem;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.admin-month-desc {
  margin: 0;
  color: #617286;
  font-size: 1rem;
}

.admin-month-side {
  display: flex;
  align-items: flex-start;
}

.admin-metrics-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px));
  gap: 14px;
  margin-top: 22px;
}

.admin-metric-card {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.035);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.admin-metric-label {
  margin-bottom: 8px;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-metric-value {
  font-size: 2rem;
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.05em;
  color: #122033;
}

.admin-chapter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.admin-chapter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.10);
  color: #31465f;
  font-size: 0.9rem;
  font-weight: 700;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

@media (max-width: 900px) {
  .admin-shell-head,
  .admin-month-panel-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-metrics-row {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .admin-shell {
    padding: 18px;
    border-radius: 20px;
  }

  .admin-month-panel {
    padding: 18px;
    border-radius: 18px;
  }

  .admin-month-heading h3 {
    font-size: 1.6rem;
  }

  .admin-metrics-row {
    grid-template-columns: 1fr;
  }
}
/* ===== compact admin dashboard overrides ===== */

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 18px;
  padding: 4px 2px 10px;
}

.admin-kicker {
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5f7390;
}

.admin-topbar h1 {
  margin: 0 0 6px;
  font-size: 2.3rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.admin-topbar p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.admin-top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-board {
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(148,163,184,0.16);
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 12px 30px rgba(15,23,42,0.08);
  backdrop-filter: blur(10px);
}

.admin-board-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.admin-board-head h2 {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: -0.04em;
}

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

.admin-row-card {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(148,163,184,0.14);
  border-radius: 20px;
  padding: 18px 18px 16px;
  box-shadow: 0 8px 20px rgba(15,23,42,0.05);
}

.admin-row-main {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.admin-row-title h3 {
  margin: 0 0 6px;
  font-size: 1.7rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.admin-row-title p {
  margin: 0;
  color: var(--muted);
}

.admin-row-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mini-stat {
  min-width: 110px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(15,23,42,0.035);
  border: 1px solid rgba(148,163,184,0.14);
}

.mini-stat-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #667892;
}

.mini-stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 850;
  line-height: 1;
}

.admin-row-chapters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.admin-row-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(37,99,235,0.06);
  border: 1px solid rgba(37,99,235,0.10);
  color: #334a63;
  font-size: 0.84rem;
  font-weight: 700;
}

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(148,163,184,0.14);
}

@media (max-width: 860px) {
  .admin-topbar,
  .admin-board-head,
  .admin-row-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-row-stats {
    width: 100%;
  }
}
/* ===== homepage refresh overrides ===== */

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 22px;
  align-items: stretch;
  margin-bottom: 24px;
  padding: 28px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(59,130,246,0.18), transparent 260px),
    linear-gradient(135deg, #101a2b 0%, #17263a 55%, #1d3148 100%);
  color: #fff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.20);
  border: 1px solid rgba(255,255,255,0.06);
}

.home-hero-copy h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 3.2vw, 3.1rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  color: #f8fbff;
  max-width: 8.5em;
}

.home-hero-copy p {
  margin: 0;
  max-width: 40rem;
  color: rgba(235, 243, 252, 0.82);
  font-size: 1rem;
  line-height: 1.45;
}

.home-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.16);
  color: #bcd7ff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.home-hero .btn-secondary {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.14);
  color: #fff;
  backdrop-filter: blur(8px);
}

.home-hero-side {
  display: grid;
  gap: 14px;
}

.home-stat-card {
  padding: 18px 18px 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.home-stat-value {
  font-size: 2.1rem;
  line-height: 1;
  font-weight: 850;
  letter-spacing: -0.05em;
  color: #fff;
}

.home-stat-label {
  margin-top: 7px;
  font-size: 0.9rem;
  color: rgba(235,243,252,0.75);
  font-weight: 600;
}

.home-section {
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(248,250,253,0.92));
  border: 1px solid rgba(148,163,184,0.16);
  box-shadow: 0 16px 40px rgba(15,23,42,0.08);
}

.home-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.home-section-head h2 {
  margin: 0;
  font-size: 1.9rem;
  letter-spacing: -0.04em;
  color: #152238;
}

.home-month-list {
  display: grid;
  gap: 16px;
}

.home-month-card {
  display: block;
  padding: 22px 22px 18px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(148,163,184,0.16);
  box-shadow: 0 12px 26px rgba(15,23,42,0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  position: relative;
  overflow: hidden;
}

.home-month-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 5px;
  border-radius: 99px;
  background: linear-gradient(to bottom, #2563eb, #38bdf8);
}

.home-month-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(15,23,42,0.10);
  border-color: rgba(37,99,235,0.20);
}

.home-month-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.home-month-top h3 {
  margin: 0 0 8px;
  font-size: 1.8rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: #132136;
}

.home-month-summary {
  margin: 0;
  color: #5f7186;
  font-size: 1rem;
  max-width: 46rem;
}

.home-month-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  white-space: nowrap;
}

.home-image-count {
  font-size: 0.92rem;
  font-weight: 700;
  color: #5f7186;
}

.home-chapter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.home-chapter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(15,23,42,0.04);
  border: 1px solid rgba(148,163,184,0.14);
  color: #34485f;
  font-size: 0.88rem;
  font-weight: 700;
}

.home-month-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(148,163,184,0.14);
  color: #27496f;
  font-weight: 750;
}

.home-arrow {
  font-size: 1.15rem;
  line-height: 1;
}

@media (max-width: 900px) {
  .home-hero {
    grid-template-columns: 1fr;
  }

  .home-section-head,
  .home-month-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-month-meta {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .home-hero,
  .home-section {
    padding: 18px;
    border-radius: 20px;
  }

  .home-hero-copy h1 {
    font-size: 2.2rem;
  }
}
/* ===== final thumbnail layout ===== */

.image-grid,
.image-admin-grid,
.gallery {
  grid-template-columns: repeat(auto-fill, minmax(170px, 190px));
  gap: 14px;
  align-items: start;
}

.image-card,
.image-admin-card {
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(148,163,184,0.16);
  border-radius: 16px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 8px 18px rgba(15,23,42,0.05);
}

.image-card img,
.image-admin-card img {
  width: 100%;
  height: 180px;
  display: block;
  border-radius: 10px;
  background: #eef2f7;
  object-fit: contain;
  margin: 0;
}

.image-card figcaption,
.image-admin-card figcaption {
  margin: 0;
}

.image-title {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
  color: #223248;
}

.image-caption {
  margin-top: 4px;
  color: #5f7186;
  font-size: 0.84rem;
  line-height: 1.3;
}
/* anchor jump offset for sticky header */
.chapter-panel,
.chapter,
[id^="chapter-"] {
  scroll-margin-top: 110px;
}
