/* M3 game shell: new M3 authoritative battle layout. */
body.r9-ui{margin:0!important;padding:0!important;display:block!important;overflow:hidden!important;background:#080c19;color:#e8f1ff;font-family:"Microsoft JhengHei",system-ui,sans-serif;font-size:14px}
body.r9-ui>.container{display:none!important}
body.r9-ui{--battle-log-dock-height:0px}
.r9-shell{position:fixed;inset:0;display:grid;grid-template-rows:70px 45px minmax(0,1fr) 104px 76px 65px;overflow:hidden;z-index:2;background:radial-gradient(ellipse 70% 80% at 53% 35%,#17233e 0%,#0d1529 48%,#080c19 100%);box-sizing:border-box}
.r9-shell *{box-sizing:border-box}
.r9-shell button{font-family:inherit;cursor:pointer}
.r9-header{display:flex;align-items:center;gap:16px;padding:9px 20px;border-bottom:1px solid #293852;background:#0f192b;min-width:0}
.r9-character-btn{display:flex;align-items:center;gap:10px;flex:0 1 255px;min-width:178px;border:1px solid #354a70;background:#192943;color:#f6f9ff;border-radius:13px;padding:7px 10px;text-align:left}
.r9-character-btn:hover{border-color:#7db9ff;background:#1c3454}
.r9-avatar{flex:none;width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:linear-gradient(135deg,#345e9b,#483b78);font-size:21px}
.r9-character-meta{min-width:0;display:grid;gap:3px;flex:1}
.r9-character-meta strong{font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.r9-character-meta small{font-size:11px;color:#b6c7db}
.r9-exp{width:100%;height:4px;background:#354154;border-radius:10px;overflow:hidden}
.r9-exp>i{display:block;width:0;height:100%;background:linear-gradient(90deg,#5ccaff,#a582ff);transition:width .25s linear}
.r9-location{display:flex;align-items:center;gap:18px;flex:1;min-width:0}
.r9-location>div{display:grid;gap:4px;min-width:0}
.r9-location b{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.r9-location small{font-size:11px;color:#93a5c2;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.r9-brand{display:grid;line-height:1.02;font-weight:900;letter-spacing:.06em;color:#f8fbff;font-size:15px;min-width:90px}
.r9-brand b{color:#77b8ff}
.r9-brand small{font-size:9px;letter-spacing:0;font-weight:400;color:#89a2c7;margin-top:6px;white-space:normal;overflow-wrap:anywhere;max-width:150px;line-height:1.25}
.r9-currency{margin-left:auto;flex:none}
.r9-currency .resource-topbar{display:flex!important;position:static!important;border:0!important;background:transparent!important;padding:0!important;margin:0!important;gap:15px!important;height:auto!important;min-height:0!important}
.r9-currency .res{display:flex;gap:6px;align-items:center;min-width:0}
.r9-currency .res span{display:inline!important;margin:0!important}
.r9-auth{flex:none}
.r9-auth #nyxSessionBar{position:static!important;border-color:#2b4260!important;padding:3px 7px!important;background:#192943!important;margin:0!important}
.r9-status-strip{display:flex;align-items:center;gap:15px;padding:5px 20px;background:#101b30;border-bottom:1px solid #26344c;min-width:0}
.r9-health-group{display:flex;align-items:center;gap:10px;flex:1;min-width:0;max-width:440px}
.r9-health-group>span:first-child{white-space:nowrap;font-size:12px;color:#ccdafa}
.r9-health-group b{font-variant-numeric:tabular-nums;color:white}
.r9-meter{height:9px;flex:1;background:#2d374b;border-radius:99px;overflow:hidden}
.r9-meter i{display:block;width:0;height:100%;background:linear-gradient(90deg,#ff555a,#f79149);transition:width .2s linear}
.r9-meter.mp i{background:linear-gradient(90deg,#317fef,#69c6ff)}
.r9-status-note{display:flex;align-items:center;gap:12px;margin-left:auto;white-space:nowrap;color:#b8d1f4;font-size:12px}
.r9-status-note span:last-child{border:1px solid #3e5580;background:#1c2e4d;padding:4px 9px;border-radius:20px}
.r9-main{min-height:0;padding:12px 16px 8px;overflow:hidden}
.r9-arena{width:100%;height:100%;min-height:0;min-width:0}
.r9-command{display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:5px;padding:7px 16px;border-top:1px solid #273953;border-bottom:1px solid #273953;background:#0e192b;min-width:0}
.r9-command-buttons{display:flex;flex-wrap:nowrap;gap:8px;min-width:0;flex:none}
.r9-cta{border:1px solid #314b70;background:#1c2f4d;color:#f0f6ff;padding:9px 12px;min-height:43px;border-radius:11px;font-weight:800;white-space:nowrap;font-size:13px}
.r9-cta:hover{background:#2a4570}
.r9-cta.primary{background:#315fe5;border-color:#5177ff}
.r9-cta.danger{background:#752f3e;border-color:#a74c5b}
.r9-cta:disabled{opacity:.44;cursor:not-allowed}
.r9-active-skills{display:flex;gap:6px;overflow-x:auto;min-height:31px;max-height:36px;align-items:center;scrollbar-width:thin}
.r9-skill-chip{display:flex;align-items:center;gap:8px;border:1px solid #40506a;border-radius:8px;background:#1d2a43;color:#cbd9ef;padding:4px 9px;flex:none;font-size:11px}
.r9-skill-chip.on{border-color:#23866d;background:#103b38;color:#ccffee}
.r9-skill-chip span{font-size:10px;opacity:.85}
.r9-skill-empty{color:#8fa7c8;font-size:11px}
.r9-alert{color:#ffcf89;font-size:12px;max-width:260px;line-height:1.4}
.r9-events{display:flex;gap:10px;align-items:center;background:#101b2d;padding:7px 16px;min-width:0;overflow:hidden}
.r9-event-heading{display:flex;flex-direction:column;gap:3px;width:128px;flex:none}
.r9-event-heading b{font-size:14px}
.r9-event-heading span{font-size:10px;color:#9aacc9}
.r9-event-heading button{background:transparent;border:0;color:#84b8ff;text-align:left;padding:0;font-size:12px}
.r9-event-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));flex:1;gap:8px;min-width:0}
.r9-event{border:1px solid #293956;background:#16243d;border-radius:9px;padding:7px 10px;display:grid;gap:3px;min-width:0}
.r9-event time{font-size:10px;color:#90a8cc}
.r9-event span{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.r9-event-reward{border-color:#5b5434;color:#ffe3a3}
.r9-empty{font-size:12px;color:#91a4bf}
.r9-nav{display:flex;justify-content:center;align-items:center;gap:8px;padding:8px 16px 10px;background:#0b1426;border-top:1px solid #293952}
.r9-nav button{display:flex;align-items:center;justify-content:center;gap:9px;flex:1;max-width:180px;border:1px solid #2d4264;border-radius:11px;background:#182943;color:#eaf1ff;font-size:14px;font-weight:700;padding:10px 5px}
.r9-nav button:hover{background:#28436e;border-color:#769cd0}
.r9-drawer{position:fixed;z-index:20000;right:16px;top:24px;bottom:24px;width:min(680px,calc(100vw - 32px));border:1px solid #476087;border-radius:20px;background:#111a2e;box-shadow:0 22px 90px rgba(0,0,0,.65);display:flex;flex-direction:column;overflow:hidden}
.r9-drawer-head{display:flex;justify-content:space-between;align-items:center;padding:14px 19px;border-bottom:1px solid #354963;font-size:17px;background:#182740}
.r9-drawer-head button,.r9-detail-card header button{border:0;background:#293a59;border-radius:9px;color:#fff;font-size:18px;width:36px;height:36px}
.r9-drawer-content{flex:1;min-height:0;overflow:auto;padding:15px;overscroll-behavior:contain}
.r9-drawer .section{width:100%!important;min-width:0!important;flex:auto!important;margin:0 0 12px!important}
.r9-drawer .row{display:block!important;width:100%!important}
.r9-drawer .sys-tabs{width:100%}
.r9-drawer .section-stats .alloc-grid{display:grid!important}
.r9-backdrop{position:fixed;inset:0;z-index:19999;background:rgba(0,0,0,.45)}
.r9-detail-backdrop{position:fixed;inset:0;z-index:24000;display:grid;place-items:center;padding:18px;background:rgba(1,7,17,.77)}
.r9-detail-card{width:min(740px,100%);max-height:85dvh;display:flex;flex-direction:column;border:1px solid #456592;border-radius:18px;background:#111d33;overflow:hidden}
.r9-detail-card header{display:flex;justify-content:space-between;align-items:center;padding:14px 17px;background:#1b2a45;border-bottom:1px solid #344967}
.r9-detail-card #r9DetailContent{padding:15px;overflow:auto}
.r9-hit-record{border:1px solid #344861;background:#162741;border-radius:12px;padding:12px;margin-bottom:10px}
.r9-hit-record h3{margin:0 0 9px;font-size:15px}
.r9-hit-target{color:#a4ceff;font-weight:bold;padding:4px 0}
.r9-hit-line{padding:5px 0;border-top:1px solid #293e5a;font-variant-numeric:tabular-nums}
.r9-drawer[hidden],.r9-detail-backdrop[hidden],.r9-backdrop[hidden],[data-r9-panel][hidden]{display:none!important}
body.r9-ui #battle-hit-log-panel{display:none!important}
body.r9-ui #rpgBootGateOverlay,body.r9-ui #nyxStageHost,body.r9-ui #gameSetupModal{z-index:32000!important}
@media (max-width:1170px){.r9-brand{display:none}
.r9-currency .market-status{display:none}
.r9-command-buttons{gap:5px}
.r9-cta{font-size:12px;padding:7px 9px}
.r9-alert{max-width:160px}}
@media (max-width:780px){.r9-shell{grid-template-rows:61px 56px minmax(0,1fr) 123px 53px 61px}
.r9-header{padding:7px 9px;gap:7px}
.r9-character-btn{flex:1;min-width:0;padding:6px}
.r9-avatar{width:31px;height:33px;font-size:17px}
.r9-character-meta strong{font-size:12px}
.r9-location{flex:1}
.r9-location>div{max-width:125px}
.r9-location b{font-size:12px}
.r9-location small{font-size:9px}
.r9-currency{display:none}
.r9-auth #nyxSessionBar span{display:none}
.r9-auth #nyxSessionBar{padding:2px!important}
.r9-auth #nyxSessionBar button{font-size:11px;padding:4px!important}
.r9-status-strip{padding:4px 9px;gap:4px;display:grid;grid-template-columns:1fr 1fr}
.r9-health-group{display:grid;gap:4px}
.r9-health-group>span:first-child{font-size:10px}
.r9-status-note{grid-column:1/-1;margin:0;justify-content:space-between;font-size:10px}
.r9-main{padding:6px;overflow:hidden}
.r9-arena{overflow:auto;overscroll-behavior:contain}
.r9-command{padding:5px 9px;display:flex;gap:3px}
.r9-command-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.r9-cta{min-height:34px;font-size:11px;padding:5px 2px}
.r9-alert{max-width:none;font-size:10px;height:13px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.r9-events{padding:5px 9px;gap:8px}
.r9-event-heading{width:88px}
.r9-event-heading b{font-size:11px}
.r9-event-heading span{display:none}
.r9-event-heading button{font-size:10px}
.r9-event-list{grid-template-columns:1fr}
.r9-event:not(:first-child){display:none}
.r9-event{padding:4px 7px}
.r9-event time{display:none}
.r9-event span{font-size:11px}
.r9-nav{gap:4px;padding:5px}
.r9-nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;font-size:16px;padding:3px 1px;min-height:49px;height:49px;line-height:1.2}
.r9-nav button span{font-size:10px}
.r9-drawer{inset:0;width:100%;height:100dvh;border-radius:0;border:0}
.r9-drawer-content{padding:10px}}
@media (max-height:650px) and (min-width:781px){.r9-shell{grid-template-rows:54px 38px minmax(0,1fr) 98px 60px 54px}
.r9-main{padding:5px 11px}
.r9-header{padding:4px 12px}
.r9-event{padding:4px 7px}}
.r9-cta[hidden]{display:none!important}
@media  (min-width:781px){.r9-shell{grid-template-rows:70px 45px minmax(0,1fr) 104px 76px}
.r9-nav{display:none!important}}
.r9-header{gap:10px}
.r9-character-btn{flex:0 1 265px;min-width:215px}
.r9-power-mini{min-width:68px;display:grid;gap:2px;padding-left:9px;border-left:1px solid #40516c;text-align:right;font-variant-numeric:tabular-nums}
.r9-power-mini small{font-size:10px;color:#a7bedc;white-space:nowrap}
.r9-power-mini strong{font-size:16px;color:#f4d998;white-space:nowrap}
.r9-location{flex:0 1 240px;min-width:130px;gap:10px}
.r9-brand{min-width:58px}
.r9-header-shortcuts{display:flex;align-items:center;gap:6px;flex:0 0 auto;min-width:0}
.r9-header-shortcuts>button,.r9-more-wrap>button{border:1px solid #344f72;border-radius:9px;background:#1b2e4c;color:#edf5ff;padding:9px 11px;font-size:12px;white-space:nowrap;font-weight:700;min-height:38px}
.r9-header-shortcuts button:hover:not(:disabled){background:#294771;border-color:#87acdd}
.r9-more-wrap{position:relative;flex:none}
.r9-more-wrap>button.open{background:#2c4b78;border-color:#83b5f8}
.r9-more-menu{position:absolute;top:calc(100% + 12px);right:0;width:390px;max-width:calc(100vw - 16px);padding:14px;display:grid;gap:10px;background:#121d32;border:1px solid #4b6488;box-shadow:0 18px 50px #0009;border-radius:15px;z-index:11000}
.r9-more-menu[hidden]{display:none!important}
.r9-more-menu>strong{font-size:13px;color:#b8d6f9}
.r9-more-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.r9-more-grid button{min-height:42px;text-align:left;padding:9px 11px;border:1px solid #314561;border-radius:9px;background:#202f4a;color:#f1f6ff;font-size:12px;font-weight:700;white-space:normal}
.r9-more-grid button:disabled{opacity:.46;cursor:not-allowed}
.r9-more-backup,.r9-shop-more{display:none!important}
.r9-role-summary{border:1px solid #364d6d;background:linear-gradient(135deg,#17253d,#121a2d);border-radius:15px;padding:15px;display:grid;gap:9px}
.r9-role-heading{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;padding-bottom:10px;border-bottom:1px solid #334461}
.r9-role-heading>strong{font-size:14px;color:#ecf5ff}
.r9-role-heading>span{color:#b6c9e0;font-size:12px}
.r9-role-heading b{color:#ffe2a2;font-size:18px;margin-left:5px}
.r9-role-summary h3{font-size:13px;color:#b9d0ee;margin:6px 0 0}
.r9-four-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.r9-four-stats>div{min-width:0;display:grid;gap:5px;border:1px solid #3a5070;background:#1b2c47;border-radius:11px;padding:12px}
.r9-four-stats small,.r9-combat-summary small{font-size:11px;color:#a9c2df}
.r9-four-stats strong{font-size:23px;color:#f3f7ff;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.r9-combat-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.r9-combat-summary>div{display:grid;gap:5px;min-width:0;padding:9px 11px;border:1px solid #304361;border-radius:9px;background:#182740}
.r9-combat-summary b{font-size:16px;overflow-wrap:anywhere}
.r9-trait-summary{background:#22304a;border:1px solid #3c506e;color:#e1edfa;border-radius:9px;min-height:40px;padding:10px 12px;font-size:12px;line-height:1.6}
.r9-character-actions{display:flex;gap:8px;flex-wrap:wrap;padding-top:6px}
.r9-character-actions button{flex:1;min-width:130px;min-height:37px;border:1px solid #547cad;background:#243e64;color:#eef7ff;border-radius:9px;font-weight:700}
.r9-character-advanced{margin-top:10px;border:1px solid #2d405e;border-radius:11px;background:#111d31;overflow:hidden}
.r9-character-advanced>summary{padding:12px 14px;cursor:pointer;background:#1a2a43;color:#deedff;font-weight:700;list-style-position:inside}
.r9-character-advanced[open]>summary{border-bottom:1px solid #2f4666}
.r9-character-advanced>div{padding:10px}
.r9-drawer #r9ProfileDetails .profile-card{margin:0!important}
.r9-drawer .r9-character-advanced .section{margin:0!important}
@media  (max-width:1250px) and (min-width:781px){.r9-location{flex:0 1 155px;min-width:105px}
.r9-brand{display:none}
.r9-header-shortcuts>button{padding:8px 7px;font-size:11px}}
@media  (max-width:1090px) and (min-width:781px){.r9-header-shortcuts>button{display:none}
.r9-more-backup,.r9-shop-more{display:block!important}}
@media  (max-width:780px){.r9-header{gap:5px}
.r9-character-btn{min-width:0;flex:1 1 130px;gap:5px}
.r9-power-mini{min-width:34px;padding-left:4px}
.r9-power-mini small{display:none}
.r9-power-mini strong{font-size:11px}
.r9-location{flex:0 1 108px;min-width:75px}
.r9-location>div{max-width:108px}
.r9-header-shortcuts{position:static;flex:0 0 0;gap:0;width:0}
.r9-header-shortcuts>button,.r9-more-wrap>button{display:none!important}
.r9-more-wrap{position:static}
.r9-more-menu{position:fixed;top:auto;right:8px;bottom:65px;width:min(390px,calc(100vw - 16px));max-height:min(70dvh,480px);overflow:auto}
.r9-more-backup,.r9-shop-more{display:block!important}
.r9-four-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
.r9-combat-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
.r9-role-summary{padding:10px}
.r9-four-stats>div{padding:9px}
.r9-four-stats strong{font-size:19px}}
.r9-location>button{display:grid;gap:4px;min-width:0;text-align:left;color:#e5f0ff;background:transparent;border:0;border-radius:8px;padding:5px;cursor:pointer}
.r9-location>button:hover,.r9-location>button:focus-visible{background:#223453;outline-color:#6ea3df}
.r9-location>button b{font-size:14px}
.r9-location>button small{font-size:10px}
#r9CharacterPanel .r9-legacy-sources{display:none!important}
#r9CharacterPanel .r9-role-summary{gap:11px}
#r9CharacterPanel .r9-role-top{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:2px 0 13px;border-bottom:1px solid #334461}
#r9CharacterPanel .r9-role-person{display:flex;align-items:center;gap:12px;min-width:0;flex:1}
#r9CharacterPanel .r9-role-avatar{display:grid;place-items:center;flex:none;width:43px;height:43px;background:linear-gradient(135deg,#345e9b,#483b78);border-radius:12px;font-size:20px}
#r9CharacterPanel .r9-role-person-content{display:grid;gap:8px;flex:1;min-width:0}
#r9CharacterPanel .r9-role-person-content>strong{color:#f4f8ff;font-size:15px;line-height:1.4;overflow-wrap:anywhere}
#r9CharacterPanel .r9-role-exp-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;color:#a9c6e7;font-variant-numeric:tabular-nums}
#r9CharacterPanel .r9-role-exp-meter{height:6px;background:#2d3750;border-radius:99px;overflow:hidden}
#r9CharacterPanel .r9-role-exp-meter>i{display:block;width:0;height:100%;background:linear-gradient(90deg,#55b0ff,#a77df8)}
#r9CharacterPanel .r9-role-important{display:flex;align-items:center;gap:13px;flex:none}
#r9CharacterPanel .r9-role-power{display:grid;gap:3px;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
#r9CharacterPanel .r9-role-power small{font-size:11px;color:#acc3e1}
#r9CharacterPanel .r9-role-power b{color:#ffe1a1;font-size:21px}
#r9CharacterPanel .r9-job-change-slot .job-btn{display:block!important;position:static!important;margin:0!important;min-width:72px;min-height:40px;padding:8px 12px;border-radius:10px;border:1px solid #577db4;background:#2d4974;color:#f4f8ff;font-size:13px;font-weight:700;white-space:nowrap}
#r9CharacterPanel .r9-job-change-slot .job-btn:hover{background:#3b5e93}
#r9CharacterPanel .r9-job-change-slot .job-btn:disabled{opacity:.5;cursor:not-allowed}
#r9CharacterPanel .r9-trait-summary{display:grid;gap:3px}
#r9CharacterPanel .r9-trait-summary strong{font-size:13px;color:#f4e2ad}
#r9CharacterPanel .r9-trait-summary span{color:#b5cbe6}
#r9CharacterPanel #r9PowerBreakdownBody{padding:11px}
#r9CharacterPanel #cp-detail{margin:0!important;max-width:100%;overflow-wrap:anywhere}
#r9CharacterPanel #r9AllStatsDetails .section{box-shadow:none!important}
@media (max-width:780px){#r9CharacterPanel .r9-role-top{align-items:flex-start;gap:10px}
#r9CharacterPanel .r9-role-avatar{width:33px;height:33px;font-size:16px}
#r9CharacterPanel .r9-role-person{gap:7px}
#r9CharacterPanel .r9-role-person-content>strong{font-size:12px}
#r9CharacterPanel .r9-role-important{display:grid;gap:7px;justify-items:end}
#r9CharacterPanel .r9-role-power b{font-size:17px}
#r9CharacterPanel .r9-job-change-slot .job-btn{min-height:34px;padding:5px 10px;font-size:12px}}
/* B4-R8: only add a compact EXP percentage to the existing header. */
.r9-exp-line{display:flex;align-items:center;gap:6px;min-width:0;width:100%}
.r9-exp-line .r9-exp{flex:1;min-width:35px}
.r9-exp-percent{color:#a8d7f7;font-size:10px;white-space:nowrap;font-variant-numeric:tabular-nums}
.r9-role-exp-meta b{color:#91d3ff;font-size:11px;font-variant-numeric:tabular-nums}
#r9PowerModal:not([hidden]){display:flex;align-items:center;justify-content:center;z-index:99999}
#r9PowerModal .r9-detail-card{max-height:85vh;overflow-y:auto;width:min(760px,94vw)}
/* Keep legacy IDs for existing save/UI adapters without showing old panels. */
.r9-stats-backing{display:none!important}

/* V6.6.0 UI optimization: remove obsolete header location and duplicate account wrapper. */
.r9-header>.r9-location,.r9-location[hidden]{display:none!important}
.r9-header-shortcuts{margin-left:clamp(2px,1vw,18px)}
.r9-auth{position:relative;z-index:120}
.r9-auth #nyxSessionBar{position:relative!important;inset:auto!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
.r9-auth #nyxSessionBar>.nyx-menu-toggle{border:1px solid #405b7c;background:#1b2e4c;border-radius:11px;min-height:38px;padding:7px 11px!important;font-size:12px!important;color:#eaf3ff;white-space:nowrap}
.r9-auth #nyxSessionBar>.nyx-menu-toggle:hover{border-color:#83b5f8;background:#29456e}
/* R4: the account list is positioned from the button's viewport rectangle.
   Its stacking level stays below real modals instead of 2147483647. */
.r9-auth #nyxSessionBar>.nyx-menu-list{position:fixed!important;left:var(--nyx-menu-left,10px)!important;right:auto!important;top:var(--nyx-menu-top,80px)!important;bottom:auto!important;z-index:240!important;width:min(250px,calc(100vw - 20px));max-height:var(--nyx-menu-max-height,460px)!important;overflow-y:auto;overscroll-behavior:contain}
.r9-auth #nyxSessionBar>.nyx-menu-list button:not(.nyx-menu-copy){font-size:13px!important;padding:11px 12px!important}
.r9-auth #nyxSessionBar .nyx-menu-meta span{display:inline!important}
.r9-auth #nyxSessionBar .nyx-menu-copy{display:inline!important;font-size:10px!important;padding:0!important}
@media(max-width:780px){.r9-auth #nyxSessionBar>.nyx-menu-toggle{min-height:34px;padding:6px!important;font-size:11px!important}.r9-header-shortcuts{margin-left:0}}

/* V6.8 Shield Fix2: one HP track, red HP beneath full-height white shield. */
.r9-meter.r9-hp-shield-meter{position:relative}
.r9-hp-shield-meter>i{position:absolute;inset:0 auto 0 0;border-radius:inherit}
.r9-hp-shield-meter>i.r9-shield-fill{background:linear-gradient(90deg,#ffffff,#e4efff);z-index:1;box-shadow:inset 0 0 3px #a2b4d0}
.r9-shield-number{display:inline;color:#f1f6ff;font-size:10px;font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums}
.r9-shield-number[hidden]{display:none!important}

/* V7.3.1-A1: compact, measured shortcut overflow. Every hidden shortcut has
   a matching entry inside 更多功能; only layout changes at this breakpoint. */
.r9-shell .r9-header{min-width:0;overflow:visible}
.r9-shell .r9-header-shortcuts{min-width:0;gap:5px}
.r9-shell .r9-header-shortcuts>button{flex:none}
.r9-shell .r9-header-shortcuts>button.is-overflow{display:none!important}
.r9-shell .r9-more-grid .r9-more-backup{display:none!important}
.r9-shell .r9-more-grid .r9-more-backup.is-overflow{display:block!important}
.r9-shell .r9-more-wrap{flex-shrink:0}
.r9-shell .r9-currency .market-status{display:none!important}
@media (min-width:781px){
  .r9-shell .r9-header-shortcuts>button:not(.is-overflow){display:inline-flex!important;align-items:center;justify-content:center}
  .r9-shell .r9-header-shortcuts{flex:0 0 auto;max-width:calc(100vw - 300px)}
  .r9-shell .r9-header-shortcuts>button,.r9-shell .r9-more-wrap>button{padding:7px 9px;font-size:12px;min-height:38px}
}
@media (max-width:780px){
  .r9-shell .r9-header-shortcuts>button{display:none!important}
  .r9-shell .r9-more-menu{z-index:21000}
  .r9-shell .r9-nav #r9NavFeatures span{font-size:10px}
}

/* V8 A1: PC shortcuts are ALWAYS one row; preserve battlefield height. */
.r9-shell .r9-header{flex-wrap:nowrap!important}
.r9-shell .r9-header-shortcuts{display:flex;flex-wrap:nowrap!important;white-space:nowrap;min-width:0}
.r9-shell .r9-header-shortcuts>button{flex:none;white-space:nowrap}
.r9-shell .r9-mobile-menu-toggle,.r9-mobile-menu-backdrop{display:none!important}
@media (max-width:780px){
 .r9-shell{grid-template-rows:61px 56px minmax(0,1fr) 123px 53px!important}
 .r9-shell .r9-nav{display:none!important}
 .r9-shell .r9-header-shortcuts{position:static!important;flex:0 0 0!important;width:0!important;margin:0!important;padding:0!important}
 .r9-shell .r9-header-shortcuts>button{display:none!important}
 .r9-shell .r9-mobile-menu-toggle{display:grid!important;place-items:center;flex:none;width:38px;height:39px;background:#203a60;border:1px solid #597ca8;border-radius:10px;color:#fff;font-size:22px}
 .r9-shell .r9-mobile-menu-backdrop:not([hidden]){display:block!important;position:fixed;inset:0;z-index:33000;background:#010817ad}
 .r9-shell .r9-more-wrap{position:static}
 .r9-shell .r9-more-menu:not([hidden]){display:flex!important;flex-direction:column;position:fixed!important;top:0!important;bottom:0!important;left:0!important;right:auto!important;width:min(330px,85vw)!important;max-width:none!important;max-height:100dvh!important;height:100dvh!important;overflow-y:auto!important;border-radius:0 16px 16px 0;padding:20px 12px 28px;z-index:33001!important;box-sizing:border-box}
 .r9-shell .r9-more-grid{display:flex!important;flex-direction:column;gap:7px}
 .r9-shell .r9-more-grid button{width:100%;min-height:45px;flex:none;text-align:left;font-size:14px}
 .r9-shell .r9-more-grid .r9-more-backup{display:block!important}
 .r9-shell .r9-character-btn{min-width:0;flex:1}
}

/* V8.0.2 A3: six-step onboarding, consistent on mobile and PC. */
.nyx-a3-tutorial[hidden]{display:none!important}
.nyx-a3-tutorial{position:fixed;inset:0;z-index:60000;background:#020716b8;display:flex;align-items:center;justify-content:center;padding:16px;box-sizing:border-box}
.nyx-a3-guide{width:min(420px,100%);max-height:calc(100dvh - 32px);overflow-y:auto;box-sizing:border-box;background:#182c49;color:#eff6ff;border:1px solid #5c80ad;border-radius:16px;padding:18px;box-shadow:0 20px 70px #0009}
.nyx-a3-guide header,.nyx-a3-guide footer{display:flex;align-items:center;justify-content:space-between;gap:12px}
.nyx-a3-guide header{margin-bottom:13px}.nyx-a3-guide h3{font-size:18px;margin:12px 0}.nyx-a3-guide p{font-size:13px;line-height:1.8;color:#c3d6ee;margin:0 0 20px}
.nyx-a3-guide-counter{color:#92b5e4;font-size:12px}.nyx-a3-guide button{color:#eff6ff;background:#2e578b;border:1px solid #6186b3;border-radius:9px;padding:10px 14px;font-size:13px;cursor:pointer}
.nyx-a3-guide button[data-guide-skip]{background:#263a56}.nyx-a3-guide button:focus-visible{outline:2px solid #a5d5ff}
@media(max-width:780px){.nyx-a3-tutorial{padding:12px}.nyx-a3-guide{width:100%;max-width:400px;padding:16px}}

/* V8.0.2 A4 – non-blocking spotlight, true taps go to the existing buttons. */
.nyx-a4-tutorial[hidden]{display:none!important}
.nyx-a4-tutorial{position:fixed;inset:0;z-index:2147483647;pointer-events:none;color:#f2f7ff;font-family:inherit}
.nyx-a4-focus{position:fixed;border:2px solid #f7ce70;border-radius:11px;box-sizing:border-box;box-shadow:0 0 0 5px #f7ce7033,0 0 22px #f5b545aa;pointer-events:none;z-index:1}
.nyx-a4-focus[hidden]{display:none!important}
.nyx-a4-guide{position:fixed;left:clamp(8px,3vw,26px);right:clamp(8px,3vw,26px);max-width:440px;max-height:min(46dvh,310px);overflow-y:auto;box-sizing:border-box;border:1px solid #7598cb;background:#172d4cef;color:#eff6ff;border-radius:15px;padding:13px 15px;box-shadow:0 12px 42px #000a;pointer-events:auto;z-index:2}
.nyx-a4-guide header,.nyx-a4-guide footer{display:flex;gap:8px;justify-content:space-between;align-items:center}
.nyx-a4-guide header strong{font-size:13px}.nyx-a4-guide header small{font-size:11px;color:#adc8ed}
.nyx-a4-guide h3{font-size:16px;margin:8px 0 5px}.nyx-a4-guide p{font-size:12px;line-height:1.6;margin:0 0 7px;color:#d1e0f4}
.nyx-a4-guide-help{display:block;color:#f8d995;font-size:11px;margin-bottom:10px}
.nyx-a4-guide button{font-family:inherit;font-size:12px;color:#fff;border:1px solid #5e88bf;border-radius:8px;padding:8px 10px;background:#32649f;cursor:pointer}
.nyx-a4-guide button[data-guide-skip]{background:#324259}
@media(min-width:780px){.nyx-a4-guide{right:auto;min-width:300px}}

/* A4.1: one clear claimed badge, no repeated reward list on replay. */
.nyx-a41-reward-status{display:inline-flex;align-items:center;max-width:100%;border-radius:7px;padding:4px 8px;border:1px solid #506d9a;background:#203b5c;color:#f4d18f;font-size:11px;font-weight:700}
.nyx-a41-reward-status.claimed{border-color:#397a69;background:#183a37;color:#8fe8c3}
.nyx-a4-guide button:disabled{opacity:.55;cursor:not-allowed}

/* V8.1.4: server-authoritative combat remains live while player details are open. */
.r9-background-battle{display:flex;align-items:center;gap:13px;width:100%;margin:0 0 14px;padding:14px 16px;
  text-align:left;color:inherit;background:linear-gradient(105deg,rgba(67,121,168,.20),rgba(41,63,105,.10));
  border:1px solid rgba(91,162,210,.48);border-radius:13px;cursor:pointer;touch-action:pan-y;}
.r9-background-battle[hidden]{display:none!important}
.r9-background-battle-icon{font-size:26px;flex:none}
.r9-background-battle-copy{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.r9-background-battle-copy strong{font-size:15px;line-height:1.4;overflow-wrap:anywhere}
.r9-background-battle-copy small{font-size:12px;opacity:.79;line-height:1.4}
.r9-background-battle-arrow{font-size:30px;opacity:.75;flex:none}
.r9-background-battle:focus-visible{outline:2px solid #93ceff;outline-offset:3px}

/* V8.4.17 W7 UI fix: scoped warehouse controls, PC and mobile. */
#nyxWarehouseDialog{box-sizing:border-box;max-width:calc(100vw - 24px);margin:auto;overscroll-behavior:contain;box-shadow:0 18px 60px #0009;font:inherit;color-scheme:dark}
#nyxWarehouseDialog::backdrop{background:#030813b8}
#nyxWarehouseDialog>div:first-child{gap:12px;margin-bottom:12px;font-size:18px}
#nyxWarehouseDialog button{appearance:none;box-sizing:border-box;min-height:40px;padding:8px 12px;border:1px solid #3a5677;border-radius:9px;background:#21364e;color:#edf5ff;font:inherit;font-size:14px;font-weight:700;cursor:pointer;touch-action:manipulation}
#nyxWarehouseDialog button:hover:not(:disabled){background:#2c4d72;border-color:#6b98c8}
#nyxWarehouseDialog button:focus-visible,#nyxWarehouseDialog input:focus-visible{outline:2px solid #83b5f8;outline-offset:2px}
#nyxWarehouseDialog button:disabled{opacity:.5;cursor:not-allowed}
#nyxWarehouseDialog .nyx-warehouse-primary{background:#285fc4;border-color:#5286d5}
#nyxWarehouseDialog .nyx-warehouse-primary:hover:not(:disabled){background:#3474dc}
#nyxWarehouseDialog .nyx-warehouse-close{width:42px;min-height:42px;padding:0;font-size:22px;background:#30445d}
#nyxWarehouseDialog .nyx-warehouse-card{border:1px solid #30445d;min-width:0}
#nyxWarehouseDialog .nyx-warehouse-card>strong{font-size:15px}
#nyxWarehouseDialog .nyx-warehouse-number{color:#d4d8e2;line-height:1.3;font-variant-numeric:tabular-nums;margin-top:4px}
#nyxWarehouseDialog [data-asset="gold"] .nyx-warehouse-number{color:#ffda60}
#nyxWarehouseDialog input{appearance:none;min-height:44px;padding:10px 12px;border:1px solid #42617d;border-radius:9px;background:#101b2c;color:#edf5ff;font:inherit;font-size:16px}
#nyxWarehouseDialog input::placeholder{color:#8da5bf}
#nyxWarehouseDialog .nyx-warehouse-confirm{width:100%}
#nyxWarehouseDialog p{font-size:13px;color:#b7c9df;overflow-wrap:anywhere}
@media(max-width:780px){#nyxWarehouseDialog button{min-height:44px}}

.r9-drawer .r9-reward-summary{grid-template-columns:repeat(3,minmax(0,1fr))}.r9-reward-summary b{overflow-wrap:anywhere}
@media(max-width:360px){.r9-drawer .r9-reward-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* T1.4.1 UI: profession catalogue and free-career entry. */
#r9CharacterPanel .r9-career-entry{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#r9CharacterPanel .r9-career-entry .r9-trait-summary{width:100%;text-align:left;cursor:pointer;min-width:0;transition:border-color .15s,background .15s}
#r9CharacterPanel .r9-career-entry .r9-trait-summary:hover{background:#293d5a;border-color:#7195bf}
#r9CharacterPanel #r9FreeJobChange{background:#2c2b45;border-color:#555171}#r9CharacterPanel #r9FreeJobChange strong{color:#d8c3f5}
#r9CharacterPanel #r9FreeJobChange[hidden]{display:none!important}#r9CharacterPanel .r9-career-entry:has(#r9FreeJobChange[hidden]){grid-template-columns:1fr}
.nyx-career-dialog{box-sizing:border-box;width:min(840px,calc(100vw - 28px));max-width:100%;max-height:calc(100dvh - 36px);margin:auto;padding:0;border:1px solid #3a4b65;border-radius:16px;background:#151f30;color:#e1eaf6;font:inherit;box-shadow:0 24px 75px #000a;overflow:hidden;color-scheme:dark}
.nyx-career-dialog[open]{display:flex;flex-direction:column}.nyx-career-dialog::backdrop{background:#050b15b8}
.nyx-career-dialog .nyx-career-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:17px 20px;border-bottom:1px solid #34445b;background:#1b293d;flex:none}
.nyx-career-dialog .nyx-career-head h2{font-size:18px;margin:0;color:#edf4ff}
.nyx-career-dialog button,.nyx-career-dialog select{font:inherit;color:inherit;box-sizing:border-box}
.nyx-career-dialog .nyx-career-close{width:36px;height:36px;border:1px solid #3d536e;border-radius:9px;background:#233650;font-size:23px;line-height:1;cursor:pointer;flex:none}
.nyx-career-dialog .nyx-career-body{padding:16px 20px 20px;min-height:0;overflow:auto;scrollbar-color:#475a74 #172235;scrollbar-width:thin}
.nyx-career-dialog .nyx-career-note{font-size:13px;line-height:1.6;color:#a9bcd3;margin:0 0 12px}
.nyx-traits-layout{display:grid;grid-template-columns:minmax(175px,225px) minmax(0,1fr);gap:12px;min-height:270px;max-height:min(58dvh,540px)}
.nyx-traits-nav,.nyx-traits-detail{min-width:0;overflow:auto;scrollbar-width:thin;scrollbar-color:#475a74 #172235;background:#111b2b;border:1px solid #34435a;border-radius:12px;padding:12px;box-sizing:border-box}
.nyx-traits-group{font-size:12px;color:#a5b9d4;margin:12px 4px 6px}.nyx-traits-group:first-child{margin-top:0}
.nyx-traits-choice{display:block;text-align:left;width:100%;min-height:38px;padding:9px 12px;border:1px solid #354762;background:#1c2a40;border-radius:8px;margin-bottom:5px;cursor:pointer;overflow-wrap:anywhere}
.nyx-traits-choice:hover,.nyx-traits-choice[aria-pressed=true]{background:#29466b;border-color:#698fc0;color:#f0f6ff}
.nyx-traits-name{font-size:18px;color:#f1ddb0;margin:2px 0 5px}
.nyx-traits-effects{display:grid;gap:6px}.nyx-traits-effect{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border-radius:8px;background:#1c2a40;border:1px solid #30425b;font-size:13px}
.nyx-traits-effect-label{min-width:0;overflow-wrap:anywhere}.nyx-traits-effect-label small{display:block;color:#9dafc7;margin-top:3px;font-size:11px}.nyx-traits-effect strong{flex:none;color:#acd3f7;font-variant-numeric:tabular-nums;max-width:45%;text-align:right;overflow-wrap:anywhere}
.nyx-career-dialog .nyx-career-btn{padding:10px 14px;border:1px solid #435975;border-radius:8px;background:#24364e;color:#eaf2ff;cursor:pointer;font-weight:700}.nyx-career-dialog .nyx-career-btn.primary{background:#315788;border-color:#537db1}.nyx-career-dialog button:disabled{opacity:.5;cursor:not-allowed}.nyx-career-dialog .nyx-traits-back{display:none}
.nyx-career-dialog.nyx-free-job-dialog{width:min(520px,calc(100vw - 28px))}.nyx-career-field{display:grid;gap:6px;margin-bottom:12px;color:#b9cce3;font-size:13px}.nyx-career-select{width:100%;background:#101c2d;border:1px solid #40546e;padding:11px;border-radius:8px;min-height:40px}.nyx-free-preview{display:grid;gap:8px;padding:12px;background:#1c2a40;border:1px solid #344762;border-radius:9px;margin-bottom:12px}.nyx-free-row{display:flex;justify-content:space-between;gap:12px;font-size:13px}.nyx-free-row strong{text-align:right;overflow-wrap:anywhere}.nyx-free-preview small{color:#d3bc89}.nyx-career-actions{display:flex;justify-content:flex-end;gap:8px}
@media(max-width:680px){.nyx-career-dialog{max-height:calc(100dvh - 24px);width:calc(100vw - 20px);border-radius:13px}.nyx-career-dialog .nyx-career-head{padding:13px 15px}.nyx-career-dialog .nyx-career-body{padding:12px}.nyx-traits-layout{display:block;min-height:0;max-height:none}.nyx-traits-nav,.nyx-traits-detail{max-height:65dvh}.nyx-traits-layout:not(.show-detail) .nyx-traits-detail,.nyx-traits-layout.show-detail .nyx-traits-nav{display:none}.nyx-career-dialog .nyx-traits-back{display:block;margin-bottom:12px}.nyx-traits-effect{padding:9px;gap:8px}}
