/* A page of the key menu (core/keyPages.js): a game's keys, its moves and its fighters. The dialog is keymenu.css. */
.keys-page {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 20px 24px 28px;
}
.keys-title h3 {
    margin: 4px 0 8px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #fff;
}
.keys-lede {
    max-width: 68ch;
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.55;
    color: var(--text);
}
.keys-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.keys-group h4 {
    padding-bottom: 6px;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dim);
    border-bottom: 1px solid var(--line);
}
.keys-note {
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.5;
    color: var(--dim);
}
.keys-note--lead {
    padding: 10px 12px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    border-radius: 8px;
}

/* ---- Keys and pad pictures. The page's own kbd, so a light page's rule for it never reaches in ---- */
.keys .keys-card kbd {
    min-width: 24px;
    padding: 1px 6px;
    font-family: var(--mono);
    font-size: 12px;
    text-align: center;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--line-strong);
    border-bottom-width: 2px;
    border-radius: 4px;
}
.keys-word,
.keys-plus,
.keys-fighter-kind {
    font-family: var(--mono);
    font-style: normal;
    color: var(--dim);
}
.keys-word,
.keys-fighter-kind {
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.keys-seq-set {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}
.pad-chip--letter {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
}
/* the pause button as the glass HUD draws it: two bars */
.keys-pause::before {
    content: '';
    width: 3px;
    height: 10px;
    border-right: 3px solid currentColor;
    border-left: 3px solid currentColor;
}

/* ---- Moves: the sequence, then its name and a note ---- */
.keys-moves {
    display: grid;
    /* one width for the sequences on a page, so every group's names start on the same line */
    grid-template-columns: minmax(196px, max-content) minmax(0, 1fr);
    margin: 0;
    font-family: var(--mono);
    font-size: 12px;
}
.keys-move {
    display: contents;
}
.keys-move > dt,
.keys-move > dd {
    display: flex;
    margin: 0;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
}
.keys-move > dt {
    align-items: center;
    padding-right: 18px;
}
.keys-move > dd {
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-width: 0;
}
.keys-move:last-child > dt,
.keys-move:last-child > dd {
    border-bottom: 0;
}
.keys-move strong {
    font-weight: 500;
    color: var(--text);
}
.keys-move dd span {
    line-height: 1.45;
    color: var(--dim);
}

/* ---- Fighters: the cast as pills, the picked one's moves under them ---- */
.keys-cast {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.keys-who {
    --a: var(--brand);
    min-height: 30px;
    padding: 0 12px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--dim);
    background: none;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    cursor: pointer;
}
.keys-who:hover {
    color: #fff;
    border-color: #fff;
}
/* the pick is white, as on the 2D / 3D switch, with the fighter's own colour under it: a tint is not always readable */
.keys-who[aria-pressed='true'] {
    font-weight: 700;
    color: var(--dark);
    background: #fff;
    border-color: #fff;
    box-shadow: inset 0 -3px 0 var(--a);
}
.keys-fighter-head {
    --a: var(--brand);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    padding: 12px 0 2px;
}
.keys-fighter-head::before {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--a);
    border-radius: 50%;
}
.keys-fighter-head strong {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}
.keys-fighter-line {
    flex-basis: 100%;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--dim);
}

/* ---- Good to know: the Findabis triangle as the bullet ---- */
.keys-tips {
    display: grid;
    gap: 8px;
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.5;
    list-style: none;
    color: var(--text);
}
.keys-tips li {
    position: relative;
    padding-left: 16px;
}
.keys-tips li::before {
    content: '';
    position: absolute;
    top: 0.5em;
    left: 0;
    width: 7px;
    height: 6px;
    background: var(--brand);
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

/* ---- A phone: finger-sized pills, and where a sequence and its words do not fit side by side, the words go under ---- */
@media (max-width: 720px) {
    .keys-page {
        padding: 16px 16px max(28px, env(safe-area-inset-bottom));
    }
    .keys-who {
        min-height: 38px;
    }
}
@media (max-width: 520px) {
    .keys-moves {
        grid-template-columns: minmax(0, 1fr);
    }
    .keys-move > dt {
        padding: 10px 0 0;
        border-bottom: 0;
    }
    .keys-move > dd {
        padding: 4px 0 10px;
    }
}
