.difficulty-legend-dialog{box-sizing:border-box;width:min(560px,calc(100% - 24px));max-height:88dvh;overflow:auto;padding:26px;border:1px solid #e0e5ee;border-radius:20px;background:#fff;color:#253248;font-family:Inter,Arial}.difficulty-legend-dialog::backdrop{background:#091321b3}.difficulty-legend-dialog header{display:flex;align-items:center;justify-content:space-between;gap:15px}.difficulty-legend-dialog h2{font-size:20px;margin:.83em 0;font-weight:700}.difficulty-legend-dialog p{font-size:12px;line-height:1.7}.difficulty-legend-dialog button{border:0;border-radius:10px;padding:11px 16px;background:transparent;color:inherit;font-weight:700;font-size:24px;cursor:pointer}.difficulty-legend-dialog .difficulty-legend-entry{padding:14px 16px;margin:13px 0;border:0;border-radius:10px;background:#f5faf7}.difficulty-legend-entry h3{font-size:15px;margin:0 0 7px;color:#27ae60;font-weight:700}.difficulty-legend-entry p{margin:0}.difficulty-legend-dialog .difficulty-legend-entry.is-easy{background:#f4f8ff}.difficulty-legend-entry.is-easy h3{color:#2f80ed}.difficulty-legend-dialog .difficulty-legend-entry.is-moderate{background:#fffbf2}.difficulty-legend-entry.is-moderate h3{color:#c38a20}.difficulty-legend-dialog .difficulty-legend-entry.is-advanced{background:#fff5f5}.difficulty-legend-entry.is-advanced h3{color:#eb5757}.site-dark-theme .difficulty-legend-dialog{background:#192332;border-color:#3b4b60;color:#eaf0fa}.site-dark-theme .difficulty-legend-dialog .difficulty-legend-entry{background:#243043}

/* Keep the legend independent of typography and section spacing from its host page. */
dialog.difficulty-legend-dialog{position:fixed;inset:0;margin:auto!important;height:fit-content!important;min-height:0!important;padding:26px!important;text-align:left;line-height:1.7}
dialog.difficulty-legend-dialog>header{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:15px;padding:0!important;margin:0!important;min-height:0!important}
dialog.difficulty-legend-dialog>header>h2{padding:0!important;margin:.83em 0!important;font-size:20px!important;line-height:24px!important;letter-spacing:normal;font-weight:700}
dialog.difficulty-legend-dialog>header>button{margin:0!important;line-height:24px!important;min-width:0;min-height:0}
dialog.difficulty-legend-dialog>[data-dialog-body]{display:block;margin:0!important;padding:0!important}
dialog.difficulty-legend-dialog .difficulty-legend-entry{display:block!important;box-sizing:border-box;height:auto!important;min-height:0!important;padding:14px 16px!important;margin:13px 0!important;border:0!important}
dialog.difficulty-legend-dialog .difficulty-legend-entry>h3{display:block!important;padding:0!important;margin:0 0 7px!important;font-size:15px!important;line-height:18px!important;letter-spacing:normal;font-weight:700}
dialog.difficulty-legend-dialog .difficulty-legend-entry>p{display:block;padding:0!important;margin:0!important;font-size:12px!important;line-height:20.4px!important}
dialog.difficulty-legend-dialog>[data-dialog-body]>p{padding:0!important;margin:12px 0!important;font-size:12px!important;line-height:20.4px!important}
.site-dark-theme dialog.difficulty-legend-dialog .difficulty-legend-entry>h3{color:#27ae60!important}.site-dark-theme dialog.difficulty-legend-dialog .difficulty-legend-entry.is-easy>h3{color:#2f80ed!important}.site-dark-theme dialog.difficulty-legend-dialog .difficulty-legend-entry.is-moderate>h3{color:#c38a20!important}.site-dark-theme dialog.difficulty-legend-dialog .difficulty-legend-entry.is-advanced>h3{color:#eb5757!important}
