:root {
  color-scheme: light;
  --ink: #18202b;
  --muted: #6e7785;
  --line: #e6e9ef;
  --card: rgba(255, 255, 255, 0.92);
  --accent: #3856d8;
  --accent-dark: #263da7;
  --soft: #eff2ff;
  --shadow: 0 24px 70px rgba(27, 38, 74, 0.1);
}

* { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 10% 0%, #e9edff 0, #f7f8fb 38%, #f4f5f8 100%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

.shell { width: min(720px, calc(100% - 36px)); margin: 0 auto; padding: 42px 0 28px; }
.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 30px; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: white; background: var(--accent); font-size: 25px; box-shadow: 0 8px 22px rgba(56, 86, 216, .25); }
.eyebrow { margin: 0 0 7px; color: var(--accent); font-size: 11px; font-weight: 750; letter-spacing: .14em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 25px; letter-spacing: -.03em; }
h2 { margin-bottom: 14px; font-size: clamp(24px, 4vw, 33px); line-height: 1.17; letter-spacing: -.035em; }
.card { padding: clamp(26px, 5vw, 43px); border: 1px solid rgba(255,255,255,.85); border-radius: 27px; background: var(--card); box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.lead { color: #4c5666; font-size: 16px; line-height: 1.75; }
.notice { margin: 24px 0; padding: 17px 19px; border: 1px solid #dfe5ff; border-radius: 17px; color: #4f5b70; background: var(--soft); font-size: 14px; line-height: 1.65; }
.notice strong { color: var(--accent-dark); }
.notice p { margin: 5px 0 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 22px 0; }
label { color: #545e6e; font-size: 13px; font-weight: 650; }
select { display: block; width: 100%; margin-top: 8px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: white; font: inherit; }
.consent-row { display: flex; align-items: flex-start; gap: 10px; margin: 20px 0 25px; line-height: 1.5; }
.consent-row input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--accent); }
.button, .answer, .play-button { border: 0; cursor: pointer; font: inherit; font-weight: 700; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button { min-height: 47px; padding: 0 22px; border-radius: 13px; }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button:not(:disabled):hover, .answer:hover, .play-button:hover { transform: translateY(-1px); }
.primary { color: white; background: var(--accent); box-shadow: 0 9px 18px rgba(56, 86, 216, .2); }
.primary:not(:disabled):hover { background: var(--accent-dark); }
.secondary { color: var(--accent-dark); background: var(--soft); }
.hidden { display: none !important; }
.state-card { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 150px; color: var(--muted); }
.spinner { width: 20px; height: 20px; border: 2px solid #d7ddf6; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.study-topline { display: flex; justify-content: space-between; margin: 0 3px 10px; color: var(--muted); font-size: 13px; font-weight: 650; }
.progress-track { height: 6px; margin-bottom: 22px; overflow: hidden; border-radius: 999px; background: #e3e6ee; }
.progress-bar { width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .35s ease; }
.trial-card { padding: clamp(24px, 5vw, 42px); }
.trial-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.trial-heading h2 { margin-bottom: 8px; font-size: clamp(23px, 4vw, 31px); }
.pill { flex: none; padding: 7px 10px; border-radius: 999px; color: #626c7d; background: #f2f4f8; font-size: 11px; white-space: nowrap; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.6; }
.play-button { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 68px; margin: 28px 0 18px; border: 1px solid #dbe1ff; border-radius: 17px; color: var(--accent-dark); background: var(--soft); font-size: 16px; }
.play-button:disabled { cursor: default; opacity: .62; }
.play-icon { display: grid; place-items: center; width: 31px; height: 31px; padding-left: 2px; border-radius: 50%; color: white; background: var(--accent); font-size: 12px; }
.answers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin-top: 17px; }
.answer { min-height: 53px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: white; }
.answer:hover { border-color: #bfc8f9; color: var(--accent-dark); background: #fafbff; }
.answer:focus-visible, .button:focus-visible, .play-button:focus-visible, .text-button:focus-visible, select:focus-visible { outline: 3px solid rgba(56,86,216,.27); outline-offset: 2px; }
.answered-note { margin: 17px 0 0; color: var(--accent-dark); text-align: center; font-size: 13px; }
.privacy-note { margin: 18px 2px 0; color: var(--muted); text-align: center; font-size: 12px; }
.done-mark { display: grid; place-items: center; width: 51px; height: 51px; margin-bottom: 19px; border-radius: 50%; color: white; background: #38a776; font-size: 24px; }
.submit-confirmation { margin: 12px 0 0; color: #626c7d; font-size: 13px; }
.modal { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20, 27, 44, .45); backdrop-filter: blur(5px); }
.modal-card { position: relative; width: min(620px, 100%); max-height: min(720px, calc(100vh - 40px)); overflow: auto; padding: clamp(25px, 5vw, 40px); border: 1px solid rgba(255,255,255,.9); border-radius: 25px; background: white; box-shadow: 0 30px 90px rgba(14, 21, 48, .24); }
.modal-copy { color: #4c5666; font-size: 15px; line-height: 1.75; }
.modal-copy p { margin-bottom: 13px; }
.modal-consent { margin: 25px 0 23px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
footer { margin-top: 22px; color: #8b93a1; text-align: center; font-size: 12px; }

@media (max-width: 560px) {
  .shell { width: min(100% - 24px, 720px); padding-top: 25px; }
  .brand { margin-bottom: 20px; }
  .card { border-radius: 21px; }
  .form-grid { grid-template-columns: 1fr; }
  .trial-heading { display: block; }
  .pill { display: inline-block; }
  .answers { grid-template-columns: 1fr; }
}
