.cheats-key{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;flex:0 0 36px;background:var(--fe-color-surface);border:1px solid var(--fe-color-border);border-radius:var(--fe-radius-sm);box-shadow:0 2px 0 var(--fe-color-border)}.cheats-key svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.cheats-key{font-family:inherit;font-size:13px;font-weight:700}
.cheats-key--triangle,.cheats-key--xbox-a{color:#16844c;background:#eaf7ef;border-color:#9ad8b3}
.cheats-key--circle,.cheats-key--xbox-b{color:#c32d3d;background:#fff0f1;border-color:#efb0b8}
.cheats-key--square{color:#ad397e;background:#fff0f8;border-color:#e8b1d2}
.cheats-key--cross,.cheats-key--xbox-x{color:#2464ba;background:#edf4ff;border-color:#acc8ef}
.cheats-key--xbox-y{color:#806000;background:#fff8db;border-color:#dfca79}
.cheats-key--triangle,.cheats-key--circle,.cheats-key--square,.cheats-key--cross{font-size:25px;line-height:1}
.pad-key{display:inline-flex;vertical-align:middle;line-height:1}.pad-key .cheats-key{box-sizing:border-box;width:auto;min-width:2em;height:2em;padding:0 .35em;flex:auto;white-space:nowrap;font:700 0.9rem/1 sans-serif}.pad-key svg{width:1.3em;height:1.3em}.pad-sequence{align-items:center}.pad-sequence .cheats-keys{display:contents}

/* Platform-qualified keys share their finish in the picker, editor and article. */
[data-controller-key], .pad-key .cheats-key[data-controller-key] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    vertical-align: middle;
    width: auto;
    min-width: 1.35em;
    height: 1.35em;
    padding: 0 .16em;
    border: 1px solid #121722;
    border-radius: 50%;
    background: linear-gradient(145deg, #414956, #202530 75%);
    box-shadow: inset 0 1px 1px #ffffff40, inset 0 -2px 2px #0006;
    color: var(--pad-ink, #fff);
    white-space: nowrap;
    font: 700 1em/1 system-ui, sans-serif;
}
[data-controller-key="[PS:△]"] { --pad-ink: #74edbc; }
[data-controller-key="[PS:○]"] { --pad-ink: #ff8788; }
[data-controller-key="[PS:□]"] { --pad-ink: #ffade2; }
[data-controller-key="[PS:✕]"] { --pad-ink: #99caff; }
[data-controller-key="[Xbox:A]"] { --pad-ink: #98e569; }
[data-controller-key="[Xbox:B]"] { --pad-ink: #ff7772; }
[data-controller-key="[Xbox:X]"] { --pad-ink: #80c6ff; }
[data-controller-key="[Xbox:Y]"] { --pad-ink: #ffdb65; }
:is([data-controller-key],.pad-key .cheats-key):is(
    [data-controller-key$="1]"],[data-controller-key$="B]"]:not([data-controller-key="[Xbox:B]"])
) { border-radius: .65rem .65rem .25rem .25rem; min-width: 1.8em; }
:is([data-controller-key],.pad-key .cheats-key):is([data-controller-key$="2]"],[data-controller-key$="T]"]) {
    border-radius: .3rem .3rem .75rem .75rem; min-width: 1.8em;
}
:is([data-controller-key],.pad-key .cheats-key):is([data-controller-key*=":↑"],[data-controller-key*=":↓"],[data-controller-key*=":←"],[data-controller-key*=":→"]) {
    border-radius: .35rem;
}

.pad-key svg { width: .94em; height: .94em; }
/* Thumb cap and separate movement indicator; the stored text stays selectable. */
:is(.pad-key .cheats-key,[data-controller-key]):is([data-controller-key*=" analog"],[data-controller-key$="3]"],[data-controller-key$="S]"]) {
    position: relative;
    font-size: inherit;
    color: transparent;
    width: 1.35em;
    min-width: 1.35em;
    padding: 0;
    overflow: visible;
    border-radius: 50%;
    background: radial-gradient(circle at 45% 36%, #505b69 25%, #353e4a 62%, #202631 63%);
    box-shadow: inset 0 0 0 1px #9099a4;
}
[data-controller-key*="Sol analog"],[data-controller-key$=":LS]"] { --stick-side: "L"; }
[data-controller-key*="Sağ analog"],[data-controller-key$=":RS]"] { --stick-side: "R"; }
[data-controller-key$=":L3]"] { --stick-side: "L3"; }
[data-controller-key$=":R3]"] { --stick-side: "R3"; }
[data-controller-key$=":LS]"] { --stick-side: "LS"; }
[data-controller-key$=":RS]"] { --stick-side: "RS"; }
[data-controller-key*=" analog"]::before,[data-controller-key$="3]"]::before,[data-controller-key$="S]"]::before {
    content: var(--stick-side);
    position: absolute; inset: 0;
    display: grid; place-items: center;
    color: white; font-size: .74em;
}
[data-controller-key*=" analog "] { margin-inline-end: .75em; }
[data-controller-key*=" analog ↑"] { --stick-direction: "↑"; }
[data-controller-key*=" analog ↓"] { --stick-direction: "↓"; }
[data-controller-key*=" analog ←"] { --stick-direction: "←"; }
[data-controller-key*=" analog →"] { --stick-direction: "→"; }
[data-controller-key*=" analog "]::after {
    content: var(--stick-direction);
    position: absolute; left: 100%; bottom: -.05em;
    color: #fff; background: #343e4c; border-radius: .18em;
    font: 700 .78em/1 system-ui,sans-serif;
}

/* A geometric outline keeps the PlayStation square identical in text and SVG editors. */
[data-controller-key="[PS:□]"], .pad-key .cheats-key[data-controller-key="[PS:□]"] {
    position: relative;
    width: 1.35em;
    padding: 0;
    color: transparent;
}
[data-controller-key="[PS:□]"]::before {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    box-sizing: border-box;
    width: .7em;
    height: .7em;
    border: max(1.5px, .11em) solid var(--pad-ink);
}

.pad-key [data-pad-face]::before { content: attr(data-pad-face); }
