:root {
  --accent: #a32119;
  --accent-contrast: #ffffff;

  --bg: #f5f5f4;
  --bg-card: #ffffff;
  --text: #1c1c1c;
  --text-muted: #5a5a5a;
  --border: #e2e2e0;
  --box-bg: #faf5f4;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] {
  --bg: #121212;
  --bg-card: #1c1c1c;
  --text: #ececec;
  --text-muted: #a8a8a8;
  --border: #2c2c2c;
  --box-bg: #241a19;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.noscript-box {
  max-width: 640px;
  margin: 2rem auto;
  padding: 1rem 1.25rem;
  background: #fff3f2;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: #1c1c1c;
  font-size: 0.95rem;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem;
}

.toolbar {
  width: 100%;
  max-width: 640px;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0 1.5rem 0;
}

.toolbar-group {
  display: flex;
  gap: 0.4rem;
}

.chip {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

.card {
  width: 100%;
  max-width: 640px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 2.5rem 1.75rem;
  text-align: center;
  margin-top: auto;
}

.emoji {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 0.75rem;
}

h1 {
  font-size: 1.5rem;
  margin: 0 0 0.75rem 0;
  letter-spacing: -0.01em;
}

.description {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.55;
  margin: 0 auto;
  max-width: 480px;
}

.boxes {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  text-align: left;
}

.box {
  background: var(--box-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
}

.box h2 {
  font-size: 0.9rem;
  margin: 0 0 0.35rem 0;
  color: var(--accent);
}

.box p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.requested-url {
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--box-bg);
  border: 1px dashed var(--border);
  border-radius: 10px;
  text-align: left;
}

.diagnostics-title {
  margin-bottom: 0.5rem;
}

.diagnostics-row {
  margin-top: 0.6rem;
}

.diagnostics-row:first-child {
  margin-top: 0;
}

.requested-url-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.diagnostics-row-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.requested-url-value {
  display: block;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  color: var(--text);
  word-break: break-all;
}

.footer {
  width: 100%;
  max-width: 640px;
  margin-top: auto;
  padding-top: 1.75rem;
  text-align: center;
}

.footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.footer a:hover {
  text-decoration: underline;
}

@media (max-width: 420px) {
  .card {
    padding: 2rem 1.25rem;
  }
  .emoji {
    font-size: 2.5rem;
  }
  h1 {
    font-size: 1.3rem;
  }
}
