:root {
  --a11y-bg: #f7f4ec;
  --a11y-surface: #ffffff;
  --a11y-ink: #0b1f33;
  --a11y-muted: #29475b;
  --a11y-primary: #003b5c;
  --a11y-primary-dark: #00283d;
  --a11y-focus: #005fcc;
  --a11y-line: #49677b;
}

html {
  font-size: 20px;
}

body {
  background: var(--a11y-bg);
  color: var(--a11y-ink);
  font-size: 1rem;
  line-height: 1.5;
}

button,
a,
input,
textarea,
select {
  font-size: 1rem;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 4px solid var(--a11y-focus);
  outline-offset: 4px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: auto;
  min-height: 84px;
  padding: 12px 0 16px;
  background: var(--a11y-bg);
}

.accessibility-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  order: -1;
}

.accessibility-nav button {
  min-height: 60px;
  border: 0;
  border-radius: 15px;
  background: var(--a11y-primary);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.accessibility-nav button:disabled {
  background: #6a7f8e;
  cursor: default;
}

.accessibility-nav .listen-screen-button {
  background: #0b5d3b;
}

.brand-button {
  min-height: 60px;
  font-size: 1.15rem;
}

.header-actions {
  flex-wrap: wrap;
  gap: 10px;
}

.header-action {
  min-height: 56px;
  padding: 12px 16px;
  border: 2px solid var(--a11y-line);
  border-radius: 15px;
  background: var(--a11y-surface);
  color: var(--a11y-ink);
  font-size: .9rem;
}

.screen {
  padding-top: 34px;
}

.page-heading p:not(.eyebrow),
.dialog-intro,
.game-help,
.card-result {
  color: var(--a11y-muted);
  font-size: 1.1rem;
  line-height: 1.5;
}

.screen > .page-heading > .back-button {
  display: none;
}

.voice-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  margin: 8px 0 4px;
  padding: 12px 18px;
  border: 2px solid var(--a11y-primary);
  border-radius: 14px;
  background: #e6f2f8;
  color: var(--a11y-primary-dark);
  font-weight: 800;
  cursor: pointer;
}

.voice-button.listening {
  background: #ffe0a6;
  border-color: #7a4e00;
}

.voice-help {
  display: block;
  margin: 4px 0 10px;
  color: var(--a11y-muted);
  font-size: .85rem;
}

.listen-screen-button {
  white-space: nowrap;
}

@media (max-width: 650px) {
  .app {
    padding: 0 16px;
  }

  .app-header {
    margin: 0 -16px;
    padding: 10px 16px 14px;
  }

  .accessibility-nav button {
    min-height: 64px;
    padding: 8px 4px;
    font-size: .78rem;
  }

  .brand-button {
    font-size: 1rem;
  }

  .header-actions {
    width: 100%;
  }

  .header-action {
    flex: 1;
    min-width: 0;
    padding: 10px 8px;
    font-size: .78rem;
  }
}
