/* Seven inspectable indicators and the illustrated result, with tablet-sized targets. */
.simulation-hud{padding:18px 0 24px;width:100%}
.stat-section-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}
.stat-section-heading strong{font-size:14px}
.stat-section-heading small{display:block;font-size:11px;color:var(--muted);margin-top:4px}
.stat-section-heading .text-button{font-size:12px;flex-shrink:0;min-height:44px}
.stat-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px}
.stat-card{--stat-color:#16776b;display:flex;flex-direction:column;text-align:left;gap:9px;padding:14px 12px;border:1px solid var(--line);border-radius:16px;background:var(--white);min-height:126px;position:relative;transition:border-color .15s,transform .15s}
.stat-card:hover{transform:translateY(-2px);border-color:var(--stat-color)}
.stat-name{font-size:12px;font-weight:700;display:flex;gap:6px;align-items:center;min-height:30px;line-height:1.25}
.stat-name>span{font-size:19px;flex-shrink:0}
.stat-number{font-size:24px;font-weight:800;font-variant-numeric:tabular-nums;line-height:1;display:flex;align-items:baseline;gap:2px}
.stat-number small{font-size:10px;color:var(--muted);font-weight:500}
.stat-number .stat-delta{font-size:11px;font-weight:700;font-style:normal;margin-left:auto;color:#8a4f32}
.stat-number .stat-delta.positive{color:#16776b}
.stat-track{display:block;height:5px;background:#e6ebe1;border-radius:6px;overflow:hidden}
.stat-track>span{display:block;height:100%;background:var(--stat-color);border-radius:6px;transition:width .3s}
.stat-hint{font-size:10px;color:var(--muted)}
.stat-changed{border-color:var(--stat-color)}
.stat-amber{--stat-color:#c49322}.stat-blue{--stat-color:#3381ae}.stat-rose{--stat-color:#b86689}.stat-green{--stat-color:#63933e}.stat-orange{--stat-color:#c57638}.stat-purple{--stat-color:#8b6cb1}.stat-teal{--stat-color:#218a7d}
.simulation-note{font-size:11px;line-height:1.6;color:var(--muted);margin-top:11px}
.stat-grid-compact .stat-card{min-height:98px;padding:10px 11px;gap:7px;border-radius:12px}
.stat-grid-compact .stat-name{font-size:11px;min-height:27px}
.stat-grid-compact .stat-number{font-size:20px}
.stat-grid-compact .stat-hint{font-size:9px}
.ending-hero{display:grid;grid-template-columns:minmax(250px,.9fr) minmax(300px,1.1fr);border-radius:26px;overflow:hidden;border:1px solid var(--line);background:var(--white)}
.ending-art{width:100%;aspect-ratio:1;background-size:200% 200%;background-repeat:no-repeat;flex-shrink:0}
.ending-hero>.ending-art{align-self:center}
.ending-copy{padding:clamp(24px,3.4vw,45px);display:flex;flex-direction:column;justify-content:center;gap:18px}
.ending-copy h2{font-size:clamp(29px,3vw,42px);line-height:1.12}
.ending-copy>p{font-size:15px;color:var(--muted)}
.ending-scoreline{display:flex;align-items:center;gap:24px;padding:18px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.ending-scoreline>strong{font-size:36px;font-variant-numeric:tabular-nums;white-space:nowrap}
.ending-scoreline strong small{font-size:12px;font-weight:500}
.ending-scoreline>span{font-size:12px;line-height:1.65;color:var(--muted)}
.ending-strength{display:flex;gap:12px;align-items:center;font-size:10px;color:var(--muted)}
.ending-strength>span:first-child{font-size:29px}
.ending-strength strong{display:block;font-size:15px;color:var(--ink);margin-top:4px}
.ending-strength .text-button{font-size:11px;margin-left:auto;min-height:44px}
.ending-actions{display:flex;flex-wrap:wrap;gap:10px}
.ending-actions .button{font-size:13px;min-height:48px;padding:13px 19px;flex:1;white-space:normal}
.ending-copy>.text-button{font-size:12px;align-self:flex-start;min-height:44px}
.ending-indicators{margin:30px 0 15px}
.ending-indicators h2{font-size:23px}
.enhanced-results .result-panel-nav{flex-wrap:wrap}
.ending-gallery-dialog{width:min(950px,calc(100vw - 32px));max-width:950px}
.ending-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:24px 0}
.ending-gallery-card{border:1px solid var(--line);border-radius:18px;overflow:hidden}
.ending-gallery-card>div:last-child{padding:18px}
.ending-gallery-card h3{font-size:21px;margin:9px 0}
.ending-gallery-card p{font-size:12px;margin:0}
.ending-gallery-card.is-earned{border:3px solid var(--teal)}
.stat-detail-dialog{width:min(650px,calc(100vw - 32px));max-width:650px}
.stat-detail-value{display:flex;gap:24px;align-items:center;padding:20px 0;margin:12px 0;border-bottom:1px solid var(--line)}
.stat-detail-value strong{font-size:52px;color:var(--stat-color);font-variant-numeric:tabular-nums}
.stat-detail-value strong small{font-size:15px;color:var(--muted)}
.stat-detail-value>span{max-width:260px;font-size:14px;line-height:1.6}
.stat-model-note{padding:16px 18px;border-radius:12px;background:var(--mint);font-size:13px!important;margin:18px 0!important}
.stat-driver-list{margin:14px 0 22px}
.stat-driver-list article{display:flex;align-items:flex-start;gap:13px;padding:14px 0;border-top:1px solid var(--line)}
.stat-driver-list h4{margin:0 0 7px;font-size:14px;line-height:1.5}
.stat-driver-list p{font-size:12px;margin:0 0 7px}
.stat-driver-list small{font-size:11px;color:var(--muted)}
.driver-mark{font-size:21px;color:var(--teal)}
.workflow-footer{display:flex;justify-content:flex-end;margin-top:20px}
.result-visual>.ending-art{max-width:280px;border-radius:16px;margin-bottom:20px}
.ending-mini-title{margin:0}
body[data-theme="expert"] .stat-card,body[data-theme="expert"] .ending-hero{background:#1c281e;border-color:#41553a}
body[data-theme="expert"] .stat-card.stat-changed{border-color:var(--stat-color)}
body[data-theme="expert"] .stat-track{background:#34412f}
body[data-theme="expert"] .stat-number .stat-delta.positive{color:#c1f27d}
body[data-theme="expert"] .stat-number .stat-delta{color:#e4b98c}
body[data-theme="expert"] .ending-copy h2,body[data-theme="expert"] .ending-scoreline>strong{color:#c1f27d}
body[data-theme="expert"] .ending-copy>p,body[data-theme="expert"] .ending-scoreline>span,body[data-theme="expert"] .simulation-note,body[data-theme="expert"] .stat-hint,body[data-theme="expert"] .stat-section-heading small{color:#a2b494}
body[data-theme="expert"] .ending-strength strong{color:#e4efdb}
body[data-theme="expert"] .stat-model-note{background:#2b3d25}
body[data-theme="expert"] .ending-gallery-card{border-color:#41553a}
body[data-theme="expert"] .ending-gallery-card.is-earned{border-color:#c1f27d}
@media(max-width:1000px){.stat-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.ending-copy{padding:25px;gap:14px}.ending-strength{flex-wrap:wrap}.ending-strength .text-button{margin-left:0}.ending-copy h2{font-size:30px}.stat-grid-compact .stat-card{min-height:90px}}
@media(max-width:700px){.ending-hero{grid-template-columns:1fr}.ending-hero>.ending-art{max-height:none}.ending-copy{padding:24px}.ending-indicators .stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stat-section-heading{align-items:flex-start}.stat-section-heading .text-button{max-width:120px;font-size:11px}.stat-section-heading h2{font-size:21px}.ending-gallery{gap:12px}.ending-gallery-card>div:last-child{padding:13px}.ending-gallery-card h3{font-size:18px}.ending-gallery-card p{font-size:11px}.result-visual>.ending-art{position:static;width:150px;max-width:45%;margin:0 16px 0 0}.result-visual{flex-wrap:wrap}.enhanced-results .result-panel-nav{width:100%;gap:3px}.enhanced-results .result-panel-nav button{flex:1;justify-content:center;font-size:12px;padding:10px 12px}.simulation-note{font-size:10px}}
@media(max-width:420px){.stat-grid-compact{grid-template-columns:repeat(2,minmax(0,1fr))}.ending-gallery{grid-template-columns:1fr}.ending-scoreline{gap:15px}.ending-scoreline>strong{font-size:30px}.ending-actions{flex-direction:column}.stat-detail-value{gap:16px}.stat-detail-value strong{font-size:44px}}
@media(prefers-reduced-motion:reduce){.stat-card,.stat-track>span{transition:none}}
@media(min-width:1001px) and (max-height:900px){
  .visual-game .picture-options{max-width:calc(clamp(160px,100dvh - 620px,260px)*4 + 54px)}
  .visual-game .picture-options.options-3{max-width:calc(clamp(160px,100dvh - 620px,260px)*3 + 36px)}
  .visual-question{padding-top:12px;padding-bottom:10px}
  .visual-question .question-heading h1,.visual-game.age-junior .question-heading h1,body[data-theme="expert"] .visual-question .question-heading h1{font-size:30px}
  .visual-game .option-caption,.visual-game.age-junior .option-caption,body[data-theme="expert"] .visual-game .option-caption{font-size:18px;min-height:54px;padding:10px 12px}
  .simulation-hud{padding:8px 0}
  .simulation-hud .stat-section-heading{margin-bottom:8px}
  .stat-grid-compact .stat-card{min-height:80px;padding:8px 10px;gap:5px}
  .stat-grid-compact .stat-hint{display:none}
  .simulation-hud .simulation-note{margin-top:7px}
}
