* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background: #f3f7fb;
  color: #1f2933;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.app {
  width: 100%;
  max-width: 620px;
  text-align: center;
}

.company-footer {
  width: 100%;
  max-width: 620px;
  margin-top: 24px;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.45;
  text-align: center;
}

.company-footer p {
  margin: 0;
}

.company-footer .company-name {
  margin-bottom: 1px;
  font-weight: 700;
}

.company-footer .company-powered {
  font-size: 0.76rem;
  font-weight: 600;
}

.company-footer .company-copyright {
  font-size: 0.74rem;
}

h1 {
  margin: 0 0 24px;
  color: #14532d;
  font-size: 2.2rem;
}

h2 {
  margin: 0 0 18px;
  font-size: 1.4rem;
}

.panel {
  background: #ffffff;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.module-actions {
  display: grid;
  gap: 12px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

select,
input {
  width: 100%;
  padding: 12px;
  margin-bottom: 16px;
  font-size: 1.1rem;
  border: 2px solid #bcccdc;
  border-radius: 6px;
}

.range-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.range-text {
  margin: 0 0 18px;
  color: #52606d;
  font-weight: 700;
}

.question-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0 0 18px;
  padding: 0;
  border: none;
}

.question-options legend {
  width: 100%;
  margin-bottom: 10px;
  font-weight: 700;
}

.question-options label {
  margin: 0;
}

.question-options input {
  position: absolute;
  opacity: 0;
}

.question-options span {
  display: block;
  min-width: 54px;
  padding: 10px 14px;
  font-size: 1rem;
  font-weight: 700;
  color: #2563eb;
  background: #ffffff;
  border: 2px solid #bcccdc;
  border-radius: 6px;
  cursor: pointer;
}

.question-options input:checked + span {
  color: #ffffff;
  background: #2563eb;
  border-color: #2563eb;
}

.question-options input:focus + span {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

button {
  width: 100%;
  padding: 13px 18px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  background: #2563eb;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

button:hover {
  background: #1d4ed8;
}

.back-button {
  margin-bottom: 18px;
  color: #1f2933;
  background: #e6edf5;
}

.back-button:hover {
  background: #d9e2ec;
}

.secondary-button {
  margin-bottom: 10px;
  background: #14532d;
}

.secondary-button:hover {
  background: #166534;
}

.outline-button {
  margin-top: 10px;
  color: #2563eb;
  background: #ffffff;
  border: 2px solid #2563eb;
}

.outline-button:hover {
  color: #ffffff;
  background: #2563eb;
}

.question-count,
.score {
  margin: 0 0 16px;
  font-weight: 700;
  color: #52606d;
}

.question-text {
  margin: 20px 0;
  font-size: 3rem;
  font-weight: 700;
}

.vertical-question {
  display: flex;
  justify-content: center;
  text-align: left;
}

.vertical-question-block {
  margin: 0;
  font-family: "Courier New", Courier, monospace;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.12;
  white-space: pre;
}

.feedback {
  min-height: 28px;
  margin: 16px 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.feedback.correct {
  color: #15803d;
}

.feedback.wrong {
  color: #b91c1c;
}

.final-score {
  margin: 8px 0;
  font-size: 1.8rem;
  font-weight: 700;
}

.result-counts,
.time-summary,
.performance-message,
.no-review-message {
  margin: 8px 0;
  font-weight: 700;
}

.performance-message {
  color: #14532d;
  font-size: 1.2rem;
}

.review-section {
  margin: 18px 0;
  text-align: left;
}

.review-section h3 {
  margin: 0 0 10px;
  text-align: center;
  font-size: 1.1rem;
}

.review-table {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 8px 12px;
  align-items: start;
  font-size: 0.98rem;
}

.review-header {
  font-weight: 700;
  color: #52606d;
  border-bottom: 1px solid #d9e2ec;
  padding-bottom: 6px;
}

.review-rows {
  display: contents;
}

.review-question,
.review-answer {
  padding: 4px 0;
  border-bottom: 1px solid #eef2f7;
}

.review-answer {
  text-align: center;
}

.hidden {
  display: none;
}

@media (max-width: 480px) {
  body {
    padding: 12px;
  }

  .company-footer {
    margin-top: 18px;
    font-size: 0.76rem;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .panel {
    padding: 18px;
  }

  .range-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .question-text {
    font-size: 2.4rem;
  }

  .vertical-question-block {
    font-size: 2.25rem;
  }

  .review-table {
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 6px 8px;
    font-size: 0.92rem;
  }
}
