:root {
  --bg: #ECE5E5;
  --ink: #3C1312;
  --muted: #8A6D6C;
  --accent: #C65633;
  --primary: #8D1E18;
  --primary-hover: #7A1914;
  --border: #D9CFCF;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2.5rem 1rem;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.wordmark {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  background: linear-gradient(90deg, var(--accent), var(--ink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.card {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 34px rgba(60, 19, 18, 0.12);
  padding: 2.25rem 2rem;
}
.card section { display: none; }
.card[data-state="invalid"] .s-invalid,
.card[data-state="ready"] .s-ready,
.card[data-state="revealed"] .s-revealed { display: block; }
.card[data-state="revealed"] noscript,
.card[data-state="ready"] noscript,
.card[data-state="invalid"] noscript { display: none; }
h1 { margin: 0 0 0.75rem; font-size: 1.4rem; line-height: 1.3; }
p { margin: 0 0 1.25rem; }
button {
  font: inherit;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  padding: 0.8rem 1.2rem;
}
button:disabled { opacity: 0.6; cursor: default; }
button:focus-visible { outline: 3px solid rgba(198, 86, 51, 0.45); outline-offset: 2px; }
.primary {
  width: 100%;
  color: #fff;
  background: var(--primary);
  border: none;
  box-shadow: 0 6px 18px rgba(141, 30, 24, 0.25);
}
.primary:hover:not(:disabled) { background: var(--primary-hover); }
.secondary {
  color: var(--primary);
  background: #fff;
  border: 1px solid var(--primary);
  margin-bottom: 1.25rem;
}
.secondary:hover { background: #FBECEB; }
.secret {
  margin: 0 0 1rem;
  padding: 1rem;
  background: #F7F3F3;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: 0.95rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 50vh;
  overflow: auto;
}
.note { color: var(--muted); font-size: 0.92rem; margin: 0; }
.error { color: #A94442; font-size: 0.92rem; margin: 1rem 0 0; }
.error:empty { display: none; }
.footer { color: var(--muted); font-size: 0.85rem; letter-spacing: 0.02em; }
@media (max-width: 480px) {
  body { padding: 1.5rem 0.75rem; gap: 1.5rem; justify-content: flex-start; }
  .card { padding: 1.75rem 1.25rem; }
  .wordmark { font-size: 2.25rem; }
}
