: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: #f4efe7;
  --surface: #fffaf2;
  --surface-strong: #f8eadb;
  --text: #251f19;
  --muted: #756a60;
  --line: #dfd1c0;
  --accent: #315f56;
  --accent-strong: #233f39;
  --accent-soft: #dbe8df;
  --button-text: #ffffff;
  --shadow: rgba(49, 36, 23, 0.12);
}

body[data-mode="night"] {
  color-scheme: dark;
  --page: #0e1420;
  --surface: #151f2d;
  --surface-strong: #1e2b3b;
  --text: #f6f0df;
  --muted: #b4c3cc;
  --line: #314256;
  --accent: #7bd4b3;
  --accent-strong: #cbeedc;
  --accent-soft: #1e3c38;
  --button-text: #0e1420;
  --shadow: rgba(0, 0, 0, 0.24);
}

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: 16px 40px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  background: color-mix(in srgb, var(--page) 92%, 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: 9px 14px;
  background: var(--surface);
  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: 64px 0 40px;
}

.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.6rem;
  line-height: 0.98;
  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: 32px;
}

.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: var(--surface);
  color: var(--muted);
  cursor: not-allowed;
}

.hero-panel,
.counter-card,
.command-card,
.info-card,
.channel-group,
.notice-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 50px var(--shadow);
}

.hero-panel {
  padding: 28px;
}

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

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

.status-list span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
  padding: 13px 14px;
  background: var(--surface-strong);
  font-weight: 700;
}

.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: 82px 0;
}

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

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

.info-card,
.channel-group,
.notice-item {
  padding: 22px;
}

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

.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: 24px;
}

.counter-mark {
  display: grid;
  width: 92px;
  height: 112px;
  flex: none;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  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: 22px;
}

.command-card code {
  display: block;
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--surface-strong);
  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: var(--surface-strong);
  color: var(--muted);
  font-size: 0.9rem;
}

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

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 42px 0 54px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@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 {
    min-height: auto;
    padding-top: 52px;
  }

  h1 {
    font-size: 3.35rem;
  }

  .card-grid,
  .channel-grid {
    grid-template-columns: 1fr;
  }
}

@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;
  }

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

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