/* End-of-game paintings have a dedicated, ornament-free text area. */
dialog.result-screen{padding:0!important;width:min(760px,calc(100vw - 30px));max-width:760px;max-height:92vh;overflow:auto;border:1px solid #d7a4bc;background:#100d17!important;border-radius:6px;box-shadow:0 25px 100px #000d,0 0 50px #e14b8b19;color:#f8eaf3}
.result-screen::backdrop{background:#07050bdf;backdrop-filter:blur(7px)}.result-hero{position:relative;line-height:0;border-bottom:1px solid #a4788e66}.result-hero>img{width:100%;aspect-ratio:2.2;object-fit:cover;object-position:50% 24%;display:block;image-rendering:pixelated;background:#211220}.result-hero:after{content:'';position:absolute;inset:0;background:linear-gradient(transparent 65%,#100d17);pointer-events:none}
.result-hero #result-dismiss{position:absolute;right:14px;top:14px;z-index:2;width:42px;height:42px;padding:0;display:grid;place-items:center;border:1px solid #efc4da88;background:#0d0b13dd;border-radius:4px;color:#fff0fa;font-size:26px;cursor:pointer;line-height:1}
.result-copy{padding:24px 35px 30px;text-align:center}.result-label{font:12px 'Bahnschrift','Microsoft YaHei',sans-serif;letter-spacing:2px;color:#e7bd9a}.result-copy h2{font:700 45px/1.2 'KaiTi','SimSun',serif;margin:14px 0 12px;color:#ffe8be;text-shadow:0 2px 12px #e8a75615}.result-screen[data-kind=defeat] .result-copy h2{color:#f4bbd0}.result-screen[data-kind=draw] .result-copy h2{color:#d8e8ff}#result-reason{font-size:16px;line-height:1.8;color:#e4ccdc;margin:0 0 19px}.result-stats{display:grid;grid-template-columns:repeat(3,1fr);max-width:460px;margin:0 auto 24px;gap:10px}.result-stats>div{padding:11px;border:1px solid #7e687b44;background:#1e1824;border-radius:3px}.result-stats small{display:block;color:#bba5b8;font-size:12px;margin-bottom:5px}.result-stats strong{font:500 19px 'Bahnschrift','Microsoft YaHei',sans-serif;color:#f2e1ef}.result-actions{display:flex;justify-content:center;gap:12px}.result-actions button{background:linear-gradient(#1a2533ee,#1a2533ee),url('assets/ai-secondary.webp') center/150% 190%;border:1px solid #a791a7;border-radius:4px;min-height:52px;padding:14px 25px;font:15px 'Microsoft YaHei',sans-serif;color:#ffedf8;cursor:pointer;min-width:160px}.result-actions #result-review{background:linear-gradient(#8d3159f5,#8d3159f5),url('assets/ai-button.webp') center/150% 190%;border-color:#edacc9}.result-actions button:hover:not(:disabled){filter:brightness(1.2)}.result-actions button:disabled{opacity:.4;cursor:default}#result-view{margin-top:18px;padding:5px 12px;background:none;border:0;color:#c9a8c2;font-size:13px;text-decoration:underline;text-underline-offset:4px;box-shadow:none;cursor:pointer}.result-actions button:focus-visible,#result-view:focus-visible,#result-dismiss:focus-visible{outline:3px solid #ffe7b8;outline-offset:3px}
/* The promotion tray lives inside the board frame and does not cover the whole app. */
.result-hero>img{aspect-ratio:3.2;max-height:230px}.result-copy{padding:18px 30px 22px}.result-copy h2{font-size:38px;margin:10px 0}.result-stats{margin-bottom:16px}.result-xp{margin:12px 0;padding:10px 14px}
@media(max-width:520px){.result-hero>img{aspect-ratio:2.2;max-height:180px}}
.board-frame{position:relative}.promotion-tray{position:absolute;z-index:12;left:50%;transform:translateX(-50%);width:min(420px,calc(100% - 24px));padding:16px;border:1px solid #ffcf9a;background:linear-gradient(#13101bf5,#13101bf5),url('assets/ai-panel.webp') center/160% 160%;box-shadow:0 10px 35px #000a,0 0 25px #f6c7791c;border-radius:4px;color:#fff0dc}.promotion-tray[data-edge=top]{top:17%}.promotion-tray[data-edge=bottom]{bottom:17%}.promotion-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px}.promotion-header strong{font:700 18px 'KaiTi','SimSun',serif;color:#ffe7bc}.promotion-header button{background:none;border:0;padding:3px 5px;box-shadow:none;color:#cdb7c9;font-size:12px;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.promotion-tray #promotion-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:0}.promotion-tray #promotion-options button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;width:auto;height:auto;min-width:0;min-height:112px;padding:8px 3px;background:linear-gradient(#202535f5,#202535f5),url('assets/ai-secondary.webp') center/160% 190%!important;border:1px solid #8c7c9b!important;border-radius:3px;color:#fff2e4;font-size:15px;cursor:pointer;box-shadow:none}.promotion-tray #promotion-options button:hover{border-color:#ffe2a8!important;filter:brightness(1.16)}.promotion-tray #promotion-options button:focus-visible{outline:3px solid #ffe2a8;outline-offset:2px}.promotion-portrait{display:flex;align-items:center;justify-content:center;width:100%;height:74px}.promotion-portrait .unit-art{height:100%;width:100%;object-fit:contain}.promotion-portrait .unit-badge{display:none}.promotion-tray p{font-size:11px;color:#cdbbc8;text-align:center;line-height:1.7;margin:12px 0 0}.square.promotion-target{background:#f5c37320;box-shadow:inset 0 0 0 3px #ffe1a0,0 0 20px #ffd48a44}
.promotion-flare{z-index:105;opacity:0}.promotion-flare>span{width:85%;height:85%;border:2px solid #ffe6a8;box-shadow:0 0 22px #ffd58a,inset 0 0 18px #ff79b577;background:radial-gradient(#fff3c855,transparent 70%);transform:rotate(45deg)}.promoted-unit{z-index:106;opacity:0}.promotion-spark{background:#ffedbe;box-shadow:0 0 10px #ffb88e;z-index:107;opacity:0}
.promotion-tray #promotion-options .promotion-portrait .unit-art{width:100%;height:100%}
@media(max-width:540px){dialog.result-screen{max-height:92vh}.result-hero>img{aspect-ratio:1.65}.result-copy{padding:21px 20px 25px}.result-copy h2{font-size:37px}.result-label{font-size:10px}.result-actions{gap:9px}.result-actions button{min-width:0;flex:1;padding:14px 12px;font-size:14px}#result-reason{font-size:14px}.result-stats{gap:7px}.result-stats>div{padding:10px 6px}.result-stats strong{font-size:17px}.promotion-tray{padding:13px;width:calc(100% - 22px)}.promotion-tray #promotion-options{gap:6px}.promotion-tray #promotion-options button{min-height:94px;font-size:13px;gap:4px}.promotion-portrait{height:59px}.promotion-header strong{font-size:17px}.promotion-tray p{font-size:10px}.promotion-tray[data-edge=top]{top:19%}.promotion-tray[data-edge=bottom]{bottom:19%}}
@media(max-height:820px) and (min-width:600px){.result-hero>img{height:140px;max-height:140px;aspect-ratio:auto}.result-copy{padding:12px 26px 16px}.result-copy h2{font-size:34px;margin:8px 0}.result-stats{margin-bottom:10px}.result-xp{margin:8px 0}.result-actions button{min-height:46px;padding:10px 12px}}
