
/* Character Command owns its internal scroll; the top chrome belongs to the host. */
#statsBack{
  --s3-modal-top:max(12px,var(--ah-safe-top,0px));
  box-sizing:border-box;
  align-items:stretch;
  padding:var(--s3-modal-top) max(10px,var(--ah-safe-right,0px))
          max(10px,var(--ah-safe-bottom,0px)) max(10px,var(--ah-safe-left,0px));
  overscroll-behavior:contain;
}
@media(max-width:650px){
  #statsBack.s3-telegram-host{
    /* Telegram's floating Back / menu overlay is not part of the CSS env safe area.
       Reserve a genuine interaction zone instead of shifting controls under it. */
    --s3-modal-top:max(86px,var(--tg-content-safe-area-inset-top,0px),calc(var(--ah-safe-top,0px) + 56px));
  }
}
#statsBack .ah-panel{
  height:100%;
  min-height:0;
  max-height:100%;
  box-sizing:border-box;
  background:#070e17;
  border:1px solid #31516a;
  box-shadow:0 18px 60px #000b;
}
#statsBack #statsRoot.ah-stats-root{padding:0!important;display:flex;flex-direction:column;overflow:hidden;flex:1;min-height:0}
#statsBack .s3-shell{display:flex;flex-direction:column;height:100%;min-height:0;background:linear-gradient(140deg,#0e1e30,#060d17)}
#statsBack .s3-tabs{flex:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:5px 8px 7px;gap:5px;border-bottom:1px solid #233e51;background:#081421}
#statsBack .s3-tabs button{min-height:44px;position:relative;border:1px solid transparent;background:transparent;color:#9ab3c7;font-size:11px;letter-spacing:.10em;font-weight:800;border-radius:8px;touch-action:manipulation;transition:background .2s ease,color .2s ease}
#statsBack .s3-tabs button[aria-selected="true"]{background:linear-gradient(#19374a,#102639);border-color:#396b84;color:#eff9ff;box-shadow:inset 0 1px 0 #65d9ff38}
#statsBack .s3-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:9px 11px calc(18px + var(--ah-safe-bottom,0px) + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:9px}
#statsBack .s3-stage{position:relative;flex:none;height:clamp(150px,27dvh,260px);overflow:hidden;border:1px solid #35546b;border-radius:17px;background:radial-gradient(ellipse at 50% 45%,#254a65 0%,#0a2032 50%,#050d18 88%);display:flex;align-items:center;justify-content:center}
#statsBack .s3-stage:before{position:absolute;content:"";inset:0;background:linear-gradient(180deg,#0b1b2900 45%,#030911aa 100%),repeating-linear-gradient(0deg,transparent 0 49px,#b9ecff05 50px 51px);pointer-events:none}
#statsBack .s3-portrait{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:50% 42%;filter:drop-shadow(0 10px 16px #000a);pointer-events:none}
#statsBack .s3-stage-title{position:absolute;bottom:0;left:0;right:0;display:flex;align-items:end;justify-content:space-between;gap:8px;padding:20px 12px 9px;background:linear-gradient(transparent,#030b15eb);color:#f4f8ff}
#statsBack .s3-stage-title strong{font-size:18px;text-shadow:0 1px 4px #000}
#statsBack .s3-stage-title b{font-size:11px;color:#80dfff;white-space:nowrap}
#statsBack .s3-power{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:8px;background:linear-gradient(115deg,#102c41,#0a1b2c);border:1px solid #315975;border-radius:12px;padding:9px 10px;min-height:70px}
#statsBack .s3-power span{font-size:10px;letter-spacing:.12em;font-weight:800;color:#a3d3e6}
#statsBack .s3-power strong{font-size:28px;line-height:1.05;color:#f1fbff;font-variant-numeric:tabular-nums;grid-column:1;grid-row:2}
#statsBack .s3-power button{border:1px solid #9f7641;background:#52381b;color:#fce0ae;border-radius:9px;min-height:44px;padding:0 8px;font-size:10px;font-weight:900;grid-column:2;grid-row:1 / span 2;white-space:nowrap}
#statsBack .s3-box{border:1px solid #294960;background:linear-gradient(#102234,#0a1726);border-radius:13px;padding:11px 12px;min-width:0}
#statsBack .s3-label{font-size:10px;letter-spacing:.13em;font-weight:900;color:#89d4f7;margin-bottom:5px}
#statsBack .s3-box h3{font-size:16px;color:#f0f7ff;margin:2px 0 4px}
#statsBack .s3-box p{font-size:12px;line-height:1.5;color:#b7cadc;margin:5px 0}
#statsBack .s3-bars{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#statsBack .s3-bar-row{padding:9px;border:1px solid #27445e;border-radius:11px;background:#0e2132;min-width:0}
#statsBack .s3-bar-row>div:first-child{display:flex;justify-content:space-between;gap:5px;font-size:11px;color:#dce9f4}
#statsBack .s3-bar-row span{color:#a9bed2;font-variant-numeric:tabular-nums}
#statsBack .s3-track{margin-top:8px;height:6px;background:#04101e;border-radius:10px;overflow:hidden}
#statsBack .s3-track i{display:block;height:100%;background:linear-gradient(90deg,#32799c,#86dbff);border-radius:10px}
#statsBack .s3-combat{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
#statsBack .s3-combat div{padding:9px;background:#081624;border:1px solid #203c51;border-radius:9px}
#statsBack .s3-combat span{display:block;font-size:10px;color:#9ab9cb}
#statsBack .s3-combat strong{display:block;margin-top:4px;font-size:15px;color:#f1f8fd}
#statsBack .s3-more{width:100%;min-height:44px;text-align:left;border:1px solid #37607b;background:#0e2639;color:#bfe7fa;border-radius:10px;padding:0 12px;font-size:12px;font-weight:750;margin-top:9px;display:flex;justify-content:space-between;align-items:center}
#statsBack .s3-more span{font-size:20px}
#statsBack .s3-build-title{display:flex;gap:10px;justify-content:space-between;align-items:center;color:#99cddd;font-size:11px;letter-spacing:.12em;font-weight:900;padding:8px 3px}
#statsBack .s3-build-title strong{font-size:30px;color:#ffe2ad}
#statsBack .s3-attributes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#statsBack .s3-attribute{display:flex;align-items:stretch;justify-content:space-between;min-width:0;min-height:92px;border-radius:11px;padding:8px;border:1px solid #2e536d;background:radial-gradient(at 0 0,#1b374d,#0d1d2c 80%);box-shadow:inset 0 1px 0 #a1d6ff10}
#statsBack .s3-attr-info{min-width:0;flex:1;border:0;background:none;text-align:left;color:#ecf7ff;padding:2px 5px;min-height:44px}
#statsBack .s3-attr-info span{display:block;font-size:11px;letter-spacing:.1em;color:#7fe1ff;font-weight:900}
#statsBack .s3-attr-info strong{display:block;font-size:25px;margin:4px 0;font-variant-numeric:tabular-nums;line-height:1.05}
#statsBack .s3-attr-info small{font-size:10px;color:#adc6d6;text-transform:capitalize}
#statsBack .s3-plus{flex:0 0 44px;align-self:center;width:44px;height:44px;position:relative;z-index:2;touch-action:manipulation;border:1px solid #e6a45a;background:linear-gradient(#b98240,#755023);border-radius:10px;color:#fff5db;font-size:27px;font-weight:800;cursor:pointer}
#statsBack .s3-plus:disabled{opacity:.36;cursor:default;filter:saturate(.45)}
#statsBack .s3-primary{display:block;width:100%;min-height:44px;touch-action:manipulation;margin-top:10px;border:1px solid #d3a25d;border-radius:10px;color:#16130b;background:linear-gradient(#ffd28a,#cf9250);font-size:12px;font-weight:900}
#statsBack .s3-primary:disabled{opacity:.5;background:#4e4c48;color:#ddd}
#statsBack .s3-sheet-back{position:absolute;inset:0;z-index:5;display:flex;align-items:flex-end;background:#010810c9}
#statsBack .s3-sheet{display:flex;flex-direction:column;width:100%;max-height:82%;min-height:25%;background:#0b1a2a;border:1px solid #45728d;border-radius:17px 17px 0 0;overflow:hidden}
#statsBack .s3-sheet-head{display:flex;align-items:center;justify-content:space-between;padding:12px 15px;color:#c2e9fb;border-bottom:1px solid #31516a;font-size:12px;letter-spacing:.1em}
#statsBack .s3-sheet-head button{width:44px;height:44px;border:1px solid #35536c;background:#172b40;color:white;border-radius:9px;font-size:17px}
#statsBack .s3-sheet-body{overflow:auto;padding:12px;overscroll-behavior:contain}
#statsBack .s3-sheet-stat{border-bottom:1px solid #29465a;padding:10px 0}
#statsBack .s3-sheet-stat h3{font-size:16px;color:#bfeaff}
#statsBack .s3-sheet-stat p{font-size:12px;color:#c5d2dd;line-height:1.45}
#statsBack .s3-notice{padding:9px 36px 9px 12px;border:1px solid #527f86;background:#113333;color:#d5f3e9;border-radius:10px;font-size:12px;box-shadow:0 6px 24px #0008}
#statsBack .s3-legacy-power{justify-content:initial;min-height:70px}
#statsBack .s3-legacy-power strong{margin:0}
#statsBack .s3-sheet-back .ahs-card{margin-bottom:10px}
#statsBack .s3-shell button:focus-visible{outline:2px solid #e8b269;outline-offset:2px}
#statsBack .ah-panel{position:relative}
@media(max-width:350px){#statsBack .s3-body{padding:9px}#statsBack .s3-attribute{min-height:88px}#statsBack .s3-attr-info strong{font-size:21px}}
@media(max-height:670px){#statsBack .s3-stage{height:155px}}
@media(prefers-reduced-motion:reduce){#statsBack .s3-shell *,#statsBack .s3-shell *:before{animation:none!important;transition:none!important}}

/* Character Command visual pass: modal chrome and restrained hierarchy */
#statsBack .ah-panel-hd{gap:8px;padding:6px 9px;min-height:56px;background:linear-gradient(#101e2e,#091523);border-bottom:1px solid #2b4c63}
#statsBack .ah-panel-hd .ah-title{font-size:13px;letter-spacing:.14em;font-weight:900;white-space:nowrap;color:#eff6fc}
#statsBack .s3-header-actions{display:flex;gap:5px;align-items:center;margin-left:auto;min-width:0}
#statsBack .ah-panel-hd #btnStatsSync,#statsBack .ah-panel-hd #btnStatsRefresh{touch-action:manipulation;min-width:44px;min-height:44px;width:44px;height:44px;display:grid;place-items:center;padding:0;border-radius:9px;background:#102538;border:1px solid #31516a;color:#d3eafb}
#statsBack .ah-panel-hd .ah-x{flex:none;min-width:44px;min-height:44px;touch-action:manipulation}
#statsBack .s3-tabs button[aria-selected="true"]:after{content:"";position:absolute;left:20%;right:20%;bottom:2px;height:2px;border-radius:3px;background:#65d9ff}
#statsBack .s3-tabs button:active,#statsBack .s3-more:active,#statsBack .s3-plus:active{transform:translateY(1px);filter:brightness(1.12)}
#statsBack .s3-stage:after{content:"";pointer-events:none;position:absolute;inset:0;background:linear-gradient(90deg,#02091463,transparent 22% 76%,#02091457)}
#statsBack .s3-stage-title{z-index:1}
#statsBack .s3-power.is-empty button{border-color:#39556a;color:#aabed0;background:#112438}
#statsBack .s3-box.s3-next-goal{border-left:2px solid #65d9ff77}
#statsBack .s3-next-goal .s3-goal-missing{display:inline-block;color:#d3e8f7;font-size:11px;font-weight:800;margin-top:2px}
#statsBack .s3-attribute:focus-within{border-color:#65d9ff80}
#statsBack .s3-training-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
#statsBack .s3-training-rank{color:#eff6fc;font-weight:900;font-variant-numeric:tabular-nums;white-space:nowrap}
#statsBack .s3-training-track{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:4px;margin:9px 0 11px}
#statsBack .s3-training-track i{display:block;height:5px;background:#183447;border:1px solid #28516b;border-radius:4px}
#statsBack .s3-training-track i.is-complete{background:#63b4d7;border-color:#72c9ee}
#statsBack .s3-training-note{font-size:12px;color:#bdd0df;line-height:1.35;margin:5px 0 9px}
#statsBack .s3-training-sub{font-size:10px;letter-spacing:.10em;font-weight:850;color:#8bcbe6;margin:11px 0 6px}
#statsBack .s3-training-chips{display:flex;flex-wrap:wrap;gap:5px}
#statsBack .s3-training-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid #304e65;border-radius:7px;padding:6px 8px;background:#081725;font-size:11px;color:#d5e6f0;font-variant-numeric:tabular-nums}
#statsBack .s3-training-chip b{color:#eff6fc}
#statsBack .s3-training-meta{font-size:11px;color:#9cb8cd;margin-top:8px}
#statsBack .s3-feedback{position:absolute;bottom:calc(9px + env(safe-area-inset-bottom,0px));left:12px;right:12px;z-index:4;pointer-events:none}
#statsBack .s3-feedback .s3-notice{pointer-events:auto;margin:0}
#statsBack .s3-feedback-close{position:absolute;right:0;top:0;min-width:44px;min-height:44px;background:transparent;border:0;color:#e0f6f1;font-size:16px;pointer-events:auto}
#statsBack .s3-legacy-focus{border-color:#426b85;background:linear-gradient(135deg,#122d41,#091727 85%);position:relative}
#statsBack .s3-legacy-focus h3{font-size:19px;line-height:1.22}
#statsBack .s3-legacy-meter{height:5px;background:#081523;border-radius:7px;overflow:hidden;margin:12px 0 5px}
#statsBack .s3-legacy-meter i{display:block;height:100%;background:linear-gradient(90deg,#32647d,#65d9ff)}
#statsBack .s3-legacy-wall{border-left:2px solid #588eab}
#statsBack .s3-wall-floor{font-size:32px;letter-spacing:.02em;line-height:1.1;font-weight:900;color:#eff6fc;font-variant-numeric:tabular-nums;margin:4px 0 6px}
#statsBack .s3-wall-meta{font-size:12px;color:#b6cbda}
#statsBack .s3-legacy-power{grid-template-columns:1fr auto}
#statsBack .s3-legacy-power strong{grid-column:2;grid-row:1;font-size:28px}
#statsBack .s3-legacy-power span{grid-column:1;grid-row:1}
#statsBack .s3-more{touch-action:manipulation}
@media(max-width:350px){#statsBack .s3-body{padding:8px 9px}#statsBack .s3-attribute{min-height:88px}#statsBack .s3-attr-info strong{font-size:21px}#statsBack .s3-power button{font-size:9px;padding-inline:6px}#statsBack .ah-panel-hd .ah-title{font-size:12px;letter-spacing:.08em}}
@media(max-height:670px){#statsBack .s3-stage{height:155px}}
@media(prefers-reduced-motion:reduce){#statsBack .s3-shell *,#statsBack .s3-shell *:before,#statsBack .s3-shell *:after{animation:none!important;transition:none!important}}

/* WORLD IDENTITY P0 / PASS A+B — strictly scoped, CSS-first art layers.
   No rendered UI or fake data. Decorative layers never own pointer events. */
#statsBack{
  background:linear-gradient(180deg,rgba(3,8,14,.985),rgba(4,10,18,.975));
  isolation:isolate;
}
#statsBack .ah-panel{
  border-radius:14px 14px 10px 10px;
  background:#07121d;
  border-color:rgba(117,179,202,.34);
  box-shadow:0 14px 35px #000b,inset 0 1px rgba(155,214,237,.13);
}
#statsBack .ah-panel-hd{
  border-bottom:1px solid rgba(117,191,223,.29);
  background:linear-gradient(170deg,#192d3b,#0b1b29 68%,#071420);
  box-shadow:inset 0 1px rgba(161,221,240,.12);
}
#statsBack .s3-shell{
  --s3-edge:rgba(107,163,193,.30);
  --s3-hull:#112638;
  --s3-cyan:#65d9ff;
  position:relative;
  isolation:isolate;
  background:linear-gradient(#071420,#060d16);
}
#statsBack .s3-tabs{z-index:2;position:relative;box-shadow:inset 0 -1px #7fe0ff12}
#statsBack .s3-body{position:relative;isolation:isolate}
#statsBack .s3-body::before{
  position:fixed;content:"";pointer-events:none;
  inset:auto 13px 12px 13px;height:min(63vh,600px);
  z-index:-1;opacity:.24;
  background:linear-gradient(90deg,#040b11 0 7%,transparent 7% 93%,#040b11 93%),
    repeating-linear-gradient(90deg,transparent 0 51px,#77bedb0a 52px,#77bedb0a 53px,transparent 54px 91px);
}
/* One dramatic plate lives inside the existing hero frame; real equipped
   character keeps its own <img> and layering. */
#statsBack .s3-shell[data-s3-view="overview"] .s3-stage{
  border-radius:12px;
  border:1px solid rgba(126,198,226,.40);
  background:
    radial-gradient(ellipse 22% 82% at 50% 44%,rgba(40,189,235,.32),transparent 86%),
    linear-gradient(90deg,#07121b 0 7%,#1a3749 7.4%,#071a29 9.2%,transparent 13% 87%,#071a29 91%,#1a3749 92.6%,#07121b 94%),
    repeating-linear-gradient(90deg,transparent 0 22%,rgba(100,164,190,.12) 22.1% 22.5%,transparent 23% 26%),
    linear-gradient(180deg,#031019 0%,#0b2636 48%,#08121d 100%);
  box-shadow:inset 0 1px #9ad4ed37,inset 0 -16px 28px #03080fd9,0 8px 25px #0007;
}
#statsBack .s3-shell[data-s3-view="overview"] .s3-stage::before{
  content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
  background:
    linear-gradient(90deg,rgba(111,191,221,.33),transparent 2%) 10% 50% / 2px 78% no-repeat,
    linear-gradient(90deg,rgba(111,191,221,.33),transparent 2%) 90% 50% / 2px 78% no-repeat,
    repeating-linear-gradient(0deg,transparent 0 39px,#a9e6ff07 40px 41px);
}
#statsBack .s3-shell[data-s3-view="overview"] .s3-stage::after{
  content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
  background:radial-gradient(ellipse at 50% 80%,transparent 0 24%,#030b159c 84%);
}
#statsBack .s3-stage .s3-portrait{z-index:1;object-fit:contain;object-position:50% 46%}
#statsBack .s3-stage .s3-stage-title{z-index:2;box-shadow:inset 0 -1px #8dd7ec1c}
#statsBack .s3-shell[data-s3-view="overview"] .s3-power{
  border-radius:9px;border-color:rgba(117,180,202,.50);
  background:linear-gradient(120deg,#15384d 0%,#0a1d2d 55%,#11212d);
  box-shadow:inset 0 1px #9bd5ea24,0 3px 8px #0004;
}
#statsBack .s3-shell[data-s3-view="overview"] .s3-next-goal{
  border-radius:9px;
  border:1px solid #46728c;
  border-left:3px solid #68cbe7;
  background:linear-gradient(120deg,#112d3f,#0a1a29 78%);
}
#statsBack .s3-shell[data-s3-view="overview"] .s3-next-goal .s3-label::before{
  content:"▰";font-size:10px;color:#65d9ff;margin-right:8px;
}
#statsBack .s3-shell[data-s3-view="overview"] .s3-bar-row,
#statsBack .s3-shell[data-s3-view="overview"] .s3-combat div{
  border-radius:7px;background:linear-gradient(165deg,#102638,#071725);
}
#statsBack .s3-shell[data-s3-view="overview"] .s3-box:not(.s3-next-goal){
  border-radius:10px;
  background:linear-gradient(165deg,#112a3c,#081622);
}
/* Prepare a common mechanical vocabulary without redesigning Build / Legacy
   until the Overview vertical-slice screenshot is approved. */
#statsBack .s3-more{border-radius:8px;border-color:rgba(104,173,203,.38)}
#statsBack .s3-shell button:focus-visible{outline:2px solid #65d9ff;outline-offset:2px}
@media(max-width:350px){
 #statsBack .s3-stage{height:clamp(143px,26dvh,210px)}
}
@media(prefers-reduced-motion:reduce){
 #statsBack .s3-shell *,#statsBack .s3-shell *::before,#statsBack .s3-shell *::after{animation:none!important;transition:none!important}
}

/* World Identity V1 — actual optimized environment plates.
   All live text, stat mutations and equipped player art stay in DOM.
   Backgrounds are ornamental and have no hit-testing surface. */
#statsBack .s3-shell{
  --s3-world-plate:none;
  --s3-world-position:center top;
}
#statsBack .s3-shell[data-s3-view="overview"]{
  --s3-world-plate:url("/assets/stats3/world_identity/overview_identity_chamber_v1.webp");
  --s3-world-position:center 27%;
}
#statsBack .s3-shell[data-s3-view="build"]{
  --s3-world-plate:url("/assets/stats3/world_identity/build_augmentation_console_v1.webp");
  --s3-world-position:center 18%;
}
#statsBack .s3-shell[data-s3-view="legacy"]{
  --s3-world-plate:url("/assets/stats3/world_identity/legacy_signal_archive_v1.webp");
  --s3-world-position:center 22%;
}
/* The selected plate belongs to the existing scrolling scene, not the page
   or modal. An opaque scrim preserves text contrast and hides unmapped areas. */
#statsBack .s3-shell .s3-body{
  background-image:linear-gradient(180deg,rgba(4,11,18,.80),rgba(4,11,18,.72) 44%,rgba(4,11,18,.61) 100%),var(--s3-world-plate);
  background-position:center,var(--s3-world-position);
  background-size:cover,cover;
  background-repeat:no-repeat;
  background-attachment:local,local;
}
#statsBack .s3-shell .s3-body::before{display:none}
/* Overview is the one place where the environment and the equipped avatar
   deliberately meet. Center ornament stays subordinate to live portrait. */
