:root{--game-numerals:Arial,"Microsoft YaHei",sans-serif}
.hero-stats,.profile-resources,.profile-progress,.gear-slot b,.shop-wallet,.shop-good strong,.ranking-table,.result-row,.royal-plinth>strong,#bossPercent,#integrityText,#mechanicText,#shieldText,#petFragmentRanks strong{font-family:var(--game-numerals)!important;font-variant-numeric:tabular-nums lining-nums;font-feature-settings:"tnum";font-style:normal}
#profilePeek #detailBuffs{position:static;margin:8px 16px;min-height:0;font:12px/1.6 var(--game-numerals);color:#315c58}
#profilePeek #detailBuffs:empty{display:none}.hero-stats span{font-size:13px}.hero-stats>b{font-size:22px}.profile-resources{flex-wrap:wrap;gap:8px}.profile-progress{margin:12px 0}.auto-upgrade-row{justify-content:center;margin:12px 0;gap:12px}.auto-upgrade-row .profile-help{background:transparent;color:#305951;border-color:#829a82;padding:10px 14px}.costume-benefits{margin:4px 20px;font-size:12px;line-height:1.7}.costume-benefits summary{cursor:pointer;color:#46615b}.auto-upgrade-result{font:12px/1.6 var(--game-numerals)}
#returnLobby{width:98px;height:40px;top:980px;left:24px;border-radius:5px 15px 5px 15px;font:14px var(--serif);letter-spacing:1px;background:linear-gradient(135deg,#355c59f5,#142f35f5);border:1px solid #d5b97a;box-shadow:inset 0 0 0 3px #d1b06b22,0 3px 10px #0004;padding:0 5px}#returnLobby::after{content:none}#returnLobby:hover{filter:brightness(1.15)}#returnLobby:active{transform:translateY(1px)}.queen-duel #storyObjective{display:none!important}
#gameHelpBtn{position:absolute;bottom:24px;left:30%;width:40%;padding:9px;background:#244e4b;border:1px solid #c6ad72;color:#f6dfaa;border-radius:6px}#gameHelp{width:450px;max-height:80vh;padding:24px;background:#163c3c;color:#ebddbb;border:1px solid #c5a570;border-radius:14px;overflow:auto}#gameHelp h2{text-align:center;color:#ffe3a3}#gameHelp details{padding:12px 0;border-bottom:1px solid #baa46b44}#gameHelp summary{cursor:pointer;font-size:17px}#gameHelp p{font:14px/1.85 var(--game-numerals);color:#cdd8ca}.help-close{float:right;background:none;border:0;color:#ffe6b5;font-size:26px}
#resultDialog.hidden-result[open]{background:#102e35 url('art/v31/royal-result.png') center/100% 100%;padding:30px 22px 22px;box-shadow:0 20px 80px #000b;border:0;border-radius:20px}
#resultDialog.hidden-result #resultEmblem{display:none}#resultDialog.hidden-result #resultEyebrow{font-size:12px;letter-spacing:3px;margin:8px 0}#resultDialog.hidden-result #resultTitle{font-size:34px;margin:6px 0}#resultDialog.hidden-result #resultReward{font:12px/1.6 var(--game-numerals);margin:0}
#resultDialog.hidden-result #resultRanks{display:flex;flex-direction:column;gap:0}.royal-result-podium{position:relative;display:block;height:355px;padding:0;flex-shrink:0}.royal-place{position:absolute;bottom:0;width:30%}.royal-place.place-1{left:35%;bottom:25px}.royal-place.place-2{left:1%}.royal-place.place-3{right:1%;bottom:-8px}.royal-place canvas{width:120px;height:154px}.royal-place.place-1 canvas{width:140px;height:178px}.royal-rank-crown{height:20px;font:16px var(--serif);color:#ffe1a0}.royal-place.place-1 .royal-rank-crown{height:22px;font:18px var(--serif)}
.royal-plinth,.place-1 .royal-plinth{min-height:94px;background:linear-gradient(transparent,#122f35bb);border:0;box-shadow:none;padding:10px 2px 4px}.royal-plinth>em{top:-13px;width:26px;height:26px;font-size:16px;line-height:24px}.royal-plinth>small{font-size:11px;margin-top:4px}.royal-plinth>.face{display:none}.royal-plinth>b{font:13px/1.5 var(--game-numerals);margin:4px 0}.royal-plinth>strong{font:700 22px/1.15 var(--game-numerals)!important;text-shadow:0 2px 3px #173834}.royal-plinth>strong>span{font:10px/1.4 var(--game-numerals);letter-spacing:0}.royal-empty{height:152px}.royal-result-heading{padding:12px 0 8px;font-size:13px}.royal-result-heading small:empty{display:none}.royal-fragment-value{font:700 22px/1.15 var(--game-numerals)!important}.royal-fragment-value small{font:10px/1.5 var(--game-numerals)!important}.royal-result-list .rank-medal{font:700 18px var(--game-numerals)}.royal-result-list .result-row{min-height:55px}.royal-result-list .result-row strong{font:14px var(--game-numerals)}.royal-result-list .result-row small{font:12px var(--game-numerals)}#resultDialog.hidden-result #nextRoundClock{margin:8px 0;font-size:12px}

.royal-rank-crown{visibility:hidden}
#gameHelp table{width:100%;border-collapse:collapse}#gameHelp th,#gameHelp td{padding:5px;border-bottom:1px solid #baa46b44;text-align:center;font-family:var(--game-numerals);font-variant-numeric:tabular-nums}

/* Keep settlement controls visible while the rankings scroll. */
#resultDialog[open]{display:flex;flex-direction:column;box-sizing:border-box}
#resultDialog[open]>:not(#resultRanks){flex-shrink:0}
#resultDialog[open] #resultRanks{display:flex;flex-direction:column;flex:1 1 0;min-height:0;height:auto;max-height:none;overflow:auto}
#resultDialog[open] #continueBtn{display:block;position:relative;width:100%;min-height:44px;margin-top:8px;padding:10px 16px;border:1px solid #d5b97a;border-radius:6px;background:linear-gradient(#35625c,#214540);color:#fff0c8;font-size:16px}

/* Keep seat management reachable while character details scroll above it. */
#profilePeek:not([hidden]){display:flex;flex-direction:column}
#profilePeek .profile-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:#829c8d transparent;padding-right:4px}
#profilePeek .profile-footer{position:relative;flex:none;display:block;padding:8px 8px 4px;margin-top:6px;border-top:1px solid #b8a374;background:linear-gradient(#f3ecd7eb,#ece2c8f5);border-radius:0 0 12px 12px}
#profilePeek .profile-footer .profile-progress{height:26px;margin:0 0 6px}
#profilePeek .profile-footer .profile-resources{display:flex;flex-wrap:nowrap;gap:8px;min-height:30px;margin:0 0 6px;font-size:13px}
#profilePeek .profile-shortcuts{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}
#profilePeek .profile-shortcuts button{min-width:0;padding:9px 0;border:1px solid #b9a16b;border-radius:6px;background:linear-gradient(#4c7971,#234b48);color:#fff0cd;font:13px var(--serif)}
#profilePeek .profile-dismiss{position:static;width:100%;min-height:36px;margin:9px 0 0;padding:8px 12px;border:1px solid #9e7050;background:linear-gradient(#f6e8d1,#e7cdb0);color:#713f2f;font:600 14px var(--sans);letter-spacing:2px;cursor:pointer}
#profilePeek .profile-dismiss:hover{background:#f9ead2;border-color:#79472e}
#profilePeek .profile-dismiss:disabled{opacity:.55;cursor:wait}
#profilePeek .profile-footer #detailBuffs{margin:4px 0;font-size:11px;max-height:34px;overflow:auto}
