:root {
  color-scheme: light;
  --ink: #171914;
  --muted: #767a70;
  --paper: #f6f7f2;
  --card: rgba(255, 255, 252, 0.9);
  --accent: #ff5c35;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 92, 53, 0.09), transparent 30%),
    radial-gradient(circle at 82% 78%, rgba(158, 190, 96, 0.13), transparent 32%),
    var(--paper);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(23, 25, 20, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 25, 20, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
}

.shell {
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
}

.router-card {
  width: min(100%, 520px);
  padding: clamp(32px, 7vw, 56px);
  text-align: center;
  background: var(--card);
  border: 1px solid rgba(23, 25, 20, 0.08);
  border-radius: 28px;
  box-shadow: 0 24px 80px rgba(35, 38, 29, 0.1);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #44483f;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  color: white;
  background: var(--ink);
  border-radius: 10px;
  place-items: center;
}

.brand-mark svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.status-icon {
  position: relative;
  display: grid;
  width: 64px;
  height: 64px;
  margin: 52px auto 28px;
  background: rgba(255, 92, 53, 0.08);
  border-radius: 50%;
  place-items: center;
}

.error-mark {
  color: #b42d3c;
  font-family: Georgia, serif;
  font-size: 32px;
  font-weight: 600;
  line-height: 1;
}

h1 {
  margin: 0;
  font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(34px, 7vw, 48px);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.035em;
}

.description {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.retry-button {
  min-width: 128px;
  min-height: 46px;
  margin-top: 30px;
  padding: 0 22px;
  color: white;
  background: var(--ink);
  border: 0;
  border-radius: 13px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.retry-button:hover {
  background: #30332c;
  transform: translateY(-1px);
}

.retry-button:focus-visible {
  outline: 3px solid rgba(255, 92, 53, 0.24);
  outline-offset: 3px;
}

.is-error .status-icon {
  background: rgba(180, 45, 60, 0.08);
}

@media (max-width: 520px) {
  .shell {
    padding: 16px;
  }

  .router-card {
    padding: 36px 24px 42px;
    border-radius: 22px;
  }

  .status-icon {
    margin-top: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
