@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/AtkinsonHyperlegible-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/AtkinsonHyperlegible-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --wall: #1f3d36;
  --wall-deep: #16302a;
  --paper: #f4f7f2;
  --ink: #17241f;
  --muted: #3d564c;
  --line: #d3ddd4;
  --bell: #f0c400;
  --bell-shadow: #b89200;
  --listen: #c5362b;
  --focus: #fff4b0;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 0, #2a5248 0, var(--wall) 42%, var(--wall-deep) 100%);
  color: var(--paper);
  font-family: "Atkinson Hyperlegible", "Avenir Next", "Segoe UI", sans-serif;
}

main {
  width: min(40rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.2rem 0 3rem;
}

.house {
  margin: 0;
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.place {
  margin: 0.35rem 0 1.4rem;
  max-width: 36ch;
  color: #d5e4da;
  font-size: 1.05rem;
  line-height: 1.4;
}

.sheet {
  min-height: 11rem;
  padding: 1.4rem 1.35rem 1.5rem;
  background: var(--paper);
  color: var(--ink);
  border-radius: 1.4rem 1.4rem 1.1rem 1.1rem;
}

#answer {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.15rem);
  line-height: 1.35;
  font-weight: 700;
}

#talk {
  display: grid;
  place-items: center;
  width: 9.5rem;
  height: 9.5rem;
  margin: 1.3rem auto 0.6rem;
  border: 0;
  border-radius: 50%;
  background: var(--bell);
  color: var(--ink);
  font: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  box-shadow: 0 0.45rem 0 var(--bell-shadow);
  cursor: pointer;
}

#talk:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

#talk[aria-pressed="true"] {
  background: var(--listen);
  color: white;
  box-shadow: 0 0.2rem 0 #8d241c;
  transform: translateY(0.25rem);
}

#talk:disabled {
  cursor: progress;
  transform: translateY(0.25rem);
  box-shadow: 0 0.2rem 0 var(--bell-shadow);
}

.hint,
.heard,
.counts,
label {
  text-align: center;
  color: #d5e4da;
}

.hint,
.heard,
.counts {
  margin: 0.35rem 0;
  font-size: 1rem;
  line-height: 1.4;
}

form {
  display: grid;
  gap: 0.4rem;
  margin-top: 1.1rem;
}

label {
  font-size: 0.95rem;
}

input {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.1rem;
  background: #143029;
  color: var(--paper);
  font: inherit;
  font-size: 1.15rem;
}

input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

details {
  margin-top: 1.8rem;
  color: #d5e4da;
}

summary {
  cursor: pointer;
  font-size: 1.05rem;
}

ul {
  margin: 0.7rem 0 0;
  padding-left: 1.15rem;
}

li {
  margin: 0.35rem 0;
  line-height: 1.4;
}

@media (prefers-reduced-motion: reduce) {
  #talk { transition: none; }
}
