:root {
    --shortcut-accent: #9a72ff;
    --shortcut-cyan: #37d7e6;
    --shortcut-panel: rgba(12, 17, 27, .99);
}

#shortcut-reference {
    position: fixed;
    inset: 0;
    z-index: 120100;
    color: #f3f5fd;
    font-family: "Segoe UI", Arial, sans-serif;
}

#shortcut-reference[hidden] { display: none !important; }

.shortcut-reference-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 6, 12, .78);
    backdrop-filter: blur(12px);
}

.shortcut-reference-panel {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(980px, calc(100vw - 32px));
    height: min(820px, calc(100dvh - 32px));
    transform: translate(-50%, -50%);
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    overflow: hidden;
    border: 1px solid rgba(174, 154, 255, .34);
    border-radius: 20px;
    background: radial-gradient(circle at 88% 0, rgba(55, 215, 230, .11), transparent 32%), var(--shortcut-panel);
    box-shadow: 0 28px 90px rgba(0, 0, 0, .64), inset 0 0 0 1px rgba(255, 255, 255, .035);
}

.shortcut-reference-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    padding: 24px 28px 18px;
    border-bottom: 1px solid rgba(174, 180, 196, .13);
}

.shortcut-reference-kicker {
    margin: 0 0 6px;
    color: var(--shortcut-cyan);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.shortcut-reference-header h2 { margin: 0; color: #fff; font-size: clamp(24px, 4vw, 34px); line-height: 1.08; }
.shortcut-reference-header p:last-child { margin: 8px 0 0; color: #aeb6ca; font-size: 14px; line-height: 1.4; }

.shortcut-reference-close {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(174, 180, 196, .2);
    border-radius: 50%;
    background: rgba(255, 255, 255, .055);
    color: #eef1fb;
    font-size: 22px;
    cursor: pointer;
}

.shortcut-search-wrap {
    min-height: 56px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 0 28px;
    border-bottom: 1px solid rgba(174, 180, 196, .1);
    color: #8f98ad;
}

.shortcut-search-wrap > span { color: var(--shortcut-accent); font-size: 23px; }
.shortcut-search {
    width: 100%;
    height: 36px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #f4f6ff;
    font: 14px/1 "Segoe UI", Arial, sans-serif;
}
.shortcut-search::placeholder { color: #737d93; }
.shortcut-result-count { white-space: nowrap; color: #858ea4; font-size: 11px; }

.shortcut-reference-content {
    padding: 20px 28px 28px;
    overflow: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: max-content;
    align-content: start;
    gap: 14px;
}

.shortcut-group {
    min-width: 0;
    overflow: hidden;
    align-self: start;
    border: 1px solid rgba(174, 180, 196, .14);
    border-radius: 14px;
    background: rgba(255, 255, 255, .025);
}

.shortcut-group-featured {
    border-color: rgba(55, 215, 230, .34);
    box-shadow: inset 0 0 30px rgba(55, 215, 230, .035);
}

.shortcut-group > header { padding: 15px 16px 12px; border-bottom: 1px solid rgba(174, 180, 196, .1); }
.shortcut-group h3 { margin: 0 0 5px; color: #f8f9ff; font-size: 16px; }
.shortcut-group header p { margin: 0; color: #8f98ad; font-size: 12px; line-height: 1.38; }
.shortcut-list { display: grid; }

.shortcut-row {
    min-height: 74px;
    display: grid;
    grid-template-columns: minmax(118px, .72fr) minmax(0, 1.4fr);
    gap: 14px;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(174, 180, 196, .08);
}
.shortcut-row:last-child { border-bottom: 0; }

.shortcut-keys { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.shortcut-keys kbd {
    min-width: 25px;
    min-height: 25px;
    box-sizing: border-box;
    display: inline-grid;
    place-items: center;
    padding: 4px 7px;
    border: 1px solid rgba(190, 199, 220, .24);
    border-bottom-color: rgba(190, 199, 220, .38);
    border-radius: 6px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .045));
    box-shadow: 0 2px 0 rgba(0, 0, 0, .45);
    color: #e9ebf4;
    font: 700 11px/1 "Segoe UI", Arial, sans-serif;
    white-space: nowrap;
}
.shortcut-plus { color: #697287; font-size: 11px; }
.shortcut-copy { min-width: 0; display: grid; gap: 4px; }
.shortcut-copy strong { color: #e8eaff; font-size: 13px; }
.shortcut-copy span { color: #9da6ba; font-size: 12px; line-height: 1.4; }

.shortcut-empty { grid-column: 1 / -1; min-height: 200px; display: grid; place-content: center; gap: 7px; text-align: center; }
.shortcut-empty strong { color: #fff; font-size: 18px; }
.shortcut-empty span { color: #8f98ad; font-size: 13px; }

.shortcut-reference-panel > footer {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 28px;
    border-top: 1px solid rgba(174, 180, 196, .13);
    color: #8e97ac;
    font-size: 11px;
}
.shortcut-reference-panel > footer button {
    min-width: 76px;
    height: 34px;
    border: 1px solid rgba(174, 154, 255, .45);
    border-radius: 8px;
    background: rgba(154, 114, 255, .14);
    color: #efeaff;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 700px) {
    .shortcut-reference-panel { inset: 0; width: 100%; height: 100dvh; transform: none; border: 0; border-radius: 0; }
    .shortcut-reference-header { padding: 18px 16px 13px; }
    .shortcut-reference-header p:last-child { font-size: 12px; }
    .shortcut-search-wrap { min-height: 50px; padding: 0 16px; }
    .shortcut-reference-content { grid-template-columns: 1fr; padding: 14px 12px 20px; }
    .shortcut-row { grid-template-columns: minmax(105px, .62fr) minmax(0, 1.38fr); padding: 11px 12px; gap: 10px; }
    .shortcut-reference-panel > footer { min-height: 58px; padding: 0 14px calc(env(safe-area-inset-bottom, 0px) / 2); }
    .shortcut-reference-panel > footer span { max-width: 230px; }
}

@media (prefers-reduced-motion: reduce) {
    .shortcut-reference-backdrop { backdrop-filter: none; }
}
