.device-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
    margin-bottom: 20px;
}

.device-identity h2 {
    font-size: 14px;
    margin-bottom: 5px;
}

.bluetooth-access {
    margin: 0 0 20px;
}

.actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.device-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 20px;
}

.card-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.keyboard-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.keyboard-surround {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px 7.3% 44px;
}

.keyboard-frame {
    width: 100%;
    max-width: 740px;
}

.keys {
    width: 100%;
    position: relative;
    aspect-ratio: 107.1333333333/62.4666666667;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    column-gap: 6.2227753578%;
    row-gap: 11.3553895411%;
    container-type: inline-size;
}

.circle-key {
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--key-face);
    border: 0.728562539cqi solid var(--key-rim);
    box-shadow:
        0 0.242814cqi 0.485628cqi var(--key-drop),
        inset 0 0.202364cqi 0.161881cqi var(--key-gloss),
        inset 0 -0.161881cqi 0.242814cqi var(--key-inset);
    color: var(--key-label);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    user-select: none;
}

.circle-key .note {
    font: 600 3.3cqi var(--mono);
    line-height: 1;
    text-shadow: none;
    white-space: nowrap;
}

.circle-key.active {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary-text);
}

.sharp-key {
    position: absolute;
    width: 4.9408836341%;
    aspect-ratio: 1;
    background: var(--key-rim);
    border-radius: 50%;
    box-shadow: 0 0.242814cqi 0.485628cqi var(--key-drop);
    z-index: 3;
}

.sharp-key.active {
    background: var(--primary);
}

.keyboard-footer {
    border-top: 1px solid var(--line-soft);
    display: flex;
    gap: 20px;
    align-items: center;
    padding-top: 18px;
    color: var(--muted);
    font-size: 11px;
    flex-wrap: wrap;
}

.legend-dot {
    background: var(--primary);
    margin-right: 6px;
}

.keyboard-footer b {
    color: var(--primary-text);
    margin-left: 5px;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar .card {
    padding: 22px;
}

.sidebar h2 {
    font-size: 14px;
}

#last-note {
    font:
        56px Georgia,
        serif;
    letter-spacing: -2px;
    color: var(--text-strong);
    margin: 9px 0;
}

#last-event {
    margin-bottom: 18px;
    font-size: 11px;
}

.metrics {
    display: flex;
    gap: 40px;
    margin: 0;
}

.metrics dt {
    font: 10px var(--mono);
    color: var(--muted);
    margin-bottom: 6px;
}

.metrics dd {
    margin: 0;
    font: 20px var(--mono);
}

.calibration .muted {
    font-size: 11px;
}

.calibration > button {
    width: 100%;
}

.inline {
    display: flex;
    gap: 7px;
}

.inline input {
    width: 60px;
    flex: 1;
}

.inline button {
    padding: 7px 10px;
}

.technical {
    margin-top: 20px;
}

.technical summary {
    cursor: pointer;
    font-size: 13px;
}

.technical-list {
    font-size: 12px;
}

.technical-list > div {
    display: flex;
    gap: 20px;
    margin: 14px 0;
}

.technical-list dt {
    color: var(--muted);
    min-width: 170px;
}

.technical-list dd {
    margin: 0;
    font-family: var(--mono), monospace;
    overflow-wrap: anywhere;
}

.technical code {
    overflow-wrap: anywhere;
}

.technical p:last-child {
    margin-bottom: 0;
}
