#options-panel {position:absolute;inset:0;display:flex;align-items:flex-start;justify-content:flex-end;padding:70px 16px 16px;z-index:150;background:#17202b88;color:#293344;}
#options-panel.hidden {display:none!important;}
#options-panel .options-card {width:min(440px,100%);max-height:calc(100dvh - 90px);border:2px solid #d5bd98;border-radius:16px;background:#fffaf0;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 10px 40px #0005;}
#options-panel header {display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid #dacbb5;}
#options-panel h2 {margin:0;font-size:19px;}
#options-panel button {min-height:44px;font:inherit;cursor:pointer;}
#options-close {border:1px solid #d5bd98;border-radius:9px;background:#f0e2ca;color:#362a40;padding:8px 13px;}
#options-body {min-height:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;padding:14px;}
#options-panel #hud-help {position:static!important;display:block!important;max-width:none!important;width:auto!important;padding:12px;margin:0;background:#f1e7d5;border-radius:10px;font-size:13px;line-height:1.55;}
#btn-options {min-height:38px;white-space:nowrap;}
body.options-open #touch-ui {visibility:hidden;}
body.photo-mode #btn-options,body.game-open #btn-options {display:none!important;}
body.touch #hud-top #btn-options {padding:0 8px;min-width:44px;font-size:12px;}
body.touch #btn-options .options-label {display:none;}
body.touch #options-panel {padding:62px 8px 8px;}
body.touch #options-panel .options-card {max-height:calc(100dvh - 70px);}
/* Garder les boutons historiques dans leur barre ; replier les ajouts sans les couper. */
#hud-top {flex-wrap:wrap;max-width:calc(100vw - 24px);}
body.touch #hud-top {flex-wrap:wrap;overflow:visible;}
