/* 단축키 목록 — `?` 로 연다.
 *
 * 작은 판 하나다. 다른 시트처럼 아래에서 올라오지 않는다 — 읽던 자리를 잠깐
 * 덮고 바로 사라지는 것이라, 화면 가운데에서 짧게 떠오르는 편이 빠르다.
 */
.keys-sheet {
    width: min(320px, calc(100vw - 32px));
    padding: 0;
    border: 1px solid var(--rule);
    border-radius: var(--radius-surface);
    background: var(--paper-raised);
    color: var(--ink);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .22);
}

.keys-sheet::backdrop {
    background: rgba(0, 0, 0, .35);
}

.keys-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--rule);
}

.keys-head strong { font-size: 15px; }

.keys-close {
    width: 32px; height: 32px;
    border: 0; border-radius: 999px;
    background: transparent;
    color: var(--ink-muted);
    font-size: 20px; line-height: 1;
    cursor: pointer;
    transition: background var(--dur-fast);
}
.keys-close:hover { background: var(--surface-strong); }

.keys-list {
    margin: 0;
    padding: 8px 16px 12px;
    list-style: none;
    /* 한 줄에 둘 — 열 넷을 넘어가면 폰에서 글자가 접힌다 */
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px;
}

.keys-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 13px;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* `?` 줄만 한 단을 통째로 쓴다 — 결이 다른 한 줄이다 */
.keys-list .keys-self { grid-column: 1 / -1; color: var(--ink-muted); }

.keys-list kbd {
    flex-shrink: 0;
    min-width: 22px;
    padding: 2px 6px;
    border: 1px solid var(--rule);
    border-bottom-width: 2px;
    border-radius: 6px;
    background: var(--paper);
    color: var(--ink);
    font: 600 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
    text-align: center;
}

.keys-foot {
    margin: 0;
    padding: 0 16px 14px;
    font-size: 12px;
    color: var(--ink-muted);
}

@media (max-width: 380px) {
    .keys-list { grid-template-columns: minmax(0, 1fr); }
}
