:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--page);
  color: var(--text);
  transition: background 220ms ease, color 220ms ease;
}

body[data-mode="cafe"] {
  --page: #f7f4ee;
  --surface: #fffdf8;
  --surface-strong: #f3ece0;
  --text: #251f19;
  --muted: #756a60;
  --line: #e0d7c9;
  --accent: #315f56;
  --accent-strong: #233f39;
  --accent-soft: #dbe8df;
  --button-text: #ffffff;
  --shadow: rgba(49, 36, 23, 0.06);
}

body[data-mode="night"] {
  color-scheme: dark;
  --page: #111823;
  --surface: #17212d;
  --surface-strong: #202b37;
  --text: #f6f0df;
  --muted: #b4c3cc;
  --line: #344252;
  --accent: #7bd4b3;
  --accent-strong: #cbeedc;
  --accent-soft: #1e3c38;
  --button-text: #0e1420;
  --shadow: rgba(0, 0, 0, 0.18);
}

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

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 14px 40px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  background: color-mix(in srgb, var(--page) 94%, transparent);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--button-text);
  font-weight: 800;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 22px;
  color: var(--muted);
  font-size: 0.94rem;
}

.site-nav a {
  padding: 8px 0;
}

.site-nav a:hover {
  color: var(--text);
}

.mode-toggle {
  min-width: 124px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 13px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.mode-toggle:hover {
  border-color: var(--accent);
}

main {
  overflow: hidden;
}

.hero {
  min-height: calc(100vh - 70px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 48px;
  align-items: center;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 54px 0 22px;
}

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

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 11ch;
  margin-bottom: 20px;
  font-size: 4.1rem;
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 20px;
  font-size: 2rem;
  line-height: 1.18;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.02rem;
  letter-spacing: 0;
}

.hero-summary {
  max-width: 580px;
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1.8;
}

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

.action-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--button-text);
  cursor: pointer;
  font-weight: 700;
}

.action-link:nth-child(n + 2) {
  background: transparent;
  color: var(--accent-strong);
}

.action-link.is-disabled {
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
  cursor: not-allowed;
}

.hero-index {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 46px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-index a {
  display: grid;
  gap: 4px;
  min-height: 72px;
  align-content: center;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
}

.hero-index a:last-child {
  border-right: 0;
}

.hero-index span {
  color: var(--muted);
  font-size: 0.82rem;
}

.hero-index strong {
  color: var(--text);
  font-size: 0.96rem;
}

.hero-panel,
.counter-card,
.command-card,
.info-card,
.channel-group,
.map-card,
.feedback-card,
.guide-card,
.notice-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow: none;
}

.hero-panel {
  padding: 22px;
  box-shadow: 0 18px 44px var(--shadow);
}

.panel-title {
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 750;
}

.panel-divider {
  height: 1px;
  margin: 18px 0;
  background: var(--line);
}

.today-route {
  display: grid;
  gap: 8px;
}

.today-route span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.today-route a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--surface-strong) 54%, transparent);
  color: var(--accent-strong);
  font-weight: 700;
}

.today-route a::after {
  color: var(--muted);
  content: ">";
}

.status-list {
  display: grid;
  gap: 8px;
}

.status-list span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
  padding: 11px 12px;
  background: color-mix(in srgb, var(--surface-strong) 66%, transparent);
  color: var(--muted);
  font-weight: 650;
}

.status-list span::after {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.section-block,
.split-section {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 72px 0;
}

.section-copy {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.85;
}

.status-section {
  padding-top: 34px;
}

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

.status-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
}

.status-card span,
.status-card strong,
.status-card p {
  display: block;
}

.status-card span {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.status-card strong {
  margin-bottom: 7px;
  color: var(--accent-strong);
  font-size: 1.02rem;
}

.status-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.card-grid,
.channel-grid,
.cafe-map-grid,
.feedback-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.info-card,
.channel-group,
.map-card,
.feedback-card,
.notice-item {
  padding: 18px;
}

.info-card p,
.channel-group p,
.map-card p,
.feedback-card p,
.notice-item p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.75;
}

.cafe-map-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 24px;
}

.map-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 218px;
}

.map-card:nth-child(1),
.map-card:nth-child(2),
.map-card:nth-child(3) {
  grid-column: span 2;
}

