:root {
  --bg: #eef4f6;
  --ink: #17313c;
  --muted: #5b7380;
  --card: #ffffff;
  --accent: #1f6f8b;
  --accent-dark: #164e61;
  --correct: #1f8a5b;
  --wrong: #c4453c;
}

* {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  background: #eef4f6;
  color: #17313c;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-user-select: none;
  user-select: none;
}

.app {
  width: 100%;
  min-height: 100%;
}

.screen {
  display: none;
  width: 100%;
  padding: 20px 16px 24px;
}

.screen.is-active {
  display: block;
}

.start-card,
.result-card {
  width: 92%;
  max-width: 640px;
  margin: 40px auto 0;
  background: #fff;
  border-radius: 24px;
  padding: 28px 20px;
  text-align: center;
  -webkit-box-shadow: 0 12px 28px rgba(23, 49, 60, 0.1);
  box-shadow: 0 12px 28px rgba(23, 49, 60, 0.1);
}

.eyebrow {
  margin: 0 0 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  color: #1f6f8b;
}

h1,
h2 {
  margin: 0;
  font-weight: 700;
}

h1 {
  font-size: 36px;
}

.lead {
  margin: 12px 0 0;
  color: #5b7380;
  font-size: 18px;
  line-height: 1.35;
}

.offline-status {
  margin: 12px 0 0;
  color: #164e61;
  font-size: 15px;
  font-weight: 600;
}

.mode-grid {
  margin-top: 24px;
}

.mode-btn,
.primary-btn,
.speak-btn {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  font: inherit;
}

.mode-btn,
.primary-btn {
  display: block;
  width: 100%;
  min-height: 88px;
  margin: 0 0 12px;
  border-radius: 18px;
  background: #1f6f8b;
  color: #fff;
  -webkit-box-shadow: 0 8px 18px rgba(31, 111, 139, 0.28);
  box-shadow: 0 8px 18px rgba(31, 111, 139, 0.28);
}

.mode-btn:last-child,
.mode-btn:nth-child(2) {
  background: #164e61;
  margin-bottom: 0;
}

.mode-title,
.mode-sub {
  display: block;
}

.mode-title {
  font-size: 24px;
  font-weight: 700;
}

.mode-sub {
  margin-top: 4px;
  font-size: 14px;
  opacity: 0.86;
}

.quiz-bar {
  overflow: hidden;
  margin-bottom: 8px;
}

.mode-chip {
  float: left;
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1f6f8b;
}

.score {
  float: right;
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.prompt {
  text-align: center;
  margin-bottom: 8px;
}

.prompt-label {
  margin: 0;
  color: #5b7380;
  font-size: 16px;
  font-weight: 600;
}

.country-row {
  margin-top: 6px;
}

#country-name {
  display: inline-block;
  vertical-align: middle;
  font-size: 28px;
  line-height: 1.2;
  max-width: 70%;
}

.speak-btn {
  display: inline-block;
  vertical-align: middle;
  width: 52px;
  height: 52px;
  margin-left: 8px;
  border-radius: 50%;
  background: #1f6f8b;
  color: #fff;
  font-size: 22px;
}

.speak-btn.is-speaking {
  background: #164e61;
}

.feedback {
  min-height: 24px;
  margin: 8px 0 0;
  font-size: 18px;
  font-weight: 700;
}

.feedback.is-correct {
  color: #1f8a5b;
}

.feedback.is-wrong {
  color: #c4453c;
}

.flag-options {
  width: 100%;
  overflow: hidden;
  margin-top: 10px;
}

.flag-btn {
  float: left;
  width: 48%;
  margin: 0 1% 12px;
  padding: 10px;
  min-height: 150px;
  background: #fff;
  border: 3px solid transparent;
  border-radius: 16px;
  -webkit-box-shadow: 0 8px 18px rgba(23, 49, 60, 0.12);
  box-shadow: 0 8px 18px rgba(23, 49, 60, 0.12);
}

.flag-btn img {
  display: block;
  width: 100%;
  height: 120px;
  border: 0;
  background: #f2f5f6;
}

.flag-caption {
  display: none;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.flag-btn.is-revealed .flag-caption {
  display: block;
}

.flag-btn.is-correct {
  background: #e8f7ef;
  border-color: #1f8a5b;
}

.flag-btn.is-wrong {
  background: #fdeeee;
  border-color: #c4453c;
}

.result-score {
  margin: 12px 0 6px;
  font-size: 56px;
  font-weight: 800;
}

.primary-btn {
  width: 100%;
  margin-top: 20px;
  font-size: 22px;
  font-weight: 700;
}

@media (min-width: 700px) {
  .mode-btn {
    display: inline-block;
    width: 48%;
    margin: 0 1%;
    vertical-align: top;
  }
}
