:root {
  --bg: #f7efe3;
  --paper: #fffbf3;
  --ink: #2b1a10;
  --muted: #7a5d43;
  --brand: #b96a2b;
  --gold: #ffd166;
  --line: #e5d5be;
  --error: #b3261e;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0 auto;
  max-width: 980px;
  min-height: 100vh;
  padding: max(22px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  color: var(--ink);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 209, 102, 0.26), transparent 32rem),
    var(--bg);
  font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
}

.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0 26px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
}

.subtitle {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
}

.test-link {
  flex: none;
  margin-top: 6px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 251, 243, 0.72);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.test-link:hover {
  border-color: var(--brand);
}

.status {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1rem;
}

.status.is-test {
  color: var(--brand);
  font-weight: 700;
}

.status.is-error {
  color: var(--error);
  font-weight: 700;
}

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

.channel-card {
  position: relative;
  display: flex;
  min-height: 172px;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 8px 22px rgba(76, 49, 20, 0.08);
  animation: card-in 0.42s both;
  animation-delay: var(--delay);
}

.channel-card::after {
  position: absolute;
  right: -28px;
  bottom: -42px;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: rgba(255, 209, 102, 0.16);
  content: "";
}

.channel-card.is-ready {
  border-color: rgba(185, 106, 43, 0.38);
}

.channel-mark {
  position: relative;
  z-index: 1;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid var(--gold);
  border-radius: 50%;
  color: #fff8e8;
  background: var(--ink);
  font-size: 1.1rem;
  font-weight: 900;
}

.channel-copy {
  position: relative;
  z-index: 1;
  margin-top: 18px;
}

.channel-copy h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
  line-height: 1.25;
}

.channel-copy p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.channel-state {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  margin-top: 18px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--muted);
  background: #f2e7d7;
  font-size: 0.8rem;
  font-weight: 700;
}

.channel-card.is-ready .channel-state {
  color: #fff;
  background: var(--brand);
}

.empty {
  grid-column: 1 / -1;
  padding: 40px 20px;
  border: 1px dashed var(--line);
  border-radius: 24px;
  color: var(--muted);
  text-align: center;
}

.footer {
  margin-top: 38px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

.footer p {
  margin: 0;
}

code {
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(43, 26, 16, 0.07);
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 560px) {
  body {
    padding-right: 18px;
    padding-left: 18px;
  }

  h1 {
    font-size: 2rem;
  }

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

  .channel-card {
    min-height: 150px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .channel-card {
    animation: none;
  }
}