.map-card:nth-child(4),
.map-card:nth-child(5) {
  grid-column: span 3;
}

.map-code {
  width: fit-content;
  border: 1px solid color-mix(in srgb, var(--line) 66%, var(--accent));
  border-radius: 999px;
  padding: 5px 9px;
  background: color-mix(in srgb, var(--accent-soft) 58%, transparent);
  color: var(--accent-strong);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 800;
}

.feedback-section {
  padding-top: 46px;
}

.feedback-grid {
  margin-top: 24px;
}

.guide-section {
  padding-top: 42px;
}

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

.guide-card {
  padding: 18px;
}

.guide-card span {
  display: inline-flex;
  margin-bottom: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  background: color-mix(in srgb, var(--accent-soft) 56%, transparent);
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 800;
}

.guide-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.72;
}

.feedback-card {
  display: grid;
  align-content: start;
  gap: 12px;
}

.feedback-card span {
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  background: color-mix(in srgb, var(--surface-strong) 68%, transparent);
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 700;
}

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

.command-menu-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
}

.command-menu-card p {
  margin-bottom: 14px;
  color: var(--muted);
  line-height: 1.72;
}

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

.command-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border: 1px solid color-mix(in srgb, var(--line) 74%, var(--accent));
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--surface-strong);
  background: color-mix(in srgb, var(--surface-strong) 62%, transparent);
  color: var(--accent-strong);
  font-family: "Cascadia Code", Consolas, "Microsoft YaHei", monospace;
  font-size: 0.9rem;
  white-space: nowrap;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 38px;
  align-items: center;
}

.counter-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
}

.counter-mark {
  display: grid;
  width: 92px;
  height: 112px;
  flex: none;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent-soft) 78%, transparent);
  color: var(--accent-strong);
  font-size: 2.7rem;
  font-weight: 800;
}

.counter-card strong,
.counter-card span {
  display: block;
}

.counter-card strong {
  margin-bottom: 6px;
  font-size: 1.28rem;
}

.counter-card span {
  color: var(--muted);
}

.command-card {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.command-card code {
  display: block;
  border-radius: 8px;
  padding: 11px 13px;
  background: color-mix(in srgb, var(--surface-strong) 68%, transparent);
  color: var(--accent-strong);
  font-family: "Cascadia Code", Consolas, monospace;
}

.channel-group h3 {
  color: var(--accent-strong);
}

.channel-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.channel-list span {
  border-radius: 999px;
  padding: 6px 10px;
  background: color-mix(in srgb, var(--surface-strong) 64%, transparent);
  color: var(--muted);
  font-size: 0.9rem;
}

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

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

.changelog-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow: none;
}

.changelog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.changelog-meta span,
.changelog-version {
  border-radius: 999px;
  padding: 5px 9px;
  background: color-mix(in srgb, var(--surface-strong) 68%, transparent);
}

.changelog-version {
  color: var(--accent-strong);
  font-weight: 700;
}

.changelog-item ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.75;
}

.changelog-item li::marker {
  color: var(--accent);
}

.ledger-board {
  border: 1px solid color-mix(in srgb, var(--line) 58%, #0b1418);
  border-radius: 8px;
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    #1a2429;
  box-shadow: 0 18px 44px var(--shadow);
}

.latest-summary {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
}

.latest-summary span,
.latest-summary strong {
  display: block;
}

.latest-summary span {
  margin-bottom: 5px;
  color: var(--muted);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.82rem;
}

.latest-summary strong {
  color: var(--accent-strong);
  font-size: 1.04rem;
}

.latest-summary p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.ledger-board-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(164, 190, 185, 0.18);
  border-radius: 6px;
  padding: 10px 14px;
  background: #111b20;
  color: #8ed06a;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0;
}

.ledger-screen {
  height: 360px;
  margin-top: 10px;
  overflow-y: auto;
  border: 1px solid rgba(164, 190, 185, 0.22);
  border-radius: 6px;
  padding: 18px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(11, 22, 26, 0.76), rgba(14, 26, 30, 0.96)),
    #0d191d;
  background-size: 100% 18px, auto, auto;
  color: #c5d0ca;
  scrollbar-color: rgba(184, 205, 199, 0.62) rgba(23, 35, 40, 0.9);
  scrollbar-width: thin;
}

