/* Keyblade dialog layout repair: retain artwork, sizes and theme. */
#keyblade-picker[open]{display:grid;grid-template-areas:"controls" "gallery" "footer" "credits";grid-template-rows:auto minmax(0,1fr) auto auto;box-sizing:border-box;overflow:hidden;height:min(820px,calc(100dvh - 24px))!important;max-height:calc(100dvh - 24px)}
#keyblade-picker .cursor-dialog-controls{grid-area:controls;min-width:0;min-height:0;max-height:42dvh;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
#keyblade-picker .cursor-dialog-head{padding:12px 20px 4px}
#keyblade-picker h2{font-size:clamp(23px,3vw,28px)}
#keyblade-picker .cursor-search-wrap{padding-bottom:4px}
#keyblade-picker .cursor-filter-details>summary{min-height:32px;padding:4px 0}
#keyblade-picker .cursor-results{padding-top:4px;padding-bottom:2px}
#keyblade-picker .cursor-size-panel{padding:4px 20px 8px;gap:10px}
#keyblade-picker .cursor-preview{width:56px;height:56px;flex-basis:56px}
#keyblade-picker .cursor-size-options legend{margin-bottom:3px}
#keyblade-picker .cursor-size-note{margin:3px 0 0}
#keyblade-picker .cursor-grid{grid-area:gallery;min-width:0;min-height:0;margin:0;padding:12px 20px 18px;overflow:auto;scrollbar-gutter:stable;scroll-padding-block:12px;grid-auto-rows:max-content;align-content:start;align-items:start;gap:12px;isolation:isolate}
#keyblade-picker .cursor-option{display:grid;grid-template-rows:128px auto auto;justify-items:center;align-items:start;align-content:start;min-height:0;height:auto;overflow:visible;padding:12px 8px;gap:6px;scroll-margin-block:12px;box-sizing:border-box}
#keyblade-picker .cursor-thumb,#keyblade-picker .cursor-thumb img,#keyblade-picker .native-pointer{height:128px;width:100%;max-width:170px;object-fit:contain}
#keyblade-picker .cursor-option-name,#keyblade-picker .cursor-art-edition,#keyblade-picker .cursor-origin{height:auto;max-height:none;overflow:visible;white-space:normal;overflow-wrap:anywhere;line-height:1.4}
#keyblade-picker .cursor-empty{grid-area:gallery;align-self:start}
#keyblade-picker .cursor-dialog-foot{grid-area:footer;position:static;inset:auto;transform:none;isolation:isolate;width:auto;max-width:none;min-width:0;margin:0;padding:10px 20px;border-radius:0;border-width:1px 0 0;display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;box-shadow:none}
#keyblade-picker .cursor-dialog-foot #cursor-selection{position:static;width:auto;height:auto;max-width:none;flex:1 1 180px;min-width:0;overflow:visible;clip-path:none;margin:0}
#keyblade-picker .cursor-dialog-foot .cursor-picker-done{min-width:140px;min-height:44px;margin:0;grid-column:auto;grid-row:auto;width:auto}
#keyblade-picker .cursor-picker-credits{grid-area:credits;box-sizing:border-box;margin:0;padding:0 20px;max-height:min(22dvh,160px);overflow:auto}
#keyblade-picker .cursor-picker-credits summary{box-sizing:border-box;min-height:36px;padding-block:8px}
@media(max-width:600px){#keyblade-picker[open]{width:calc(100vw - 16px);height:calc(100dvh - 16px)!important;max-height:calc(100dvh - 16px);border-radius:20px}#keyblade-picker .cursor-dialog-head{padding:8px 12px 2px}#keyblade-picker .cursor-dialog-controls{max-height:43dvh}#keyblade-picker .cursor-size-panel{padding:3px 12px 6px}#keyblade-picker .cursor-preview{display:none}#keyblade-picker .cursor-size-buttons{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}#keyblade-picker .cursor-size-buttons button{font-size:11px;padding:6px 3px;min-width:0;min-height:44px;white-space:normal}#keyblade-picker .cursor-grid{grid-template-columns:repeat(2,minmax(0,1fr));padding:10px 12px 14px;gap:8px}#keyblade-picker .cursor-option{grid-template-rows:100px auto auto;padding:10px 6px}#keyblade-picker .cursor-thumb,#keyblade-picker .cursor-thumb img,#keyblade-picker .native-pointer{height:100px}#keyblade-picker .cursor-dialog-foot{padding:8px 12px max(8px,env(safe-area-inset-bottom));gap:6px}#keyblade-picker .cursor-dialog-foot #cursor-selection{flex-basis:100%;font-size:11px}#keyblade-picker .cursor-dialog-foot .cursor-picker-done{flex:1;min-width:120px}#keyblade-picker .cursor-picker-credits{padding:0 12px}}
@media(max-height:560px){#keyblade-picker .cursor-dialog-controls{max-height:45dvh}#keyblade-picker .cursor-size-note,#keyblade-picker .cursor-preview{display:none}#keyblade-picker .cursor-dialog-head{padding-top:4px}#keyblade-picker .cursor-search-wrap input{height:40px;min-height:40px}#keyblade-picker .cursor-picker-credits{display:block;max-height:15dvh}#keyblade-picker .cursor-picker-credits summary{min-height:28px;padding:4px 0}}
@media(max-height:560px){#keyblade-picker .cursor-option{grid-template-rows:72px auto auto}#keyblade-picker .cursor-thumb,#keyblade-picker .cursor-thumb img,#keyblade-picker .native-pointer{height:72px}}
@media(max-height:560px){#keyblade-picker .cursor-option{grid-template-rows:56px auto auto}#keyblade-picker .cursor-thumb,#keyblade-picker .cursor-thumb img,#keyblade-picker .native-pointer{height:56px}}
@media(max-width:600px) and (min-height:561px) and (max-height:700px){#keyblade-picker .cursor-option{grid-template-rows:72px auto auto}#keyblade-picker .cursor-thumb,#keyblade-picker .cursor-thumb img,#keyblade-picker .native-pointer{height:72px}}
