/* Retrofus Ascension — bottom-bar tools (« Accès rapide »), account bar and team frame, 21/10/2026.
   1. The radio leaves the « Auto / Cases » row for the bottom bar, next to a new button that opens the Android application window (hud-dock.js, apk-dialog.js).
   2. The bar « Accueil · langues · Mon compte » (top right) and the team frame « Équipe » (left) are larger. Both are scaled with a transform, not a zoom: the positions written in
      their own CSS and by their scripts (the frame can be dragged) stay the ones of the screen; the account bar keeps its upper right corner, the frame its upper left corner. */

/* ---- 1. the bottom bar: 9 tools on 2 rows, the radio in the free place of the lower row, the application in a tall button on the right ---------------------------------------- */
@media (min-width:1001px) and (min-height:560px){
  html[data-theme] body #spell-dock#spell-dock{grid-template-columns:56px 200px 64px auto auto auto auto repeat(3,38px) repeat(5,38px)!important}
  /* slots: 7 Radio, 8 Application Android (the others: local.css) */
  html body:not(.in-battle) #spell-dock .rv-dock-btn[data-slot="7"]{grid-column:14;grid-row:3/5}
  html body:not(.in-battle) #spell-dock .rv-dock-btn[data-slot="8"]{grid-column:15;grid-row:1/5}
  html body:not(.in-battle) #spell-dock .rv-dock-btn.is-on{border-color:#c8862a;box-shadow:0 1px 0 #fff inset,0 0 0 2px #e8780c88;color:#a65a08}
  html[data-theme="nuit"] body #spell-dock .rv-dock-btn.is-on{border-color:#e8a23c!important;box-shadow:0 0 0 2px #e8a23c88!important;color:#ffd28a!important}
  /* the original button of the radio is no longer in the « Auto / Cases » row (its panel and its rules are the module's own: the bottom bar clicks it) */
  html body #radio-toggle{display:none!important}
}

/* ---- 2. larger account bar and team frame ----------------------------------------------------------------------------------------------------------------------------------- */
@media (min-width:761px){
  :root{--rv-hd-k:1.12;--rv-tf-k:1.15;--rv-hd-dy:calc(54px * (var(--rv-hd-k) - 1) * var(--ui-zoom,1))}
  html body #game-topbar{transform:scale(var(--rv-hd-k,1));transform-origin:100% 0}
  /* the « Auto / Cases » row, the radio panel and the right column follow the larger bar (its height was 54 px, the row sat 12 px under it) */
  html body .tools.glass{top:calc(78px + var(--rv-hd-dy,0px))!important}
  html body #rv-radio{top:calc(112px + var(--rv-hd-dy,0px))}
  /* the Groupe window opens under the right column */
  html body #multiplayer-panel{top:calc(178px + var(--rv-hd-dy,0px))!important;max-height:min(560px,calc((var(--rv-dock-top,100dvh) - 10px) / var(--ui-zoom,1) - 178px - var(--rv-hd-dy,0px)))!important}
  html body #rv-teamframe{transform:scale(var(--rv-tf-k,1));transform-origin:0 0}
}
/* right column of the computer layout: account bar, then the « Auto / Cases » row (now two buttons: the radio left it), then the « Paliers » chip UNDER that row (it sat on top of the radio button), then « Quitter le donjon » */
@media (min-width:1001px) and (min-height:560px){
  html body #support-open#support-open.support-chip{top:calc(130px + var(--rv-hd-dy,0px))}
  html body #dungeon-exit#dungeon-exit{top:calc(176px + var(--rv-hd-dy,0px))!important}
}
/* account bar: by the width of the screen; team frame (5 portraits, about 240 px high): by its height too, so that it never goes down under the bottom bar */
@media (min-width:1000px){:root{--rv-hd-k:1.22}}
@media (min-width:1000px) and (min-height:760px){:root{--rv-tf-k:1.25}}
@media (min-width:1300px){:root{--rv-hd-k:1.32}}
@media (min-width:1300px) and (min-height:860px){:root{--rv-tf-k:1.4}}

