/* Pause and results share the same game-menu layout and spacing. */
#overlay .pause-actions img{width:18px;height:18px;object-fit:contain;vertical-align:middle;margin-right:8px;pointer-events:none}
#overlay .capture-entry>span{font-size:10px;margin-left:8px;opacity:.7}
#menu-root:is([data-screen=pause],[data-screen=result]){padding:0;overflow:hidden}
#menu-root:is([data-screen=pause],[data-screen=result]) #overlay{display:flex;align-items:center;justify-content:flex-start;padding:clamp(24px,5vw,72px);overflow-y:auto;overscroll-behavior:contain;background:linear-gradient(90deg,#10251ff5 0%,#10251fe8 38%,#10251f85 72%,#10251f38);backdrop-filter:none;-webkit-backdrop-filter:none}
#menu-root:is([data-screen=pause],[data-screen=result]) #overlay .run-card{width:min(820px,100%);max-width:none;max-height:none!important;margin:0;padding:0!important;overflow:visible;background:transparent;border:0;border-radius:0;box-shadow:none;color:#f6f3e9}
#menu-root:is([data-screen=pause],[data-screen=result]) .run-heading{margin-bottom:30px}
#menu-root:is([data-screen=pause],[data-screen=result]) #overlay-tag{display:flex;align-items:center;gap:9px;color:#e8cf8a;font-size:10px;font-weight:700;letter-spacing:.2em}
#menu-root:is([data-screen=pause],[data-screen=result]) #overlay-tag:before{content:'';width:7px;height:12px;border-left:2px solid currentColor;border-right:2px solid currentColor}
#menu-root:is([data-screen=pause],[data-screen=result]) #overlay-title{font-size:clamp(38px,5.5vw,66px)!important;line-height:1.05;font-weight:800;letter-spacing:-.045em;margin:13px 0 0;color:#fff7e6}
#menu-root:is([data-screen=pause],[data-screen=result]) .pause-layout{display:grid;grid-template-columns:minmax(240px,380px) minmax(160px,260px);gap:clamp(28px,6vw,80px);align-items:start}
#menu-root:is([data-screen=pause],[data-screen=result]) .pause-choices{grid-column:1;grid-row:1;min-width:0}
#menu-root:is([data-screen=pause],[data-screen=result]) .pause-run-info{grid-column:2;grid-row:1;min-width:0;padding:8px 0 0 24px;border-left:1px solid #eee7cb26}
#menu-root:is([data-screen=pause],[data-screen=result]) #overlay-text,#menu-root:is([data-screen=pause],[data-screen=result]) #route-info{display:none}
#menu-root:is([data-screen=pause],[data-screen=result]) .result-summary{display:grid;grid-template-columns:1fr;gap:24px;margin:0;padding:0;border:0;background:none}
#menu-root:is([data-screen=pause],[data-screen=result]) .result-summary>div{display:block;padding:0;border:0;background:none}
#menu-root:is([data-screen=pause],[data-screen=result]) .result-summary dt{font-size:9px;text-transform:uppercase;letter-spacing:.14em;color:#aebfb2;margin:0 0 6px}
#menu-root:is([data-screen=pause],[data-screen=result]) .result-summary dd{margin:0;font-size:16px;line-height:1.4;font-weight:600;color:#edeede;overflow-wrap:anywhere}
#menu-root:is([data-screen=pause],[data-screen=result]) #result-progress{font-size:30px;line-height:1.15;font-variant-numeric:tabular-nums;color:#ffda79}
#menu-root:is([data-screen=pause],[data-screen=result]) #run-career{font-size:11px;line-height:1.5;color:#b7c8ba;margin:16px 0 0}
#menu-root:is([data-screen=pause],[data-screen=result]) #run-career:empty{display:none}
#menu-root:is([data-screen=pause],[data-screen=result]) #primary{display:flex;justify-content:flex-start;align-items:center;gap:14px;width:100%;min-height:66px;margin:0 0 12px;padding:16px 22px;background:#ffda79;border:0;border-radius:16px;color:#214740;font-size:22px;font-weight:800;letter-spacing:-.02em;box-shadow:0 4px 0 #08171250;transition:transform .12s,background-color .12s}
#menu-root:is([data-screen=pause],[data-screen=result]) #primary:before{content:'';border-top:7px solid transparent;border-bottom:7px solid transparent;border-left:11px solid currentColor}
#menu-root:is([data-screen=pause],[data-screen=result]) #primary:hover{background:#ffe49c;transform:translateY(-1px)}
#menu-root:is([data-screen=pause],[data-screen=result]) #primary:active{transform:translateY(2px);box-shadow:none}
#menu-root:is([data-screen=pause],[data-screen=result]) .pause-actions{display:flex;flex-direction:column;gap:2px;margin:0;padding:0}
#menu-root:is([data-screen=pause],[data-screen=result]) .pause-actions button{display:flex;align-items:center;gap:13px;width:100%;min-height:46px;margin:0;padding:10px 16px;background:transparent;border:1px solid transparent;border-radius:10px;color:#e3e8d9;font-size:14px;font-weight:600;text-align:left}
#menu-root:is([data-screen=pause],[data-screen=result]) .pause-actions img{width:19px;height:19px;margin:0;opacity:.8;flex-shrink:0}
#menu-root:is([data-screen=pause],[data-screen=result]) .pause-actions button:hover{background:#ffffff0d;border-color:#ffffff18;color:#ffe2a0}
#menu-root:is([data-screen=pause],[data-screen=result]) .capture-entry{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:44px;margin:16px 0 0;padding:12px 2px;border:0;border-top:1px solid #ffffff20;border-radius:0;background:none;color:#bfcec1;font-size:11px;text-align:left}
#menu-root:is([data-screen=pause],[data-screen=result]) .card-foot{font-size:10px;letter-spacing:.03em;color:#a6b9ac;text-align:left;margin:24px 0 0}
#menu-root:is([data-screen=pause],[data-screen=result]) button:focus-visible{outline:2px solid #ffe6a5;outline-offset:3px}
body[data-touch=yes] #menu-root:is([data-screen=pause],[data-screen=result]) .card-foot{display:none}
@media(max-width:600px){
 #menu-root:is([data-screen=pause],[data-screen=result]) #overlay{padding:max(24px,env(safe-area-inset-top)) max(22px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(22px,env(safe-area-inset-left));background:linear-gradient(100deg,#10251ff2,#10251fbd)}
 #menu-root:is([data-screen=pause],[data-screen=result]) .run-heading{margin-bottom:22px}
 #menu-root:is([data-screen=pause],[data-screen=result]) .pause-layout{display:flex;flex-direction:column;gap:20px}
 #menu-root:is([data-screen=pause],[data-screen=result]) .pause-run-info{width:100%;padding:0;border:0}
 #menu-root:is([data-screen=pause],[data-screen=result]) .result-summary{grid-template-columns:1fr 1fr;gap:10px 20px}
 #menu-root:is([data-screen=pause],[data-screen=result]) .result-summary>div:first-child{grid-column:1/-1}
 #menu-root:is([data-screen=pause],[data-screen=result]) .result-summary dt{font-size:8px;margin-bottom:3px}
 #menu-root:is([data-screen=pause],[data-screen=result]) .result-summary dd{font-size:12px}
 #menu-root:is([data-screen=pause],[data-screen=result]) #result-progress{font-size:18px}
 #menu-root:is([data-screen=pause],[data-screen=result]) .pause-choices{width:100%}
 #menu-root:is([data-screen=pause],[data-screen=result]) #primary{min-height:60px;font-size:21px}
 #menu-root:is([data-screen=pause],[data-screen=result]) .capture-entry{margin-top:10px}
}
@media(max-height:620px){#menu-root:is([data-screen=pause],[data-screen=result]) #overlay{align-items:flex-start}#menu-root:is([data-screen=pause],[data-screen=result]) .run-heading{margin-bottom:18px}#menu-root:is([data-screen=pause],[data-screen=result]) .card-foot{margin-top:14px}}
@media(max-height:480px) and (min-width:601px){#menu-root:is([data-screen=pause],[data-screen=result]) #overlay{padding:20px 36px}#menu-root:is([data-screen=pause],[data-screen=result]) #overlay-title{font-size:38px!important}#menu-root:is([data-screen=pause],[data-screen=result]) .run-heading{margin-bottom:16px}#menu-root:is([data-screen=pause],[data-screen=result]) #primary{min-height:52px;padding:12px 18px;font-size:19px}#menu-root:is([data-screen=pause],[data-screen=result]) .pause-actions{display:grid;grid-template-columns:1fr 1fr}#menu-root:is([data-screen=pause],[data-screen=result]) .pause-actions button{font-size:12px;padding:9px;gap:8px}#menu-root:is([data-screen=pause],[data-screen=result]) .capture-entry{margin-top:10px}#menu-root:is([data-screen=pause],[data-screen=result]) .result-summary{gap:17px}#menu-root:is([data-screen=pause],[data-screen=result]) .card-foot{display:none}}
@media(prefers-reduced-motion:reduce){#menu-root:is([data-screen=pause],[data-screen=result]) #primary{transition:none}}

/* Override legacy shared-card !important surfaces; the overlay owns outer padding. */
#menu-root:is([data-screen=pause],[data-screen=result]) #overlay{box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;padding:max(32px,env(safe-area-inset-top)) max(28px,env(safe-area-inset-right)) max(32px,env(safe-area-inset-bottom)) max(28px,env(safe-area-inset-left));scrollbar-gutter:stable}
#menu-root:is([data-screen=pause],[data-screen=result]) #overlay .run-card{box-sizing:border-box;flex:0 0 auto;width:min(760px,100%);min-width:0;max-width:760px;max-height:none!important;padding:0!important;margin-block:auto;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;overflow:visible}
#menu-root:is([data-screen=pause],[data-screen=result]) .run-heading{margin:0 0 24px;padding:0}
#menu-root:is([data-screen=pause],[data-screen=result]) .pause-layout{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:32px;margin:0;padding:0}
#menu-root:is([data-screen=pause],[data-screen=result]) .pause-run-info{padding:6px 0 0 24px;margin:0}
#menu-root:is([data-screen=pause],[data-screen=result]) .result-summary{margin:0;padding:0;gap:22px}
#menu-root:is([data-screen=pause],[data-screen=result]) .result-summary>div{margin:0;padding:0;border-radius:0}
#menu-root:is([data-screen=pause],[data-screen=result]) .result-summary dd{text-align:left;margin:0;max-width:100%}
#menu-root:is([data-screen=pause],[data-screen=result]) #primary{box-sizing:border-box;margin:0 0 12px;line-height:1.2}
#menu-root:is([data-screen=pause],[data-screen=result]) .pause-actions{gap:4px}
#menu-root:is([data-screen=pause],[data-screen=result]) .pause-actions button{box-sizing:border-box;line-height:1.3}
#menu-root:is([data-screen=pause],[data-screen=result]) .pause-actions button span{min-width:0;white-space:normal}
#menu-root:is([data-screen=pause],[data-screen=result]) .capture-entry{gap:12px;line-height:1.4;margin:14px 0 0}
#menu-root:is([data-screen=pause],[data-screen=result]) .capture-entry>span{margin:0;text-align:right}
#menu-root:is([data-screen=pause],[data-screen=result]) .card-foot{margin:20px 0 0;padding:0;line-height:1.4}
@media(min-width:900px){#menu-root:is([data-screen=pause],[data-screen=result]) #overlay{padding-left:max(48px,env(safe-area-inset-left));padding-right:max(48px,env(safe-area-inset-right))}}
@media(max-width:600px){
 #menu-root:is([data-screen=pause],[data-screen=result]) #overlay{padding:max(24px,env(safe-area-inset-top)) max(22px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(22px,env(safe-area-inset-left))}
 #menu-root:is([data-screen=pause],[data-screen=result]) .run-heading{margin-bottom:20px}
 #menu-root:is([data-screen=pause],[data-screen=result]) .pause-layout{gap:18px}
 #menu-root:is([data-screen=pause],[data-screen=result]) .pause-run-info{padding:0;border:0}
 #menu-root:is([data-screen=pause],[data-screen=result]) .result-summary{gap:10px 20px}
 #menu-root:is([data-screen=pause],[data-screen=result]) #primary{min-height:58px;padding:14px 18px}
 #menu-root:is([data-screen=pause],[data-screen=result]) .pause-actions button{min-height:44px;padding:10px 14px}
}
@media(max-height:620px){#menu-root:is([data-screen=pause],[data-screen=result]) #overlay .run-card{margin-block:0}}
@media(max-height:480px) and (min-width:601px){
 #menu-root:is([data-screen=pause],[data-screen=result]) #overlay{padding:max(20px,env(safe-area-inset-top)) max(28px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(28px,env(safe-area-inset-left))}
 #menu-root:is([data-screen=pause],[data-screen=result]) .run-heading{margin-bottom:16px}
 #menu-root:is([data-screen=pause],[data-screen=result]) .pause-layout{grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:24px}
 #menu-root:is([data-screen=pause],[data-screen=result]) .pause-run-info{padding:4px 0 0 20px}
 #menu-root:is([data-screen=pause],[data-screen=result]) #primary{margin-bottom:8px}
 #menu-root:is([data-screen=pause],[data-screen=result]) .result-summary{gap:16px}
}

/* Results: retain the cause/completion message and use restrained outcome colors. */
#menu-root[data-screen=result] #overlay-text{display:block;margin:0 0 22px;padding:0 0 20px;border-bottom:1px solid #eee7cb26;color:#ced9cb;font-size:13px;line-height:1.6;overflow-wrap:anywhere}
#menu-root[data-screen=result] #overlay-title{max-width:100%;overflow-wrap:anywhere}
#menu-root[data-screen=result] #overlay[data-state=finished] #overlay-tag:before{width:12px;height:7px;border:0;border-left:2px solid currentColor;border-bottom:2px solid currentColor;transform:translateY(-2px) rotate(-45deg)}
#menu-root[data-screen=result] #overlay[data-state=failed] #overlay-tag{color:#e5ad94}
#menu-root[data-screen=result] #overlay[data-state=failed] #overlay-tag:before{content:'×';display:grid;place-items:center;flex:0 0 13px;width:13px;height:16px;border:0;font-size:21px;font-weight:400;line-height:1;letter-spacing:0}
#menu-root[data-screen=result] #overlay[data-state=failed] #result-progress{color:#e5ad94}
#menu-root[data-screen=result] #primary:before{width:13px;height:13px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;transform:rotate(-30deg)}
#menu-root[data-screen=result] .card-foot{color:#a6b9ac}
@media(max-width:600px){
 #menu-root[data-screen=result] #overlay-text{margin-bottom:14px;padding-bottom:14px;font-size:12px;line-height:1.5}
 #menu-root[data-screen=result] .result-summary{gap:10px 18px}
}
@media(max-height:480px) and (min-width:601px){#menu-root[data-screen=result] #overlay-text{font-size:11px;line-height:1.5;margin-bottom:14px;padding-bottom:14px}}

/* Failure marker shares a fixed line box with its label. */
#menu-root[data-screen=result] #overlay[data-state=failed] #overlay-tag{display:flex;align-items:center;gap:9px;line-height:16px}
#menu-root[data-screen=result] #overlay[data-state=failed] #overlay-tag:before{content:'';display:block;position:relative;flex:0 0 12px;width:12px;height:12px;border:0;border-radius:0;transform:none;background:linear-gradient(45deg,transparent 43%,currentColor 44%,currentColor 56%,transparent 57%),linear-gradient(-45deg,transparent 43%,currentColor 44%,currentColor 56%,transparent 57%)}

/* Use the button's text color instead of the SVG file's fixed pigment. */
#menu-root:is([data-screen=pause],[data-screen=result]) #pause-restart img{display:none}
#menu-root:is([data-screen=pause],[data-screen=result]) #pause-restart::before{content:'';display:block;flex:0 0 19px;width:19px;height:19px;background:currentColor;mask:url('/assets/icons/ui/refresh.svg') center/contain no-repeat;-webkit-mask:url('/assets/icons/ui/refresh.svg') center/contain no-repeat;opacity:.8}
