/* A flat tree-paper color; only the content scrolls. */
.update-dialog{box-sizing:border-box;width:min(640px,94vw);max-height:92dvh;overflow:hidden;color:#49382c;padding:20px 24px;border:2px solid #957247;border-image:none;background:#f8ecd3;background-image:none;border-radius:10px;zoom:calc(1 / var(--interface-scale,1));box-shadow:2px 5px 12px #241b1355;font-family:PandaHand,sans-serif;z-index:1000}
.update-dialog[open]{display:flex;flex-direction:column;gap:12px}
.update-dialog::backdrop{background:#241b13b3}
.update-dialog h2{flex:none;font-family:PandaDisplay,sans-serif;font-weight:400;font-size:clamp(22px,2.6vw,30px);line-height:1.12;margin:0;text-align:center;color:#a93120}
.update-content{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#ad8759 transparent;padding:0 10px 0 2px;scrollbar-gutter:stable}
.update-content:focus-visible{outline:2px solid #368f85;outline-offset:-2px}
.update-dialog p,.update-dialog li{font-size:clamp(17px,2vw,21px);line-height:1.38;overflow-wrap:anywhere}
.update-content p{margin:0 0 12px}.update-content p:last-child{margin-bottom:0}
.update-content ul{margin:0;padding-left:24px}.update-content li+li{margin-top:10px}
.update-actions{flex:none;display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin:0;padding-top:6px}
.update-actions button{white-space:normal;max-width:100%;min-height:40px;font-size:clamp(17px,2vw,22px);padding:8px 20px}
.update-dialog progress{display:block;width:100%;height:24px;accent-color:#368f85}.update-progress{text-align:center;font-variant-numeric:tabular-nums}
@media(max-height:420px){.update-dialog{padding:12px 16px}.update-dialog[open]{gap:7px}.update-dialog h2{font-size:22px}.update-actions{padding-top:3px}.update-actions button{min-height:34px;padding:5px 16px}.update-content li+li{margin-top:7px}}

.update-dialog h3{font-size:clamp(20px,2.3vw,25px);line-height:1.2;color:#49382c;margin:0 0 12px}
.update-dialog .patch-version{font-size:clamp(14px,1.6vw,17px);color:#6b583f;font-variant-numeric:tabular-nums;margin-bottom:8px}
.patch-history-entry+.patch-history-entry{margin-top:24px;padding-top:20px;border-top:1px solid #b89b72}
.update-dialog .patch-history-hint{font-size:15px;color:#6b583f;margin-bottom:20px}
#app[data-screen=menu] .menu-release-actions{position:fixed;width:auto;height:auto;margin:0;flex-direction:row;bottom:14px;right:18px;z-index:10;display:flex;align-items:center;gap:8px;max-width:calc(100vw - 24px)}
#app[data-screen=menu] .menu-release-actions button{position:static!important;transform:none!important;rotate:0deg!important;width:auto!important;min-height:36px!important;padding:8px 14px!important;font-size:clamp(13px,1.5vw,19px)!important}
@media(max-height:420px){#app[data-screen=menu] .menu-release-actions{bottom:8px;right:10px;gap:5px}#app[data-screen=menu] .menu-release-actions button{min-height:30px!important;padding:5px 9px!important;font-size:13px!important}}
@media(max-width:420px){#app[data-screen=menu] .menu-release-actions{right:8px;left:8px;justify-content:flex-end;flex-wrap:wrap}}

/* Le panneau utilitaire doit grandir avec son libellé, sans hauteur héritée. */
#app[data-screen=menu] .menu-release-actions button{height:auto!important;line-height:1.2;white-space:nowrap;box-sizing:border-box;background-size:100% 100%!important;min-width:150px}
@media(max-height:420px){#app[data-screen=menu] .menu-release-actions button{min-width:130px}}

/* Texte centré dans la partie utile de la planche, loin des fixations. */
#app[data-screen=menu] .menu-release-actions [data-action=install]{display:flex;align-items:center;justify-content:center;width:clamp(180px,18vw,240px)!important;min-width:0;min-height:0!important;height:auto!important;aspect-ratio:728/220!important;padding:12px 28px!important;font-size:clamp(12px,1.25vw,17px)!important;line-height:1!important;background-size:100% 100%!important}
@media(max-height:420px){#app[data-screen=menu] .menu-release-actions [data-action=install]{width:180px!important;font-size:12px!important;padding:10px 26px!important}}

/* Persistent storage failure; outside screen rendering and non-modal until consulted. */
#save-warning{position:fixed;z-index:2500;left:max(8px,env(safe-area-inset-left));bottom:max(8px,env(safe-area-inset-bottom));display:flex;align-items:center;gap:10px;max-width:calc(100vw - 16px);padding:8px 12px;border:2px solid #9c3729;border-radius:8px;background:#fff1ce;color:#762719;box-shadow:0 2px 8px #0005;font:700 16px/1.25 sans-serif}
#save-warning button{font:700 15px/1.3 sans-serif;min-height:36px;padding:6px 10px;background:#efd39c;border:1px solid #9c3729;border-radius:5px;color:#542617;white-space:normal}
.save-failure-code{overflow-wrap:anywhere;font-size:.8em}
@media(max-width:600px){#save-warning{font-size:13px;gap:6px;padding:6px 8px}#save-warning button{font-size:13px}}
