/* ==========================================================================
   サがつくブログ。（千葉商科大学 サービス創造学部）公式アーカイブ
   Static Archive Stylesheet
   ========================================================================== */

:root {
  --brand-yellow: #ffcd00;
  --brand-yellow-soft: #fff7cc;
  --brand-yellow-deep: #d9a800;
  --ink-strong: #1a1d24;
  --ink-body: #2c313c;
  --ink-muted: #5c6472;
  --ink-subtle: #7c8494;
  --link: #0f5288;
  --link-hover: #09375e;
  --bg-canvas: #f7f6f1;
  --bg-card: #ffffff;
  --bg-tint: #f2efe4;
  --border: #e5e0d0;
  --border-strong: #d4cdb8;
  --shadow-sm: 0 1px 3px rgba(26, 29, 36, 0.05), 0 1px 2px rgba(26, 29, 36, 0.04);
  --shadow-md: 0 6px 20px rgba(26, 29, 36, 0.08);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --container-max: 1140px;
  --font-sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  --base-font-size: 16px;
}

html.font-large {
  --base-font-size: 18.5px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: var(--base-font-size);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-body);
  background-color: var(--bg-canvas);
  line-height: 1.8;
  word-break: break-word;
  overflow-wrap: anywhere;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #0f5288;
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink-strong);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 9999;
}

.skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
  border-radius: var(--radius-sm);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--brand-yellow);
  border-bottom: 3px solid var(--ink-strong);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.5rem 0;
}

.header-brand-link {
  display: block;
  width: 100%;
  max-width: 680px;
  flex: 0 1 auto;
  min-width: 0;
  line-height: 0;
}

.header-banner {
  display: block;
  width: 100%;
  max-width: 680px;
  height: auto;
}

.header-archive-meta {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  text-align: right;
}

.archive-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--ink-strong);
  color: var(--brand-yellow);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.32rem 0.78rem;
  border-radius: 999px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.archive-period {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-strong);
  white-space: nowrap;
}

/* ---------- Navigation Bar ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(26, 29, 36, 0.04);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.25rem;
  flex-wrap: wrap;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-strong);
  text-decoration: none;
}

.nav-links a:hover {
  background: var(--bg-tint);
  color: var(--ink-strong);
  text-decoration: none;
}

.nav-links a[aria-current="page"] {
  background: var(--brand-yellow);
  color: var(--ink-strong);
  box-shadow: inset 0 0 0 1px rgba(26, 29, 36, 0.15);
}

.nav-count {
  font-size: 0.76rem;
  font-weight: 600;
  background: rgba(26, 29, 36, 0.08);
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.font-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--bg-canvas);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.15rem;
  font-size: 0.78rem;
}

.font-toggle-label {
  padding: 0 0.45rem;
  color: var(--ink-muted);
  font-weight: 600;
}

.font-toggle button {
  border: 0;
  background: transparent;
  color: var(--ink-body);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
}

.font-toggle button[aria-pressed="true"] {
  background: var(--ink-strong);
  color: #fff;
}

/* ---------- Archive Notice Strip ---------- */
.archive-notice {
  background: var(--brand-yellow-soft);
  border-bottom: 1px solid #ecd982;
  color: var(--ink-strong);
  font-size: 0.85rem;
  padding: 0.55rem 0;
}

.archive-notice p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ---------- Main Grid Layout ---------- */
.site-main {
  padding: 1.75rem 0 3.5rem;
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 1.75rem;
  align-items: start;
}

