:root {
  color-scheme: light;
  --bg: #f7f8f6;
  --surface: #ffffff;
  --surface-soft: #f1f4f2;
  --text: #202421;
  --muted: #66706a;
  --line: #dfe5e0;
  --accent: #315f54;
  --accent-strong: #21483f;
  --accent-soft: #e2ece8;
  --shadow: 0 18px 40px rgba(40, 54, 48, 0.08);
  --radius: 8px;
  --thumb-size: 140px;
  --thumb-gap: 7px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(223, 229, 224, 0.82);
  background: rgba(247, 248, 246, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent);
  font-size: 16px;
}

.hero {
  min-height: calc(100vh - 64px);
  display: grid;
  align-items: center;
  padding: 72px 24px 64px;
}

.hero-inner {
  width: min(980px, 100%);
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 32px;
  font-size: clamp(52px, 8vw, 104px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
}

.operator-letter {
  max-width: 780px;
  margin: 0 0 30px;
  padding: 28px 0 30px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.operator-letter p {
  max-width: 720px;
  margin-bottom: 18px;
  color: #34403a;
  font-size: clamp(16px, 1.45vw, 19px);
  line-height: 1.95;
  overflow-wrap: anywhere;
}

.operator-letter p:last-child {
  margin-bottom: 0;
}

.operator-letter .letter-signature {
  margin-top: 24px;
  color: var(--muted);
  text-align: right;
  line-height: 1.7;
}

.hero-actions {
  margin-bottom: 34px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 700;
}

.primary-button {
  padding: 0 22px;
  background: var(--accent);
  color: #ffffff;
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--accent-strong);
}

.secondary-button {
  padding: 0 18px;
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.secondary-button:hover,
.secondary-button:focus-visible {
  border-color: var(--accent);
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 760px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.quick-stats div {
  padding: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.quick-stats dt {
  color: var(--muted);
  font-size: 13px;
}

.quick-stats dd {
  margin: 3px 0 0;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
}

.archive {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 54px 0 96px;
}

.archive-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.archive-summary {
  max-width: 380px;
  margin-bottom: 8px;
  color: var(--muted);
  text-align: right;
}

.toolbar {
  position: sticky;
  top: 64px;
  z-index: 15;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.toolbar input,
.toolbar select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
}

.toolbar input:focus,
.toolbar select:focus {
  border-color: var(--accent);
  outline: 3px solid var(--accent-soft);
}

.segmented {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  min-height: 44px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.segment {
  min-width: 72px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.segment.active {
  background: var(--accent);
  color: #ffffff;
}

.status {
  min-height: 28px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
}

.timeline {
  display: grid;
  gap: 16px;
}

.post {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(40, 54, 48, 0.05);
  scroll-margin-top: 160px;
}

.post-date {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.post-day {
  display: block;
  color: var(--text);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.post-main {
  min-width: 0;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.post-name {
  color: var(--accent);
  font-weight: 800;
}

.post-text {
  margin-bottom: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #2c332f;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(3, var(--thumb-size));
  gap: var(--thumb-gap);
  width: fit-content;
  max-width: 100%;
}

.image-grid.single {
  grid-template-columns: var(--thumb-size);
}

.image-grid.double {
  grid-template-columns: repeat(2, var(--thumb-size));
}

.image-button {
  display: block;
  width: var(--thumb-size);
  height: var(--thumb-size);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: var(--surface-soft);
  cursor: zoom-in;
}

.image-grid.single .image-button {
  max-width: var(--thumb-size);
}

.image-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 160ms ease;
}

.image-grid.single .image-button img {
  height: 100%;
  object-fit: cover;
}

.image-button:hover img,
.image-button:focus-visible img {
  transform: scale(1.025);
}

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

.sentinel {
  height: 48px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(16, 19, 17, 0.88);
  padding: 32px 72px;
}

.lightbox.open {
  display: flex;
}

.lightbox-figure {
  display: grid;
  gap: 12px;
  width: 100%;
  height: 100%;
  margin: 0;
  align-items: center;
  justify-items: center;
}

.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 112px);
  border-radius: 8px;
  cursor: zoom-out;
  object-fit: contain;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.34);
}

.lightbox figcaption {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.icon-button {
  position: absolute;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
}

.icon-button:disabled {
  cursor: default;
  opacity: 0.35;
}

.close-lightbox {
  top: 20px;
  right: 20px;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

@media (max-width: 760px) {
  :root {
    --thumb-size: 112px;
    --thumb-gap: 6px;
  }

  .site-header {
    min-height: 58px;
    padding: 0 18px;
  }

  .hero {
    min-height: calc(100vh - 58px);
    padding: 42px 18px;
  }

  h1 {
    font-size: clamp(48px, 16vw, 72px);
  }

  .operator-letter {
    margin-bottom: 24px;
    padding: 22px 0 24px;
  }

  .operator-letter p {
    font-size: 16px;
    line-height: 1.85;
    margin-bottom: 15px;
  }

  .quick-stats {
    grid-template-columns: 1fr;
  }

  .archive {
    width: min(100% - 28px, 1120px);
    padding-top: 38px;
  }

  .archive-head {
    display: block;
  }

  .archive-summary {
    max-width: none;
    margin-top: 12px;
    text-align: left;
  }

  .toolbar {
    top: 58px;
    grid-template-columns: 1fr 1fr;
  }

  .toolbar .secondary-button,
  .toolbar .segmented {
    width: 100%;
  }

  .post {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 16px;
  }

  .post-date {
    display: flex;
    gap: 8px;
    align-items: baseline;
  }

  .post-day {
    font-size: 22px;
  }

  .image-grid {
    grid-template-columns: repeat(3, var(--thumb-size));
    gap: var(--thumb-gap);
  }

  .image-grid.single {
    grid-template-columns: var(--thumb-size);
  }

  .lightbox {
    padding: 58px 12px 28px;
  }

  .lightbox img {
    max-height: calc(100vh - 122px);
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }
}

@media (max-width: 460px) {
  :root {
    --thumb-size: 104px;
    --thumb-gap: 6px;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  .image-grid {
    grid-template-columns: repeat(3, var(--thumb-size));
  }

  .image-grid.single {
    grid-template-columns: var(--thumb-size);
  }
}

@media (max-width: 360px) {
  :root {
    --thumb-size: 88px;
  }
}
