/* Keyboard shortcuts dialog (js/hotkeys.js). It lives in #lyt-root, so the --l-* theme tokens follow light and dark. Heights use % of the
   viewport (the containing block of a modal dialog) with a floor, never dvh: Firefox resolved dvh limits to 0 on dialogs (ad-export.css). */
.hk-help{width:min(860px,calc(100% - 24px));max-width:none;max-height:calc(100% - 48px);min-height:min(320px,calc(100% - 48px));margin:auto;padding:0;
  border:1px solid var(--l-border,#27344f);border-radius:16px;background:var(--l-surface,#121d33);color:var(--l-text,#e8edf5);
  box-shadow:var(--l-shadow,0 8px 30px rgba(0,0,0,.42));font:13px/1.45 Inter,system-ui,sans-serif;overflow:hidden}
.hk-help[open]{display:flex;flex-direction:column}
.hk-help::backdrop{background:rgba(8,12,22,.5);backdrop-filter:blur(3px)}
.hk-head{display:flex;align-items:center;gap:10px;padding:16px 20px;border-bottom:1px solid var(--l-border,#27344f);flex:none;background:var(--l-surface,#121d33)}
.hk-title{flex:1;min-width:0}
.hk-title h2{margin:0;font-size:17px;line-height:1.3;font-weight:700}
.hk-title p{margin:2px 0 0;color:var(--l-muted,#9aa7bd);font-size:12px}
.hk-head button{border:1px solid var(--l-border,#27344f);background:var(--l-surface2,#16233d);color:var(--l-text,#e8edf5);border-radius:9px;padding:7px 12px;
  font:inherit;font-weight:600;font-size:12px;min-height:36px;cursor:pointer;white-space:nowrap}
.hk-head button:hover{border-color:var(--l-accent,#10b981)}
.hk-head .hk-single[aria-pressed="true"]{color:var(--l-accent,#10b981)}
.hk-help :focus-visible{outline:2px solid var(--l-accent,#10b981);outline-offset:2px}
.hk-touch{display:none;margin:10px 20px 0;color:var(--l-muted,#9aa7bd);font-size:12px}
.hk-body{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;padding:6px 20px 20px;
  display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:0 28px;align-items:start}
.hk-body h3{margin:14px 0 4px;font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:var(--l-muted,#9aa7bd);font-weight:700}
.hk-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:5px 0;border-bottom:1px solid var(--l-border,#27344f)}
.hk-row:last-child{border-bottom:0}
.hk-what{min-width:0}
.hk-what em{font-style:normal;color:var(--l-muted,#9aa7bd);font-size:11px}
.hk-keys{display:inline-flex;align-items:center;gap:3px;flex:none;white-space:nowrap}
.hk-row kbd{background:var(--l-surface2,#16233d);border:1px solid var(--l-border,#27344f);border-bottom-width:2px;border-radius:5px;padding:1px 6px;
  font:600 11px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--l-text,#e8edf5);min-width:20px;text-align:center}
.hk-row kbd.hk-arrow{font-size:14px;line-height:1.05;padding:1px 5px}
.hk-or,.hk-plus{color:var(--l-muted,#9aa7bd);font-size:11px;padding:0 3px}
.hk-row.off{opacity:.45}
.hk-mouse .hk-how{color:var(--l-muted,#9aa7bd);font-size:12px;text-align:right}
/* Mouse & touch spans the dialog, its rows in two columns. */
.hk-body .hk-wide{grid-column:1/-1}
.hk-wide .hk-rows{display:grid;grid-template-columns:repeat(auto-fill,minmax(380px,1fr));gap:0 28px}
.hk-wide .hk-row:last-child{border-bottom:1px solid var(--l-border,#27344f)}
@media (pointer:coarse){.hk-touch{display:block}}
/* Phones: full screen, one column, sticky header, 44 px targets. */
@media (max-width:767px){
  .hk-help{width:100%;height:100%;max-height:100%;min-height:0;margin:0;inset:0;border:0;border-radius:0}
  .hk-head{position:sticky;top:0;flex-wrap:wrap;padding:12px 16px}
  .hk-title{flex-basis:100%}
  .hk-head button{min-height:44px}
  .hk-body{grid-template-columns:1fr;padding:4px 16px 24px}
  .hk-wide .hk-rows{grid-template-columns:1fr}
  .hk-mouse{flex-direction:column;align-items:flex-start;gap:0}
  .hk-mouse .hk-how{text-align:left}
  .hk-touch{margin:10px 16px 0}
}
/* Status-bar entry point (layouts.js): "? Shortcuts". */
.lyt-status .sbtn#lyt-keys{cursor:pointer;padding:0 4px}
.lyt-status .sbtn#lyt-keys kbd{font:inherit;font-weight:700;border:1px solid var(--l-border,#27344f);border-radius:4px;padding:0 4px;line-height:1.3}
@media print{.hk-help{display:none!important}}
