:root {
  color-scheme: light;
  --ink: #2c3e50;
  --text: #333;
  --muted: #5f6b73;
  --page: #f4f4f4;
  --card: #fff;
  --green: #03ba8f;
  --green-dark: #00775b;
  --gold: #d89e38;
  --gold-dark: #7a5000;
  --border: #dce2e5;
  --control-border: #68777e;
  --danger: #a52a2a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-size: 20px;
  line-height: 1.55;
}
* { box-sizing: border-box; }
body {
  min-width: 280px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--page);
}
button, select, input { font: inherit; }
a { color: var(--green-dark); }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible {
  outline: 3px solid var(--gold-dark);
  outline-offset: 3px;
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 40px, 920px);
  margin: 0 auto;
  padding: 22px 0;
  flex-wrap: wrap;
  gap: 12px;
}
.language-control {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
}
.language-control select { width: auto; max-width: 100%; }
.language-control[hidden] { display: none; }
.language-control small { flex-basis: 100%; }
.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}
.page-shell { width: min(100% - 40px, 800px); margin: 12px auto 64px; }
.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(100% - 40px, 920px);
  margin: -0.5rem auto 2rem;
  color: var(--muted);
  font-size: clamp(0.62rem, 2.5vw, 0.72rem);
  gap: 0.6rem;
  letter-spacing: 0.01em;
  text-align: center;
}
.origin-mark {
  display: block;
  width: min(100%, 16rem);
  height: auto;
  flex: none;
}
.card {
  padding: 34px 40px 40px;
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 3px 16px rgb(27 49 59 / 8%);
}
h1, h2, h3 { margin: 0 0 0.75rem; color: var(--ink); line-height: 1.2; }
h1 { font-size: clamp(1.8rem, 5vw, 2.55rem); }
h1[tabindex="-1"]:focus { outline: none; }
h2 { font-size: 1.35rem; }
p { margin: 0 0 1rem; }
.lead { font-size: 1.12rem; }
.eyebrow {
  margin-bottom: 0.4rem;
  color: var(--green-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.notice {
  margin: 1.4rem 0;
  padding: 18px 20px;
  border-left: 4px solid var(--gold);
  border-radius: 4px;
  background: #fffaf0;
}
.notice p:last-child { margin-bottom: 0; }
.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  margin: 0.4rem 0;
  padding: 0.65rem 1.05rem;
  border: 2px solid transparent;
  border-radius: 5px;
  font-weight: 750;
  line-height: 1.2;
  cursor: pointer;
}
.button:disabled { cursor: wait; opacity: 0.58; }
.button-primary { color: #092c24; background: var(--green); }
.button-primary:hover:not(:disabled) { background: #18c99f; }
.button-secondary, .button-quiet, .stop-control { color: var(--ink); background: #fff; }
.button-secondary { border-color: var(--green); }
.button-quiet, .stop-control { border-color: var(--control-border); }
.stop-control {
  min-height: 44px;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--control-border);
  border-radius: 4px;
  cursor: pointer;
}
.button-row, .example-grid, .response-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 1rem;
}
.response-grid .button { min-height: 74px; flex: 1 1 220px; font-size: 1.05rem; }
.field, .check { display: block; margin: 0 0 1.1rem; }
.field span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--ink);
  font-weight: 700;
}
.field select {
  width: 100%;
  min-height: 52px;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--control-border);
  border-radius: 4px;
  color: var(--text);
  background: #fff;
}
.check { padding-left: 1.75rem; }
.check input {
  width: 1.05rem;
  height: 1.05rem;
  margin-left: -1.75rem;
  margin-right: 0.45rem;
  accent-color: var(--green-dark);
  vertical-align: -0.18rem;
}
.error { color: var(--danger); font-weight: 700; }
.progress { color: var(--muted); font-size: 0.85rem; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.sound-stage {
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
}
.sound-label { color: var(--ink); font-size: 1.45rem; font-weight: 800; }
.quit-dialog {
  width: min(100% - 32px, 520px);
  padding: 28px;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 18px 60px rgb(0 0 0 / 24%);
}
.quit-dialog::backdrop { background: rgb(22 35 41 / 54%); }
@media (max-width: 600px) {
  :root { font-size: 18px; }
  .site-header, .page-shell { width: min(100% - 20px, 800px); }
  .site-header { padding: 14px 0; }
  .card { padding: 24px 15px 28px; }
  .button, .button-row .button, .example-grid .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
