:root {
  color: #24343b;
  background: #eff3f3;
  font-family: "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
}

main {
  width: min(940px, 100%);
  margin: 0 auto;
  padding: 24px 20px 40px;
  text-align: center;
}

.top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  min-height: 48px;
  margin-bottom: 24px;
  border-bottom: 1px solid #d2dcde;
}

.brand { font-size: 15px; font-weight: 700; }
.progress { color: #69787d; font-size: 13px; text-align: right; }

.panel {
  padding: clamp(22px, 5vw, 48px);
  border: 1px solid #d9e1e2;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 4px 18px rgb(23 48 64 / 4%);
}

.panel h1 { margin: 0 0 22px; font-size: clamp(25px, 3vw, 32px); line-height: 1.4; }
.bodycopy { font-size: 17px; line-height: 1.9; white-space: pre-line; }
.question { margin: 20px 0; font-size: 19px; line-height: 1.7; }
.muted { color: #68777e; font-size: 14px; line-height: 1.7; }
.notice { padding: 14px 16px; border-left: 3px solid #36776d; background: #f0f6f4; line-height: 1.8; }
.consent-copy { max-width: 760px; margin: 0 auto; text-align: left; font-size: 16px; line-height: 1.85; }
.consent-copy p { margin: 0 0 14px; }

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
button, input, select { font: inherit; }
button {
  min-height: 46px;
  padding: 8px 18px;
  border: 1px solid #728187;
  border-radius: 4px;
  background: #fff;
  color: #24343b;
  cursor: pointer;
}
button:hover:not(:disabled) { border-color: #326e67; background: #f2f7f5; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #83bdb1; outline-offset: 2px; }
button.primary { border-color: #286a63; background: #286a63; color: #fff; }
button.primary:hover:not(:disabled) { background: #20574f; }
button:disabled { cursor: not-allowed; opacity: .52; }
button.selected { border-color: #286a63; background: #286a63; color: #fff; }

.quiz-options { display: grid; gap: 10px; max-width: 680px; margin: 24px auto; }
.quiz-options button { min-height: 54px; text-align: center; }
.scale-grid { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; margin: 25px auto; max-width: 900px; }
.scale-grid.five { grid-template-columns: repeat(5, minmax(54px, 1fr)); }
.scale-grid button { padding: 8px 4px; min-width: 0; }
.choice-grid { display: grid; grid-template-columns: repeat(6, minmax(44px, 1fr)); gap: 10px; max-width: 560px; margin: 24px auto; }
.choice-grid button { min-height: 62px; font-size: 21px; font-weight: 700; }
.coinrow { display: flex; justify-content: space-evenly; gap: 12px; max-width: 560px; margin: 20px auto; }
.coin {
  display: grid;
  width: 40px;
  aspect-ratio: 1;
  place-items: center;
  border: 2px solid #b69434;
  border-radius: 50%;
  background: #efd277;
  color: #44370f;
  font-weight: 700;
}
.feedback { margin: 22px 0; padding: 14px 18px; border-left: 4px solid #34796d; background: #f0f6f4; line-height: 1.8; }
.feedback p { margin: 6px 0; }
.strong { font-weight: 700; }
.outcome { font-size: 22px; font-weight: 800; }
.scale { display: flex; justify-content: space-between; gap: 18px; max-width: 620px; margin: 0 auto; color: #35484e; font-size: 16px; font-weight: 600; }
.field { display: grid; justify-items: center; gap: 10px; margin: 20px 0; font-size: 16px; }
.field input, .field select { width: min(100%, 440px); min-height: 44px; padding: 8px 12px; border: 1px solid #aebbc1; border-radius: 4px; }
.field input[type="range"] { padding: 0; accent-color: #286a63; }
.timer { margin: 26px 0; color: #52646a; font-size: 20px; font-variant-numeric: tabular-nums; }
.round-heading { color: #7e898d; font-size: 15px !important; font-weight: 400; }
.fixation { margin: 12vh 0; text-align: center; font-size: 56px; }
.thinking-dots { display: inline-block; min-width: 1.4em; animation: dots 1.1s steps(4, end) infinite; }
.error { margin-top: 16px; color: #a52e2e; line-height: 1.6; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

@keyframes dots { 0% { opacity: .2; } 50% { opacity: 1; } 100% { opacity: .2; } }

@media (max-width: 600px) {
  main { padding: 12px 12px 28px; }
  .top { margin-bottom: 14px; }
  .panel { padding: 24px 18px; }
  .panel h1 { font-size: 23px; }
  .bodycopy { font-size: 16px; }
  .choice-grid { grid-template-columns: repeat(3, minmax(48px, 1fr)); }
  .scale-grid { grid-template-columns: repeat(6, minmax(40px, 1fr)); gap: 8px; max-width: 420px; }
  .scale-grid.five { grid-template-columns: repeat(5, minmax(42px, 1fr)); }
  .scale { flex-direction: row; gap: 8px; font-size: 14px; }
  .actions button { flex: 1 1 100%; }
}