.ledger-screen::-webkit-scrollbar {
  width: 10px;
}

.ledger-screen::-webkit-scrollbar-track {
  background: rgba(23, 35, 40, 0.9);
  border-radius: 999px;
}

.ledger-screen::-webkit-scrollbar-thumb {
  border: 2px solid rgba(23, 35, 40, 0.9);
  border-radius: 999px;
  background: rgba(184, 205, 199, 0.7);
}

.ledger-screen .changelog-list {
  gap: 20px;
}

.ledger-entry {
  border: 0;
  border-bottom: 1px solid rgba(164, 190, 185, 0.18);
  border-radius: 0;
  padding: 0 0 18px;
  background: transparent;
  box-shadow: none;
}

.ledger-entry:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.ledger-entry .changelog-meta {
  color: #8aa19a;
  font-family: "Cascadia Code", Consolas, monospace;
}

.ledger-entry .changelog-meta span,
.ledger-entry .changelog-version {
  border: 1px solid rgba(142, 208, 106, 0.18);
  background: rgba(142, 208, 106, 0.06);
}

.ledger-entry .changelog-version {
  color: #8ed06a;
}

.ledger-entry h3 {
  color: #9adb72;
  font-size: 1.08rem;
}

.ledger-points {
  font-family: "Cascadia Code", Consolas, "Microsoft YaHei", monospace;
}

.ledger-points li {
  color: #c8d4cf;
}

body[data-mode="night"] .ledger-board {
  border-color: rgba(123, 212, 179, 0.26);
  background:
    linear-gradient(180deg, rgba(123, 212, 179, 0.08), rgba(123, 212, 179, 0)),
    #111a20;
}

body[data-mode="night"] .ledger-board-top {
  color: #9ff0c3;
}

body[data-mode="night"] .ledger-entry h3,
body[data-mode="night"] .ledger-entry .changelog-version {
  color: #9ff0c3;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(220px, auto);
  align-items: start;
  gap: 28px;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 42px 0 54px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-brand,
.footer-status {
  display: grid;
  gap: 7px;
}

.footer-brand strong {
  color: var(--text);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.footer-links a {
  color: var(--accent-strong);
  font-weight: 650;
}

.footer-status {
  justify-items: end;
  font-size: 0.92rem;
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
    padding: 14px 20px;
  }

  .site-nav {
    grid-column: 1 / -1;
    order: 3;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero,
  .split-section {
    grid-template-columns: 1fr;
  }

  .hero-index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-index a:nth-child(2) {
    border-right: 0;
  }

  .hero-index a:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .hero {
    min-height: auto;
    padding-top: 52px;
  }

  h1 {
    font-size: 3.2rem;
  }

  .card-grid,
  .channel-grid,
  .feedback-grid,
  .guide-grid,
  .status-board,
  .command-menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cafe-map-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-card:nth-child(n) {
    grid-column: span 1;
  }
}

@media (max-width: 560px) {
  .site-header {
    gap: 12px;
  }

  .brand {
    font-size: 0.96rem;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .mode-toggle {
    min-width: auto;
    padding: 8px 11px;
  }

  .hero,
  .section-block,
  .split-section,
  .site-footer {
    width: min(100% - 32px, 1180px);
  }

  h1 {
    font-size: 2.75rem;
  }

  h2 {
    font-size: 1.68rem;
  }

  .hero-summary {
    font-size: 1rem;
  }

  .ledger-screen {
    height: 300px;
    padding: 14px;
  }

  .ledger-board-top {
    padding: 9px 11px;
    font-size: 0.82rem;
  }

  .hero-actions,
  .site-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .site-footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .footer-status {
    justify-items: start;
  }

  .hero-index {
    grid-template-columns: 1fr;
  }

  .cafe-map-grid {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .channel-grid,
  .feedback-grid,
  .guide-grid,
  .status-board,
  .command-menu-grid {
    grid-template-columns: 1fr;
  }

  .latest-summary {
    grid-template-columns: 1fr;
  }

  .hero-index a,
  .hero-index a:nth-child(2) {
    border-right: 0;
  }

  .hero-index a:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .action-link {
    width: 100%;
  }
}
