/* NYX M3 V5.2 - one source of truth: server battle snapshot */
.r9-shell .r9-command{order:1;margin:10px 0 8px}
.r9-shell .r9-status-strip{order:2}
.r9-shell .r9-main{order:3;margin-top:12px}
.r9-shell .r9-events{display:none!important}
.r9-shell{display:flex;flex-direction:column}
.r9-shell>.r9-header{order:0}.r9-shell>.r9-nav{order:5}
.m3-view{color:#edf2fc;font:13px/1.5 system-ui,-apple-system,sans-serif;width:100%}
.m3-view *{box-sizing:border-box}
.m3-view [hidden]{display:none!important}
.m3-grid{display:grid;grid-template-columns:minmax(205px,.8fr) minmax(350px,1.8fr) minmax(310px,1.15fr);align-items:stretch;gap:12px}
.m3-panel{min-width:0;border:1px solid #2b405e;background:#101d31;border-radius:14px;overflow:hidden;display:flex;flex-direction:column;min-height:550px}
.m3-panel>header{padding:14px 15px;border-bottom:1px solid #293954;position:relative}
.m3-panel>header small{font-size:10px;letter-spacing:.08em;color:#84a4cc;font-weight:700}
.m3-panel>header h2{margin:1px 0 0;color:#f3f6fd;font-size:17px}
.m3-panel-body{padding:13px;display:grid;align-content:start;gap:14px}
.m3-block{background:#16273e;border-radius:11px;border:1px solid #2a3f5c;padding:14px}
.m3-block h3{font-size:13px;font-weight:750;margin:0 0 13px;display:flex;justify-content:space-between;gap:6px}
.m3-block h3 small{font-size:10px;color:#8fa7c8}
.m3-value{display:flex;justify-content:space-between;gap:8px;font-size:12px;margin:8px 0;color:#c5d4e8}
.m3-value b{font-variant-numeric:tabular-nums;color:#eef3ff}
.m3-damage{padding:12px 9px;background:#0b1629;border:1px solid #365071;border-radius:9px;text-align:center;margin-top:13px}
.m3-damage small{display:block;color:#9bb0ce;font-size:11px}
.m3-damage strong{display:block;color:#9edac8;font-size:23px;font-variant-numeric:tabular-nums}
.m3-empty{padding:13px 8px;color:#99abc3;font-size:12px;text-align:center}
.m3-chip{display:inline-flex;padding:3px 7px;border-radius:5px;background:#383353;color:#c5b6fd;font-size:11px;margin:2px}
.m3-effect{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;margin:5px 0}
.m3-effect small{color:#a7b7cd}
.m3-head-state{position:absolute;right:14px;top:22px;color:#73d4b4;font-size:11px}
.m3-target-strip{padding:11px 14px;display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;color:#aebfd6;background:#14253b;font-size:12px}
.m3-target-strip b{color:#d9ebff}
.m3-player-progress{padding:9px 14px;display:flex;align-items:center;gap:8px;font-size:11px;color:#b0c0d8}
.m3-player-progress .m3-meter{flex:1}
.m3-player-progress small{white-space:nowrap}
.m3-meter{height:8px;background:#33445c;border-radius:99px;overflow:hidden}
.m3-meter.thin{height:6px}
.m3-meter i{height:100%;display:block;width:0;border-radius:inherit;background:#d4756d}
.m3-meter .m3-cast-fill{background:#d8a84e}
.m3-filters{display:flex;gap:5px;flex-wrap:wrap;padding:9px 12px;border-bottom:1px solid #283b54}
.m3-filters button,.m3-tabs button,.m3-mobile-tabs button{border:1px solid #35506f;background:#182b44;color:#b8c8df;border-radius:7px;padding:5px 9px;cursor:pointer;font-size:11px}
.m3-filters button.active,.m3-tabs button.active,.m3-mobile-tabs button.active{background:#24516a;color:#e4f8ff;border-color:#3e8b9f}
.m3-log-list{height:420px;max-height:60vh;overflow:auto;padding:9px 13px;scrollbar-width:thin}
.m3-log-item{display:grid;grid-template-columns:72px 1fr;gap:9px;border-bottom:1px solid #293b52;padding:10px 3px;font-size:12px;line-height:1.7}
.m3-log-item time{color:#859ab7;font:11px ui-monospace,monospace;margin-top:2px}
.m3-log-item.player{color:#7bd9b4}.m3-log-item.enemy{color:#f3b49b}.m3-log-item.reward{color:#f3ce78}.m3-log-item.status{color:#c7b4ff}
.m3-log-foot{border-top:1px solid #293b52;padding:10px 13px;display:flex;gap:8px;justify-content:space-between;align-items:center;color:#9fb2cc;font-size:11px}
.m3-log-foot button{color:#acd8ff;background:#18324b;border:1px solid #355374;padding:5px 8px;border-radius:6px;cursor:pointer}
.m3-tabs{display:flex;gap:4px;margin-top:8px}
.m3-roster{padding:11px;overflow:auto;max-height:630px;min-height:420px;scrollbar-width:thin;flex:1}
.m3-monster{background:#16263d;border:1px solid #324765;border-radius:11px;padding:12px;margin-bottom:10px}
.m3-monster.selected{border-color:#519dc4;box-shadow:inset 2px 0 #4d9bc7}
.m3-monster-top{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:9px}
.m3-monster-name{color:#ecf3ff;background:none;border:none;padding:0;text-align:left;font-weight:750;cursor:pointer;font-size:13px}
.m3-target-tag{font-size:10px;color:#9bdfdc;font-weight:500}
.m3-meter-label{display:flex;justify-content:space-between;color:#b0c1d9;font-size:11px;margin:7px 0 4px;font-variant-numeric:tabular-nums}
.m3-monster-foot{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:9px}
.m3-monster-foot button{border:0;background:transparent;color:#8fc3f3;font-size:11px;cursor:pointer}
.m3-shield{font-size:11px;color:#a9ceeb}
.m3-monster-extra{margin-top:11px;padding:12px;background:#0e1a2d;border-radius:8px;font-size:11px;line-height:1.7;color:#afc1d8}
.m3-monster-extra h4{margin:8px 0 3px;color:#e2e9f4;font-size:12px}
.m3-monster-extra>div:not(:first-child){display:flex;gap:8px;justify-content:space-between}
.m3-dead{padding:8px 11px;background:#111c2d;border:1px solid #29384e;border-radius:8px;opacity:.75;display:flex;justify-content:space-between;flex-wrap:wrap;color:#a7b4c7;font-size:11px;margin:6px 0}
.m3-dead .m3-meter{width:100%;margin-top:6px}
.m3-roster-footer{padding:10px 13px;border-top:1px solid #293b52;color:#96acc8;font-size:11px}
.m3-map-panel{overflow:auto;max-height:630px;min-height:420px;padding:13px;color:#c5d2e3;font-size:12px}
.m3-map-panel h3{font-size:17px;margin:4px 0}.m3-map-panel h4{margin:18px 0 8px}
.m3-map-row{display:flex;justify-content:space-between;gap:8px;border-bottom:1px solid #293b52;padding:8px 0}
.m3-map-row small{color:#9faeca}
.m3-mobile-tabs{display:none}
@media(max-width:1190px){.m3-grid{grid-template-columns:minmax(170px,.75fr) minmax(320px,1.7fr) minmax(240px,1fr)}.m3-panel{min-height:490px}}
@media(max-width:900px){.m3-grid{display:block}.m3-mobile-tabs{display:flex;gap:8px;margin:8px 0}.m3-mobile-tabs button{flex:1;min-height:38px;font-size:12px}.m3-panel{display:none;min-height:400px}.m3-view[data-mobile-view=player] .m3-player,.m3-view[data-mobile-view=battle] .m3-battle,.m3-view[data-mobile-view=monsters] .m3-monsters{display:flex}.m3-log-list{height:55vh;max-height:none}.m3-roster{max-height:62vh}.r9-shell .r9-command{margin-top:7px}}

/* M3 viewport override: controls and HP/MP stay accessible; every column scrolls independently. */
.r9-shell{display:flex!important;flex-direction:column!important}
.r9-shell>.r9-header{flex:0 0 auto!important}
.r9-shell>.r9-command{flex:0 0 auto!important}
.r9-shell>.r9-status-strip{flex:0 0 auto!important}
.r9-shell>.r9-main{flex:1 1 auto!important;min-height:0!important;overflow:auto!important}
.r9-shell>.r9-nav{flex:0 0 auto!important}
.r9-arena{height:auto!important;min-height:100%!important;overflow:visible!important}
.m3-grid{min-height:0}
.m3-panel{height:auto;min-height:0}
.m3-log-list{height:clamp(260px,48vh,680px);max-height:none}
.m3-roster,.m3-map-panel{min-height:0;max-height:clamp(260px,58vh,750px)}
@media(max-width:900px){.r9-shell>.r9-main{overflow-y:auto!important}.m3-panel{min-height:0}.m3-log-list{height:52vh;min-height:200px}.m3-roster{max-height:60vh}.m3-grid{display:block}}
/* Compact M3 action bar: no empty skill/status rows occupying screen space. */
.r9-shell .r9-command{margin:0!important;padding:6px 12px!important;gap:3px;justify-content:flex-start;min-height:0}
.r9-shell .r9-command-buttons{flex-wrap:wrap;align-items:center}
.r9-shell .r9-active-skills:empty,.r9-shell .r9-alert:empty{display:none!important}
.r9-shell .r9-active-skills{min-height:0}
@media(max-width:900px){.r9-shell .r9-command{padding:5px 7px!important}.r9-shell .r9-command-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}.r9-shell .r9-command .r9-cta{min-height:35px}}

/* B4-R11-S15: damage numbers belong to the actual player/monster HP cards. */
.r9-brand #r9AppReleaseVersion[hidden]{display:none!important}
#r9FloatMode.is-on{background:#21564f;border-color:#2e9e86;color:#d4fff0}
.m3-player-vitals{display:none;position:relative;overflow:visible;isolation:isolate;margin:10px 12px 0;padding:10px 12px 16px;
  border:1px solid #355270;border-radius:11px;background:#172a42;min-height:108px}
.m3-player-vitals-head{display:flex;justify-content:space-between;gap:6px;color:#e6f2ff;font-size:13px}
.m3-player-vitals-head small{color:#9cb7d7;font-size:10px}
.m3-player-vitals .m3-meter{height:7px}
.m3-player-vitals .m3-mp-fill{background:#57b9ef}
.m3-player-vitals .m3-meter-label{margin:5px 0 3px;font-size:10px}
.m3-player-vitals .m3-float-layer{position:absolute;inset:0;overflow:visible;pointer-events:none;z-index:2}
.m3-float-mode .m3-player-vitals{display:block}
.m3-monster-hp-wrap{position:relative;isolation:isolate}
.m3-card-floats{position:absolute;inset:0;pointer-events:none;overflow:visible;z-index:2}
.m3-float-item{position:absolute;bottom:9px;left:50%;min-width:0;max-width:100%;display:flex;flex-direction:column;
  align-items:center;gap:0;text-align:center;white-space:nowrap;pointer-events:none;
  font-variant-numeric:tabular-nums;text-shadow:0 2px 5px #080e19,0 0 7px #080e19;
  animation:m3-rise 1.8s ease-out forwards;will-change:transform,opacity}
.m3-float-item strong{font-size:clamp(14px,1.1vw,19px);line-height:1.1}
.m3-float-item small{font-size:9px;line-height:1.3;color:#d5e4f8;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.m3-float-item.damage strong{color:#ffe397}
.m3-player-vitals .m3-float-item.damage strong{color:#ff847f}
.m3-float-item.crit strong{color:#ffce50;font-size:clamp(15px,1.3vw,22px)}
.m3-float-item.heal strong{color:#78e5ac}
.m3-float-item.miss strong{color:#b6c8df}
@keyframes m3-rise{0%{opacity:0;transform:translate(-50%,12px) scale(.92)}
  12%{opacity:1;transform:translate(-50%,0) scale(1)}
  70%{opacity:1;transform:translate(-50%,-15px)}
  100%{opacity:0;transform:translate(-50%,-30px)}}
.m3-float-mode .m3-grid{grid-template-columns:minmax(255px,1.05fr) minmax(215px,.7fr) minmax(365px,1.5fr)}
.m3-float-mode .m3-filters{display:none}
.m3-float-mode .m3-log-list{height:clamp(220px,40vh,480px)}
.m3-float-mode .m3-log-item{grid-template-columns:1fr;gap:1px;padding:7px 2px}
.m3-float-mode .m3-log-item time{font-size:10px}
.m3-float-mode .m3-player .m3-panel-body{padding:9px;gap:9px}
.m3-float-mode .m3-player .m3-block{padding:10px}
.m3-float-mode .m3-roster{max-height:clamp(380px,67vh,760px);padding:7px 9px}
.m3-float-mode .m3-monster{padding:6px 9px;margin-bottom:5px;border-radius:9px}
.m3-float-mode .m3-monster-top{margin-bottom:1px}
.m3-float-mode .m3-monster-name{font-size:12px;max-width:90%;overflow:hidden;text-overflow:ellipsis}
.m3-float-mode .m3-monster-top small{font-size:10px}
.m3-float-mode .m3-monster .m3-meter-label{font-size:10px;margin:3px 0 2px}
.m3-float-mode .m3-monster .m3-meter{height:6px}
.m3-float-mode .m3-monster .m3-meter.thin{height:4px}
.m3-float-mode .m3-monster-foot{margin-top:2px;min-height:19px;font-size:10px}
.m3-float-mode .m3-monster-foot .m3-chip{padding:1px 4px;margin:1px;font-size:10px}
.m3-float-mode .m3-target-tag{font-size:9px}
.m3-float-mode .m3-dead{margin:3px 0;padding:4px 8px;position:relative;isolation:isolate}
@media(max-width:1190px) and (min-width:901px){
  .m3-float-mode .m3-grid{grid-template-columns:minmax(210px,1fr) minmax(185px,.68fr) minmax(280px,1.38fr)}
}
@media(max-width:900px){
  .m3-float-mode .m3-mobile-tabs{display:none}
  .m3-float-mode .m3-grid{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}
  .m3-float-mode .m3-player,.m3-float-mode .m3-monsters,.m3-float-mode .m3-battle{display:flex!important;min-width:0}
  .m3-float-mode .m3-player{grid-column:1;grid-row:1}
  .m3-float-mode .m3-monsters{grid-column:2;grid-row:1}
  .m3-float-mode .m3-battle{grid-column:1/-1;grid-row:2}
  .m3-float-mode .m3-roster{max-height:67vh}
  .m3-float-mode .m3-log-list{height:36vh;min-height:190px}
  .m3-float-mode .m3-panel>header{padding:9px}
  .m3-float-mode .m3-panel>header h2{font-size:14px}
  .m3-float-mode .m3-player-vitals{margin:7px 6px 0}
  .m3-float-mode .m3-float-item strong{font-size:15px}
}
@media(max-width:560px){
  .m3-float-mode .m3-grid{grid-template-columns:minmax(0,1fr)}
  .m3-float-mode .m3-player,.m3-float-mode .m3-monsters,.m3-float-mode .m3-battle{grid-column:1}
  .m3-float-mode .m3-player{grid-row:1}
  .m3-float-mode .m3-monsters{grid-row:2}
  .m3-float-mode .m3-battle{grid-row:3}
  .m3-float-mode .m3-player .m3-block:first-child{display:none}
  .m3-float-mode .m3-roster{max-height:450px}
}
@media(prefers-reduced-motion:reduce){.m3-float-item{animation:none;opacity:1;transform:translate(-50%,0)}}

/* V6.8 Shield Fix2: player and monster use the same one-track layered HP. */
.m3-meter.m3-health-shield{position:relative}
.m3-health-shield>i{position:absolute;inset:0 auto 0 0;border-radius:inherit}
.m3-health-shield>i.m3-shield-fill{background:linear-gradient(90deg,#ffffff,#e4efff);z-index:1;box-shadow:inset 0 0 3px #a2b4d0}
.m3-shield-text{color:#edf6ff;font-size:10px;font-weight:750;white-space:nowrap}
.m3-shield-text[hidden]{display:none!important}

/* ===========================================================================
   V7.1.11 / Stage 1 — Shared PC home layout, visual only.
   Keep existing text/float event renderers, combat snapshot, IDs and handlers.
   Stage 2 will introduce the optional three-mode display control separately.
   =========================================================================== */
@media (min-width:901px) {
  /* Consistent shell/header spacing regardless of the current damage mode. */
  body.r9-ui .r9-shell .r9-header {
    min-height:74px;
    padding:9px clamp(12px,1.1vw,22px);
    gap:clamp(8px,1vw,16px);
  }
  body.r9-ui .r9-shell .r9-character-btn {
    flex:0 0 clamp(245px,18.5vw,310px);
    min-width:0;
    min-height:64px;
  }
  body.r9-ui .r9-shell .r9-header-shortcuts {margin-left:4px;gap:6px}
  body.r9-ui .r9-shell .r9-header-shortcuts>button,
  body.r9-ui .r9-shell .r9-more-wrap>button {
    min-height:40px;
    padding:8px clamp(8px,.7vw,13px);
    border-radius:10px;
  }
  body.r9-ui .r9-shell .r9-header-shortcuts button:focus-visible,
  body.r9-ui .r9-shell .r9-character-btn:focus-visible,
  body.r9-ui .r9-shell .r9-cta:focus-visible {
    outline:2px solid #a9d3ff;
    outline-offset:2px;
  }
  /* Fixed visual rhythm: skill slots / map / battle controls share a strip. */
  body.r9-ui .r9-shell .r650-command {
    margin:0!important;
    min-height:120px;
    padding:9px clamp(12px,1vw,20px)!important;
    gap:4px;
  }
  body.r9-ui .r9-shell .r650-grid {
    grid-template-columns:minmax(0,1.2fr) minmax(185px,.43fr) minmax(0,1.05fr);
    gap:clamp(8px,.8vw,14px);
  }
  body.r9-ui .r9-shell .r650-world-button {
    min-height:94px;
    height:100%;
    max-height:106px;
    box-shadow:0 4px 13px #03112074;
  }
  body.r9-ui .r9-shell .r650-combat {grid-template-rows:minmax(44px,1fr) minmax(38px,1fr);gap:6px}
  body.r9-ui .r9-shell .r650-combat-main .r9-cta {min-height:46px}
  body.r9-ui .r9-shell .r650-combat-options .r9-cta {min-height:36px}
  body.r9-ui .r9-shell .r9-cta {
    transition:border-color .14s ease,background-color .14s ease,box-shadow .14s ease;
  }
  body.r9-ui .r9-shell .r9-cta:disabled {box-shadow:none;opacity:.48}
  /* HP/MP/exploration retain the same alignment across both presentations. */
  body.r9-ui .r9-shell .r9-status-strip {
    min-height:46px;
    padding:7px clamp(12px,1.1vw,22px);
    gap:clamp(10px,1.1vw,20px);
  }
  body.r9-ui .r9-shell .r9-health-group {max-width:none;flex:1 1 0;min-width:0}
  body.r9-ui .r9-shell .r9-health-group>span:first-child {font-variant-numeric:tabular-nums}
  body.r9-ui .r9-shell .r9-meter {min-width:44px}
  body.r9-ui .r9-shell .r9-exploration-state {
    min-width:150px;
    flex:0 1 250px;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  body.r9-ui .r9-shell .r9-status-note {flex:0 0 auto;gap:8px}
  body.r9-ui .r9-shell>.r9-main {margin-top:0;padding:12px 14px 16px}
  /* This grid is identical for classic text mode and existing floating mode. */
  body.r9-ui .m3-view .m3-grid,
  body.r9-ui .m3-view.m3-float-mode .m3-grid {
    display:grid;
    grid-template-columns:minmax(235px,.92fr) minmax(355px,1.72fr) minmax(285px,1.13fr);
    height:clamp(455px,calc(100dvh - 302px),795px);
    min-height:0;
    align-items:stretch;
    gap:12px;
  }
  body.r9-ui .m3-view .m3-panel {
    height:100%;
    min-height:0;
    min-width:0;
    border-radius:14px;
  }
  body.r9-ui .m3-view .m3-panel>header {
    min-height:92px;
    flex:0 0 auto;
    padding:13px 15px;
  }
  body.r9-ui .m3-view .m3-panel>header h2 {font-size:16px}
  body.r9-ui .m3-view .m3-player .m3-panel-body {
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
    overscroll-behavior:contain;
    scrollbar-width:thin;
  }
  body.r9-ui .m3-view .m3-battle .m3-log-list,
  body.r9-ui .m3-view.m3-float-mode .m3-battle .m3-log-list {
    height:auto;
    min-height:0;
    max-height:none;
    flex:1 1 auto;
    overflow-y:auto;
    overscroll-behavior:contain;
  }
  body.r9-ui .m3-view .m3-monsters .m3-roster,
  body.r9-ui .m3-view.m3-float-mode .m3-monsters .m3-roster,
  body.r9-ui .m3-view .m3-monsters .m3-map-panel {
    flex:1 1 auto;
    min-height:0;
    max-height:none;
    overflow-y:auto;
    overscroll-behavior:contain;
  }
  body.r9-ui .m3-view .m3-log-foot,
  body.r9-ui .m3-view .m3-roster-footer {flex:0 0 auto}
}
@media (min-width:901px) and (max-width:1180px) {
  body.r9-ui .r9-shell .r9-character-btn {flex-basis:242px}
  body.r9-ui .r9-shell .r650-grid {grid-template-columns:minmax(0,1fr) minmax(165px,.55fr) minmax(0,1.05fr)}
  body.r9-ui .r9-shell .r650-combat-options {flex-wrap:wrap;row-gap:4px}
  body.r9-ui .m3-view .m3-grid,
  body.r9-ui .m3-view.m3-float-mode .m3-grid {
    grid-template-columns:minmax(185px,.92fr) minmax(300px,1.62fr) minmax(238px,1.16fr);
    gap:9px;
  }
  body.r9-ui .r9-shell .r9-status-strip {gap:9px}
  body.r9-ui .r9-shell .r9-status-note {font-size:11px}
}
@media (prefers-reduced-motion:reduce) {
  body.r9-ui .r9-shell .r9-cta {transition:none}
}
@media (min-width:901px) and (max-width:1080px) {
  /* Existing world-control stack stays two rows at compact desktop widths. */
  body.r9-ui .r9-shell .r650-grid {grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  body.r9-ui .r9-shell .r650-world-button {height:86px;max-height:none}
  body.r9-ui .r9-shell .r650-command {min-height:0}
}

/* ===========================================================================
   NYX V7.1.11 Stage 2 — Player | Battlefield | Loot / Chat.
   Visual-only shell rearrangement. Combat/drops are provided by server records.
   =========================================================================== */
.m3-stage2 .m3-stage-controls{display:flex;align-items:center;gap:8px;margin-top:3px}
.m3-stage2 .m3-stage-controls .m3-tabs{margin-top:0}
.m3-stage2 .m3-display-controls{margin-left:auto;display:flex;align-items:center;min-width:0}
.m3-stage2 .m3-display-controls #r9FloatMode{display:inline-flex;align-items:center;justify-content:center;min-height:30px;max-height:32px;font-size:11px;padding:4px 10px;margin:0;white-space:nowrap}
.m3-stage2 .m3-side-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:6px}
.m3-stage2 .m3-side-tabs button{min-width:0;padding:8px 4px;background:#172942;border:1px solid #345070;border-radius:8px;color:#b9cbe3;font-size:12px;font-weight:700;cursor:pointer}
.m3-stage2 .m3-side-tabs button.active{background:#305b8b;border-color:#78aef0;color:#fff;box-shadow:inset 0 -2px #9bccff}
.m3-stage2 .m3-side-tabs button:focus-visible{outline:2px solid #b0dcff;outline-offset:2px}
.m3-stage2 .m3-loot-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:5px;padding:12px 13px 8px;color:#d8e9fb;font-size:12px}
.m3-stage2 .m3-loot-heading small{font-size:10px;color:#8eaac8}
.m3-stage2 .m3-loot-list{flex:1 1 auto;min-height:0;overflow-y:auto;padding:0 10px 12px;scrollbar-width:thin;overscroll-behavior:contain}
.m3-stage2 .m3-loot-entry{display:flex;gap:9px;padding:10px 9px;margin:5px 0 8px;border-radius:9px;background:#182c47;border:1px solid #304762;line-height:1.6}
.m3-stage2 .m3-loot-icon{height:28px;min-width:28px;display:grid;place-items:center;background:#1c3653;border-radius:6px}
.m3-stage2 .m3-loot-content{min-width:0;flex:1;color:#f3d59b;font-size:12px;overflow-wrap:anywhere}
.m3-stage2 .m3-loot-content small{display:block;color:#8fa7c7;font-size:10px;margin-top:2px;font-variant-numeric:tabular-nums}
.m3-stage2 .m3-chat-placeholder{flex:1;display:flex;min-height:0;padding:18px;align-items:center;justify-content:center;flex-direction:column;text-align:center;gap:11px;color:#c5d6ec}
.m3-stage2 .m3-chat-placeholder>span{font-size:30px}
.m3-stage2 .m3-chat-placeholder>b{font-size:16px}
.m3-stage2 .m3-chat-placeholder>p{margin:0;color:#92a8c7;font-size:12px;line-height:1.9}
.m3-stage2 .m3-combat-stage .m3-roster{flex:1 1 auto;min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain;padding:10px 13px;scrollbar-width:thin}
.m3-stage2 .m3-combat-stage .m3-map-panel{flex:1 1 auto;min-height:0;max-height:none;overflow-y:auto}
.m3-stage2 .m3-monster-top{min-height:25px;flex-wrap:wrap}
.m3-stage2 .m3-monster-name{flex:1 1 auto}
.m3-stage2 .m3-hit-readout{font-weight:850;font-size:18px;color:#ffd47b;line-height:1.2;font-variant-numeric:tabular-nums;white-space:nowrap;text-shadow:0 1px 8px #c9771d33}
.m3-stage2 .m3-hit-readout.is-crit{color:#ffbd45;font-size:20px;text-shadow:0 1px 12px #e7a13180}
.m3-stage2 .m3-hit-readout:empty,.m3-stage2.m3-float-mode .m3-hit-readout{display:none}
.m3-stage2 .m3-monster.selected{background:#1a304b;border-color:#6badd9;box-shadow:inset 3px 0 #6badd9,0 0 0 1px #366b9844}
.m3-stage2 .m3-monster{padding:10px 12px;margin-bottom:9px}
.m3-stage2 .m3-panel>header small{font-size:9px}
.m3-stage2 .m3-panel>header h2{font-size:15px}
.m3-stage2 .m3-legacy-log[hidden]{display:none!important}
@media (min-width:901px){
  /* Reduce skill/map/command strip ~one third while retaining its full width
     for future action buttons. Do not change the HP/MP/explore strip. */
  body.r9-ui .r9-shell .r650-command{min-height:0;padding:6px clamp(10px,.85vw,16px)!important;gap:2px}
  body.r9-ui .r9-shell .r650-grid{gap:10px;align-items:center}
  body.r9-ui .r9-shell .r650-skills{gap:4px}
  body.r9-ui .r9-shell .r650-skill-row{gap:4px}
  body.r9-ui .r9-shell .r650-skill-chip{min-height:31px;padding:2px 3px}
  body.r9-ui .r650-skill-chip strong{font-size:10px}
  body.r9-ui .r650-skill-chip span{font-size:9px}
  body.r9-ui .r650-empty-slot{min-height:30px}
  body.r9-ui .r9-shell .r650-world-button{height:72px;min-height:72px;max-height:72px;font-size:18px!important;border-radius:13px}
  body.r9-ui .r9-shell .r650-combat{grid-template-rows:38px 32px;gap:4px}
  body.r9-ui .r9-shell .r650-combat-main .r9-cta{min-height:37px;height:38px;padding:5px 11px;font-size:13px}
  body.r9-ui .r9-shell .r650-combat-options .r9-cta,
  body.r9-ui .r9-shell .r650-combat-options select{min-height:31px;height:32px;padding:4px 9px;font-size:11px}
  body.r9-ui .r9-shell .r650-combat-options{gap:6px}
  body.r9-ui .r9-shell .r9-status-strip{min-height:46px}
  body.r9-ui .r9-shell>.r9-main{padding-top:8px}
  /* Same three columns in both modes, never move the chatting dock. */
  body.r9-ui .m3-stage2 .m3-grid,
  body.r9-ui .m3-stage2.m3-float-mode .m3-grid{grid-template-columns:minmax(210px,.93fr) minmax(390px,1.9fr) minmax(255px,1.08fr);height:clamp(480px,calc(100dvh - 255px),830px);gap:10px}
  body.r9-ui .m3-stage2 .m3-panel>header{min-height:70px;padding:9px 12px}
  body.r9-ui .m3-stage2 .m3-head-state{right:12px;top:10px;font-size:10px}
  body.r9-ui .m3-stage2 .m3-combat-stage .m3-roster,
  body.r9-ui .m3-stage2.m3-float-mode .m3-combat-stage .m3-roster{height:auto;min-height:0;max-height:none;flex:1 1 auto;padding:10px 12px}
  body.r9-ui .m3-stage2 .m3-combat-stage .m3-map-panel{min-height:0;max-height:none;flex:1 1 auto}
  body.r9-ui .m3-stage2.m3-float-mode .m3-monster{padding:9px 12px;margin-bottom:9px}
  body.r9-ui .m3-stage2.m3-float-mode .m3-panel>header{min-height:70px}
  body.r9-ui .m3-stage2.m3-float-mode .m3-player .m3-block:first-child{display:block}
}
@media (min-width:901px) and (max-width:1190px){
  body.r9-ui .m3-stage2 .m3-grid,body.r9-ui .m3-stage2.m3-float-mode .m3-grid{grid-template-columns:minmax(175px,.9fr) minmax(320px,1.9fr) minmax(230px,1.15fr);gap:7px}
}
@media (max-width:900px){
  .m3-stage2 .m3-panel>header{min-height:64px;padding:10px}
  .m3-stage2 .m3-grid,.m3-stage2.m3-float-mode .m3-grid{display:block!important}
  .m3-stage2 .m3-panel,.m3-stage2.m3-float-mode .m3-panel{display:none!important}
  .m3-stage2[data-mobile-view="player"] .m3-player,
  .m3-stage2[data-mobile-view="battle"] .m3-battle,
  .m3-stage2[data-mobile-view="monsters"] .m3-monsters{display:flex!important}
  .m3-stage2 .m3-combat-stage .m3-roster{max-height:65dvh}
}

/* ===========================================================================
   V7.1.11 Stage 3 — compact player heading, local strike meter, responsive
   two-column monster cards. No combat calculation or reward logic in CSS/JS.
   =========================================================================== */
.m3-stage2 .m3-player>header.m3-compact-heading{min-height:42px;padding:9px 12px;display:flex;align-items:center}
.m3-stage2 .m3-heading-line{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-width:0}
.m3-stage2 .m3-heading-line small{white-space:nowrap;letter-spacing:.05em;font-size:10px;color:#88a9d0}
.m3-stage2 .m3-heading-label{font-size:12px;font-weight:750;color:#ebf5ff;white-space:nowrap}
.m3-stage2 .m3-player>.m3-player-progress{flex:0 0 auto;margin:0;padding:12px 13px 11px;border-bottom:1px solid #283b54;gap:9px;font-size:11px}
.m3-stage2 .m3-player>.m3-player-progress .m3-meter{min-width:0;height:9px}
.m3-stage2 .m3-player>.m3-player-progress small{min-width:35px;text-align:right;font-size:11px;font-variant-numeric:tabular-nums;color:#d2e4ff}
.m3-stage2 .m3-combat-stage{container-name:m3-battlefield;container-type:inline-size}
.m3-stage2 .m3-combat-stage .m3-roster,
.m3-stage2.m3-float-mode .m3-combat-stage .m3-roster{
  display:grid;grid-template-columns:minmax(0,1fr);grid-auto-rows:max-content;
  align-content:start;gap:9px;align-items:start;
}
.m3-stage2 .m3-combat-stage .m3-roster>.m3-empty{grid-column:1/-1}
.m3-stage2 .m3-combat-stage .m3-roster>.m3-monster,
.m3-stage2.m3-float-mode .m3-combat-stage .m3-roster>.m3-monster,
.m3-stage2 .m3-combat-stage .m3-roster>.m3-dead{min-width:0;width:100%;margin:0}
.m3-stage2 .m3-combat-stage .m3-monster-name{min-width:0;overflow-wrap:anywhere;flex:1 1 105px}
.m3-stage2 .m3-combat-stage .m3-hit-readout{max-width:100%;font-size:16px}
.m3-stage2 .m3-combat-stage .m3-hit-readout.is-crit{font-size:17px}
.m3-stage2 .m3-combat-stage .m3-monster-top{gap:5px}
.m3-stage2 .m3-combat-stage .m3-meter-label{gap:5px}
.m3-stage2 .m3-combat-stage .m3-monster .m3-meter-label span:last-child{white-space:nowrap}
@container m3-battlefield (min-width:600px){
  .m3-stage2 .m3-combat-stage .m3-roster,
  .m3-stage2.m3-float-mode .m3-combat-stage .m3-roster{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (min-width:901px){
  body.r9-ui .m3-stage2 .m3-panel.m3-player>header.m3-compact-heading{min-height:42px;padding:9px 12px}
}
@media (max-width:900px){
  .m3-stage2 .m3-panel.m3-player>header.m3-compact-heading{min-height:42px;padding:9px 12px}
  .m3-stage2 .m3-player>.m3-player-progress{padding:10px 12px}
}

/* V7.1.11 Stage 4 — always-on, six-lane player FX; server-recorded events only. */
.m3-stage2 .m3-player-impact{margin:9px 11px 0;padding:10px 9px 8px;border:1px solid #304863;border-radius:11px;background:#14253d;flex:0 0 auto}
.m3-stage2 .m3-player-impact-caption{display:flex;justify-content:space-between;gap:8px;color:#e3eefc;font-size:12px;font-weight:700}
.m3-stage2 .m3-player-impact-caption small{font-size:10px;font-weight:500;color:#8fa9ca}
.m3-stage2 .m3-player-floats-grid{position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));height:135px;margin-top:5px;isolation:isolate;pointer-events:none}
.m3-stage2 .m3-player-float-item{position:relative;inset:auto!important;bottom:auto!important;left:auto!important;width:100%;height:100%;min-width:0;max-width:100%;display:flex;align-items:center;justify-content:center;padding:2px 3px;overflow:visible;transform:none;animation:m3-player-rise 1.8s ease-out forwards;text-align:center;white-space:nowrap}
.m3-stage2 .m3-player-float-item strong{font-size:clamp(11px,.94vw,15px);font-weight:800;line-height:1.15}
.m3-stage2 .m3-player-float-item small{max-width:100%;font-size:9px;overflow:hidden;text-overflow:ellipsis}
.m3-stage2 .m3-player-float-item.damage strong{color:#ff8a88}
.m3-stage2 .m3-player-float-item.crit strong{color:#ffcc72;font-size:clamp(12px,1vw,16px)}
.m3-stage2 .m3-player-float-item.status strong{color:#d7a4ff}
.m3-stage2 .m3-player-float-item.miss strong{color:#bed2e8}
.m3-stage2 .m3-player-float-item.heal strong{color:#8cddb2}
.m3-stage2 .m3-player-float-item[data-m3-player-lane="0"]{grid-column:1;grid-row:1}
.m3-stage2 .m3-player-float-item[data-m3-player-lane="1"]{grid-column:2;grid-row:1}
.m3-stage2 .m3-player-float-item[data-m3-player-lane="2"]{grid-column:1;grid-row:2}
.m3-stage2 .m3-player-float-item[data-m3-player-lane="3"]{grid-column:2;grid-row:2}
.m3-stage2 .m3-player-float-item[data-m3-player-lane="4"]{grid-column:1;grid-row:3}
.m3-stage2 .m3-player-float-item[data-m3-player-lane="5"]{grid-column:2;grid-row:3}
@keyframes m3-player-rise{0%{opacity:0;transform:translateY(7px) scale(.96)}12%{opacity:1;transform:translateY(0) scale(1)}75%{opacity:1;transform:translateY(-5px)}100%{opacity:0;transform:translateY(-15px)}}
.m3-stage2.m3-float-mode .m3-player .m3-block:first-child{display:block}
.m3-stage2 .m3-player>.m3-panel-body:empty{display:none}
@media(prefers-reduced-motion:reduce){.m3-stage2 .m3-player-float-item{animation:none;opacity:1;transform:none}}

/* S5: static server-sourced attribute attack; no weapon identity or hidden X. */
.m3-stage2 .m3-attribute-attack{display:flex;align-items:center;justify-content:space-between;gap:6px;margin:8px 12px 2px;padding:8px 11px;border-radius:9px;background:#17273e;color:#b8d0e9;font-size:12px}
.m3-stage2 .m3-attribute-attack strong{font-size:16px;font-weight:800;color:#f0f6ff;font-variant-numeric:tabular-nums}
.m3-stage2 .m3-hit-readout{display:flex;flex-direction:column;align-items:end;gap:1px;line-height:1.15}
.m3-stage2 .m3-hit-readout strong{font-size:13px;font-variant-numeric:tabular-nums}
.m3-stage2 .m3-hit-readout small{font-size:9px;color:#c0cfe2;white-space:nowrap}


/* V7.1.11 Stage 5 Fix 2 — transparent FX across the existing battlefield.
   The FX layer never consumes card height and cannot capture user clicks. */
.m3-stage2 .m3-combat-stage .m3-battlefield-surface{position:relative;display:flex;flex-direction:column;flex:1 1 auto;min-height:0;overflow:hidden;isolation:isolate}
.m3-stage2 .m3-combat-stage .m3-battlefield-surface>.m3-roster,
.m3-stage2 .m3-combat-stage .m3-battlefield-surface>.m3-map-panel{flex:1 1 auto;min-height:0;max-height:none}
.m3-stage2 .m3-battle-damage-fx{position:absolute;inset:0;padding:clamp(165px,20vh,200px) 10px 16px;z-index:5;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));align-items:center;justify-items:center;overflow:hidden;pointer-events:none;isolation:isolate}
.m3-stage2:not(.m3-float-mode) .m3-battle-damage-fx{display:none}
.m3-stage2 .m3-battle-fx-burst{position:relative;min-width:0;width:100%;height:max-content;max-height:none;display:flex;flex-direction:column;gap:3px;justify-content:center;align-items:center;align-self:center;justify-self:center;overflow:visible;pointer-events:none;white-space:nowrap;animation:m3-battle-burst-rise 1.1s ease-out forwards}
.m3-stage2 .m3-battle-fx-burst.is-kill{animation:m3-battle-kill-flash .45s ease-out forwards}
.m3-stage2 .m3-battle-fx-burst[data-m3-battle-lane="0"]{grid-area:1/1}
.m3-stage2 .m3-battle-fx-burst[data-m3-battle-lane="1"]{grid-area:1/2}
.m3-stage2 .m3-battle-fx-burst[data-m3-battle-lane="2"]{grid-area:1/3}
.m3-stage2 .m3-battle-fx-burst[data-m3-battle-lane="3"]{grid-area:1/4}
.m3-stage2 .m3-battle-fx-burst[data-m3-battle-lane="4"]{grid-area:2/1}
.m3-stage2 .m3-battle-fx-burst[data-m3-battle-lane="5"]{grid-area:2/2}
.m3-stage2 .m3-battle-fx-burst[data-m3-battle-lane="6"]{grid-area:2/3}
.m3-stage2 .m3-battle-fx-burst[data-m3-battle-lane="7"]{grid-area:2/4}
.m3-stage2 .m3-battle-fx-hit{display:flex;flex:0 0 auto;min-height:1.25em;width:100%;align-items:center;justify-content:center;text-align:center;font:900 clamp(19px,1.55vw,26px)/1.25 system-ui,sans-serif;font-variant-numeric:tabular-nums;color:#f7e7c9;text-shadow:0 2px 6px #060b17,0 0 6px #080e19;overflow:visible;text-overflow:clip}
.m3-stage2 .m3-battle-fx-hit.crit{color:#ffcd55;font-size:clamp(21px,1.78vw,29px);text-shadow:0 0 5px #ffce50bf,0 0 13px #e88b16a0,0 2px 5px #060b17}
.m3-stage2 .m3-battle-fx-hit.miss{color:#c4d3e5}
@keyframes m3-battle-burst-rise{0%{opacity:0;transform:translateY(12px) scale(.96)}12%{opacity:1;transform:translateY(0) scale(1)}70%{opacity:1;transform:translateY(-4px)}100%{opacity:0;transform:translateY(-18px)}}
@keyframes m3-battle-kill-flash{0%{opacity:0;transform:scale(.96)}12%{opacity:1;transform:scale(1.06)}77%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1)}}
.m3-stage2 .m3-monster-dead{opacity:.82;border-color:#34445d}
.m3-stage2 .m3-monster-dead .m3-monster-name{color:#bbc7d8}
.m3-stage2 .m3-monster-dead .m3-monster-foot{color:#8698b1;font-size:10px}
@media (max-width:900px){.m3-stage2 .m3-battle-damage-fx{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(4,minmax(0,1fr));padding:clamp(170px,22vh,200px) 10px 14px}.m3-stage2 .m3-battle-fx-hit{font-size:19px}.m3-stage2 .m3-battle-fx-hit.crit{font-size:21px}.m3-stage2 .m3-battle-fx-burst[data-m3-battle-lane="0"]{grid-area:1/1}.m3-stage2 .m3-battle-fx-burst[data-m3-battle-lane="1"]{grid-area:1/2}.m3-stage2 .m3-battle-fx-burst[data-m3-battle-lane="2"]{grid-area:2/1}.m3-stage2 .m3-battle-fx-burst[data-m3-battle-lane="3"]{grid-area:2/2}.m3-stage2 .m3-battle-fx-burst[data-m3-battle-lane="4"]{grid-area:3/1}.m3-stage2 .m3-battle-fx-burst[data-m3-battle-lane="5"]{grid-area:3/2}.m3-stage2 .m3-battle-fx-burst[data-m3-battle-lane="6"]{grid-area:4/1}.m3-stage2 .m3-battle-fx-burst[data-m3-battle-lane="7"]{grid-area:4/2}}
@media(prefers-reduced-motion:reduce){.m3-stage2 .m3-battle-fx-burst,.m3-stage2 .m3-battle-fx-burst.is-kill{animation:none;opacity:1;transform:none}}

/* S5 Fix 4 — keep each real hit at its natural line height; no flex shrinking or burst clipping.
   Battlefield overlay remains absolute and cannot alter monster card dimensions. */

/* V7.3.1-A1: one-line battlefield heading and compact map tab; no RNG or
   monster configuration is calculated in this stylesheet. */
body.r9-ui .m3-stage2 .m3-combat-stage>header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 10px;padding:7px 12px;min-height:0!important}
.m3-stage2 .m3-combat-stage .m3-stage-heading{display:flex;align-items:baseline;gap:10px;min-width:0;white-space:nowrap}
.m3-stage2 .m3-combat-stage .m3-stage-heading small{font-size:9px;letter-spacing:.035em;flex:none;color:#8baed4}
.m3-stage2 .m3-combat-stage .m3-stage-heading h2{font-size:14px;margin:0;min-width:0;white-space:nowrap}
body.r9-ui .m3-stage2 .m3-combat-stage>header .m3-head-state{position:static;grid-column:2;grid-row:1;justify-self:end;font-size:10px;white-space:nowrap}
body.r9-ui .m3-stage2 .m3-combat-stage>header .m3-stage-controls{grid-column:1/-1;margin:0;min-height:30px}
.m3-stage2 .m3-combat-stage .m3-stage-controls .m3-tabs{display:flex;gap:5px}
.m3-stage2 .m3-combat-stage .m3-stage-controls .m3-tabs button{min-height:29px;height:29px;padding:3px 10px;font-size:12px}
.m3-stage2 .m3-combat-stage .m3-display-controls #r9FloatMode{min-height:29px;max-height:29px;padding:3px 8px}
.m3-stage2 .m3-combat-stage .m3-target-strip{min-height:35px;padding:8px 12px;align-items:center}
.m3-stage2 .m3-combat-stage .m3-map-panel{padding:13px 14px;scrollbar-width:thin;overscroll-behavior:contain}
.m3-stage2 .m3-map-hero{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px;flex-wrap:wrap}
.m3-stage2 .m3-map-hero h3{margin:0;font-size:17px;color:#eff7ff}
.m3-stage2 .m3-map-hero>span{font-size:11px;color:#b0c9e7;white-space:nowrap}
.m3-stage2 .m3-map-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-bottom:12px}
.m3-stage2 .m3-map-summary>div{display:flex;flex-direction:column;min-width:0;gap:3px;background:#192b46;border:1px solid #304b69;border-radius:8px;padding:9px 10px}
.m3-stage2 .m3-map-summary small{font-size:10px;color:#9cb7d5}
.m3-stage2 .m3-map-summary b{font-size:14px;color:#e3f3ff;font-variant-numeric:tabular-nums}
.m3-stage2 .m3-map-list-label{margin:8px 0 5px;font-size:12px;font-weight:750}
.m3-stage2 .m3-map-monster-list{display:grid;align-content:start;gap:0}
.m3-stage2 .m3-map-row{padding:9px 4px;min-height:37px;align-items:center;font-size:12px}
.m3-stage2 .m3-map-row small{white-space:nowrap;font-size:10px}
@media(max-width:640px){
  .m3-stage2 .m3-combat-stage .m3-stage-heading{gap:6px}
  .m3-stage2 .m3-combat-stage .m3-stage-heading small{font-size:8px}
  .m3-stage2 .m3-combat-stage .m3-stage-heading h2{font-size:12px}
  .m3-stage2 .m3-map-summary{gap:4px}
  .m3-stage2 .m3-map-summary>div{padding:7px 6px}
  .m3-stage2 .m3-map-summary b{font-size:12px}
}
@media(max-width:420px){
  body.r9-ui .m3-stage2 .m3-combat-stage>header{gap:4px}
  .m3-stage2 .m3-combat-stage .m3-stage-heading{white-space:normal;flex-wrap:wrap;gap:1px 7px}
  .m3-stage2 .m3-map-summary small{font-size:9px}
  .m3-stage2 .m3-map-summary b{font-size:11px}
}

/* A6-R1 世界聊天 — contained inside the existing loot/chat dock. */
.m3-stage2 .m3-chat-active[hidden]{display:none!important}
.m3-stage2 .m3-chat-active{display:flex;flex-direction:column;align-items:stretch;justify-content:stretch;text-align:left;gap:7px;padding:9px 10px 10px;overflow:hidden}
.m3-stage2 .m3-chat-heading{flex:0 0 auto;color:#e5efff;font-size:12px}
.m3-stage2 .m3-chat-messages{flex:1 1 auto;min-height:100px;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:7px;scrollbar-width:thin;padding-right:2px}
.m3-stage2 .m3-chat-empty{font-size:12px;color:#93acc9;text-align:center;margin:auto 0}
.m3-stage2 .m3-chat-message{background:#192e48;border:1px solid #2b4260;border-radius:9px;padding:8px 9px;min-width:0}
.m3-stage2 .m3-chat-meta{display:flex;justify-content:space-between;gap:8px;font-size:11px;color:#f4d89c}
.m3-stage2 .m3-chat-meta strong{overflow-wrap:anywhere}
.m3-stage2 .m3-chat-meta time{font-size:10px;color:#90a6c4;white-space:nowrap}
.m3-stage2 .m3-chat-message p{color:#ecf3ff;white-space:pre-wrap;overflow-wrap:anywhere;margin:5px 0 0;font-size:12px;line-height:1.6}
.m3-stage2 .m3-chat-form{flex:0 0 auto;display:flex;align-items:stretch;gap:5px;margin-top:3px}
.m3-stage2 .m3-chat-form textarea{flex:1;min-width:0;resize:none;border-radius:8px;background:#0f1d32;border:1px solid #385576;color:#f8fbff;font:inherit;font-size:12px;padding:9px;min-height:58px}
.m3-stage2 .m3-chat-form button{min-width:52px;border-radius:8px;border:1px solid #5685bf;background:#2d629c;color:white;font-size:12px;font-weight:700;cursor:pointer}
.m3-stage2 .m3-chat-form button:disabled{opacity:.55;cursor:default}
.m3-stage2 .m3-chat-status{flex:0 0 auto;color:#ffcb91;min-height:13px;font-size:11px}
.m3-stage2 .m3-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:900px){.m3-stage2 .m3-chat-active{min-height:380px;max-height:60vh}.m3-stage2 .m3-chat-messages{min-height:190px}}

/* A6-R2: compact real-time world/team/whisper chat. */
.m3-stage2 .m3-chat-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}
.m3-stage2 .m3-chat-live-indicator{font-size:10px;color:#85e5b6;font-weight:700}
.m3-stage2 .m3-chat-mode-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;flex-shrink:0}
.m3-stage2 .m3-chat-mode-tabs button{border:1px solid #395b81;background:#152b47;color:#c8dbf3;border-radius:7px;padding:7px 3px;font:inherit;font-size:12px;cursor:pointer}
.m3-stage2 .m3-chat-mode-tabs button.active{background:#2b629f;border-color:#73a9e5;color:#fff;font-weight:700}
.m3-stage2 .m3-chat-mode-tabs button:disabled{opacity:.45;cursor:not-allowed}
.m3-stage2 .m3-chat-recipients{width:100%;flex-shrink:0;border:1px solid #395b81;border-radius:7px;background:#14283f;color:#eff6ff;padding:7px 9px;font:inherit;font-size:12px}
.m3-stage2 .m3-chat-recipients[hidden]{display:none!important}
@media(max-width:600px){.m3-stage2 .m3-chat-active{padding:8px;min-height:310px}.m3-stage2 .m3-chat-form textarea{min-height:46px}}

/* A6 R3 report action: compact, touch-friendly, never obscures the message text. */
.m3-stage2 .m3-chat-report{display:block;margin:6px 0 0 auto;padding:3px 8px;border:1px solid #4f6684;border-radius:6px;background:transparent;color:#b8c7dd;font:inherit;font-size:10px;cursor:pointer}
.m3-stage2 .m3-chat-report:hover,.m3-stage2 .m3-chat-report:focus-visible{border-color:#e3ba74;color:#ffe3af}

/* NYX B1 R2 — align the right loot/chat header with the compact left PLAYER header. */
body.r9-ui .m3-stage2 .m3-panel.m3-monsters>header.m3-dock-compact,
body.r9-ui .m3-stage2.m3-float-mode .m3-panel.m3-monsters>header.m3-dock-compact{
  display:flex;flex-direction:column;justify-content:center;gap:5px;
  min-height:0;height:auto;padding:8px 12px 9px;
}
.m3-stage2 .m3-dock-compact .m3-heading-line{gap:8px}
.m3-stage2 .m3-dock-compact .m3-heading-line small{font-size:9px;letter-spacing:.04em}
.m3-stage2 .m3-dock-compact .m3-heading-label{font-size:12px;line-height:1.35}
.m3-stage2 .m3-dock-compact .m3-side-tabs{margin-top:0;gap:5px}
.m3-stage2 .m3-dock-compact .m3-side-tabs button{padding:5px 4px;min-height:29px;font-size:11px;border-radius:7px}
.m3-stage2 .m3-chat-active{gap:5px;padding-top:7px}
.m3-stage2 .m3-chat-heading strong{font-size:11px;font-weight:650}
.m3-stage2 .m3-chat-live-indicator{font-size:9px}
.m3-stage2 .m3-chat-mode-tabs{gap:4px}
.m3-stage2 .m3-chat-mode-tabs button{font-size:11px;padding:5px 3px;min-height:29px}
@media(max-width:600px){.m3-stage2 .m3-dock-compact .m3-heading-label{font-size:11px}}

/* NYX V8.0.2 A1 — Mobile RPG HUD. PC >=781px unchanged. All values
   are presentation of the existing authoritative game/boss snapshot. */
.nyx-mobile-vitals,.nyx-mobile-compact-bars,.nyx-mobile-map,.nyx-mobile-skill-launch,.nyx-mobile-chat-bar,.nyx-mobile-loot-toasts,.nyx-mobile-overlay,.nyx-mobile-skill-drawer,.nyx-mobile-chat-sheet,.nyx-mobile-account-slot{display:none!important}
@media (max-width:780px){
  html{height:auto!important;overflow-x:hidden!important;overflow-y:auto!important}
  body.r9-ui{height:auto!important;min-height:100dvh!important;overflow-x:hidden!important;overflow-y:auto!important}
  body.r9-ui .r9-shell{position:relative!important;inset:auto!important;display:flex!important;flex-direction:column!important;min-height:100dvh!important;height:auto!important;overflow:visible!important;padding-bottom:calc(66px + env(safe-area-inset-bottom,0px));background:radial-gradient(ellipse at top,#182d4b 0%,#0c1729 48%,#09101d 100%)}
  body.r9-ui .r9-shell .r9-header{position:sticky!important;top:0;z-index:140;order:0;display:flex!important;align-items:flex-start!important;gap:8px!important;padding:8px 10px!important;min-height:0!important;height:auto!important;background:#0e1b30f5;backdrop-filter:blur(8px);border-bottom:1px solid #375472}
  body.r9-ui .r9-header:has(#r9MoreMenu:not([hidden])){z-index:34000}
  body.r9-ui .r9-mobile-menu-toggle{width:43px!important;height:45px!important;min-height:45px!important;margin-top:2px}
  body.r9-ui .r9-header-shortcuts{width:0!important;min-width:0!important;flex:0 0 0!important}
  body.r9-ui .r9-header .r9-currency,body.r9-ui .r9-header .r9-auth{display:none!important}
  body.r9-ui .r9-character-btn{display:grid!important;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:7px!important;flex:1!important;min-width:0!important;width:100%;padding:10px!important;background:linear-gradient(150deg,#1d3859,#192d49)!important;border-color:#47678d!important;border-radius:15px!important}
  body.r9-ui .r9-avatar{width:40px;height:40px}
  body.r9-ui .r9-character-meta{min-width:0;gap:3px}
  body.r9-ui .r9-character-meta strong{font-size:14px}
  body.r9-ui .r9-character-meta small{font-size:11px}
  body.r9-ui .r9-power-mini{display:grid;gap:3px;min-width:46px;font-size:12px}
  body.r9-ui .r9-power-mini strong{font-size:12px!important;color:#f6d38b}
  body.r9-ui .nyx-mobile-vitals{grid-column:1/-1;display:grid!important;gap:8px;margin-top:3px;padding-top:9px;border-top:1px solid #364e6b}
  body.r9-ui .nyx-mobile-vital{display:grid;gap:4px}
  body.r9-ui .nyx-mobile-numbers{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:#e8f1ff;font-variant-numeric:tabular-nums}
  body.r9-ui .nyx-mobile-numbers b{color:#fda9ad}
  body.r9-ui .nyx-mobile-vital:nth-child(2) .nyx-mobile-numbers b{color:#9aceff}
  body.r9-ui .nyx-mobile-meter{display:block;width:100%;height:10px;border-radius:20px;background:#38465b;overflow:hidden}
  body.r9-ui .nyx-mobile-meter i{display:block;width:0;height:100%;border-radius:20px;background:linear-gradient(90deg,#f25f71,#ffab64);transition:width .2s linear}
  body.r9-ui .nyx-mobile-meter.mp i{background:linear-gradient(90deg,#337cf0,#65cbfb)}
  body.r9-ui .nyx-mobile-compact-bars{display:none!important}
  body.r9-ui .r9-shell.nyx-mobile-scrolled .r9-character-btn{padding:7px 9px!important}
  body.r9-ui .r9-shell.nyx-mobile-scrolled .r9-avatar{width:30px;height:30px;font-size:17px}
  body.r9-ui .r9-shell.nyx-mobile-scrolled .r9-character-meta strong{font-size:12px}
  body.r9-ui .r9-shell.nyx-mobile-scrolled .r9-exp-line,body.r9-ui .r9-shell.nyx-mobile-scrolled .r9-power-mini{display:none!important}
  body.r9-ui .r9-shell.nyx-mobile-scrolled .nyx-mobile-vitals{display:none!important}
  body.r9-ui .r9-shell.nyx-mobile-scrolled .nyx-mobile-compact-bars{grid-column:1/-1;display:grid!important;grid-template-columns:1fr 1fr;gap:7px}
  body.r9-ui .r9-shell.nyx-mobile-scrolled .nyx-mobile-meter{height:6px}
  body.r9-ui .r9-shell .r9-command{order:1!important;display:flex!important;flex-direction:column!important;gap:9px!important;margin:0!important;padding:10px 12px!important;background:transparent!important;border:0!important;min-height:0!important;height:auto!important}
  body.r9-ui .nyx-mobile-map{display:flex!important;align-items:center;gap:9px;width:100%;min-height:60px;padding:11px 12px!important;background:#1c3452;border:1px solid #43658d;border-radius:12px;color:#edf5ff;text-align:left}
  body.r9-ui .nyx-mobile-map>span:first-child{font-size:20px}
  body.r9-ui .nyx-mobile-map-info{min-width:0;flex:1;display:grid;gap:3px}
  body.r9-ui .nyx-mobile-map-info strong{font-size:13px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
  body.r9-ui .nyx-mobile-map-info small{font-size:11px;color:#b9cfe8;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
  body.r9-ui .r650-grid{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:7px!important;width:100%;min-height:0!important;height:auto!important}
  body.r9-ui .r650-world-center{display:none!important}
  body.r9-ui .r650-combat{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:7px!important;width:100%;min-width:0!important;height:auto!important}
  body.r9-ui .r650-combat-main{display:flex!important;gap:7px!important;justify-content:space-between;flex-wrap:wrap}
  body.r9-ui .r650-combat-main>button{flex:1 1 135px;min-height:45px}
  body.r9-ui .r650-combat-options{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:7px!important;width:100%!important}
  body.r9-ui .r650-combat-options>*{min-width:0}
  body.r9-ui .r650-difficulty-label{font-size:11px}
  body.r9-ui .r650-combat-options .r9-cta{min-height:38px;padding:7px 10px;font-size:12px}
  body.r9-ui .r9-shell .r9-status-strip{display:none!important}
  body.r9-ui .r9-shell .r9-main{order:2!important;display:block!important;min-width:0!important;min-height:0!important;height:auto!important;flex:none!important;padding:0 10px 16px!important;overflow:visible!important}
  body.r9-ui .r9-shell .r9-arena{width:100%!important;height:auto!important;overflow:visible!important;min-height:0!important}
  body.r9-ui .r9-shell .r9-nav{display:none!important}
  body.r9-ui .r9-alert{max-width:100%;font-size:12px}
  /* Preserve original server-fed combat and player-float DOM; remove mobile tabs only. */
  body.r9-ui .m3-stage2 .m3-mobile-tabs{display:none!important}
  body.r9-ui .m3-stage2 .m3-grid{display:flex!important;flex-direction:column!important;gap:10px!important;min-height:0!important;height:auto!important}
  body.r9-ui .m3-stage2 .m3-panel{min-height:0!important;height:auto!important;max-height:none!important;width:100%!important}
  body.r9-ui .m3-stage2 .m3-battle{display:flex!important;order:1!important}
  body.r9-ui .m3-stage2 .m3-player{display:flex!important;order:2!important}
  body.r9-ui .m3-stage2 .m3-monsters{display:none!important}
  body.r9-ui .m3-stage2 .m3-battlefield-surface{min-height:220px!important;height:auto!important;overflow:visible!important}
  body.r9-ui .m3-stage2 #m3Roster{min-height:230px!important;max-height:none!important;height:auto!important;overflow:visible!important;padding:10px!important}
  body.r9-ui .m3-stage2 #m3MapInfo{max-height:none!important;height:auto!important;overflow:visible!important}
  body.r9-ui .m3-stage2 .m3-player-floats-grid{height:90px!important}
  body.r9-ui .m3-stage2 .m3-player-impact{margin:8px 10px!important}
  body.r9-ui .m3-stage2 .m3-player>.m3-panel-body{max-height:none!important;overflow:visible!important}
  /* Fixed live chat and skill drawer (same original buttons and form). */
  body.r9-ui .nyx-mobile-chat-bar{display:flex!important;position:fixed;z-index:400;left:8px;right:8px;bottom:calc(7px + env(safe-area-inset-bottom,0px));width:calc(100% - 16px);gap:8px;align-items:center;min-height:44px;padding:8px 11px;border:1px solid #56779d;border-radius:11px;background:#213955f5;color:#eaf2ff;box-shadow:0 8px 22px #050a14c7}
  body.r9-ui .nyx-mobile-chat-bar b{white-space:nowrap;font-size:12px}
  body.r9-ui .nyx-mobile-chat-bar>span:nth-child(2){flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;font-size:11px;color:#bed1e5}
  body.r9-ui .nyx-mobile-skill-launch{display:flex!important;position:fixed;z-index:410;right:12px;bottom:calc(70px + env(safe-area-inset-bottom,0px));width:54px;min-height:54px;border:1px solid #867bca;background:#443a78;color:white;border-radius:15px;flex-direction:column;align-items:center;justify-content:center;font-size:23px;box-shadow:0 7px 20px #0009}
  body.r9-ui .nyx-mobile-skill-launch small{font-size:10px}
  body.r9-ui .nyx-mobile-overlay:not([hidden]){display:block!important;position:fixed;inset:0;z-index:39000;background:#030a16ba}
  body.r9-ui .nyx-mobile-skill-drawer:not([hidden]){display:flex!important;position:fixed;right:0;top:0;bottom:0;z-index:39001;width:min(380px,92vw);height:100dvh;flex-direction:column;border-left:1px solid #53739a;background:#0e1b30;box-shadow:-12px 0 30px #000a;overflow:hidden}
  body.r9-ui .nyx-mobile-skill-drawer>header{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:62px;padding:12px 14px;border-bottom:1px solid #355272;background:#1b3452}
  body.r9-ui .nyx-mobile-skill-drawer>header strong{font-size:17px}
  body.r9-ui .nyx-mobile-skill-drawer button{color:#edf5ff;border:1px solid #456389;border-radius:9px;background:#254668;min-height:39px;padding:8px}
  body.r9-ui .nyx-mobile-skill-drawer>p{color:#a8c0de;margin:10px 12px 5px;font-size:11px}
  body.r9-ui .nyx-mobile-skill-content{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:10px 12px}
  body.r9-ui .nyx-mobile-skill-content .r650-skills{display:flex!important;flex-direction:column!important;gap:18px!important;width:100%!important;min-height:0!important;height:auto!important;overflow:visible!important}
  body.r9-ui .nyx-mobile-skill-content .r650-skill-row{display:grid!important;gap:9px!important;width:100%!important}
  body.r9-ui .nyx-mobile-skill-content .r650-group-label{font-size:13px;font-weight:800;color:#e7edf9}
  body.r9-ui .nyx-mobile-skill-content .r650-slots{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important;width:100%!important;min-width:0!important;overflow:visible!important}
  body.r9-ui .nyx-mobile-skill-content .r650-skill-chip,body.r9-ui .nyx-mobile-skill-content .r650-empty-slot{min-width:0!important;width:100%!important;min-height:72px!important;height:auto!important;white-space:normal!important;text-align:center;justify-content:center;padding:7px 5px!important;font-size:12px!important;overflow-wrap:anywhere}
  body.r9-ui .nyx-mobile-skill-content .r650-skill-chip{display:flex!important;flex-direction:column;gap:4px}
  body.r9-ui .nyx-mobile-skill-content .r650-skill-chip strong{font-size:12px!important;white-space:normal!important}
  body.r9-ui .nyx-mobile-skill-content .r650-skill-chip span{font-size:10px!important}
  body.r9-ui .nyx-mobile-skill-drawer>#nyxMobileSkillManage{flex:none;margin:10px 12px calc(13px + env(safe-area-inset-bottom,0px))}
  body.r9-ui .nyx-mobile-chat-sheet:not([hidden]){display:flex!important;position:fixed;z-index:39001;left:0;right:0;bottom:0;height:50dvh;min-height:280px;max-height:95dvh;flex-direction:column;overflow:hidden;border:1px solid #4c6d95;border-radius:18px 18px 0 0;background:#12243b;box-shadow:0 -14px 35px #000a;padding-bottom:env(safe-area-inset-bottom,0px)}
  body.r9-ui .nyx-mobile-chat-sheet.expanded{height:85dvh}
  body.r9-ui .nyx-mobile-chat-grip{height:18px;flex:none;touch-action:none;cursor:ns-resize}
  body.r9-ui .nyx-mobile-chat-grip:before{content:"";display:block;width:56px;height:4px;border-radius:10px;background:#6b86a5;margin:6px auto}
  body.r9-ui .nyx-mobile-chat-sheet>header{display:flex;align-items:center;justify-content:space-between;flex:none;gap:9px;padding:7px 11px;border-bottom:1px solid #405b7e}
  body.r9-ui .nyx-mobile-chat-sheet>header>div{display:flex;gap:6px}
  body.r9-ui .nyx-mobile-chat-sheet>header button{font-size:11px;min-height:34px;padding:5px 8px;background:#294768;border:1px solid #4b6b8d;border-radius:9px;color:#eef4ff}
  body.r9-ui .nyx-mobile-chat-content{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}
  body.r9-ui .nyx-mobile-chat-content #m3ChatPlaceholder{display:flex!important;flex:1;min-height:0!important;max-height:none!important;overflow:hidden!important;padding:8px 10px}
  body.r9-ui .nyx-mobile-chat-content .m3-chat-messages{min-height:0!important;flex:1!important;overflow-y:auto!important}
  body.r9-ui .nyx-mobile-chat-content .m3-chat-form{margin-top:5px}
  body.r9-ui .nyx-mobile-chat-content .m3-chat-form textarea{min-height:43px!important;max-height:95px;resize:none}
  body.r9-ui .nyx-mobile-loot-toasts{display:flex!important;flex-direction:column;gap:5px;position:fixed;right:10px;bottom:calc(132px + env(safe-area-inset-bottom,0px));z-index:350;max-width:min(290px,76vw);pointer-events:none}
  body.r9-ui .nyx-mobile-loot-toast{padding:9px 11px;border:1px solid #39725b;background:#17372eec;border-radius:10px;color:#96f2bd;font-size:11px;line-height:1.4;box-shadow:0 5px 17px #0008;animation:nyx-mobile-toast .25s ease-out}
  body.r9-ui .nyx-mobile-loot-toast.rare{border-color:#aa8641;background:#47351cec;color:#ffe0a1}
  @keyframes nyx-mobile-toast{from{transform:translateX(15px);opacity:0}to{transform:translateX(0);opacity:1}}
  body.r9-ui .nyx-mobile-menu-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
  body.r9-ui .nyx-mobile-menu-head button{display:grid;place-items:center;flex:none;min-width:39px;min-height:39px;background:#2b4362;border:1px solid #577398;border-radius:9px;color:white}
  body.r9-ui .nyx-mobile-account-slot{display:block!important;padding:6px 0 10px}
  body.r9-ui .nyx-mobile-account-slot #nyxSessionBar{position:relative!important;inset:auto!important;display:block!important;width:100%;z-index:auto!important}
  body.r9-ui .nyx-mobile-account-slot #nyxSessionBar>.nyx-menu-toggle{width:100%;min-height:42px}
  body.r9-ui .nyx-mobile-account-slot #nyxSessionBar>.nyx-menu-list:not([hidden]){position:relative!important;inset:auto!important;width:100%!important;max-height:260px!important;overflow:auto!important;z-index:auto!important}
  body.r9-ui .r9-more-menu:not([hidden]){overflow-y:auto!important}
  /* Full skill center — a page-sized, scrollable module, not a tiny desktop popup. */
  body.r9-ui .psv2-modal{width:100vw!important;max-width:100vw!important;max-height:100dvh!important;height:100dvh!important;border-radius:0!important}
  body.r9-ui .psv2-backdrop{padding:0!important}
  body.r9-ui .psv2-header{padding:11px 14px}
  body.r9-ui .psv2-header h2{font-size:19px}
  body.r9-ui .psv2-layout{overflow-y:auto!important;min-height:0!important;display:flex!important;flex-direction:column!important;gap:12px!important;padding:12px!important}
  body.r9-ui .psv2-grid{grid-template-columns:1fr!important}
}
@media(max-width:340px){body.r9-ui .r9-power-mini strong{font-size:10px!important}body.r9-ui .r9-character-btn{padding:7px!important}body.r9-ui .r650-combat-options{gap:4px!important}}
@media(prefers-reduced-motion:reduce){body.r9-ui .nyx-mobile-loot-toast{animation:none!important}}
@media(max-width:780px){
  body.r9-ui .nyx-mobile-skill-content .r650-skill-row{grid-template-columns:minmax(0,1fr)!important}
  body.r9-ui .nyx-mobile-skill-content .r650-group-label{width:100%;white-space:normal}
}
@media(max-width:780px){
  body.r9-ui .nyx-mobile-skill-content .r650-empty-slot{display:grid!important;place-items:center;background:#1c304c;border:1px dashed #385678;border-radius:10px;color:#8da5c4;font-size:17px}
  body.r9-ui .nyx-mobile-skill-content .r650-skill-chip{border-radius:10px!important;border:1px solid #3f5976!important;background:#1b304b!important}
  body.r9-ui .nyx-mobile-skill-content .r650-skill-chip.on{background:#133f38!important;border-color:#287c66!important}
  body.r9-ui .nyx-mobile-skill-content .r650-skill-manage{background:#294b72!important;border:1px solid #679ad0!important}
}

/* V8.0.2 A2: mailbox is the first mobile drawer action; account controls stay at the end. */
.nyx-mobile-mail-entry,.nyx-mobile-account-slot{display:none!important}
@media(max-width:780px){
 body.r9-ui .nyx-mobile-mail-entry{display:block!important;width:100%;flex:none;text-align:left;min-height:48px;margin:8px 0 12px;padding:11px 13px;border:1px solid #5685bd;background:#22446f;color:#f5f9ff;border-radius:10px;font-size:14px;font-weight:700}
 body.r9-ui .nyx-mobile-account-slot{display:flex!important;flex-direction:column;gap:7px;flex:none;padding:15px 0 12px;margin-top:12px;border-top:1px solid #38516f}
 body.r9-ui .nyx-mobile-account-caption{display:block;color:#a9bfd9;font-size:12px;margin:0 0 5px}
 body.r9-ui .nyx-mobile-account-slot>button{width:100%;min-height:45px;flex:none;text-align:left;background:#1c304e;color:#e7f1ff;border:1px solid #38516f;border-radius:9px;font-size:14px;padding:10px 12px}
 body.r9-ui .r9-more-menu:not([hidden]){overflow-y:auto!important;overscroll-behavior:contain;overflow-anchor:none;-webkit-overflow-scrolling:touch;touch-action:pan-y;scroll-padding-top:18px;scroll-padding-bottom:22px}
 body.r9-ui .r9-more-menu #nyxMobileMailEntry:focus-visible,body.r9-ui .nyx-mobile-account-slot button:focus-visible{outline:2px solid #9ac7ff;outline-offset:2px}
}

/* V8.1.3 — stable monster slots; only authoritative changed fields repaint. */
.m3-stage2 .m3-player-frequency{display:flex;align-items:center;gap:12px;padding:12px 14px;border-bottom:1px solid #283b54;color:#b0c0d8;font-size:12px}
.m3-stage2 .m3-player-frequency b{border-radius:7px;padding:3px 9px;color:#b7f2d3;background:#174a37;font-size:12px}
.m3-stage2 .m3-player-frequency b:not(:empty){font-variant-numeric:tabular-nums}
.m3-stage2 .m3-player-frequency small{margin-left:auto;color:#d2e4ff;font-variant-numeric:tabular-nums}
.m3-stage2 .m3-monster.m3-slot.is-empty{min-height:86px;border-style:dashed;border-color:#314256;background:#122034;display:flex;align-items:center;justify-content:center;color:#6c839d}
.m3-stage2 .m3-slot-empty{font-size:12px}
.m3-stage2 .m3-slot-content{min-width:0;width:100%}
.m3-stage2 .m3-slot-content[hidden],.m3-stage2 .m3-slot-empty[hidden]{display:none!important}
.m3-stage2 .m3-card-stats{display:flex;flex-wrap:wrap;gap:4px;margin-top:7px}
.m3-stage2 .m3-card-stats span{display:inline-flex;flex:1 1 auto;align-items:baseline;justify-content:center;gap:4px;min-width:0;max-width:100%;background:#101f32;border-radius:999px;padding:4px 6px;text-align:center;color:#a3b9d4;font-size:10px;white-space:normal}
.m3-stage2 .m3-card-stats b{min-width:0;color:#e7f1ff;font-size:11px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}

/* V8.1.6: near-black, static low-frequency presentation. No CSS animations. */
.nyx-lowfreq-overlay{position:fixed!important;inset:0!important;z-index:2147483000!important;
  background:#020405!important;color:#d3e7e5!important;border:0!important;
  margin:0!important;padding:0!important;width:100vw!important;height:100dvh!important;
  cursor:pointer!important;font:inherit!important;display:flex!important;
  align-items:center!important;justify-content:center!important;flex-direction:column!important;
  animation:none!important;transition:none!important;box-shadow:none!important;touch-action:manipulation!important;}
.nyx-lowfreq-overlay[hidden]{display:none!important;}
.nyx-lowfreq-badge{display:flex;align-items:center;justify-content:center;position:absolute;
  top:50%;left:50%;transform:translate(-50%,-50%);height:105px;width:134px;
  clip-path:polygon(50% 0%,97% 34%,78% 96%,22% 96%,3% 34%);
  background:#084745;color:#b8efe4;border:0;font-size:16px;font-weight:700;
  letter-spacing:.07em;text-shadow:0 0 10px #0caab675;animation:none!important;}
.nyx-lowfreq-footer{position:absolute;bottom:21%;left:0;width:100%;display:flex;flex-direction:column;
  align-items:center;gap:12px;font-size:13px;color:#939c9e;animation:none!important;}
#nyxLowfreqElapsed{color:#c2d3d3;font-size:17px;font-variant-numeric:tabular-nums;letter-spacing:.08em;}
#r9PowerSave{white-space:nowrap;font-size:12px;}
@media(prefers-reduced-motion:reduce){.nyx-lowfreq-overlay *{animation:none!important;transition:none!important}}


/* V8.2.3-R4 — approved mobile combat arrangement; desktop columns unchanged. */
.nyx-mobile-brand,.nyx-mobile-attribute,.nyx-mobile-battle-vitals{display:none!important}
.m3-stage2 .m3-display-controls{gap:6px}
.m3-stage2 .m3-display-controls .m3-hide-damage-toggle{display:inline-flex;align-items:center;justify-content:center;min-height:30px;padding:4px 9px;margin:0;border:1px solid #49668c;border-radius:9px;background:#203858;color:#e4efff;font-size:11px;font-weight:700;white-space:nowrap;cursor:pointer}
.m3-stage2 .m3-display-controls .m3-hide-damage-toggle.is-on{background:#553141;border-color:#e7798b;color:#ffe4ec}
.m3-stage2.m3-hide-damage .m3-battle-damage-fx,
.m3-stage2.m3-hide-damage .m3-player-floats-grid,
.m3-stage2.m3-hide-damage [data-m3-hit-readout]{display:none!important}
@media(max-width:780px){
  body.r9-ui .r9-shell .r9-header{position:relative!important;display:grid!important;grid-template-columns:44px minmax(0,1fr) 44px;grid-template-rows:49px auto;align-items:center!important;padding:10px 10px 9px!important;gap:8px!important;background:radial-gradient(ellipse at 65% 0%,#133d84,#071629 75%)!important;border-bottom:0!important;backdrop-filter:none!important}
  body.r9-ui .nyx-mobile-brand{display:block!important;grid-column:2;grid-row:1;text-align:center;font-size:29px;line-height:1;font-weight:900;letter-spacing:.16em;color:#eef7ff;text-shadow:0 0 12px #4788ff,0 0 27px #2266dd}
  body.r9-ui .r9-mobile-menu-toggle{grid-column:1;grid-row:1;margin:0!important;background:#182f50!important;border:1px solid #507aae!important;border-radius:12px!important}
  body.r9-ui .r9-character-btn{grid-column:1/-1;grid-row:2;display:grid!important;grid-template-columns:45px minmax(0,1fr) minmax(97px,30%);gap:8px!important;padding:13px 11px!important;background:linear-gradient(125deg,#183b61,#112744 70%,#162e50)!important;border:1px solid #5487c7!important;box-shadow:inset 0 0 0 1px #22496a,0 0 17px #1256ab40;border-radius:15px!important}
  body.r9-ui .r9-avatar{width:43px!important;height:49px!important;background:linear-gradient(145deg,#1c598d,#59439f)!important;border:1px solid #6faefc!important;border-radius:12px!important}
  body.r9-ui .r9-character-meta strong{font-size:16px!important}
  body.r9-ui .r9-character-meta small{font-size:11px!important}
  body.r9-ui .r9-power-mini{display:none!important}
  body.r9-ui .nyx-mobile-attribute{grid-column:3;grid-row:1;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;border:1px solid #365c83;border-radius:11px;padding:8px 3px;background:linear-gradient(160deg,#1d395c,#142943);box-shadow:inset 0 -1px #2d9edb66}
  body.r9-ui .nyx-mobile-attribute small{font-size:10px;color:#eff6ff;white-space:nowrap}
  body.r9-ui .nyx-mobile-attribute strong{font-size:clamp(15px,4.1vw,22px);color:#ffe29a;font-variant-numeric:tabular-nums;text-shadow:0 0 7px #b47c3359}
  body.r9-ui .r9-shell.nyx-mobile-scrolled .r9-character-btn{padding:12px 11px!important}
  body.r9-ui .r9-shell.nyx-mobile-scrolled .r9-exp-line{display:flex!important}
  body.r9-ui .r9-shell .r9-command{padding:8px 10px 10px!important;gap:9px!important}
  body.r9-ui .nyx-mobile-map{border:1px solid #4c78a5!important;border-radius:13px!important;background:linear-gradient(145deg,#1d3c60,#17304c)!important;box-shadow:0 0 10px #0f498441}
  body.r9-ui .r650-combat-main>button{border-radius:13px!important}
  body.r9-ui .nyx-mobile-battle-vitals{display:grid!important;gap:9px;padding:12px 13px;margin-top:0;border:1px solid #5b8aba;border-radius:12px;background:linear-gradient(135deg,#1c3c61,#162c48);box-shadow:inset 0 0 0 1px #1e4970}
  /* R4-FIX1: the legacy V6.5.0 38dvh command scroller trapped the new HP/MP
     inside a separately scrolling panel, hiding difficulty/drop controls behind
     it. Keep controls, vitals and battlefield in one ordinary page scroll. */
  body.r9-ui .r9-shell>.r9-command.r650-command{position:static!important;top:auto!important;max-height:none!important;height:auto!important;overflow:visible!important;flex:0 0 auto!important}
  body.r9-ui .r9-shell .r650-grid,body.r9-ui .r9-shell .r650-combat,body.r9-ui .r9-shell .r650-combat-options{max-height:none!important;overflow:visible!important}
  body.r9-ui .r9-shell .nyx-mobile-battle-vitals{position:static!important;inset:auto!important;transform:none!important;z-index:auto!important;align-self:stretch;flex:0 0 auto;clear:both}
  body.r9-ui .nyx-mobile-battle-vitals .nyx-mobile-vital{display:grid;gap:5px}
  body.r9-ui .nyx-mobile-battle-vitals .nyx-mobile-numbers{display:flex;align-items:center;justify-content:space-between;font-size:13px;color:#f5f9ff}
  body.r9-ui .nyx-mobile-battle-vitals .nyx-mobile-numbers b{color:#ff9fb9}
  body.r9-ui .nyx-mobile-battle-vitals .nyx-mobile-vital:nth-child(2) b{color:#91d7ff}
  body.r9-ui .nyx-mobile-battle-vitals .nyx-mobile-meter{display:block;width:100%;height:9px;background:#354963;border-radius:10px;overflow:hidden}
  body.r9-ui .nyx-mobile-battle-vitals .nyx-mobile-meter i{display:block;height:100%;width:0;border-radius:10px;background:linear-gradient(90deg,#f05d82,#ffae8d);transition:width .2s linear}
  body.r9-ui .nyx-mobile-battle-vitals .nyx-mobile-meter.mp i{background:linear-gradient(90deg,#286cdb,#6fddfc)}
  body.r9-ui .m3-stage2 .m3-grid{gap:0!important}
  body.r9-ui .m3-stage2 .m3-player{display:none!important}
  body.r9-ui .m3-stage2 .m3-combat-stage{border:1px solid #5485b8!important;border-radius:15px!important;background:linear-gradient(170deg,#142e4e,#0e2038)!important;box-shadow:0 0 14px #125aa53d}
  body.r9-ui .m3-stage2 .m3-combat-stage .m3-stage-controls{flex-wrap:wrap;gap:6px}
  body.r9-ui .m3-stage2 .m3-display-controls{margin-left:auto;display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}
  body.r9-ui .m3-stage2 .m3-display-controls #r9FloatMode,body.r9-ui .m3-stage2 .m3-display-controls .m3-hide-damage-toggle{min-height:32px;font-size:10px;padding:5px 8px}
  body.r9-ui .m3-stage2 .m3-battlefield-surface{min-height:245px!important;background:radial-gradient(ellipse at 50% 90%,#123967,#0b2039 75%)!important}
  body.r9-ui .m3-stage2 #m3Roster{min-height:265px!important;padding:11px!important}
  body.r9-ui .m3-stage2 .m3-monster.m3-slot.is-empty{min-height:86px;border-color:#325778;background:radial-gradient(ellipse at 50% 90%,#173a63,#0e2037 70%)}
  body.r9-ui .m3-stage2 .m3-slot-empty{color:#91b3d9;font-size:13px}
  body.r9-ui .m3-stage2 .m3-panel.m3-monsters{display:none!important}
  body.r9-ui .r9-shell>.r9-main{padding:0 10px 14px!important}
  body.r9-ui .nyx-mobile-chat-bar{border-radius:13px;border-color:#568abc;background:#1d3d61f5}
}

/* Desktop loot notifications are presentation-only, no changes to committed receipts. */
.m3-stage2 .m3-pc-loot-toggle{margin-left:auto;border:1px solid #496f9c;background:#163052;color:#d9e8ff;border-radius:8px;padding:6px 9px;white-space:nowrap;font-size:11px;cursor:pointer}
@media(max-width:780px){body.r9-ui .m3-pc-loot-toggle{display:none!important}}

/* V8.4.1: state-specific combat controls; no duplicate action nodes. */
#r9ReviveStop[hidden]{display:none!important}
@media(min-width:781px){body.r9-ui .r650-combat-main{flex-wrap:wrap;justify-content:flex-start}body.r9-ui .r650-combat-main #r9ReviveStop{flex:1 1 auto;white-space:nowrap}body.r9-ui .r650-combat-main #r9Revive{flex:1 1 auto}}
@media(max-width:780px){body.r9-ui .nyx-revive-waiting .r650-combat-main{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))}body.r9-ui .nyx-revive-waiting #r9Revive{order:0}body.r9-ui .nyx-revive-waiting #r9ReviveStop{order:1;font-size:12px}body.r9-ui .nyx-revive-waiting #r9PowerSave{order:2}body.r9-ui .nyx-revive-waiting .r650-combat-main>button{min-width:0;width:100%}}

@media(max-width:780px){body.r9-ui .nyx-revive-waiting .r650-combat-main>button:not([hidden]){min-height:40px!important}}

/* V8.4.6 explicit symmetric desktop columns; mobile unchanged. */
@media(min-width:1081px){
  body.r9-ui .r9-shell .r650-command > .r650-grid.nyx-centered-controls{display:grid!important;grid-template-columns:minmax(0,1fr) clamp(150px,15vw,300px) minmax(0,1fr)!important;grid-template-areas:"skills map combat"!important;grid-template-rows:auto!important;width:100%!important;min-width:0;gap:clamp(8px,.8vw,14px);align-items:center}
  body.r9-ui .r9-shell .nyx-centered-controls>.r650-skills{grid-area:skills!important;width:100%;max-width:650px;justify-self:start}
  body.r9-ui .r9-shell .nyx-centered-controls>.r650-world-center{grid-area:map!important;width:100%;justify-self:center}
  body.r9-ui .r9-shell .nyx-centered-controls>.r650-combat{grid-area:combat!important;width:100%;min-width:0;justify-self:stretch;grid-template-rows:minmax(38px,auto) minmax(32px,auto)}
  body.r9-ui .r9-shell .nyx-centered-controls .r650-combat-main,body.r9-ui .r9-shell .nyx-centered-controls .r650-combat-options{flex-wrap:wrap;row-gap:4px}
  body.r9-ui .nyx-centered-controls .r650-combat-main>button:not([hidden]){flex:0 1 auto}
  body.r9-ui .nyx-centered-controls .r650-combat-options .r650-drops-button{margin-left:auto;flex:0 0 auto}
}

@media(min-width:781px) and (max-width:1080px){
 body.r9-ui .r9-shell .r650-command > .r650-grid.nyx-centered-controls{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-areas:"map map" "skills combat"!important;grid-template-rows:auto auto!important;gap:8px;align-items:center;width:100%!important}
 body.r9-ui .r9-shell .nyx-centered-controls>.r650-world-center{grid-area:map!important;width:min(245px,45%);justify-self:center}
 body.r9-ui .r9-shell .nyx-centered-controls>.r650-skills{grid-area:skills!important;min-width:0;width:100%}
 body.r9-ui .r9-shell .nyx-centered-controls>.r650-combat{grid-area:combat!important;min-width:0;width:100%;grid-template-rows:auto auto}
 body.r9-ui .r9-shell .nyx-centered-controls .r650-combat-main,body.r9-ui .r9-shell .nyx-centered-controls .r650-combat-options{flex-wrap:wrap;row-gap:4px}
}

/* A2 encounter notification — presentation only; no layout shift or input capture. */
.m3-stage2 .m3-encounter-notice{position:absolute;z-index:8;top:12px;left:50%;width:min(calc(100% - 24px),520px);transform:translateX(-50%);border:1px solid #b88a45;border-radius:12px;overflow:hidden;pointer-events:none;text-align:center;box-shadow:0 8px 28px #050b17a6;background:#14243af5;color:#f5d28b}
.m3-stage2 .m3-encounter-body{display:flex;flex-direction:column;align-items:center;gap:2px;padding:9px 14px;min-width:0}
.m3-stage2 .m3-encounter-body small{font-size:9px;letter-spacing:.17em;font-weight:700;color:#d9b87b}
.m3-stage2 .m3-encounter-body strong{font-size:clamp(17px,3.2vw,23px);font-weight:850;line-height:1.3;letter-spacing:.1em}
.m3-stage2 .m3-encounter-body span{font-size:12px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#ebd9b1}
.m3-stage2 .m3-encounter-notice[data-kind="elite"]{width:min(calc(100% - 24px),320px);animation:m3-encounter-enter 1s ease both}
.m3-stage2 .m3-encounter-notice[data-kind="elite"] .m3-encounter-band{height:2px;background:linear-gradient(90deg,transparent,#d6a74e,transparent)}
.m3-stage2 .m3-encounter-notice[data-kind="boss"]{top:24px;border-color:#b65563;background:linear-gradient(145deg,#18283f,#291b2c 50%,#102138);color:#ffd5d4;box-shadow:0 10px 38px #060b18d9,0 0 18px #bf405330;animation:m3-boss-warning-enter 2.4s ease both}
.m3-stage2 .m3-encounter-notice[data-kind="boss"] .m3-encounter-body{padding:17px 10px;gap:5px}
.m3-stage2 .m3-encounter-notice[data-kind="boss"] .m3-encounter-body small{color:#e69aa1;font-size:10px;letter-spacing:.19em}
.m3-stage2 .m3-encounter-notice[data-kind="boss"] .m3-encounter-body strong{font-size:clamp(22px,5vw,36px);color:#ffd5d4;text-shadow:0 0 15px #df536751;letter-spacing:.07em}
.m3-stage2 .m3-encounter-notice[data-kind="boss"] .m3-encounter-body span{color:#eac2c6;font-size:13px}
.m3-stage2 .m3-encounter-notice[data-kind="boss"] .m3-encounter-band{height:11px;background:repeating-linear-gradient(125deg,#ac4253 0 12px,#21314a 12px 23px);border-block:1px solid #d6757d50}
.m3-stage2 .m3-monster.m3-elite-slot:not(.is-empty) [data-m3-elite]{color:#f0ca78;background:#554122;border-color:#a37f40}
.m3-stage2 .m3-monster.m3-boss-slot:not(.is-empty) [data-m3-elite]{color:#ffb0b6;background:#522b3c;border-color:#b65563}
@keyframes m3-encounter-enter{0%{opacity:0;transform:translate(-50%,-6px)}15%,78%{opacity:1;transform:translate(-50%,0)}100%{opacity:0;transform:translate(-50%,-4px)}}
@keyframes m3-boss-warning-enter{0%{opacity:0;transform:translate(-50%,-8px) scale(.97)}13%,85%{opacity:1;transform:translate(-50%,0) scale(1)}100%{opacity:0;transform:translate(-50%,0) scale(.99)}}
@media(prefers-reduced-motion:reduce){.m3-stage2 .m3-encounter-notice[data-kind]{animation:none!important}}

.m3-stage2 .m3-battle-fx-hit.counter{color:#c4a1ff;text-shadow:0 0 7px #9b68ef,0 2px 6px #060b17}

/* V9.1.0 party vitals: display only, server supplies HP percentage. */
.m3-stage2 .m3-player.m3-party-active>.m3-attribute-attack,.m3-stage2 .m3-player.m3-party-active>.m3-player-frequency,.m3-stage2 .m3-player.m3-party-active>.m3-player-impact,.m3-stage2 .m3-player.m3-party-active>#m3CoreTraits{display:none!important}
.m3-stage2 .m3-party-vitals[hidden]{display:none!important}
.m3-stage2 .m3-party-vitals{display:flex;flex-direction:column;gap:8px;padding:10px;overflow:auto;min-height:0;flex:0 1 auto}
.m3-stage2 .m3-party-vital{padding:10px;border:1px solid #304863;background:#17273d;border-radius:10px;display:flex;flex-direction:column;gap:7px;min-width:0}
.m3-stage2 .m3-party-vital-top,.m3-stage2 .m3-party-vital-meta{display:flex;justify-content:space-between;align-items:center;gap:7px;font-size:11px;color:#b9cde4;font-variant-numeric:tabular-nums}
.m3-stage2 .m3-party-vital-top strong{font-size:12px;color:#e3eefc;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.m3-stage2 .m3-party-vital-top small{color:#9ceab1;white-space:nowrap}.m3-stage2 .m3-party-vital-meta strong{color:#e3eefc}.m3-stage2 .m3-party-vital.is-offline .m3-party-vital-top small{color:#e4c48a}
.m3-stage2 .m3-party-vital-meter{height:7px;border-radius:6px;background:#293b52;overflow:hidden}.m3-stage2 .m3-party-vital-meter i{display:block;height:100%;background:#459b76;border-radius:6px}.m3-stage2 .m3-party-vital.is-offline .m3-party-vital-meter i{background:#75859a}

/* R3: purely presentational layout and hit effects. */
.m3-stage2 .m3-display-controls{flex-wrap:wrap;justify-content:flex-end}
#m3PcLootToggle{font-size:11px;padding:4px 8px;white-space:nowrap;min-height:29px}
@media(min-width:901px){
 body.r9-ui .m3-stage2:is([data-loot-mode=hidden],[data-loot-mode=toast]) .m3-grid{grid-template-columns:minmax(210px,.93fr) minmax(0,2.98fr)}
 body.r9-ui .m3-stage2:is([data-loot-mode=hidden],[data-loot-mode=toast]) .m3-info-dock{display:none!important}
 @container m3-battlefield (min-width:850px){
  body.r9-ui .m3-stage2:is([data-loot-mode=hidden],[data-loot-mode=toast]) .m3-combat-stage #m3Roster{grid-template-columns:repeat(3,minmax(0,1fr))}
 }
}
@media(min-width:781px){
 body.r9-ui .nyx-mobile-chat-bar{display:flex!important;position:fixed;z-index:400;right:14px;bottom:8px;width:min(330px,45vw);gap:8px;align-items:center;padding:8px 11px;min-height:34px;border:1px solid #56779d;border-radius:10px;background:#213955f5;color:#eaf2ff;box-shadow:0 8px 22px #050a14a0}
 body.r9-ui .nyx-mobile-chat-bar b{white-space:nowrap;font-size:12px}
 body.r9-ui .nyx-mobile-chat-bar>span:nth-child(2){flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;font-size:11px;color:#bed1e5}
 body.r9-ui .nyx-mobile-overlay:not([hidden]){display:block!important;position:fixed;inset:0;z-index:39000;background:#030a1644}
 body.r9-ui .nyx-mobile-chat-sheet:not([hidden]){display:flex!important;position:fixed;z-index:39001;right:12px;bottom:0;width:min(520px,92vw);height:50dvh;min-height:280px;max-height:95dvh;flex-direction:column;overflow:hidden;border:1px solid #4c6d95;border-radius:14px 14px 0 0;background:#12243b;box-shadow:0 -14px 35px #000a}
 body.r9-ui .nyx-mobile-chat-sheet.expanded{height:85dvh}
 body.r9-ui .nyx-mobile-chat-grip{height:18px;flex:none;touch-action:none;cursor:ns-resize}
 body.r9-ui .nyx-mobile-chat-grip:before{content:"";display:block;width:56px;height:4px;border-radius:10px;background:#6b86a5;margin:6px auto}
 body.r9-ui .nyx-mobile-chat-sheet>header{display:flex;align-items:center;justify-content:space-between;gap:9px;padding:7px 11px;border-bottom:1px solid #405b7e}
 body.r9-ui .nyx-mobile-chat-sheet>header button{font-size:12px;min-height:34px;padding:5px 8px;background:#294768;border:1px solid #4b6b8d;border-radius:9px;color:#eef4ff}
 body.r9-ui .nyx-mobile-chat-content{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}
 body.r9-ui .nyx-mobile-chat-content #m3ChatPlaceholder{display:flex!important;flex:1;min-height:0!important;max-height:none!important;overflow:hidden!important;padding:8px 10px}
 body.r9-ui .nyx-mobile-chat-content .m3-chat-messages{min-height:0!important;flex:1!important;overflow-y:auto!important}
 body.r9-ui .nyx-mobile-loot-toasts{display:flex!important;flex-direction:column;gap:5px;position:fixed;right:14px;bottom:55px;z-index:350;max-width:min(340px,40vw);pointer-events:none}
 body.r9-ui .nyx-mobile-loot-toast{padding:9px 11px;border:1px solid #39725b;background:#17372eec;border-radius:10px;color:#96f2bd;font-size:12px;line-height:1.4;box-shadow:0 5px 17px #0008;animation:nyx-mobile-toast .25s ease-out}
 body.r9-ui .nyx-mobile-loot-toast.rare{border-color:#aa8641;background:#47351cec;color:#ffe0a1}
}
.m3-stage2 .m3-monster{position:relative;isolation:isolate}
.m3-r3-cast,.m3-r3-static{position:absolute;inset:0;pointer-events:none;z-index:4;display:flex;align-items:center;justify-content:center;overflow:hidden;border-radius:inherit}
.m3-r3-cast{animation:nyx-r3-cast .65s ease-out forwards;background:radial-gradient(ellipse at center,#c084fc7a,transparent 72%);border:2px solid #c4b5fd}
.m3-r3-cast:before,.m3-r3-cast:after{content:"";position:absolute;inset:12% 10%;border:2px solid #ddd6fe;border-radius:50%;transform:rotate(-18deg);opacity:.8}
.m3-r3-cast:after{transform:rotate(18deg);border-color:#a78bfa}
.m3-r3-cast.is-area{background:linear-gradient(125deg,transparent 15%,#818cf877 45%,transparent 70%);border-color:#93c5fd}
.m3-r3-cast b{position:absolute;top:3px;left:5px;padding:2px 6px;font-size:10px;color:#f5eaff;background:#302052d9;border-radius:5px;z-index:1}
@keyframes nyx-r3-cast{0%{opacity:.15;transform:scale(.84)}22%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1.04)}}
.m3-r3-static{z-index:5;flex-direction:column;gap:0;justify-content:center;background:linear-gradient(90deg,transparent,#0b142b60,transparent)}
.m3-stage2 .m3-r3-static .m3-battle-fx-hit{font-size:clamp(13px,1.2vw,18px);line-height:1.12}
.m3-stage2 .m3-r3-static .m3-battle-fx-hit.crit{font-size:clamp(15px,1.4vw,21px)}
.m3-stage2 .m3-battle-fx-hit.nyx-dmg-basic{--hit-color:#edf2ff}
.m3-stage2 .m3-battle-fx-hit.nyx-dmg-tier4{--hit-color:#60a5fa}
.m3-stage2 .m3-battle-fx-hit.nyx-dmg-tier5{--hit-color:#c084fc}
.m3-stage2 .m3-battle-fx-hit.nyx-dmg-follow{--hit-color:#fb923c}
.m3-stage2 .m3-battle-fx-hit.nyx-dmg-core{--hit-color:#22d3ee}
.m3-stage2 .m3-battle-fx-hit[class*="nyx-dmg-"]{color:var(--hit-color);font-weight:800;text-shadow:0 2px 4px #030712,0 0 5px #030712}
.m3-stage2 .m3-battle-fx-hit[class*="nyx-dmg-"].crit{color:var(--hit-color);font-weight:950;-webkit-text-stroke:.35px #ffd166;text-shadow:0 0 3px #ffd166,0 2px 5px #030712}
.m3-stage2 .m3-battle-fx-hit[class*="nyx-dmg-"].miss{color:#94a3b8;-webkit-text-stroke:0}
.m3-r3-buffs{display:flex;gap:3px;flex-wrap:wrap;margin:3px 0}.m3-r3-buffs[hidden]{display:none}
.m3-r3-buff{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border:1px solid #5a8aaf;border-radius:5px;background:#1c354b;color:#9de7b1;font-size:12px;cursor:help}
.m3-hide-damage .m3-r3-cast,.m3-hide-damage .m3-r3-static{display:none!important}
@media(prefers-reduced-motion:reduce){.m3-r3-cast{animation:none;opacity:.8}}

/* R3.1: desktop command band, two rows, existing server-owned action nodes. */
.r31-display,.r31-challenge{display:none}
@media(min-width:781px){
 body.r9-ui .r9-shell .r650-command>.r650-grid.nyx-centered-controls{
  grid-template-columns:minmax(0,1fr) clamp(120px,10vw,175px) minmax(285px,.78fr) minmax(200px,.53fr) minmax(125px,.32fr)!important;
  grid-template-areas:"skills map combat display challenge"!important;grid-template-rows:auto!important;gap:8px;align-items:stretch!important;
 }
 body.r9-ui .r9-shell .nyx-centered-controls>.r650-skills{max-width:none;width:100%;align-content:center}
 body.r9-ui .r9-shell .nyx-centered-controls>.r650-world-center{width:100%;align-items:stretch}
 body.r9-ui .r9-shell .nyx-centered-controls>.r650-world-center .r650-world-button{width:100%;height:100%;min-height:72px;max-height:none;font-size:clamp(14px,1.15vw,18px)!important;box-shadow:none;white-space:nowrap;padding:5px}
 body.r9-ui .r9-shell .nyx-centered-controls>.r650-combat{grid-template-rows:38px 32px;align-content:center;gap:4px}
 body.r9-ui .r9-shell .nyx-centered-controls .r650-combat-main{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) minmax(0,.7fr);gap:4px;align-items:stretch;min-width:0}
 body.r9-ui .r9-shell .nyx-centered-controls .r650-combat-main #r9Start{grid-column:1;grid-row:1}
 body.r9-ui .r9-shell .nyx-centered-controls .r650-combat-main:not(:has(#r9PartyRoom:not([hidden]),#r9Escape:not([hidden]))) #r9Start{grid-column:1/3}
 body.r9-ui .r9-shell .nyx-centered-controls .r650-combat-main :is(#r9PartyRoom,#r9Escape){grid-column:2;grid-row:1}
 body.r9-ui .r9-shell .nyx-centered-controls .r650-combat-main #r9PowerSave{grid-column:3;grid-row:1}
 body.r9-ui .r9-shell .nyx-centered-controls .r650-combat-main>.r9-cta{width:100%;min-width:0;min-height:38px;height:38px;padding:3px 4px;font-size:clamp(10px,.82vw,13px);white-space:normal;line-height:1.15;margin:0;overflow-wrap:anywhere}
 body.r9-ui .r9-shell .nyx-centered-controls .r650-combat-main:has(#r9Revive:not([hidden])){display:flex;flex-wrap:nowrap}
 body.r9-ui .r9-shell .nyx-centered-controls .r650-combat-main:has(#r9Revive:not([hidden]))>.r9-cta:not([hidden]){flex:1 1 0;width:auto}
 body.r9-ui .r9-shell .nyx-centered-controls .r650-combat-options{display:flex;flex-wrap:nowrap;gap:5px;min-width:0}
 body.r9-ui .r9-shell .nyx-centered-controls .r650-combat-options #r650DifficultySlot{flex:1;min-width:0}
 body.r9-ui .r9-shell .nyx-centered-controls .r650-combat-options #difficultySelect{width:100%;min-width:0;max-width:none}
 body.r9-ui .r9-shell .nyx-centered-controls .r650-combat-options #r9Mode{flex:1;min-width:0;white-space:nowrap}
 body.r9-ui .r9-shell .r31-display{display:grid;grid-area:display;grid-template-rows:38px 32px;gap:4px;align-content:center;min-width:0}
 .r31-loot-row{display:flex;align-items:center;gap:4px;padding:3px;border:1px solid #314964;border-radius:9px;background:#132238;min-width:0}
 .r31-loot-label{font-size:12px;font-weight:700;color:#bcd1e8;white-space:nowrap;padding-left:3px}
 #r31LootChoices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;flex:1;min-width:0}
 #r31LootChoices button{border:1px solid #354e6d;border-radius:6px;background:#20354e;color:#bfd3e9;min-width:0;padding:5px 2px;font-family:inherit;line-height:1.2;cursor:pointer;white-space:nowrap;font-size:12px;font-weight:700}
 #r31LootChoices button.is-on{border-color:#86b8f6;background:#305eac;color:#fff;box-shadow:inset 0 -2px #84b6ff}
 #r31LootChoices button:focus-visible{outline:2px solid #b5d6ff;outline-offset:1px}
 #r31VisualControls{display:grid;grid-template-columns:1.25fr 1fr;gap:4px;min-width:0}
 body.r9-ui .r9-shell #r31VisualControls .r9-cta{display:inline-flex;align-items:center;justify-content:center;width:100%;min-width:0;min-height:32px;max-height:32px;padding:3px 3px;font-size:11px;white-space:nowrap;margin:0;border-radius:8px}
 #r31VisualControls #r9HideDamage.is-on{background:#553141;border-color:#e7798b;color:#ffe4ec}
 body.r9-ui .r9-shell .r31-challenge{display:grid;grid-area:challenge;grid-template-rows:38px 32px;gap:4px;align-content:center;min-width:0}
 body.r9-ui .r9-shell .r31-challenge .r9-cta{width:100%;min-width:0;min-height:0;height:100%;margin:0;padding:3px 4px;font-size:11px;white-space:nowrap}
 body.r9-ui .m3-stage2 #m3DisplayControls{display:none!important}
 body.r9-ui #m3PcLootToggle{display:none!important}
}
@media(min-width:781px) and (max-width:1279px){
 body.r9-ui .r9-shell .r650-command>.r650-grid.nyx-centered-controls{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(120px,.48fr)!important;grid-template-areas:"skills skills map" "combat display challenge"!important;grid-template-rows:auto auto!important;gap:6px}
 body.r9-ui .r9-shell .nyx-centered-controls>.r650-world-center .r650-world-button{min-height:60px}
}
@media(max-width:780px){
 body.r9-ui .r9-shell .r31-display,body.r9-ui .r9-shell .r31-challenge{display:none!important}
 #m3PcLootToggle.is-on{background:#255078;border-color:#639cce;color:#e4f2ff}
 /* Mobile only has toast and hidden; the old permanent loot panel isn't a mode. */
 body.r9-ui .m3-stage2 .m3-info-dock{display:none!important}
}
/* No legacy static damage DOM when floats are off; old caches fail closed. */
.m3-stage2:not(.m3-float-mode) .m3-r3-static{display:none!important}

/* T100 magic swordsman: presentation-only variants, existing visibility rules apply. */
.m3-r3-cast.is-magic-blade{background:linear-gradient(135deg,transparent 20%,#60a5fa55 43%,#dbeafecc 49%,#818cf866 54%,transparent 70%);border-color:#60a5fa}
.m3-r3-cast.is-magic-blade:before,.m3-r3-cast.is-magic-blade:after{inset:42% 3%;border-radius:45%;border-color:#bfdbfe;transform:rotate(-30deg)}
.m3-r3-cast.is-magic-blade:after{transform:rotate(-42deg);border-color:#818cf8}
.m3-r3-cast.is-magic-rune{background:radial-gradient(circle,#ede9fe99 0%,#8b5cf655 30%,transparent 68%);border-color:#c084fc}
.m3-r3-cast.is-magic-rune:before{inset:9%;border:3px dashed #c4b5fd;transform:rotate(24deg)}
.m3-r3-cast.is-magic-rune:after{inset:22%;border:2px double #e9d5ff;transform:rotate(-24deg)}

.m3-resonance progress{width:100%;height:8px;accent-color:#5eead4;}
.m3-resonance small{color:#a5e6dc;}
/* 1.1.0 fifth continuous attacks: presentation only; same authoritative hit events. */
.m3-r3-cast.fx110{--fx:#bfdbfe;--fx2:#60a5fa;background:radial-gradient(ellipse at center,color-mix(in srgb,var(--fx2) 42%,transparent),transparent 72%);border-color:var(--fx);animation:nyx110-flash .65s ease-out forwards;box-shadow:inset 0 0 15px var(--fx2)}
.m3-r3-cast.fx110:before,.m3-r3-cast.fx110:after{border-color:var(--fx);opacity:.9;animation:nyx110-wave .6s ease-out forwards}
.m3-r3-cast.fx110-w_oath{--fx:#fde68a;--fx2:#ca8a04}.m3-r3-cast.fx110-w_oath:before{inset:8% 22%;border-radius:12% 12% 48% 48%;border-width:4px}.m3-r3-cast.fx110-w_oath:after{inset:45% 6%;border-radius:0;transform:rotate(-35deg)}
.m3-r3-cast.fx110-w_burst{--fx:#fecaca;--fx2:#dc2626;background:linear-gradient(135deg,transparent 25%,#ef444488 47%,#fff7edbb 50%,transparent 67%)}.m3-r3-cast.fx110-w_burst:before,.m3-r3-cast.fx110-w_burst:after{inset:43% 0;border-width:4px;transform:rotate(-35deg);border-radius:12%}.m3-r3-cast.fx110-w_burst:after{transform:rotate(35deg)}
.m3-r3-cast.fx110-m_holy{--fx:#fef3c7;--fx2:#facc15;background:conic-gradient(from 0deg,transparent,#fef3c788,transparent,#fde68a88,transparent)}.m3-r3-cast.fx110-m_holy:before{inset:9%;border:4px double var(--fx)}.m3-r3-cast.fx110-m_holy:after{inset:22% 43%;border-radius:4px;transform:rotate(0)}
.m3-r3-cast.fx110-m_element{--fx:#ddd6fe;--fx2:#a855f7;background:conic-gradient(#60a5fa66,#fb718566,#fbbf2466,#34d39966,#60a5fa66)}.m3-r3-cast.fx110-m_element:before{inset:16%;border-radius:4px;transform:rotate(45deg);border-width:3px}.m3-r3-cast.fx110-m_element:after{inset:28%;border-radius:4px;transform:rotate(-15deg)}
.m3-r3-cast.fx110-a_elf{--fx:#bbf7d0;--fx2:#10b981;background:repeating-linear-gradient(145deg,transparent 0 15%,#6ee7b777 16% 18%,transparent 20% 30%)}.m3-r3-cast.fx110-a_elf:before,.m3-r3-cast.fx110-a_elf:after{inset:35% 3%;border-radius:50% 0;border-width:3px;transform:rotate(-30deg)}
.m3-r3-cast.fx110-a_shadow{--fx:#c7d2fe;--fx2:#4338ca}.m3-r3-cast.fx110-a_shadow:before{inset:14%;border:3px dashed var(--fx)}.m3-r3-cast.fx110-a_shadow:after{inset:45% 5%;border-radius:0;transform:rotate(0deg);border-width:3px}
.m3-r3-cast.fx110-t_shadow{--fx:#e9d5ff;--fx2:#7c3aed;background:linear-gradient(115deg,transparent 14%,#a78bfa77 35%,transparent 51%,#c4b5fd66 65%,transparent 80%)}.m3-r3-cast.fx110-t_shadow:before,.m3-r3-cast.fx110-t_shadow:after{inset:25% 4%;border-radius:0 80%;transform:rotate(40deg)}.m3-r3-cast.fx110-t_shadow:after{transform:rotate(-40deg)}
.m3-r3-cast.fx110-t_execute{--fx:#fda4af;--fx2:#be123c}.m3-r3-cast.fx110-t_execute:before{inset:15% 28%;border-radius:5px;transform:rotate(45deg);border-width:4px}.m3-r3-cast.fx110-t_execute:after{inset:4%;border:3px dashed var(--fx)}
.m3-r3-cast.fx110-ms_blade{--fx:#a5f3fc;--fx2:#2563eb;background:linear-gradient(45deg,transparent 35%,#67e8f988 48%,transparent 55%),linear-gradient(-45deg,transparent 35%,#818cf888 48%,transparent 55%)}.m3-r3-cast.fx110-ms_blade:before,.m3-r3-cast.fx110-ms_blade:after{inset:45% 2%;border-radius:3px;transform:rotate(45deg)}.m3-r3-cast.fx110-ms_blade:after{transform:rotate(-45deg)}
.m3-r3-cast.fx110-ms_rune{--fx:#f5d0fe;--fx2:#a21caf;background:repeating-conic-gradient(transparent 0deg 35deg,#e879f966 36deg 45deg)}.m3-r3-cast.fx110-ms_rune:before{inset:7%;border:4px double var(--fx)}.m3-r3-cast.fx110-ms_rune:after{inset:25%;border:3px dashed var(--fx);border-radius:8px;transform:rotate(45deg)}
@keyframes nyx110-flash{0%{opacity:.2}22%{opacity:1}100%{opacity:0}}
@keyframes nyx110-wave{0%{scale:.7;opacity:.2}28%{opacity:1}100%{scale:1.15;opacity:0}}
@media(prefers-reduced-motion:reduce){.m3-r3-cast.fx110,.m3-r3-cast.fx110:before,.m3-r3-cast.fx110:after{animation:none;opacity:.7}}

/* Wind pursuit: separate compact column within the existing damage burst. */
.m3-stage2 .m3-battle-fx-burst.has-wind-follow{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:4px;align-items:center;justify-items:center}
.m3-stage2 .nyx-dmg-normal-stack,.m3-stage2 .nyx-dmg-follow-stack{display:flex;flex-direction:column;gap:2px;min-width:0;width:100%;align-items:center;justify-content:center}
.m3-stage2 .m3-battle-fx-hit.nyx-dmg-wind-follow1{--hit-color:#8cf4bd;font-style:italic;text-shadow:0 1px 4px #061d13,0 0 4px #2d956b}
.m3-stage2 .m3-battle-fx-hit.nyx-dmg-wind-follow2{--hit-color:#91dbff;font-style:italic;text-shadow:0 1px 4px #071b2e,0 0 4px #3178ae}
.m3-stage2 .has-wind-follow .m3-battle-fx-hit{font-size:clamp(12px,1.08vw,19px)}
.m3-stage2 .has-wind-follow .nyx-dmg-follow-stack .m3-battle-fx-hit{font-size:clamp(12px,1.18vw,21px);font-weight:900}
@media(max-width:780px){.m3-stage2 .m3-battle-fx-burst.has-wind-follow{grid-template-columns:minmax(0,1fr);gap:1px}.m3-stage2 .nyx-dmg-follow-stack{flex-direction:row;flex-wrap:wrap}.m3-stage2 .nyx-dmg-follow-stack .m3-battle-fx-hit{width:auto;flex:0 0 auto}}
