.whq-app {
  --whq-blue: #1677a8;
  --whq-blue-dark: #164760;
  --whq-blue-light: #eaf7fd;
  --whq-yellow: #ffd96a;
  --whq-orange: #ff9d2e;
  --whq-green: #258a62;
  --whq-green-light: #e9f8f1;
  --whq-red: #cc4055;
  --whq-red-light: #fff0f2;
  --whq-text: #263b46;
  --whq-muted: #647781;
  --whq-line: #dcebf2;
  --whq-white: #ffffff;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  color: var(--whq-text);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.75;
}

.whq-app,
.whq-app * {
  box-sizing: border-box;
}

.whq-app button,
.whq-app select {
  font: inherit;
}

.whq-shell {
  overflow: hidden;
  border: 1px solid var(--whq-line);
  border-radius: 26px;
  background: var(--whq-white);
  box-shadow: 0 14px 38px rgba(22, 71, 96, 0.12);
}

.whq-hero {
  position: relative;
  overflow: hidden;
  padding: 38px 32px 32px;
  background: linear-gradient(135deg, #e9f7fd 0%, #fffaf0 100%);
  text-align: center;
}

.whq-hero::before,
.whq-hero::after {
  position: absolute;
  border-radius: 999px;
  content: "";
  opacity: 0.45;
}

.whq-hero::before {
  top: -54px;
  right: -38px;
  width: 150px;
  height: 150px;
  background: #bceaff;
}

.whq-hero::after {
  bottom: -65px;
  left: -40px;
  width: 145px;
  height: 145px;
  background: #ffe49b;
}

.whq-eyebrow,
.whq-pill,
.whq-question-tag,
.whq-book-ref {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 800;
}

.whq-eyebrow {
  position: relative;
  z-index: 1;
  padding: 6px 14px;
  background: var(--whq-white);
  color: var(--whq-blue);
  font-size: 13px;
  box-shadow: 0 5px 16px rgba(22, 71, 96, 0.08);
}

.whq-hero h2 {
  position: relative;
  z-index: 1;
  margin: 12px 0 8px;
  color: var(--whq-blue-dark);
  font-size: clamp(25px, 5vw, 36px);
  line-height: 1.35;
}

.whq-hero p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #48636f;
}

.whq-meta-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.whq-pill {
  padding: 5px 11px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--whq-blue-dark);
  font-size: 12px;
}

.whq-main {
  padding: 30px;
}

.whq-section-title {
  margin: 0 0 5px;
  color: var(--whq-blue-dark);
  font-size: 22px;
  line-height: 1.45;
}

.whq-section-lead {
  margin: 0 0 22px;
  color: var(--whq-muted);
  font-size: 14px;
}

.whq-action-grid,
.whq-category-grid {
  display: grid;
  gap: 14px;
}

.whq-action-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.whq-category-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.whq-mode-button,
.whq-category-button,
.whq-choice,
.whq-next-button,
.whq-secondary-button {
  appearance: none;
  border: 0;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.whq-mode-button:focus-visible,
.whq-category-button:focus-visible,
.whq-choice:focus-visible,
.whq-next-button:focus-visible,
.whq-secondary-button:focus-visible {
  outline: 3px solid rgba(22, 119, 168, 0.3);
  outline-offset: 3px;
}

.whq-mode-button:hover,
.whq-category-button:hover,
.whq-next-button:hover,
.whq-secondary-button:hover {
  transform: translateY(-2px);
}

.whq-mode-button {
  min-height: 116px;
  padding: 20px;
  border: 2px solid transparent;
  border-radius: 18px;
  text-align: left;
}

.whq-mode-button strong,
.whq-category-button strong {
  display: block;
  margin-bottom: 3px;
  font-size: 17px;
}

.whq-mode-button span,
.whq-category-button span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  opacity: 0.84;
}

.whq-mode-button--primary {
  background: var(--whq-blue);
  color: var(--whq-white);
  box-shadow: 0 8px 20px rgba(22, 119, 168, 0.2);
}

.whq-mode-button--wrong {
  border-color: #f2cbd2;
  background: var(--whq-red-light);
  color: #953246;
}

.whq-mode-button[disabled] {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
  box-shadow: none;
}

.whq-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 25px 0 12px;
  color: var(--whq-muted);
  font-size: 13px;
  font-weight: 800;
}

.whq-divider::before,
.whq-divider::after {
  flex: 1;
  height: 1px;
  background: var(--whq-line);
  content: "";
}

.whq-category-button {
  min-height: 92px;
  padding: 16px 18px;
  border: 1px solid var(--whq-line);
  border-left: 5px solid var(--whq-blue);
  border-radius: 15px;
  background: #fbfdfe;
  color: var(--whq-blue-dark);
  text-align: left;
}

.whq-category-button:hover {
  background: var(--whq-blue-light);
  box-shadow: 0 7px 18px rgba(22, 71, 96, 0.08);
}

.whq-storage-note,
.whq-update-box,
.whq-disclaimer {
  border-radius: 14px;
  font-size: 13px;
}

.whq-storage-note {
  margin-top: 24px;
  padding: 13px 16px;
  background: #f5f8fa;
  color: var(--whq-muted);
}

.whq-storage-note strong {
  color: var(--whq-blue-dark);
}

.whq-progress-wrap {
  margin-bottom: 20px;
}

.whq-progress-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: var(--whq-muted);
  font-size: 13px;
  font-weight: 800;
}

.whq-progress {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #edf3f6;
}

.whq-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--whq-blue), #38b8c9);
  transition: width 0.25s ease;
}

.whq-question-card {
  padding: 25px;
  border: 1px solid var(--whq-line);
  border-radius: 20px;
  background: #fff;
}

