/* Canva page 1 / 2 / 4: original PNG parts, live text and native radio controls. */
@font-face {
  font-family: 'Inter';
  src: url('../assets/web/fonts/Inter.ttf') format('truetype');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Sans JP';
  src: url('../assets/web/fonts/NotoSansJP.ttf') format('truetype');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Zen Maru Gothic';
  src: url('../assets/web/fonts/ZenMaruGothic-Bold.ttf') format('truetype');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
.quiz-page { --accent: #ff5897; --question-border: #fbd7e5; overflow: hidden; background: #fff; }
.quiz-page[data-step="2"] { --accent: #409af5; --question-border: #d5e7fb; }
.quiz-page > .back-link { padding: 9px 18px; background: #fff; }
.quiz-header { aspect-ratio: auto; min-height: 225px; position: relative; overflow: hidden; padding: 25px 0 15px; background: url('../assets/web/brush-blue.webp') left top / 34% auto no-repeat, url('../assets/web/brush-pink.webp') right top / 28% auto no-repeat, linear-gradient(90deg,#eff5fb55 1px,transparent 1px),linear-gradient(#eff5fb55 1px,transparent 1px); background-size: 34% auto,28% auto,18px 18px,18px 18px; }
.quiz-heading { position: relative; left: 4%; z-index: 1; width: 70%; padding-left: 5%; color: #142e67; font-family: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', sans-serif; }
.quiz-heading p { margin: 0; font-weight: bold; font-size: 16px; line-height: 1.7; }
.quiz-heading strong { display: inline; color: #ff629b; font-size: clamp(20px,4.9vw,29px); font-weight: 700; background: linear-gradient(transparent 78%,#fff190 78%); }
.quiz-heading p > span { display: inline-block; font-size: 14px; text-indent: 0; }
.quiz-heading h1 { margin: 12px 0 14px; font-family: inherit; font-weight: 700; font-size: clamp(25px,6vw,37px); letter-spacing: .12em; white-space: nowrap; }
.quiz-header .quiz-girl { width: 35%; height: auto; position: absolute; right: -1%; bottom: 0; top: auto; }
.steps { position: relative; z-index: 1; width: 65%; gap: 15px; color: #aaa; font-size: 14px; }
@font-face {
  font-family: 'Baloo 2';
  src: url('../assets/web/fonts/Baloo2.ttf') format('truetype');
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}
.steps > span:not(.step-dots) { display: grid; justify-items: center; gap: 5px; font-family: 'Baloo 2', sans-serif; font-size: 19px; font-weight: 600; line-height: 1.2; letter-spacing: .02em; }
.steps > span:not(.step-dots)::before { content: ''; width: 19px; height: 19px; border: 3px solid #ccc; border-radius: 50%; background: white; }
.steps [aria-current="step"] { border: 0; padding: 0; color: var(--accent); }
.steps [aria-current="step"]::before { border: 6px solid var(--accent) !important; }
.step-dots { align-self: start; padding-top: 1px; letter-spacing: 3px; }
.quiz-body { padding: 0 clamp(12px,3vw,20px); background: #fff; }
.quiz-instruction { font-size: 14px; line-height: 1.7; text-align: center; margin: 10px 0; }
.progress-label { font-size: 12px; margin: 0 0 5px; }
progress { height: 4px; margin-bottom: 20px; }
fieldset { position: relative; padding: 12px 10px 12px 58px; margin: 0 0 18px; border: 2px solid var(--question-border); border-radius: 14px; background: #fff; }
/* Floating the semantic legend places it inside the border instead of cutting through it. */
legend { float: left; position: relative; display: flex; align-items: center; min-height: 38px; width: 100%; margin: 0 0 12px; padding: 0 22px 0 0; font-size: 16px; line-height: 1.5; color: #223a6b; }
.question-number { position: absolute; top: 50%; transform: translateY(-50%); left: -53px; width: 38px; height: 38px; aspect-ratio: 1; border-radius: 50%; font-family: 'Inter', sans-serif; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; box-shadow: 2px 2px 0 var(--question-border); }
.question-decoration { position: absolute; right: 6px; top: 10px; width: 25px; height: 30px; object-fit: contain; pointer-events: none; }
.options { clear: both; gap: 10px; }
.option-box { position: relative; min-height: 94px; padding: 34px 8px 10px; display: grid; grid-template-columns: 29px 1fr; align-items: center; gap: 8px; border: 2px solid #fbe0eb; border-radius: 13px; font-size: 14px; line-height: 1.6; font-weight: bold; color: #263c6b; }
.option-icon { width: 29px; height: 34px; object-fit: contain; }
.option-box b { position: absolute; left: 9px; top: 7px; width: 22px; height: 22px; background: #f95595; font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600; line-height: 1; }
.option-box > span { padding-top: 0; font-weight: 600; }
.option:nth-child(2) .option-box { border-color: #dae8fc; }
.option:nth-child(2) b { background: #409af5; }
.option input:checked + .option-box { padding: 34px 8px 10px; border-color: #e43d7c; background: #fff1f7; box-shadow: 0 0 0 1px #e43d7c; }
.option:nth-child(2) input:checked + .option-box { border-color: #2683df; background: #eff7ff; box-shadow: 0 0 0 1px #2683df; }
.unanswered { border-color: #be2440; }
.quiz-body .primary { position: relative; z-index: 2; margin: 10px 0 0 18%; width: 78%; border: 2px solid #fff8; background: linear-gradient(110deg,var(--accent),var(--accent)); font-size: 22px; letter-spacing: .12em; padding: 10px 12px; box-shadow: 0 3px 0 var(--question-border); }
.quiz-body .secondary { position: relative; z-index: 2; margin-left: 25%; width: 71%; font-size: 14px; padding: 10px; }
.quiz-body #next { font-family: 'Noto Sans JP', sans-serif; font-weight: 600; letter-spacing: .04em; }
.quiz-page[data-step="1"] #next { font-size: 24px; margin-inline: auto; }
.quiz-body #next { padding-inline: 30px; margin-inline: auto; }
.quiz-body #next::after { content: ''; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 0; height: 0; border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-left: 12px solid currentColor; }
.quiz-footer { overflow: visible; aspect-ratio: auto; height: clamp(210px,55vw,295px); background: url('../assets/web/brush-blue.webp') right bottom / 65% 85% no-repeat,url('../assets/web/brush-pair.webp') left bottom / 20% auto no-repeat; }
.quiz-footer .quiz-boy { position: absolute; width: 32%; height: auto; top: auto; left: -2%; bottom: 0; transform: scaleX(-1); }
.quiz-footer .quiz-plane { position: absolute; width: 15%; height: auto; top: 23%; left: 44%; }
/* School cards follow the supplied mock, with actual school photographs. */
.result-content { display: flow-root; background: var(--tint); padding-top: 0; }
.result-content > h1, .result-content > #result-catch { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.result-description { margin-top: 0; margin-bottom: 14px; border: 0; padding: 12px 0; border-radius: 0; }
.school { border: 1px solid #e7edf1; border-radius: 16px; padding: 20px 18px; margin-bottom: 16px; box-shadow: 0 4px 18px rgb(16 43 69 / 4%); }
.school summary { font-size: 16px; font-weight: 600; gap: 14px; border-radius: 8px; }
.school summary > span { flex: 1; min-width: 0; }
.school summary::after { content: ''; width: 10px; height: 10px; display: block; margin: 0 5px 5px 4px; border: 0; border-right: 2px solid #6c8191; border-bottom: 2px solid #6c8191; border-radius: 0; flex-shrink: 0; transform: rotate(45deg); transition: transform .18s ease, border-color .18s ease; }
.school[open] summary::after { content: ''; transform: rotate(225deg); margin-bottom: -5px; }
.school summary:hover::after { border-color: var(--accent); }
.school-photo { border-radius: 10px; width: 72px; height: 80px; }
.school-body { margin-top: 18px; padding-top: 16px; border-color: #edf0f3; }
.school-body .tags { margin-top: 0; gap: 7px; }
.school-body .tags li { border: 0; border-radius: 6px; padding: 4px 9px; background: color-mix(in srgb,var(--accent) 7%,white); }
@media (prefers-reduced-motion: reduce) { .school summary::after { transition: none; } }
.school-body dl { grid-template-columns: 58px 1fr; }
.school-body dt { white-space: nowrap; border-right: 1px solid color-mix(in srgb,var(--accent) 25%,white); }
.schools-title { color: #20252a; font-size: 24px; margin: 18px 0 22px; }
.schools-title::after { display: none; }
.result-content > .actions { margin-top: 22px; }
@media (max-width: 359px) {
  .quiz-header { min-height: 205px; }
  .quiz-heading { width: 73%; padding-left: 4%; }
  .quiz-heading h1 { font-size: 25px; letter-spacing: .07em; }
  .quiz-heading strong { font-size: 20px; }
  .steps { gap: 9px; }
  .options { grid-template-columns: 1fr; }
  .option-box { min-height: 60px; grid-template-columns: 29px 1fr; }
  .quiz-body .primary { font-size: 18px; }
}
/* Separate supplied top/bottom artwork stays proportional as the questions grow. */
.quiz-header { min-height: clamp(190px,45vw,225px); padding-top: clamp(14px,4vw,22px); background: transparent; }
.quiz-heading p { line-height: 1.3; text-indent: clamp(10px,2.45vw,14.5px); }
.quiz-heading strong { background: none; }
.quiz-footer { height: auto; aspect-ratio: 750 / 358; background: url('../assets/web/quiz-bottom.webp') center bottom / 100% auto no-repeat; }
.quiz-surface { position: relative; isolation: isolate; }
.quiz-surface::before { content: ''; position: absolute; z-index: -1; top: 0; left: 0; width: 100%; aspect-ratio: 750 / 348; background: url('../assets/web/quiz-top.webp') center top / 100% auto no-repeat; pointer-events: none; }
.quiz-surface .quiz-header, .quiz-surface .quiz-body { background: transparent; }
.quiz-surface fieldset { background: #fff; }
.quiz-surface .option-box { background-color: #fff; }
/* Request area follows the supplied result-page design. */
.result-content #restart { display: flex; align-items: center; justify-content: center; gap: 10px; width: fit-content; max-width: 100%; margin: 22px auto 30px; padding: 7px 20px; border: 2px solid #b9cbdc; background: linear-gradient(#fff,#edf5fa); color: #292e34; box-shadow: 0 3px 7px #183c6830; }
.restart-icon { font: 700 36px/1 'Inter',sans-serif; color: #ff9342; }
.request { margin: 20px -10px 0; padding: 22px 14px 16px; border: 2px solid #ffd0db; border-radius: 18px; background: #fff; box-shadow: 0 0 0 8px #fff0f3,0 3px 16px #ed70951a; color: #24272b; }
.request h2 { font-size: clamp(19px,4.7vw,24px); line-height: 1.65; margin-bottom: 16px; }
.request h2 > span { text-decoration: underline; text-decoration-color: #ffc4d5; text-underline-offset: 7px; text-decoration-thickness: 3px; }
.request h2 strong { color: #ff1766; font-size: 1.15em; }
.request-points { padding-left: 20px; margin: 0 0 20px; font-size: 14px; line-height: 1.8; }
.request-points li { padding-left: 0; margin-bottom: 6px; }
.request-points li::marker { color: #ff397b; }
.request-options { display: grid; grid-template-columns: 1fr; gap: 18px; }
.request-channel { --channel: #07b82a; display: flex; flex-direction: column; }
.request-channel--email { --channel: #146cec; }
.request .request-bubble { flex: 1; position: relative; border: 1.5px solid var(--channel); border-radius: 999px; padding: 14px 20px; margin: 0 3px 12px; text-align: center; font-size: 14px; font-weight: 600; line-height: 1.6; overflow-wrap: anywhere; }
.request-bubble::after { content: ''; position: absolute; left: calc(50% - 6px); bottom: -7px; width: 11px; height: 11px; transform: rotate(45deg); background: white; border-right: 1.5px solid var(--channel); border-bottom: 1.5px solid var(--channel); }
.request .primary { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 64px; padding: 12px 8px; margin: 0; font-size: 16px; font-weight: 700; line-height: 1.4; border: 0; border-radius: 9px; box-shadow: 0 3px 5px #173a6226; color: white; }
.request .line, .request .line[aria-disabled="true"] { background: linear-gradient(135deg,#24da36,#00b411); color: white; }
.request .email, .request .email[aria-disabled="true"] { background: linear-gradient(135deg,#258aff,#0060de); color: white; }
.request-free { background: #fff; color: var(--channel); border-radius: 4px; padding: 4px; font-size: 14px; white-space: nowrap; }
.request-arrow { font-size: 22px; font-weight: 400; }
.request #request-note { font-size: 12px; line-height: 1.7; margin: 14px 0 0; color: #657789; }
@media (max-width: 359px) { .request-options { grid-template-columns: 1fr; gap: 18px; } }
/* Compact, raised request buttons and a centered gradient restart symbol. */
.restart-icon { display: block; width: 32px; height: 32px; flex: 0 0 32px; align-self: center; }
.request .primary { min-height: 50px; padding: 8px; box-shadow: inset 0 1px 0 #ffffff60, inset 0 -2px 0 #00000012, 0 3px 0 color-mix(in srgb,var(--channel) 70%,#17334b), 0 5px 8px #173a6226; }
.request .line, .request .line[aria-disabled="true"] { background: linear-gradient(to bottom,#25df39 0%,#0bc522 48%,#00ad15 100%); }
.request .email, .request .email[aria-disabled="true"] { background: linear-gradient(to bottom,#3496ff 0%,#1479f2 48%,#005dd6 100%); }
.request-free { padding: 3px 4px; }
.request .primary[href]:active { transform: translateY(2px); box-shadow: inset 0 1px 3px #0002,0 1px 0 color-mix(in srgb,var(--channel) 70%,#17334b); }

.keyword-blank { display: inline-block; width: 3em; }

/* Generated artwork retains native button semantics and existing action handlers. */
.result-content > .result-image-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 10px; width: 100%; margin: 16px auto; }
.result-image-actions .secondary { display: block; width: 100%; min-height: 44px; padding: 0; margin: 0; border: 0; background: transparent; box-shadow: none; border-radius: 999px; }
.result-image-actions img { display: block; width: 100%; height: auto; }
.result-image-actions .secondary:hover { opacity: .85; }
.result-image-actions .secondary:focus-visible { outline: 3px solid #183b68; outline-offset: 2px; }

/* Choices span the card; the number belongs only to the question heading. */
.quiz-surface fieldset { padding: 12px 10px; }
.quiz-surface legend { padding-left: 53px; padding-right: 40px; }
.quiz-surface .question-number { left: 0; }
.quiz-surface .option-box,
.quiz-surface .option input:checked + .option-box { min-height: 70px; padding: 7px 8px; grid-template-columns: 22px 26px minmax(0, 1fr); gap: 7px; }
.quiz-surface .option-box b { position: static; grid-column: 1; grid-row: 1; align-self: center; }
.quiz-surface .option-icon { grid-column: 2; grid-row: 1; width: 26px; height: 30px; }
.quiz-surface .option-box > span { grid-column: 3; grid-row: 1; min-width: 0; }

/* Keep every hand-drawn accent inside the card, clear of its border and heading. */
.quiz-surface .question-decoration { top: 15px; right: 13px; width: 25px; height: 29px; opacity: .72; transform: rotate(12deg); transform-origin: center; }
.quiz-surface fieldset:nth-child(3n + 2) .question-decoration { top: 17px; right: 14px; width: 23px; height: 27px; opacity: .62; transform: rotate(-14deg); }
.quiz-surface fieldset:nth-child(3n) .question-decoration { top: 15px; right: 14px; width: 26px; height: 29px; opacity: .68; transform: rotate(20deg); }

.quiz-surface .option input:checked + .option-box { border-width: 3px; border-color: #f29aba; padding: 6px 7px; box-shadow: none; }
.quiz-surface .option:nth-child(2) input:checked + .option-box { border-color: #8ebdec; }

/* Answer badges sit across the top-left corner of each choice. */
.quiz-surface .option-box,
.quiz-surface .option input:checked + .option-box { grid-template-columns: 26px minmax(0, 1fr); }
.quiz-surface .option-box b { position: absolute; left: -5px; top: -9px; grid-column: auto; grid-row: auto; box-shadow: 0 0 0 3px #fff; }
.quiz-surface .option-icon { grid-column: 1; }
.quiz-surface .option-box > span { grid-column: 2; }

/* Wrap answers at phrase boundaries; allow a fallback on very narrow screens. */
.answer-chunk { display: inline-block; max-width: 100%; overflow-wrap: anywhere; vertical-align: top; }

/* Keep action announcements available to screen readers without visible notices. */
#share-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.request-bubble .request-keyword-line { display: block; margin: 2px 0; overflow-wrap: anywhere; }

.request .request-bubble { line-height: 1.45; }