#statsBack .s3-shell[data-s3-view="overview"] .s3-stage{
  background-image:
    radial-gradient(ellipse at 50% 42%,rgba(4,13,22,.32),rgba(4,13,22,.02) 40%,rgba(4,13,22,.33) 100%),
    url("/assets/stats3/world_identity/overview_identity_chamber_v1.webp");
  background-size:cover,cover;
  background-position:center,center 31%;
  background-repeat:no-repeat;
}
#statsBack .s3-shell[data-s3-view="overview"] .s3-stage::before{
  background:linear-gradient(180deg,rgba(1,7,13,.15),transparent 48%,rgba(1,7,13,.28));
}
#statsBack .s3-shell[data-s3-view="overview"] .s3-stage::after{
  background:radial-gradient(ellipse at 50% 46%,transparent 12%,rgba(3,9,15,.34) 90%);
}
#statsBack .s3-shell[data-s3-view="overview"] .s3-portrait{
  z-index:1;
  filter:drop-shadow(0 7px 16px rgba(0,0,0,.85));
}
/* Build: a real machinery bay behind independently clickable 2x3 stat modules. */
#statsBack .s3-shell[data-s3-view="build"] .s3-attribute{
  background:linear-gradient(110deg,rgba(19,44,61,.96),rgba(7,19,29,.94));
  border:1px solid rgba(121,171,194,.48);
  border-radius:8px;
  box-shadow:inset 0 1px rgba(191,226,238,.13),inset 2px 0 rgba(84,150,175,.19),0 3px 9px rgba(0,0,0,.43);
}
#statsBack .s3-shell[data-s3-view="build"] .s3-training{
  background:linear-gradient(145deg,rgba(13,34,49,.97),rgba(4,14,24,.95));
  border-color:rgba(117,180,208,.48);
  border-radius:9px;
  box-shadow:inset 0 1px rgba(156,219,236,.14),0 4px 12px rgba(0,0,0,.34);
}
#statsBack .s3-shell[data-s3-view="build"] .s3-more{
  background:linear-gradient(100deg,rgba(16,43,61,.96),rgba(7,24,37,.94));
}
/* Legacy: monumental archive is visible in negative space, while records are
   strong opaque reading surfaces sourced solely from existing progression. */