.layout-single {
  max-width: 860px;
  margin: 0 auto;
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* ---------- Search & Filter Panel ---------- */
.filter-panel {
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.25rem;
}

.filter-search-row {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.search-input-wrap {
  position: relative;
  flex: 1;
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.05rem;
  height: 1.05rem;
  color: var(--ink-subtle);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.68rem 2.4rem 0.68rem 2.45rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.96rem;
  color: var(--ink-strong);
  background: #fff;
}

.search-input:focus {
  border-color: var(--link);
}

.search-clear-btn {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-size: 1.15rem;
  line-height: 1;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  cursor: pointer;
  display: none;
}

.search-clear-btn.is-visible {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-clear-btn:hover {
  background: var(--bg-tint);
  color: var(--ink-strong);
}

.filter-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.filter-field label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.filter-select {
  width: 100%;
  padding: 0.48rem 0.6rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.86rem;
  color: var(--ink-strong);
  background: #fff;
}

.filter-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.95rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.filter-checks {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.86rem;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--ink-body);
}

.filter-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.result-count {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink-strong);
}

.result-count strong {
  color: var(--link);
  font-size: 1.06rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.48rem 0.95rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-outline {
  background: #fff;
  color: var(--ink-strong);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  background: var(--bg-tint);
  color: var(--ink-strong);
}

.btn-primary {
  background: var(--ink-strong);
  color: var(--brand-yellow);
  border-color: var(--ink-strong);
}

.btn-primary:hover {
  background: #2f3542;
  color: var(--brand-yellow);
}

/* Active filter tags */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}

.active-filters:empty {
  display: none;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--brand-yellow-soft);
  border: 1px solid #e5c64f;
  color: var(--ink-strong);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
}

/* ---------- Post Cards ---------- */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.post-card {
  display: flex;
  gap: 1.15rem;
  padding: 1.2rem 1.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.post-card:hover {
  border-color: #d4b230;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.post-card-body {
  flex: 1;
  min-width: 0;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem 0.75rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin-bottom: 0.42rem;
}

.post-date {
  font-weight: 700;
  color: var(--ink-body);
  font-variant-numeric: tabular-nums;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.58rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: var(--bg-tint);
  color: var(--ink-strong);
  border: 1px solid var(--border);
}

.cat-pill--highlight {
  background: var(--brand-yellow-soft);
  border-color: #e6c74a;
}

.comment-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1rem 0.52rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: #edf5fc;
  color: var(--link);
  border: 1px solid #cce0f4;
}

.post-card-title {
  margin: 0 0 0.45rem;
  font-size: 1.12rem;
  line-height: 1.48;
  font-weight: 800;
}

.post-card-title a {
  color: var(--ink-strong);
}

.post-card-title a:hover {
  color: var(--link);
  text-decoration: underline;
}

.post-card-excerpt {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ink-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-thumb {
  flex: 0 0 132px;
  width: 132px;
  height: 98px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-tint);
  align-self: center;
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.empty-state {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--ink-muted);
}

.empty-state h3 {
  margin: 0 0 0.5rem;
  color: var(--ink-strong);
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 0.5rem;
}

.page-btn {
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.65rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink-strong);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover:not(:disabled) {
  background: var(--bg-tint);
}

.page-btn.is-active {
  background: var(--ink-strong);
  color: var(--brand-yellow);
  border-color: var(--ink-strong);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-ellipsis {
  padding: 0 0.3rem;
  color: var(--ink-subtle);
}

/* ---------- Sidebar ---------- */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.widget {
  padding: 1.15rem 1.2rem;
}

.widget-title {
  margin: 0 0 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--brand-yellow);
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--ink-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
}

.stat-tile {
  background: var(--bg-canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.65rem;
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--ink-strong);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-muted);
  font-weight: 600;
  margin-top: 0.15rem;
}

.year-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem;
}

.year-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.38rem 0.62rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-canvas);
  color: var(--ink-strong);
  font-size: 0.83rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.year-chip:hover,
.year-chip.is-active {
  background: var(--brand-yellow);
  border-color: var(--ink-strong);
  color: var(--ink-strong);
  text-decoration: none;
}

.year-chip span {
  font-size: 0.74rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.year-chip.is-active span,
.year-chip:hover span {
  color: var(--ink-strong);
}

.widget-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.widget-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.86rem;
  line-height: 1.45;
  padding-bottom: 0.4rem;
  border-bottom: 1px dashed var(--border);
}

