:root{color-scheme:dark;font-family:system-ui,'Malgun Gothic',sans-serif;background:#101927;color:#edf4ff}*{box-sizing:border-box}body{margin:0}button,a,textarea{font:inherit}button,a{touch-action:manipulation}button{min-height:44px;border:1px solid #4c647f;border-radius:12px;padding:9px 14px;background:#24384e;color:#eaf3ff;font-weight:700;cursor:pointer}button:disabled{opacity:.52;cursor:default}button:focus-visible,a:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #f2bd85;outline-offset:3px}a{color:#bacfe6;text-decoration:none;min-height:44px;padding:10px 8px}a:hover{color:white}.route-shell{height:100dvh;max-width:1500px;margin:auto;padding:16px 22px;display:flex;flex-direction:column;gap:14px}header{display:flex;justify-content:space-between;align-items:center;gap:14px}header small{color:#8ba7c6;font-size:12px}h1{font-size:23px;margin:3px 0}header a{font-size:12px}.extra-games{position:relative;flex:none;z-index:10}.extra-games summary{font-size:12px;min-height:44px;border:1px solid #405773;border-radius:10px;padding:12px;white-space:nowrap}.extra-games nav{position:absolute;right:0;top:100%;width:210px;display:flex;flex-direction:column;padding:6px;border:1px solid #405773;border-radius:12px;background:#172235;box-shadow:0 12px 30px #0007}.extra-games nav a{display:block;font-size:12px;max-width:none!important;text-align:left!important}.loop-guide{font-size:11px!important;color:#d3e2f1!important}.loop-guide span{padding:0 4px;color:#7699b8}.interpretation summary{padding:4px 0;min-height:32px;font-size:11px}.comparison small{display:block;color:#91b8cf;line-height:1.5;margin-top:3px}.route-layout{display:grid;grid-template-columns:minmax(0,1fr) 350px;gap:16px;flex:1;min-height:0}.field{display:grid;grid-template-rows:auto minmax(0,1fr) auto;min-height:0;background:#172235;border:1px solid #344962;border-radius:20px;overflow:hidden}.mission{padding:13px 17px;border-bottom:1px solid #344962}.mission small{color:#f5bd85;font-size:11px}.mission h2{font-size:20px;margin:7px 0 5px}.mission p{font-size:13px;margin:0;color:#c3d8f0}.viewport{position:relative;min-height:0}canvas{display:block;width:100%;height:100%}#loading,#fallback{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#142238dd;padding:20px;text-align:center;font-size:13px}#fallback{flex-direction:column;z-index:5}.motion{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 12px;border-top:1px solid #344962;font-size:12px;color:#c5e2f3}.motion button{font-size:10px;min-height:40px;padding:5px 10px}.panel{min-height:0;overflow:auto;background:#172235;border:1px solid #344962;border-radius:20px;padding:18px;display:flex;flex-direction:column;gap:10px}.panel p{margin:0;line-height:1.65;font-size:12px;color:#c2d2e4}.panel label{font-weight:750;font-size:14px}textarea{width:100%;min-height:92px;resize:vertical;padding:12px;background:#0e1829;border:1px solid #627d9d;border-radius:12px;color:white;font-size:16px;line-height:1.65}.reading-label{font-size:10px;color:#a5bed9}.reading{display:flex;flex-wrap:wrap;gap:5px}.reading span{font-size:11px;border:1px solid #42617d;border-radius:7px;background:#263d55;padding:5px 7px}.reading span[data-default=true]{border-style:dashed;background:#1c2b3e;color:#a8b8cd}#validation{font-size:11px;min-height:24px}#validation[data-error=true]{color:#ffc3a6}.primary{background:#eda969;color:#172334;border:0;min-height:48px;font-size:15px}.result{border-top:1px solid #3c526a;padding-top:12px}.result strong{font-size:14px;display:block;margin-bottom:5px}.result[data-ok=true] strong{color:#95e5c1}.result[data-ok=false] strong{color:#ffd0a4}.comparison{border:1px solid #47637f;border-radius:12px;padding:10px;overflow-wrap:anywhere}.comparison strong{font-size:12px}.comparison p{font-size:11px;margin-top:6px}.replays{display:flex;gap:6px;margin-top:9px}.replays button{flex:1;font-size:11px;padding:6px}details{font-size:11px;color:#b8cbe2}summary{cursor:pointer;min-height:40px;padding:8px 0}details p{margin:7px 0!important}.limit{font-size:10px!important;color:#8fa6c2!important}.motion-copy{min-width:0;flex:1}.applied{display:flex;align-items:center;gap:7px;min-height:20px;margin-bottom:2px;min-width:0}.applied small{font-size:10px;color:#99b4c9;flex:none}.applied mark{background:#edb07520;border:1px solid #9c744f66;color:#ffd09f;border-radius:5px;padding:1px 6px;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.motion{min-height:63px}.motion-copy>#motion{display:block;line-height:1.5}.comparison small{color:#b2d4d9}.result{overflow-wrap:anywhere}[hidden]{display:none!important}@media(max-width:800px){.route-shell{height:auto;min-height:100dvh;padding:10px;gap:10px}h1{font-size:19px}header small{font-size:10px}header a{font-size:10px;max-width:100px;text-align:center}.route-layout{display:flex;flex-direction:column;gap:10px;flex:none}.field{height:clamp(300px,46dvh,460px);flex:none}.mission{padding:10px 12px}.mission h2{font-size:17px;margin:5px 0}.mission p{font-size:12px}.panel{overflow:visible;padding:14px}.motion{font-size:11px}.panel textarea{resize:none;font-size:16px}}@media(max-height:600px) and (min-width:600px){.route-shell{height:100dvh;min-height:0;padding:7px 10px;gap:5px}h1{font-size:17px}header small{font-size:9px}.route-layout{display:grid;grid-template-columns:minmax(0,1fr) 285px;flex:1;min-height:0;gap:8px}.field{height:auto;min-height:0}.mission{padding:8px 12px}.mission h2{font-size:15px}.panel{overflow:auto;padding:10px;gap:7px}.panel textarea{min-height:68px;font-size:14px}.panel>p:first-child{font-size:10px}header a{max-width:none}.motion{font-size:10px;min-height:51px;padding:4px 8px}.applied{min-height:16px;margin-bottom:0}.applied small{font-size:9px}.applied mark{font-size:10px}.motion button{min-height:40px}}

/* Compact read-only itinerary: no extra buttons or extra rows over the field. */
.route-runbook{display:grid;grid-template-columns:1fr 1fr;gap:6px;min-width:0}
.route-step{display:grid;grid-template-columns:21px minmax(0,1fr);align-items:center;gap:3px 6px;padding:7px;background:#20344a;border:1px solid #425b72;border-radius:10px;min-height:41px}
.route-step i{grid-row:1/3;display:grid;place-items:center;width:21px;height:21px;border-radius:50%;background:#415b70;font-style:normal;font-size:10px;font-weight:800}
.route-step b{font-size:11px;overflow-wrap:anywhere}.route-step small{font-size:9px;color:#92b4c9;min-height:10px}
.route-step[data-status=active]{background:#294652;border-color:#82d2df}
.route-step[data-status=active] i{background:#85d5e0;color:#172b38}
.route-step[data-status=visited]{border-color:#699d87}.route-step[data-status=visited] small{color:#97d5b9}
.route-step small{font-size:11px;line-height:1.45;min-height:16px;overflow-wrap:anywhere}
.route-step[data-needs-review=true]{border-color:#e6ac7c;background:#3b302d}
.route-step[data-needs-review=true] i{background:#e6ac7c;color:#2c211e}
.route-step[data-needs-review=true] small{color:#ffd6b5}
.route-meta{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:4px;font-size:10px;color:#adc6dc}
.route-meta span{border-radius:6px;padding:3px 6px;background:#26354a}
.route-unavailable{grid-column:1/-1;color:#f2bba3;font-size:11px}.route-more{font-size:10px;color:#a6bdd2}
.route-receipt{margin-top:9px;display:grid;gap:5px}
.route-fact{display:grid;grid-template-columns:31px minmax(0,1fr);gap:7px;align-items:start;padding:7px 8px;background:#203147;border:1px solid #354e63;border-radius:7px;line-height:1.5}
.fact-label{font-size:10px;color:#90afc7}.route-fact b{font-size:11px;font-weight:650;color:#deebf7;overflow-wrap:anywhere}
.route-receipt[data-outcome=true] .route-fact{border-color:#3f6f60}
.comparison .route-receipt{margin-bottom:10px}.comparison small{display:none}
@media(max-height:600px) and (min-width:600px){.route-step{padding:5px;min-height:35px}.route-step b{font-size:10px}.route-meta{font-size:9px}.route-fact{padding:5px 7px}}
@media(prefers-reduced-motion:reduce){.route-step{transition:none}}


/* Compare the same three actual facts side by side instead of stacking paragraphs. */
.route-receipt{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.route-fact{grid-template-columns:1fr;gap:3px;padding:7px;align-content:start}
.fact-label{font-size:9px}.route-fact b{font-size:10px;line-height:1.55}

/* Actual first/last paths remain visible in the field; no extra game controls. */
.trail-legend{position:absolute;top:10px;left:10px;max-width:calc(100% - 20px);display:flex;flex-wrap:wrap;gap:5px 12px;align-items:center;padding:7px 10px;border-radius:10px;border:1px solid #47647a;background:#101e31dc;pointer-events:none;color:#d5e6f6;font-size:10px;line-height:1.5}
.trail-legend strong{font-size:10px;font-weight:650;width:100%;color:#a9c2d8}.trail-legend span{display:flex;gap:6px;align-items:center}.trail-legend i{display:inline-block;width:20px;height:4px;border-radius:3px;background:#e5ad7a}.trail-legend .trail-last i{background:#8be2ee}
#return-input{display:none;min-height:44px;font-size:11px;padding:7px 10px;border-color:#91b7c7;color:#edf6ff;background:#305269;flex:none}
@media(max-width:800px) and (min-height:601px){#return-input:not([hidden]){display:inline-flex;align-items:center;justify-content:center}.motion:has(#return-input:not([hidden])){flex-wrap:wrap}.motion:has(#return-input:not([hidden])) .motion-copy{flex-basis:100%}.motion:has(#return-input:not([hidden])) #sound{margin-left:auto}.field:has(#return-input:not([hidden])){height:clamp(355px,53dvh,490px)}}

.trail-legend small{width:100%;color:#deebf7;font-size:10px;line-height:1.4}

.fact-label{display:flex;align-items:center;gap:5px}.goal-mark{font:700 11px/1.1 'Malgun Gothic',sans-serif;display:inline-grid;place-items:center;width:16px;height:16px;border-radius:50%;border:1px solid #9bb8d0;color:#d6e4f0}.route-fact[data-goal=passed] .goal-mark{color:#bcf6d3;border-color:#70bc96;background:#294c3b}.route-fact[data-goal=missed] .goal-mark{color:#ffddad;border-color:#cca263;background:#4b3b29}.route-fact[data-goal=unknown] .goal-mark{color:#d1dce5}

/* The original receipts stay complete. Color connects changed words to actual facts. */
.changed-phrase{padding:1px 3px;border-radius:4px;box-decoration-break:clone;-webkit-box-decoration-break:clone;background:#8be2ee25;color:#c2f6ff;border-bottom:2px solid #8be2ee;font-weight:750}
#before .changed-phrase{background:#e5ad7a25;color:#ffdcbb;border-bottom-color:#e5ad7a}
.comparison .route-fact[data-changed=true]{background:#214052;border:1px solid #78c4d0;box-shadow:inset 0 3px 0 #8be2ee}
.comparison #before-receipt .route-fact[data-changed=true]{background:#3a3430;border-color:#b28c6c;box-shadow:inset 0 3px 0 #e5ad7a}
.comparison .route-fact[data-changed=true] .fact-label{color:#e4f5ff;font-weight:750}.comparison .route-fact[data-changed=false]{background:#1b2b3e;border-color:#35475b}
#difference{padding-top:8px;border-top:1px solid #456075;color:#bcecf1;font-size:12px;line-height:1.65}#difference[data-changed=false]{color:#c7d9e9}

/* Optional paired review reuses the existing comparison. No new task/menu. */
#sound{min-height:44px;min-width:44px}
.replays{display:grid;grid-template-columns:1fr 1fr}.replays #replay-together{grid-column:1/-1;min-height:46px;background:#30556a;border-color:#88bdc9;font-size:12px}
.route-duet-labels{position:absolute;inset:0;pointer-events:none;z-index:2;overflow:hidden}.route-duet-labels span{position:absolute;left:0;top:0;padding:3px 7px;border:1px solid;border-radius:7px;background:#172235e8;font-size:11px;font-weight:750;line-height:1.2;white-space:nowrap}.duet-first{color:#ffdbb9;border-color:#e5ad7a!important}.duet-last{color:#c2f6ff;border-color:#8be2ee!important}.trail-legend[data-duet=true]{border-color:#729aa5}.trail-legend[data-duet=true] strong,.trail-legend[data-duet=true] small{display:none}
@media(max-height:600px) and (min-width:600px){.route-duet-labels span{font-size:10px;padding:3px 5px}}