#statsBack .s3-shell[data-s3-view="legacy"] .s3-legacy-power,
#statsBack .s3-shell[data-s3-view="legacy"] .s3-legacy-focus,
#statsBack .s3-shell[data-s3-view="legacy"] .s3-legacy-wall{
  background:linear-gradient(115deg,rgba(10,30,44,.94),rgba(5,18,29,.88));
  border-radius:9px;
  border-color:rgba(124,186,211,.50);
  box-shadow:inset 0 1px rgba(175,222,237,.13),0 5px 14px rgba(0,0,0,.37);
}
#statsBack .s3-shell[data-s3-view="legacy"] .s3-legacy-focus{border-left:3px solid rgba(94,203,238,.65)}
#statsBack .s3-shell[data-s3-view="legacy"] .s3-legacy-wall{border-left:3px solid rgba(111,173,196,.80)}
#statsBack .s3-shell[data-s3-view="legacy"] .s3-more{
  background:linear-gradient(115deg,rgba(12,39,56,.96),rgba(5,20,33,.91));
  border-color:rgba(126,193,216,.58);
}
/* Prevent a failed image load from ever replacing the dark structural fallback. */
@media(prefers-reduced-motion:reduce){
  #statsBack .s3-shell .s3-body{background-attachment:scroll,scroll}
}

