.history-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 12px}
.history-toolbar .title{margin:0}
.history-toolbar button{min-height:44px;flex-shrink:0}
.history-editor{width:min(calc(100% - 30px),520px);max-height:85vh;overflow:auto;margin:auto;padding:18px;border:1px solid var(--line);border-radius:20px;background:var(--panel);color:var(--cream)}
.history-editor::backdrop{background:#000a}
.history-editor h2,.history-detail-actions h2{font-size:17px;margin:0 0 8px}
.history-editor p{margin:8px 0}
.history-editor .field{display:grid;gap:5px;margin-top:10px}
.history-editor .field[hidden],.history-editor .history-restart[hidden]{display:none}
.history-race-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.history-editor .history-restart{display:block;margin-top:12px}
.history-editor button,.history-detail-actions button{min-height:44px}
@media(max-width:380px){.history-toolbar{align-items:flex-start;flex-direction:column}}
.button.danger-ghost{background:transparent;color:var(--red);border:1px solid #ffa9a080;box-shadow:none}
.button.danger-ghost:active{background:#ffa9a014}
.history-detail-actions{margin-top:14px}
.history-detail-actions>summary{display:flex;align-items:center;justify-content:space-between;cursor:pointer;color:var(--red);font-size:14px;font-weight:800;list-style:none}
.history-detail-actions>summary::-webkit-details-marker{display:none}
.history-detail-actions>summary::after{content:"›";color:var(--soft)}
.history-detail-actions[open]>summary::after{transform:rotate(90deg)}
/* La fiche plein écran masque la barre d'onglets : rien ne doit rester posé à son emplacement. */
#betdetail{padding-bottom:calc(112px + env(safe-area-inset-bottom,0px))!important}
