.hm-library #lib-message:empty,
#lib-sms-status:empty { display: none; }

#lib-sms {
    box-sizing: border-box;
    width: min(100%, 28rem);
    margin: clamp(1.5rem, 4vw, 3rem) auto;
    padding: clamp(1.25rem, 3vw, 2rem);
    color: var(--reader-text);
    background: var(--reader-paper);
    border: 1px solid var(--reader-rule);
    border-radius: 1rem;
}
#lib-sms h2 {
    margin: 0;
    color: var(--reader-heading);
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    line-height: 1.55;
}
#lib-sms-help, #lib-sms-status {
    color: var(--reader-copy);
    font-size: .97rem;
    line-height: 1.9;
    overflow-wrap: anywhere;
}
#lib-sms-help { margin: .35rem 0 0; }
#lib-sms-status { margin: 0; }
#lib-sms-form {
    display: grid;
    gap: 1.25rem;
    margin: 1.5rem 0 0;
}
#lib-mobile-wrap, #lib-sms-code-wrap {
    display: grid;
    gap: .45rem;
    line-height: 1.7;
}
#lib-mobile-wrap input {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 3rem;
    padding: .55rem .85rem;
    border: 1px solid var(--reader-muted);
    border-radius: .55rem;
    background: var(--reader-paper);
    color: inherit;
    font: inherit;
    font-size: max(16px, 1rem);
    line-height: 1.5;
}
#lib-sms-buttons { display: grid; gap: .25rem; }
#lib-sms-buttons button { min-height: 3rem; line-height: 1.6; }
#lib-sms-buttons .lib-primary {
    width: 100%;
    color: var(--reader-action-ink);
    background: var(--reader-action);
    font-weight: 600;
}
#lib-sms-buttons button:disabled { cursor: wait; opacity: .7; }
#lib-sms-buttons .lib-link { text-decoration: underline; text-underline-offset: .23em; }
.lib-otp { position: relative; }
#lib-otp-cells { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: clamp(.25rem, 1.25vw, .6rem); }
#lib-otp-cells span {
    display: grid;
    place-items: center;
    height: 3rem;
    border: 1px solid var(--reader-muted);
    border-radius: .5rem;
    font: 600 1.4rem/1.2 ui-monospace,monospace;
    font-variant-numeric: tabular-nums;
}
.lib-otp:focus-within .current, #lib-mobile-wrap input:focus-visible, #lib-sms-buttons button:focus-visible {
    outline: 2px solid var(--reader-accent);
    outline-offset: 2px;
}
#lib-sms #lib-otp { box-sizing: border-box; position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: text; font-size: 16px; }
@media (max-width: 32rem) {
    #hm-library:has(#lib-sms:not([hidden])) .breadcrumb { margin-bottom: 1rem; }
    #lib-sms { margin-block: 1.25rem; }
}