/* FINAL PREMIUM MATERIAL PASS v1 — decor only, no data/action changes.
   Host chrome remains protected at the validated PR #74 inset. */
#statsBack .ah-panel{
  box-shadow:0 16px 48px rgba(0,0,0,.80),inset 0 1px rgba(209,239,251,.16);
  border:1px solid rgba(116,178,201,.47);
}
#statsBack .ah-panel-hd{
  position:relative;
  background:linear-gradient(165deg,#1b3141,#0b1c2b 75%);
  box-shadow:inset 0 1px rgba(187,226,241,.18),inset 0 -1px rgba(41,104,130,.35);
}
#statsBack .ah-panel-hd:before{
  content:"";position:absolute;inset:0 auto 0 0;width:3px;
  background:linear-gradient(transparent 9%,rgba(116,204,235,.74) 48%,transparent 94%);
  pointer-events:none;
}
#statsBack .ah-panel-hd #btnStatsSync,
#statsBack .ah-panel-hd #btnStatsRefresh,
#statsBack .ah-panel-hd .ah-x{
  box-shadow:inset 0 1px rgba(174,225,241,.15),0 2px 9px rgba(0,0,0,.34);
}
#statsBack .ah-panel-hd button:active{filter:brightness(1.2)}
#statsBack .s3-tabs{
  background:linear-gradient(180deg,rgba(8,22,34,.99),rgba(4,15,26,.99));
  border-bottom:1px solid rgba(95,169,201,.33);
}
#statsBack .s3-tabs button[aria-selected="true"]{
  background:linear-gradient(155deg,rgba(26,64,84,.98),rgba(15,41,57,.98));
  border-color:rgba(110,204,234,.53);
  box-shadow:inset 0 1px rgba(176,237,252,.22),0 2px 10px rgba(1,6,14,.45);
}
#statsBack .s3-shell[data-s3-view="overview"] .s3-stage{
  border-color:rgba(120,194,221,.65);
  box-shadow:inset 0 1px rgba(205,242,255,.22),inset 0 -17px 26px #030b16ae,0 6px 20px #0009;
}
#statsBack .s3-shell[data-s3-view="overview"] .s3-power{
  border-color:rgba(125,192,218,.64);
  box-shadow:inset 0 1px rgba(202,238,251,.17),inset 3px 0 rgba(92,178,214,.15),0 5px 17px rgba(0,0,0,.46);
}
#statsBack .s3-power button,
#statsBack .s3-plus,
#statsBack .s3-primary:not(:disabled){
  background:linear-gradient(180deg,#d4a05a 0%,#ac773c 44%,#69441f 100%);
  border-color:#e8b36c;
  color:#fff6e6;
  box-shadow:inset 0 1px rgba(255,239,194,.45),inset 0 -2px rgba(47,27,8,.3),0 2px 9px rgba(0,0,0,.42);
}
#statsBack .s3-primary:not(:disabled){
  background:linear-gradient(180deg,#ffd68e,#e7af66 48%,#c38b4d);
  color:#251a0b;
}
#statsBack .s3-plus:disabled{background:linear-gradient(#7a6147,#40372d);box-shadow:none;opacity:.42}
#statsBack .s3-shell[data-s3-view="build"] .s3-attribute{
  border:1px solid rgba(129,185,209,.58);
  border-left:2px solid rgba(87,158,190,.48);
  background:linear-gradient(135deg,rgba(27,58,77,.97),rgba(9,28,43,.97) 65%,rgba(5,20,32,.98));
  box-shadow:inset 0 1px rgba(204,241,251,.19),inset 0 -1px rgba(9,16,24,.8),0 4px 12px rgba(0,0,0,.43);
}
#statsBack .s3-shell[data-s3-view="build"] .s3-attribute:focus-within{
  border-color:rgba(138,217,244,.85);
}
#statsBack .s3-shell[data-s3-view="build"] .s3-training{
  border-color:rgba(127,191,212,.59);
  box-shadow:inset 0 1px rgba(205,238,249,.16),inset 2px 0 rgba(80,157,190,.24),0 6px 19px rgba(0,0,0,.52);
}
#statsBack .s3-training-chip{
  background:linear-gradient(160deg,rgba(16,42,58,.96),rgba(5,19,30,.98));
  border-color:rgba(103,161,186,.48);
}
#statsBack .s3-shell[data-s3-view="legacy"] .s3-legacy-power,
#statsBack .s3-shell[data-s3-view="legacy"] .s3-legacy-focus,
#statsBack .s3-shell[data-s3-view="legacy"] .s3-legacy-wall{
  border-color:rgba(139,198,217,.58);
  box-shadow:inset 0 1px rgba(192,232,245,.19),0 7px 18px rgba(0,0,0,.51);
}
#statsBack .s3-shell[data-s3-view="legacy"] .s3-legacy-meter{
  background:#03121c;border:1px solid rgba(82,147,177,.21);
}
#statsBack .s3-shell[data-s3-view="legacy"] .s3-legacy-meter i{
  background:linear-gradient(90deg,#346d87,#77d9f6);
  box-shadow:0 0 8px rgba(110,212,248,.24);
}
#statsBack .s3-more{
  border-color:rgba(119,186,213,.55);
  box-shadow:inset 0 1px rgba(185,228,247,.14),0 3px 9px rgba(0,0,0,.35);
}
#statsBack .s3-sheet{
  box-shadow:0 -12px 35px rgba(0,0,0,.65),inset 0 1px rgba(193,233,249,.16);
}
@media (max-width:350px){
  #statsBack .s3-build-title{gap:5px}
  #statsBack .s3-attribute{padding:6px}
}
@media (prefers-reduced-motion:reduce){
  #statsBack .s3-shell button{transition:none!important}
}
