/* v0.24 results and statistics, matching approved cream / forest layouts. */
.release-result:not([hidden]){position:fixed!important;inset:0!important;height:100dvh!important;width:100vw!important;padding:12px!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:auto!important;transform:none!important}
.release-result .win-stats{grid-template-columns:repeat(4,minmax(0,1fr))!important}
.release-result .win-pets:not(.multiple) .win-pet-photo{width:210px!important;height:210px!important;aspect-ratio:1!important}
#detailedStats{max-width:min(960px,96vw)!important;width:min(960px,96vw)!important}
.detailed-stats small{letter-spacing:normal!important;font-weight:400!important}
.release-result .win-panel{width:min(760px,94vw);max-height:94dvh;overflow:auto;padding:24px;border-radius:24px;background:#fff9ef;color:#07352e;box-sizing:border-box;border:1px solid #e7d5b9;position:relative}
.release-result .result-hero{display:grid;grid-template-columns:40% 60%;align-items:center;gap:0;margin-bottom:14px}
.release-result .win-pets{display:flex;align-items:center;justify-content:center;width:100%;height:216px;margin:0;position:relative}
.release-result .win-pet-photo{width:210px;height:210px;border:4px solid white;border-radius:18px;box-shadow:0 3px 14px #654b2338;flex:none}
.release-result .win-pets.multiple{display:grid;grid-template-columns:repeat(2,1fr);width:100%;height:216px;gap:0;padding:8px;box-sizing:border-box}
.release-result .win-pets.multiple .win-pet-photo{width:112px;height:112px;border-radius:50%;margin:-5px;position:relative}
.release-result .win-pets.multiple .win-pet-photo:nth-child(even){transform:translateY(12px)}
.release-result h2{font-family:Georgia,serif;font-size:clamp(32px,5vw,52px);line-height:1.08;margin:8px 0 18px;color:inherit}
.release-result .result-heading{text-align:center;padding:12px 0 0 12px}
.release-result .win-message{border:1px solid #e4cba7;background:#f7eddd;border-radius:18px;padding:12px 15px;color:#092e29;min-height:84px;box-sizing:border-box}
.release-result .win-message b{font:700 19px Georgia,serif;color:#82430d}
.release-result .win-message p{font:italic 18px/1.3 Georgia,serif;margin:6px 0 0}
.result-close{position:absolute;right:14px;top:12px;border:0;border-radius:50%;background:#eee2cf;color:#092e29;width:36px;height:36px;font-size:27px;line-height:1;z-index:2;padding:0;cursor:pointer}
.release-result .win-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:12px 0 8px}
.release-result .win-stats>div{background:#fffdf8;border:1px solid #ead8bb;border-radius:12px;padding:10px 4px;min-height:76px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#092e29;box-sizing:border-box}
.release-result .win-stats b{font-size:23px;line-height:1.3}.release-result .win-stats span,.release-result .win-stats small{font-size:11px;line-height:1.35;color:#315265}
.release-result .win-pb{font-size:10px;background:#ffcb5f;color:#052a24;border-radius:20px;padding:4px 7px;margin:4px 0 0;font-weight:800}
.result-points{display:grid;grid-template-columns:1fr 1fr 1.35fr;gap:10px;border:2px solid #d8a330;border-radius:14px;padding:12px;background:#04352b;color:white;align-items:center}
.result-points>div{display:flex;flex-direction:column;align-items:center;border-right:1px solid #bba76c}
.result-points b{font-size:25px}.result-points span{font-size:11px}.result-points button{background:#fff9ef;color:#07352e;border:0;border-radius:12px;padding:13px 8px;font-weight:800;font-size:13px;cursor:pointer}
.release-result .end-actions{display:flex;gap:14px;justify-content:center;margin:12px 0 0}.release-result .end-actions button{border-radius:30px;padding:11px 24px;min-width:30%;background:#063e32;color:white;border:1px solid #063e32;font-size:17px}
.release-result .end-actions .secondary-end{background:#ede1ce;color:#062d26;border-color:#d9c5a5}
.release-result .record-line{font-size:12px;margin:8px 0;color:inherit}.release-result .end-feedback-link{font-size:11px;margin:3px}
#lossOverlay.release-result .win-panel{background:linear-gradient(135deg,#062e26,#004133);color:#fff9ef;border-color:#899e8c}
#lossOverlay.release-result .end-actions button:not(.secondary-end){background:transparent;border:2px solid #fff9ef}
.detailed-stats{box-sizing:border-box;width:min(960px,96vw);max-height:94dvh;overflow:auto;background:#fffaf1;color:#103b32;border:1px solid #e6d5bd;border-radius:26px;padding:28px 24px;box-shadow:0 15px 80px #0008;position:fixed}
.detailed-stats::backdrop{background:#00271fba;backdrop-filter:blur(5px)}
.detailed-stats h2{font:700 clamp(30px,5vw,48px) Georgia,serif;margin:0}.detailed-stats>p{margin:6px 0 16px}
.stats-tabs{display:flex;max-width:490px;margin:18px auto 12px;border:1px solid #ddc9ac;border-radius:28px;background:#f4ecdf;padding:3px}
.stats-tabs button{flex:1;border:0;border-radius:25px;background:transparent;color:#092e29;padding:10px;font-size:19px;font-weight:700;cursor:pointer}.stats-tabs button[aria-selected=true]{background:#0b372e;color:white}
.stats-history-note{font-size:12px;line-height:1.4;color:#526457}
.detail-section{border:1px solid #e7d5bc;border-radius:15px;padding:15px;margin-top:10px;position:relative}.detail-section h3{font:700 24px Georgia,serif;margin:0 0 4px}.detail-section>p{font-size:13px;margin:0 0 10px;color:#49625b}
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.stats-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.stats-grid.secondary{margin-top:9px}
.stats-tile{border:1px solid #d7dfca;border-radius:12px;background:#eef1e4;padding:14px 8px;text-align:center;display:flex;flex-direction:column;justify-content:center;min-width:0}
.stats-tile.gold{background:linear-gradient(110deg,#fff5dc,#ffe6b4);border-color:#f2cf88}.stats-tile b{font-size:29px;color:#071d19;line-height:1.2}.stats-tile span{font-size:11px;margin-top:4px}.stats-tile small{font-size:12px;margin-top:4px;color:#456159}.secondary .stats-tile{background:#fffdf7;padding:9px 5px}.secondary .stats-tile b{font-size:22px}
.stats-halves{display:grid;grid-template-columns:1fr 1fr;gap:10px}.stats-halves dl{margin:12px 0 0}.stats-halves dl>div{display:flex;justify-content:space-between;gap:8px;padding:9px 8px;font-size:13px}.stats-halves dl>div:nth-child(odd){background:#f3eddf;border-radius:8px}.stats-halves dd{margin:0;font-weight:700}
.stats-table-wrap{overflow:auto}.detailed-stats table{border-collapse:collapse;width:100%;font-size:13px;text-align:left;white-space:nowrap}.detailed-stats th,.detailed-stats td{padding:10px 7px;border-bottom:1px solid #e3dacb}.detailed-stats thead{background:#f1e8d9}.detailed-stats tbody tr:nth-child(even){background:#f9f1e5}.stats-view-all{display:block;margin:0 0 8px auto;border:0;background:none;color:#063e32;text-decoration:underline;font-size:12px;cursor:pointer}
.stats-done{display:block;margin:20px auto 0;padding:13px 60px;border:0;border-radius:28px;background:#093b30;color:white;font-size:19px;font-weight:700;cursor:pointer}
.release-result .win-pets.multiple{display:block;position:relative}
.release-result .win-pets.multiple .win-pet-photo{position:absolute;width:120px;height:120px;margin:0;transform:none}
.release-result .win-pets.multiple .win-pet-photo:nth-child(1){left:0;bottom:0;z-index:3}
.release-result .win-pets.multiple .win-pet-photo:nth-child(2){left:50px;top:0;z-index:2}
.release-result .win-pets.multiple .win-pet-photo:nth-child(3){left:130px;top:0;z-index:1}
.release-result .win-pets.multiple .win-pet-photo:nth-child(4){right:0;bottom:8px;z-index:4}
@media(max-width:600px){.release-result .win-panel{padding:18px 12px}.release-result .result-hero{grid-template-columns:35% 65%}.release-result .win-pets{height:155px}.release-result .win-pet-photo{width:120px;height:145px}.release-result .win-pets.multiple{height:155px;padding:0}.release-result .win-pets.multiple .win-pet-photo{width:67px;height:67px;border-width:2px}.release-result .win-message p{font-size:14px}.release-result .win-message b{font-size:16px}.release-result h2{font-size:31px;margin-bottom:10px}.release-result .win-stats b{font-size:18px}.release-result .win-stats span,.release-result .win-stats small{font-size:9px}.result-points{gap:5px;padding:9px 5px}.result-points b{font-size:21px}.result-points span{font-size:9px}.result-points button{font-size:11px}.detailed-stats{padding:24px 12px}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stats-grid.three{grid-template-columns:1fr}.stats-halves{grid-template-columns:1fr}.stats-tile b{font-size:25px}}

@media(max-width:600px){.release-result .win-pets:not(.multiple) .win-pet-photo{width:120px!important;height:145px!important;aspect-ratio:auto!important}.release-result .win-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}.release-result .win-pets.multiple .win-pet-photo:nth-child(2){left:26px}.release-result .win-pets.multiple .win-pet-photo:nth-child(3){left:62px}}

/* Temporary no-actionable-hint exit. */
.game-toolbar .concede-loss{flex:0 0 auto;border:1px solid #d8b991;border-radius:8px;padding:8px 10px;background:#523b35;color:#fff8ed;font:600 13px/1.2 system-ui;cursor:pointer;min-height:36px}
.game-toolbar .concede-loss[hidden]{display:none!important}
.game-toolbar .concede-loss:focus-visible{outline:3px solid #ffe0a6;outline-offset:2px}
@media(max-width:700px){.game-toolbar .concede-loss{font-size:11px;padding:6px}}
/* v0.25.0.15: consistent 3/4 performance rows in both draw modes */
.detailed-stats .stats-grid.overall-top{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:600px){.detailed-stats .stats-grid.overall-top{grid-template-columns:repeat(3,minmax(0,1fr))}.detailed-stats .stats-grid.secondary{grid-template-columns:repeat(4,minmax(0,1fr))}.detailed-stats .stats-grid.overall-top .stats-tile,.detailed-stats .stats-grid.secondary .stats-tile{padding:6px 2px;min-width:0}.detailed-stats .stats-grid.overall-top .stats-tile b,.detailed-stats .stats-grid.secondary .stats-tile b{font-size:clamp(15px,3.6vw,24px)}}

/* v0.25.1.13: readable portrait stats without clipped labels */
@media (max-width:600px) and (orientation:portrait){
 .detailed-stats .stats-grid.overall-top{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .detailed-stats .stats-grid.overall-top .stats-tile:last-child{grid-column:1/-1}
 .detailed-stats .stats-grid.secondary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .detailed-stats .stats-grid.overall-top .stats-tile,.detailed-stats .stats-grid.secondary .stats-tile{padding:12px 8px;min-width:0;overflow-wrap:normal;word-break:normal}
 .detailed-stats .stats-grid.overall-top .stats-tile b,.detailed-stats .stats-grid.secondary .stats-tile b{font-size:clamp(19px,5.1vw,28px);overflow-wrap:anywhere}
 .detailed-stats .stats-grid .stats-tile span{font-size:11px;line-height:1.3}
 .detailed-stats .stats-grid .stats-tile .artwork{max-width:52px;max-height:52px}
}

/* v0.25.2.2: all eight preference species, inline and responsive */
#parkPreferences .pref-visitors .type-card-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
#parkPreferences .pref-visitors .type-card-grid button{min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:12px 6px;min-height:94px}
#parkPreferences .pref-visitors .species-illustration{font-size:32px;line-height:1.2}
#parkPreferences .pref-visitors .type-card-grid b{font-size:13px;text-align:center}
#parkPreferences .pref-visitors .type-card-grid button:disabled{opacity:.4}
@media(max-width:600px){#parkPreferences .pref-visitors .type-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Global Personal Best origin labels */
.global-pb-top{font-size:11px;font-weight:800;letter-spacing:.04em;padding:5px 9px;margin:-7px -7px 10px;background:#24483f;color:white;border-radius:8px;text-transform:uppercase}
.global-pb-top[data-tone*="spider"]{background:#a94444}

/* v0.30.3.0: global stats reuse mode-card visual language */
.global-pb-card{position:relative;padding-top:0;overflow:hidden;justify-content:flex-start}
.global-pb-card .global-pb-top{align-self:stretch;margin:0 -8px 10px;border-radius:10px 10px 0 0;padding:7px 5px;text-align:center}
.global-pb-card .artwork{margin:0 auto 5px;max-height:44px;max-width:44px}
.global-pb-top{background:#0c6652}
.global-pb-top[data-tone="draw1"]{background:#08765b}
.global-pb-top[data-tone="draw3"]{background:#2169a3}
.global-pb-top[data-tone="freecell"],.global-pb-top[data-tone="freecell-1"]{background:#424b56}
.global-pb-top[data-tone="spider-one"]{background:#c66b69}
.global-pb-top[data-tone="spider-two"]{background:#a33e42}
.global-pb-top[data-tone="spider-four"]{background:#76202c}
.global-high-card{position:relative;min-width:0;display:flex;flex-direction:column}
.global-high-card>.global-pb-top{margin:0;border-radius:11px 11px 0 0;text-align:center}
.global-high-card>.stats-tile{flex:1;border-radius:0 0 11px 11px}
.global-points-table{margin-top:18px}

/* v0.30.3.0: personal-best mode header spans the full card width */
.detailed-stats .global-pb-shell{min-width:0;display:flex;flex-direction:column;overflow:hidden;border-radius:12px}
.detailed-stats .global-pb-shell>.global-pb-top{flex:none;align-self:stretch;display:block;width:100%;box-sizing:border-box;margin:0;border-radius:11px 11px 0 0;text-align:center;padding:7px 6px;line-height:1.25}
.detailed-stats .global-pb-shell>.global-pb-card{flex:1;width:100%;box-sizing:border-box;border-radius:0 0 11px 11px;display:flex;flex-direction:row;align-items:center;justify-content:center;padding:10px 8px;gap:12px;min-height:82px}
.detailed-stats .global-pb-shell>.global-pb-card>.release-icon{flex:none}

/* Variant colour is owned by each registered game layout, never duplicated here. */
.global-pb-top[style*="--game-mode-color"]{background:var(--game-mode-color)!important}