.widget-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.widget-list .count {
  flex: 0 0 auto;
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.widget-more {
  display: inline-block;
  margin-top: 0.7rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.quick-search-form {
  display: flex;
  gap: 0.45rem;
}

.quick-search-form input {
  flex: 1;
  min-width: 0;
  padding: 0.48rem 0.65rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.88rem;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--ink-muted);
}

.breadcrumb a:hover {
  color: var(--link);
}

.breadcrumb-sep {
  color: var(--ink-subtle);
}

/* ---------- Article Detail ---------- */
.article-card {
  padding: 1.75rem 2rem;
}

.article-header {
  padding-bottom: 1.15rem;
  margin-bottom: 1.45rem;
  border-bottom: 2px solid var(--border);
}

.article-title {
  margin: 0.55rem 0 0;
  font-size: 1.55rem;
  line-height: 1.4;
  font-weight: 900;
  color: var(--ink-strong);
}

.entry-content {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--ink-body);
}

.entry-content p {
  margin: 0 0 1.25em;
}

.entry-content h2 {
  margin: 2rem 0 0.85rem;
  padding: 0.35rem 0 0.35rem 0.8rem;
  border-left: 4px solid var(--brand-yellow);
  font-size: 1.28rem;
  color: var(--ink-strong);
}

.entry-content h3 {
  margin: 1.6rem 0 0.7rem;
  font-size: 1.12rem;
  color: var(--ink-strong);
}

.entry-content ul,
.entry-content ol {
  margin: 0 0 1.25em;
  padding-left: 1.6em;
}

.entry-content blockquote {
  margin: 1.25rem 0;
  padding: 0.85rem 1.15rem;
  background: var(--bg-canvas);
  border-left: 4px solid var(--brand-yellow-deep);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink-body);
}

.entry-content img {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: zoom-in;
  margin: 0.35rem 0.35rem 0.35rem 0;
  vertical-align: middle;
}

.entry-content figure,
.entry-content .wp-caption {
  margin: 1.25rem auto;
  max-width: 100%;
  text-align: center;
}

.entry-content figcaption,
.entry-content .wp-caption-text {
  font-size: 0.84rem;
  color: var(--ink-muted);
  margin-top: 0.4rem;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.92rem;
  display: block;
  overflow-x: auto;
}

.entry-content th,
.entry-content td {
  border: 1px solid var(--border-strong);
  padding: 0.55rem 0.75rem;
  text-align: left;
}

.entry-content th {
  background: var(--bg-tint);
  font-weight: 700;
}

.video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  margin: 1.35rem 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.article-footer-meta {
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  font-size: 0.84rem;
  color: var(--ink-muted);
}

/* ---------- Read-Only Comments Section ---------- */
.comments-section {
  margin-top: 1.5rem;
  padding: 1.5rem 1.75rem;
}

.comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-bottom: 0.85rem;
  margin-bottom: 1.15rem;
  border-bottom: 2px solid var(--brand-yellow);
}

.comments-header h2 {
  margin: 0;
  font-size: 1.12rem;
  color: var(--ink-strong);
}

.readonly-tag {
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--bg-tint);
  color: var(--ink-muted);
  border: 1px solid var(--border-strong);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment-children {
  list-style: none;
  margin: 0.85rem 0 0 1.4rem;
  padding: 0 0 0 1rem;
  border-left: 3px solid var(--brand-yellow);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.comment-item {
  background: var(--bg-canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.1rem;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.comment-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--brand-yellow);
  color: var(--ink-strong);
  font-size: 0.86rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.comment-author {
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--ink-strong);
}

.comment-date {
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.comment-body {
  font-size: 0.93rem;
  line-height: 1.75;
  color: var(--ink-body);
}

.comment-body p:last-child {
  margin-bottom: 0;
}

.comments-closed-note {
  margin: 1.15rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-muted);
  text-align: right;
}

/* ---------- Article Prev/Next Nav ---------- */
.article-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.35rem;
}

.article-nav-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.95rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--ink-strong);
  box-shadow: var(--shadow-sm);
}

.article-nav-card:hover {
  border-color: #d4b230;
  background: var(--brand-yellow-soft);
  text-decoration: none;
  color: var(--ink-strong);
}

.article-nav-card--next {
  text-align: right;
}

