:root {
  --ink: #29264f;
  --muted: #68657f;
  --brand: #f27622;
  --brand-dark: #35316f;
  --brand-soft: #fff0e5;
  --accent: #35316f;
  --paper: #fffaf7;
  --surface: rgba(255, 255, 255, .88);
  --line: #eeded9;
  --danger: #b42318;
  --shadow: 0 24px 70px rgba(53, 49, 111, .13);
  --radius-xl: 30px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 10%, rgba(242, 118, 34, .14), transparent 30rem),
    linear-gradient(145deg, #fff5ee 0%, var(--paper) 52%, #fff1e8 100%);
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.ambient { position: fixed; z-index: -1; border-radius: 50%; filter: blur(3px); pointer-events: none; }
.ambient-one { width: 19rem; height: 19rem; right: -8rem; top: 8rem; background: rgba(242, 118, 34, .1); }
.ambient-two { width: 14rem; height: 14rem; left: -7rem; bottom: 5rem; background: rgba(53, 49, 111, .08); }

.site-header {
  width: min(100% - 2rem, 1080px);
  min-height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { display: inline-flex; align-items: center; gap: .75rem; color: inherit; text-decoration: none; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; color: white; background: var(--brand-dark); border-radius: 13px 13px 13px 5px; box-shadow: 0 8px 20px rgba(53, 49, 111, .2); }
.brand-mark span { font: 800 1.35rem/1 "Segoe UI Variable", "Segoe UI", sans-serif; }
.brand-copy { display: grid; gap: .06rem; }
.brand-copy strong { font: 800 .94rem/1.2 "Segoe UI Variable", "Segoe UI", sans-serif; letter-spacing: -.02em; }
.brand-copy small { color: var(--muted); font-size: .73rem; }
.privacy-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .48rem .7rem; color: var(--brand-dark); background: rgba(244, 243, 255, .92); border: 1px solid rgba(53, 49, 111, .14); border-radius: 999px; font-size: .74rem; font-weight: 700; }
.privacy-pill svg { width: 15px; fill: currentColor; }

.shell { width: min(100% - 1.25rem, 840px); margin: 1.2rem auto 2rem; }
.intro-panel, .survey-panel, .success-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(1.4rem, 5vw, 3.8rem);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .92);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.intro-panel::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; right: -120px; top: -105px; border: 38px solid rgba(242, 118, 34, .07); pointer-events: none; }

.eyebrow, .question-kicker { color: var(--brand); font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: .55rem; }
.eyebrow span { width: 24px; height: 2px; background: var(--accent); border-radius: 2px; }
h1, h2, h3, legend { font-family: "Segoe UI Variable", "Segoe UI", sans-serif; letter-spacing: -.045em; }
h1 { max-width: 690px; margin: 1rem 0 .85rem; font-size: clamp(2.15rem, 7vw, 4rem); line-height: 1.03; }
.intro-lead { max-width: 650px; margin: 0; color: var(--muted); font-size: clamp(1rem, 2.6vw, 1.16rem); line-height: 1.65; }