.whq-question-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.whq-question-tag {
  padding: 5px 10px;
  background: var(--whq-blue-light);
  color: var(--whq-blue);
  font-size: 12px;
}

.whq-difficulty {
  color: #9a6a00;
  font-size: 13px;
  letter-spacing: 1px;
}

.whq-question-text {
  margin: 0 0 22px;
  color: var(--whq-blue-dark);
  font-size: clamp(19px, 3.5vw, 24px);
  font-weight: 800;
  line-height: 1.65;
}

.whq-choices {
  display: grid;
  gap: 11px;
}

.whq-choice {
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 16px;
  border: 2px solid var(--whq-line);
  border-radius: 14px;
  background: #fff;
  color: var(--whq-text);
  text-align: left;
}

.whq-choice:hover:not([disabled]) {
  border-color: #8bc8e3;
  background: #f7fcff;
  transform: translateY(-1px);
}

.whq-choice-index {
  display: inline-grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--whq-blue-light);
  color: var(--whq-blue);
  font-size: 13px;
  font-weight: 900;
}

.whq-choice-text {
  padding-top: 1px;
  font-weight: 700;
  line-height: 1.65;
}

.whq-choice[disabled] {
  cursor: default;
}

.whq-choice.is-correct {
  border-color: #55ad86;
  background: var(--whq-green-light);
  color: #166647;
}

.whq-choice.is-correct .whq-choice-index {
  background: var(--whq-green);
  color: #fff;
}

.whq-choice.is-wrong {
  border-color: #e38a99;
  background: var(--whq-red-light);
  color: #963248;
}

.whq-choice.is-wrong .whq-choice-index {
  background: var(--whq-red);
  color: #fff;
}

.whq-feedback {
  margin-top: 18px;
  padding: 19px;
  border-radius: 16px;
}

.whq-feedback.is-correct {
  border-left: 5px solid var(--whq-green);
  background: var(--whq-green-light);
}

.whq-feedback.is-wrong {
  border-left: 5px solid var(--whq-red);
  background: var(--whq-red-light);
}

.whq-feedback-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 900;
}

.whq-feedback p {
  margin: 0 0 10px;
}

.whq-mnemonic {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--whq-blue-dark);
  font-size: 14px;
  font-weight: 800;
}

.whq-book-ref {
  margin-top: 12px;
  padding: 6px 11px;
  background: #fff;
  color: var(--whq-blue-dark);
  font-size: 12px;
}

.whq-next-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.whq-next-button,
.whq-secondary-button {
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 900;
}

.whq-next-button {
  background: var(--whq-blue);
  color: #fff;
  box-shadow: 0 7px 17px rgba(22, 119, 168, 0.2);
}

.whq-secondary-button {
  border: 2px solid var(--whq-blue);
  background: #fff;
  color: var(--whq-blue);
}

.whq-result {
  text-align: center;
}

.whq-score-circle {
  display: grid;
  width: 154px;
  height: 154px;
  margin: 4px auto 18px;
  place-items: center;
  border: 10px solid var(--whq-blue-light);
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 2px #cce9f5;
}

.whq-score-number {
  color: var(--whq-blue-dark);
  font-size: 41px;
  font-weight: 900;
  line-height: 1;
}

.whq-score-label {
  display: block;
  margin-top: 5px;
  color: var(--whq-muted);
  font-size: 12px;
  font-weight: 800;
}

.whq-result h3 {
  margin: 0 0 7px;
  color: var(--whq-blue-dark);
  font-size: 25px;
}

.whq-result-lead {
  margin: 0 auto 22px;
  color: var(--whq-muted);
}

.whq-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 auto 22px;
  text-align: left;
}

.whq-result-stat {
  padding: 14px 15px;
  border: 1px solid var(--whq-line);
  border-radius: 13px;
  background: #fbfdfe;
}

.whq-result-stat strong {
  display: block;
  color: var(--whq-blue-dark);
}

.whq-result-stat span {
  color: var(--whq-muted);
  font-size: 13px;
}

.whq-wrong-list {
  margin: 0 0 22px;
  padding: 18px;
  border-radius: 15px;
  background: var(--whq-red-light);
  text-align: left;
}

.whq-wrong-list h4 {
  margin: 0 0 8px;
  color: #8f3043;
  font-size: 16px;
}

.whq-wrong-list ul {
  margin: 0;
  padding-left: 21px;
}

.whq-wrong-list li + li {
  margin-top: 6px;
}

.whq-result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.whq-update-box {
  margin-top: 28px;
  padding: 16px 18px;
  border-left: 5px solid var(--whq-yellow);
  background: #fffaf0;
  color: #67592c;
}

.whq-update-box strong {
  display: block;
  color: #5a4d22;
}

.whq-disclaimer {
  margin-top: 12px;
  padding: 15px 18px;
  background: #f5f8fa;
  color: var(--whq-muted);
  line-height: 1.7;
}

.whq-home-link {
  appearance: none;
  margin-top: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--whq-blue);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
}

.whq-error {
  padding: 16px;
  border-left: 5px solid var(--whq-red);
  background: var(--whq-red-light);
}

@media (max-width: 680px) {
  .whq-shell {
    border-radius: 20px;
  }

  .whq-hero {
    padding: 30px 19px 25px;
  }

  .whq-main {
    padding: 21px 16px 24px;
  }

  .whq-action-grid,
  .whq-category-grid,
  .whq-result-grid {
    grid-template-columns: 1fr;
  }

  .whq-mode-button {
    min-height: 94px;
  }

  .whq-question-card {
    padding: 19px 15px;
  }

  .whq-choice {
    padding: 13px 12px;
  }

  .whq-next-button,
  .whq-secondary-button {
    width: 100%;
  }

  .whq-next-row {
    justify-content: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .whq-app *,
  .whq-app *::before,
  .whq-app *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