/* ---- « Application Android » window ------------------------------------------------------------------------------------------------------------------------------------------ */
#rv-apk-dialog{border:0;padding:0;margin:auto;resize:none;background:transparent;color:inherit;width:min(460px,calc(100vw - 24px));max-width:none;overflow:visible}
#rv-apk-dialog::backdrop{background:#0b1020bd;backdrop-filter:blur(2px)}
#rv-apk-dialog .rv-apk-card{margin:0;padding:20px 22px 16px;border-radius:16px;border:1px solid #8a6a2c;background:linear-gradient(180deg,#fbf3df,#efe1ba);color:#2b2216;box-shadow:0 22px 60px #000a;font:600 14px/1.45 var(--font-ui,"Nunito Sans",system-ui,sans-serif)}
#rv-apk-dialog header{display:flex;align-items:center;gap:14px}
#rv-apk-dialog header img{width:56px;height:56px;border-radius:14px;flex:none;box-shadow:0 3px 10px #0006}
#rv-apk-dialog h2{margin:0;font:400 23px/1.15 var(--font-display,"Bree Serif",Georgia,serif);color:inherit}
#rv-apk-dialog header p{margin:2px 0 0;font-size:12.5px;opacity:.75}
#rv-apk-dialog .rv-apk-x{margin-left:auto;align-self:flex-start;width:32px;height:32px;border-radius:9px;border:1px solid #a8956a;background:#ffffff80;color:inherit;font:700 15px/1 sans-serif;cursor:pointer}
#rv-apk-dialog .rv-apk-x:hover{background:#fff;border-color:#e8780c}
#rv-apk-dialog .rv-apk-lead{margin:14px 0 0}
#rv-apk-dialog .rv-apk-dl{display:flex;flex-direction:column;align-items:center;gap:2px;margin:14px 0 12px;padding:12px 18px;border-radius:12px;background:linear-gradient(180deg,#f59a2a,#e8780c);color:#fff;text-decoration:none;box-shadow:0 3px 0 #a9560a,0 8px 16px #0004;text-shadow:0 1px 1px #0005}
#rv-apk-dialog .rv-apk-dl span{font:800 17px/1.25 var(--font-ui,system-ui,sans-serif)}
#rv-apk-dialog .rv-apk-dl small{font:600 12px/1.2 var(--font-ui,system-ui,sans-serif);opacity:.92}
#rv-apk-dialog .rv-apk-dl:hover{filter:brightness(1.06)}
#rv-apk-dialog .rv-apk-dl:focus-visible{outline:3px solid #fff;outline-offset:2px}
#rv-apk-dialog .rv-apk-steps{margin:0;padding-left:22px}
#rv-apk-dialog .rv-apk-steps li{margin:5px 0}
#rv-apk-dialog .rv-apk-note{margin:10px 0 0;font-size:12.5px;opacity:.78}
#rv-apk-dialog footer{display:flex;justify-content:flex-end;margin-top:12px}
#rv-apk-dialog .rv-apk-close{padding:8px 18px;border-radius:10px;border:1px solid #a8956a;background:linear-gradient(180deg,#fffaf0,#eadfbf);color:inherit;font:700 13.5px var(--font-ui,system-ui,sans-serif);cursor:pointer}
#rv-apk-dialog .rv-apk-close:hover{border-color:#e8780c}
html[data-theme="nuit"] #rv-apk-dialog .rv-apk-card{background:linear-gradient(180deg,#222c3f,#1a2130);border-color:#5a76a8;color:#e8edf6}
html[data-theme="nuit"] #rv-apk-dialog .rv-apk-x,html[data-theme="nuit"] #rv-apk-dialog .rv-apk-close{background:linear-gradient(180deg,#34415c,#222c40);border-color:#3c4f6c;color:#e8edf6}
html[data-theme="nuit"] #rv-apk-dialog .rv-apk-x:hover,html[data-theme="nuit"] #rv-apk-dialog .rv-apk-close:hover{border-color:#e8a23c}
@media (max-width:520px){#rv-apk-dialog .rv-apk-card{padding:16px 16px 14px}#rv-apk-dialog h2{font-size:20px}}
