:root {
  color-scheme: light dark;
  --bg: #fff;
  --text: #202124;
  --muted: #5f6368;
  --icon: #5f6368;
  --link: #1a73e8;
  --button: #1a73e8;
  --button-text: #fff;
  --secondary: transparent;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, a { font: inherit; }

.page { min-height: 100vh; }
.error {
  width: min(600px, calc(100% - 48px));
  margin: 0 auto;
  padding-top: 18vh;
}
.icon {
  width: 48px;
  height: 48px;
  margin-bottom: 34px;
  color: var(--icon);
}
.icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: square;
  stroke-linejoin: miter;
}
h1 {
  margin: 0 0 20px;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -.35px;
}
p {
  margin: 0 0 18px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted);
}
a { color: var(--link); text-decoration: none; }
.code {
  margin-top: 26px;
  font-size: 13px;
  line-height: 1.4;
}
.desktop-reload {
  margin-top: 44px;
  border: 0;
  border-radius: 20px;
  padding: 9px 20px;
  background: var(--button);
  color: var(--button-text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.mobile-copy, .mobile-actions, .details { display: none; }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #202124;
    --text: #e8eaed;
    --muted: #9aa0a6;
    --icon: #9aa0a6;
    --link: #8ab4f8;
    --button: #8ab4f8;
    --button-text: #202124;
    --secondary: #303134;
  }
}

@media (max-width: 600px) {
  .page {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    padding: max(34px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  }
  .error {
    width: 100%;
    margin: 0;
    padding-top: 14vh;
  }
  .icon {
    width: 44px;
    height: 44px;
    margin-bottom: 54px;
  }
  h1 {
    margin-bottom: 24px;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 400;
    letter-spacing: 0;
  }
  p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.6;
  }
  .desktop-copy, .desktop-reload { display: none; }
  .mobile-copy { display: block; }
  .try { margin-top: 26px; }
  .try p { margin-bottom: 2px; }
  .code {
    margin-top: 28px;
    font-size: 13px;
    letter-spacing: .15px;
  }
  .details {
    margin-top: 56px;
  }
  .details:not([hidden]) { display: block; }
  .details h2 {
    margin: 0 0 12px;
    color: var(--text);
    font-size: 17px;
    line-height: 1.4;
    font-weight: 700;
  }
  .mobile-actions {
    display: grid;
    gap: 14px;
    width: 100%;
    margin-top: auto;
    padding-top: 36px;
  }
  .mobile-actions button {
    min-height: 54px;
    border: 0;
    border-radius: 28px;
    font-size: 16px;
    cursor: pointer;
  }
  .reload {
    background: var(--button);
    color: var(--button-text);
  }
  .more {
    background: var(--secondary);
    color: var(--link);
  }
}

@media (max-width: 360px) {
  .page { padding-left: 20px; padding-right: 20px; }
  .error { padding-top: 10vh; }
  .icon { margin-bottom: 40px; }
}