.article-nav-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.article-nav-title {
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.45;
}

.article-back-row {
  margin-top: 1.25rem;
  text-align: center;
}

/* ---------- Directory Pages (Fixed Pages / Authors) ---------- */
.dir-header {
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.35rem;
}

.dir-header h1 {
  margin: 0 0 0.4rem;
  font-size: 1.5rem;
  color: var(--ink-strong);
}

.dir-header p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.93rem;
}

.page-group {
  padding: 1.35rem 1.55rem;
  margin-bottom: 1.2rem;
}

.page-group h2 {
  margin: 0 0 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--brand-yellow);
  font-size: 1.14rem;
  color: var(--ink-strong);
}

.page-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.page-link-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
  background: var(--bg-canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink-strong);
  text-decoration: none;
}

.page-link-card:hover {
  background: var(--brand-yellow-soft);
  border-color: #d4b230;
  color: var(--ink-strong);
  text-decoration: none;
}

.page-link-title {
  font-weight: 800;
  font-size: 0.94rem;
  line-height: 1.45;
}

.page-link-meta {
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.author-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.author-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--ink-strong);
  box-shadow: var(--shadow-sm);
}

.author-card:hover {
  background: var(--brand-yellow-soft);
  border-color: #d4b230;
  color: var(--ink-strong);
  text-decoration: none;
}

.author-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: var(--brand-yellow);
  color: var(--ink-strong);
  font-weight: 900;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.author-info {
  min-width: 0;
}

.author-name {
  display: block;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.35;
}

.author-meta {
  display: block;
  font-size: 0.77rem;
  color: var(--ink-muted);
  margin-top: 0.15rem;
}

.child-pages-box {
  margin-top: 1.5rem;
  padding: 1.15rem 1.25rem;
  background: var(--bg-canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.child-pages-box h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--ink-strong);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(18, 21, 28, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img {
  max-width: 94vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  background: #fff;
}

.lightbox-caption {
  margin-top: 0.75rem;
  color: #f3f4f6;
  font-size: 0.88rem;
  text-align: center;
  max-width: 720px;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink-strong);
  color: #d8dce4;
  padding: 2.2rem 0 1.8rem;
  border-top: 4px solid var(--brand-yellow);
  font-size: 0.86rem;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-bottom: 1.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand {
  margin: 0 0 0.35rem;
  font-size: 1.08rem;
  font-weight: 900;
  color: var(--brand-yellow);
}

.footer-desc {
  margin: 0;
  color: #aeb5c2;
  max-width: 440px;
  line-height: 1.6;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.25rem;
}

.footer-links a {
  color: #e5e8ef;
}

.footer-links a:hover {
  color: var(--brand-yellow);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.1rem;
  color: #9ba3b2;
  font-size: 0.8rem;
}

.to-top {
  color: var(--brand-yellow);
  font-weight: 700;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .layout-grid {
    grid-template-columns: 1fr;
  }
  .filter-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .author-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.55rem 0 0.7rem;
  }
  .header-brand-link {
    flex: none;
    width: 100%;
  }
  .header-archive-meta {
    flex-direction: row;
    align-items: center;
    width: 100%;
    justify-content: space-between;
  }
  .post-card {
    flex-direction: column-reverse;
    padding: 1rem 1.05rem;
  }
  .post-card-thumb {
    width: 100%;
    height: 170px;
    flex: none;
  }
  .article-card {
    padding: 1.25rem 1.15rem;
  }
  .article-title {
    font-size: 1.32rem;
  }
  .article-nav,
  .page-grid,
  .author-grid {
    grid-template-columns: 1fr;
  }
  .comments-section {
    padding: 1.15rem 1rem;
  }
  .comment-children {
    margin-left: 0.65rem;
    padding-left: 0.75rem;
  }
}

@media print {
  .site-nav,
  .sidebar,
  .filter-panel,
  .article-nav,
  .article-back-row,
  .lightbox {
    display: none !important;
  }
  body {
    background: #fff;
  }
  .card,
  .article-card {
    box-shadow: none;
    border: 0;
  }
}