.planning-summary { margin: 1.5rem 0 1rem; padding: 1rem; color: var(--muted); background: #fffaf7; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 0 var(--radius-md) var(--radius-md) 0; line-height: 1.65; }
.planning-summary strong { color: var(--brand-dark); }

.playground-card { display: grid; grid-template-columns: auto 1fr; gap: 1rem; margin: 1rem 0 1.2rem; padding: 1rem; background: linear-gradient(135deg, var(--brand-dark), #45418a); border-radius: var(--radius-lg); color: white; }
.playground-progress { position: relative; width: 62px; height: 62px; display: grid; place-items: center; background: conic-gradient(var(--brand) 0 40%, rgba(255,255,255,.18) 40% 100%); border-radius: 50%; }
.playground-progress::after { content: ""; position: absolute; inset: 6px; background: var(--brand-dark); border-radius: 50%; }
.playground-progress strong { position: relative; z-index: 1; font-size: .95rem; }
.playground-kicker { color: #ffc49c; font-size: .67rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.playground-card h2 { margin: .25rem 0 .4rem; font-size: 1.05rem; letter-spacing: -.02em; }
.playground-card p { margin: 0; color: rgba(255,255,255,.84); font-size: .8rem; line-height: 1.55; }
.playground-card p strong { color: white; }

.details-card { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.details-card summary { position: relative; padding: 1rem 2rem 1rem 0; cursor: pointer; list-style: none; color: var(--brand-dark); font-weight: 700; }
.details-card summary::-webkit-details-marker { display: none; }
.details-card summary::after { content: "+"; position: absolute; right: .2rem; top: .72rem; font-size: 1.4rem; font-weight: 400; }
.details-card[open] summary::after { content: "−"; }
.details-card div { padding: 0 0 .8rem; color: var(--muted); line-height: 1.65; }
.details-card p { margin: 0 0 .8rem; }
.why-adjust { margin-bottom: .9rem; }
.teacher-message { padding-left: .8rem; color: var(--ink); border-left: 3px solid var(--brand); font-weight: 700; }
.consultive-note { padding: .65rem .75rem; color: var(--brand-dark); background: var(--brand-soft); border-radius: 10px; font-size: .8rem; font-weight: 700; }

.intro-actions { display: flex; flex-direction: column; align-items: stretch; gap: .75rem; margin-top: 1.6rem; }
.button { min-height: 52px; padding: .85rem 1.25rem; border: 0; border-radius: 14px; cursor: pointer; font-weight: 800; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button-primary { display: inline-flex; align-items: center; justify-content: center; gap: .7rem; color: white; background: var(--brand-dark); box-shadow: 0 10px 24px rgba(53, 49, 111, .22); }
.button-primary svg { width: 20px; fill: currentColor; }
.button-primary:hover { background: #282456; box-shadow: 0 13px 28px rgba(53, 49, 111, .27); transform: translateY(-1px); }
.button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid rgba(242, 118, 34, .55); outline-offset: 3px; }
.time-note { align-self: center; color: var(--muted); font-size: .8rem; }

.survey-topline { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.back-button { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem 0; color: var(--brand-dark); background: transparent; border: 0; cursor: pointer; font-weight: 700; }
.back-button svg { width: 19px; fill: currentColor; }
.step-counter { color: var(--muted); font-size: .78rem; font-weight: 700; }
.progress-track { height: 5px; margin: 1rem 0 clamp(2rem, 6vw, 3.4rem); background: #f2e4df; border-radius: 999px; overflow: hidden; }
.progress-track span { display: block; width: 20%; height: 100%; background: linear-gradient(90deg, var(--brand-dark), var(--brand)); border-radius: inherit; transition: width .35s ease; }

.form-step { animation: enter .3s ease both; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
fieldset { min-width: 0; margin: .65rem 0 0; padding: 0; border: 0; }
legend, .form-step h3 { display: block; width: 100%; margin: .6rem 0 .55rem; padding: 0; font-size: clamp(1.55rem, 5vw, 2.35rem); font-weight: 800; line-height: 1.16; }
.question-hint { margin: 0 0 1.35rem; color: var(--muted); line-height: 1.55; }
.option-grid, .option-stack, .compact-options, .range-list { display: grid; gap: .65rem; }
.option-card, .option-line, .range-option { position: relative; display: flex; align-items: center; gap: .8rem; min-height: 66px; padding: .85rem 1rem; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-md); cursor: pointer; transition: border .16s ease, background .16s ease, transform .16s ease; }
.option-card:hover, .option-line:hover, .range-option:hover { border-color: #efa16d; background: #fffaf7; transform: translateY(-1px); }
.option-card:has(input:checked), .option-line:has(input:checked), .range-option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.option-card input, .option-line input, .range-option input { position: absolute; opacity: 0; pointer-events: none; }
.radio-ui { position: relative; flex: 0 0 22px; width: 22px; height: 22px; border: 2px solid #9aaba5; border-radius: 50%; background: white; }
input:checked + .radio-ui { border-color: var(--brand); }
input:checked + .radio-ui::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--brand); }
.option-card > span:last-child { display: grid; gap: .2rem; }
.option-card strong { font-size: .92rem; }
.option-card small { color: var(--muted); font-size: .77rem; line-height: 1.4; }
.option-line { min-height: 54px; padding: .7rem .9rem; }
.range-option { justify-content: space-between; min-height: 57px; }
.range-option .radio-ui { order: -1; }

.conditional-field, .comment-field { margin-top: 1rem; }
.conditional-field label, .comment-field label { display: block; margin-bottom: .5rem; font-weight: 700; }
.comment-field label span { color: var(--muted); font-weight: 400; }
input[type="text"], textarea { width: 100%; padding: .85rem 1rem; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 12px; resize: vertical; }
input[type="text"]:focus, textarea:focus { border-color: var(--brand); }
.comment-field { padding-top: 1.1rem; border-top: 1px solid var(--line); }
.comment-field small { display: block; margin-top: .35rem; color: var(--muted); text-align: right; }
.field-error, .submit-error { min-height: 1.25rem; margin: .55rem 0 0; color: var(--danger); font-size: .82rem; font-weight: 700; }
.has-error { border-color: var(--danger) !important; }

.review-list { margin: 1.4rem 0; border-top: 1px solid var(--line); }
.review-row { display: grid; grid-template-columns: 1fr auto; gap: .7rem 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.review-row div { display: grid; gap: .18rem; }
.review-row dt { color: var(--muted); font-size: .75rem; }
.review-row dd { margin: 0; font-weight: 700; }
.review-row button { align-self: center; padding: .4rem; color: var(--brand); background: transparent; border: 0; cursor: pointer; font-size: .78rem; font-weight: 800; text-decoration: underline; }
.anonymous-note { display: flex; gap: .7rem; margin-top: 1rem; padding: .8rem; color: var(--brand-dark); background: var(--brand-soft); border-radius: 12px; font-size: .78rem; line-height: 1.5; }
.anonymous-note svg { flex: 0 0 20px; width: 20px; fill: currentColor; }
.form-actions { margin-top: 1.4rem; }
.form-actions .button { width: 100%; }
.submit-button[aria-busy="true"] .spinner { display: block; }
.spinner { display: none; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.success-panel { text-align: center; }
.success-icon { width: 74px; height: 74px; display: grid; place-items: center; margin: 0 auto 1.2rem; color: white; background: var(--brand-dark); border-radius: 50%; box-shadow: 0 12px 28px rgba(53,49,111,.24); }
.success-icon svg { width: 38px; fill: currentColor; }
.success-panel h2 { margin: .7rem 0; font-size: clamp(2rem, 6vw, 3rem); }
.success-panel p { max-width: 550px; margin: 0 auto 1.4rem; color: var(--muted); line-height: 1.6; }
.protocol-box { display: inline-grid; gap: .2rem; min-width: 210px; margin: .5rem auto 1rem; padding: .8rem 1rem; background: #fff5ee; border: 1px dashed #d49a78; border-radius: 12px; }
.protocol-box span { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.protocol-box strong { font: 800 1rem/1.2 "Segoe UI Variable", "Segoe UI", sans-serif; letter-spacing: .08em; }
.success-panel > small { display: block; color: var(--muted); }
.satisfaction-invite { max-width: 600px; margin: 1.4rem auto 1rem; padding: 1.2rem; text-align: left; background: #fffaf7; border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: var(--radius-lg); }
.satisfaction-tag { color: var(--brand); font-size: .68rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.satisfaction-invite h3 { margin: .35rem 0 .4rem; font-size: 1.3rem; letter-spacing: -.025em; }
.satisfaction-invite p { margin: 0 0 1rem; font-size: .88rem; }
.satisfaction-invite .button { width: 100%; text-decoration: none; }
.satisfaction-invite small { display: block; margin-top: .6rem; color: var(--muted); text-align: center; }
.satisfaction-shell { padding-top: 4vh; }
.satisfaction-placeholder .button { margin-top: .5rem; text-decoration: none; }

footer { display: flex; justify-content: center; gap: .55rem; padding: 0 1rem 1.6rem; color: var(--muted); font-size: .72rem; }

@media (min-width: 620px) {
  .site-header { min-height: 96px; }
  .shell { margin-top: 2rem; }
  .intro-actions { flex-direction: row; align-items: center; }
  .intro-actions .button { min-width: 230px; }
  .time-note { align-self: auto; }
  .option-grid-two { grid-template-columns: repeat(2, 1fr); }
  .compact-options { grid-template-columns: repeat(2, 1fr); }
  .survey-panel { min-height: 620px; }
  .form-actions { display: flex; justify-content: flex-end; }
  .form-actions .button { width: auto; min-width: 190px; }
}

@media (max-width: 420px) {
  .privacy-pill { width: 39px; height: 39px; justify-content: center; padding: 0; }
  .privacy-pill svg { width: 18px; }
  .privacy-pill { font-size: 0; }
  .intro-panel, .survey-panel, .success-panel { border-radius: 24px; }
  .option-card, .option-line, .range-option { padding-left: .8rem; padding-right: .8rem; }
  .playground-card { grid-template-columns: 1fr; }
  .playground-progress { width: 56px; height: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
