[data-art=back]{background-image:url('./native/back.png')!important}
[data-art=confirm]{background-image:url('./native/confirm.png')!important}
#panel,#npcDialog{overflow:hidden;max-height:calc(100dvh - 16px);background:#133b3dbd;display:none;flex-direction:column}
#panel[open],#npcDialog[open]{display:flex}
#panelBody,#dialogChoices{overflow:auto;min-height:0;overscroll-behavior:contain}
#panel header,#npcDialog header{flex:none;background:#547977c2}
.game-dialog-actions{display:flex;justify-content:space-between;align-items:center;padding:5px 12px;flex:none;border-top:1px solid #a0beb070;background:#11363499;gap:12px}
.game-dialog-actions .native-button{width:64px;height:64px;min-height:0;flex:none;touch-action:manipulation}
.game-dialog-actions button:disabled{opacity:.45;cursor:default}
#panel.legacy-list{width:min(54vw,720px);border:0;background:transparent;box-shadow:none}
#panel.legacy-list header{display:none}
#panel.legacy-list #panelBody{padding:0}
.legacy-menu-list{display:grid;gap:4px;padding:3px}
.legacy-menu-row{width:100%;min-height:44px;height:min(9.8dvh,60px);display:flex;justify-content:center;align-items:center;gap:4px;border:3px ridge #789797b3;background:#263d40ad;padding:5px 8px;font-size:20px;color:#e3e8e5;text-shadow:1px 1px 2px #111;text-align:center}
.legacy-menu-row:hover{background:#56716fa8}
.legacy-menu-row.selected{background:#c2d0cbc4;color:#e91616;text-shadow:1px 1px #533a37}
.legacy-menu-row .menu-key{color:#ed3531;background:#f8e96e;font-size:12px;line-height:18px;min-width:10px;text-shadow:none}
.legacy-menu-row span:last-child{min-width:0;overflow-wrap:anywhere}
.legacy-menu-list+.game-dialog-actions{background:transparent}
/* The LD menu has no confirm/back footer; tapping a row commits it. */
#panel.legacy-list>.game-dialog-actions{display:none}
.shortcut-table{display:grid;gap:3px;margin:10px 0}
.shortcut-table button{display:grid;grid-template-columns:48px minmax(0,1fr) 36px;align-items:center;gap:8px;text-align:left;width:100%;padding:5px 8px;border:2px ridge #779c95;background:#264c4bad;color:#ecf2e9}
.shortcut-table button.selected,.skill-row.selected{background:#718f83b0;outline:1px solid #d4e3c4}
.shortcut-table button span{overflow-wrap:anywhere;min-width:0}
.shortcut-table button b{text-align:center;color:#f8e76e}
.skill-row{cursor:pointer}.skill-row:focus-visible{outline:2px solid #f8e76e}
.skill-slot-preview{display:flex;gap:6px;padding:10px 0;justify-content:center}
.skill-slot-preview button{width:52px;height:52px;padding:0;position:relative;display:grid;place-items:center;flex:none}
.skill-slot-preview button.selected{outline:2px solid #f8e76e}
.skill-slot-preview small{position:absolute;right:2px;bottom:0;color:#fff;font-size:10px}
#dialogChoices button.selected{background:#719184;color:#fff}
@media(orientation:landscape) and (max-height:520px){#panel.legacy-list{width:54vw}.legacy-menu-list{gap:2px}.legacy-menu-row{min-height:27px;height:8.4dvh;font-size:17px;border-width:2px;padding:2px 6px}.game-dialog-actions{padding:3px 8px}.game-dialog-actions .native-button{width:44px;height:44px}#panelBody{padding:8px}.legacy-menu-row .menu-key{font-size:10px;line-height:13px}}
@media(orientation:portrait){#panel.legacy-list{width:calc(100% - 24px)}.legacy-menu-row{height:48px;font-size:17px}.game-dialog-actions .native-button{width:56px;height:56px}}
