:root {
  color-scheme: light;
  --app-ink: #18322c;
  --app-muted: #52645f;
  --app-surface: #f5f8f4;
  --app-card: #ffffff;
  --app-accent: #325c53;
  --app-focus: #f2a900;
  --bulma-scheme-main: var(--app-card);
  --bulma-scheme-main-bis: #fafcf9;
  --bulma-scheme-main-ter: var(--app-surface);
  --bulma-background: var(--app-surface);
  --bulma-text: var(--app-ink);
  --bulma-text-strong: var(--app-ink);
  --bulma-text-title: var(--app-ink);
  --bulma-text-weak: var(--app-muted);
  --bulma-link-text: #245a76;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.button,
.input,
.select select {
  min-height: 44px;
}

.profile-list li {
  border-bottom: 1px solid #d9e4e1;
  padding: 0.75rem 0;
}

.quest-grid {
  display: grid;
  gap: 1rem;
}

.quest-card {
  border: 1px solid #d9e4e1;
}

.tag.is-foundation {
  background: #dceee7;
  color: #204c42;
  font-weight: 700;
}

.review-due {
  padding: 0.75rem;
  border-left: 0.25rem solid #8a5a00;
  background: #fff5d8;
  color: #5e3d00;
}

.choice-card {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.85rem;
  border: 1px solid #cddbd6;
  border-radius: 0.65rem;
  background: var(--app-card);
}

.choice-card input {
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
}

.history-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid #e4ece8;
}

.box,
.choice-card {
  background: var(--app-card);
  color: var(--app-ink);
}

.label,
.title,
strong {
  color: var(--app-ink);
}

body {
  min-height: 100vh;
  background: var(--app-surface);
  color: var(--app-ink);
}

.connection-status {
  position: sticky;
  z-index: 20;
  top: 0;
  width: 100%;
  margin: 0;
  border-radius: 0;
  text-align: center;
  font-weight: 700;
}

.connection-status[hidden] {
  display: none;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.75rem 1rem;
  transform: translateY(-160%);
  border-radius: 0.5rem;
  background: var(--app-card);
  color: var(--app-ink);
}

.skip-link:focus {
  transform: translateY(0);
  outline: 3px solid var(--app-focus);
  outline-offset: 2px;
}

.app-header {
  border-bottom: 1px solid #dbe5df;
  background: var(--app-card);
}

.app-wordmark {
  color: var(--app-accent);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.welcome-card {
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  border: 1px solid #dbe5df;
  border-radius: 1rem;
  background: var(--app-card);
  box-shadow: 0 0.75rem 2rem rgb(35 68 59 / 8%);
  overflow-wrap: anywhere;
}

.welcome-card .title {
  max-width: 14ch;
  margin-bottom: 1rem;
  color: var(--app-ink);
  line-height: 1.08;
}

.welcome-card .subtitle {
  max-width: 34rem;
  color: var(--app-muted);
  line-height: 1.5;
}

.eyebrow {
  margin-bottom: 0.75rem;
  color: var(--app-accent);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.support-note {
  padding: 1rem;
  border-left: 0.3rem solid var(--app-accent);
  border-radius: 0.25rem;
  background: #edf4f0;
  color: var(--app-ink);
  line-height: 1.5;
}

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

@media (max-width: 480px) {
  .section {
    padding-top: 1.5rem;
  }

  .welcome-card .title {
    font-size: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
