.nbmr-app {
    --nbmr-card: #171717;
    --nbmr-card-2: #202020;
    --nbmr-text: #ffffff;
    --nbmr-muted: #b9b9b9;
    --nbmr-border: #343434;
    --nbmr-good: #35b66f;
    --nbmr-bad: #e16666;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 12px 12px 30px;
    box-sizing: border-box;
    color: var(--nbmr-text);
    font-family: inherit;
}

.nbmr-app *,
.nbmr-app *::before,
.nbmr-app *::after {
    box-sizing: border-box;
}

.nbmr-head {
    text-align: center;
    margin: 0 0 14px;
}

.nbmr-kicker {
    margin: 0 0 4px;
    color: var(--nbmr-muted);
    font-size: 12px;
    line-height: 1.3;
}

.nbmr-head h2 {
    margin: 0 0 5px;
    color: var(--nbmr-text);
    font-size: 22px;
    line-height: 1.15;
    font-weight: 800;
}

.nbmr-head > p:last-child {
    margin: 0;
    color: var(--nbmr-muted);
    font-size: 14px;
    line-height: 1.4;
}

.nbmr-form-card,
.nbmr-help,
.nbmr-inactive {
    background: var(--nbmr-card);
    border: 1px solid var(--nbmr-border);
    border-radius: 14px;
}

.nbmr-form-card {
    padding: 14px;
}

.nbmr-form {
    display: grid;
    gap: 12px;
}

.nbmr-field {
    min-width: 0;
}

.nbmr-field label {
    display: block;
    margin: 0 0 5px;
    color: var(--nbmr-text);
    font-size: 13px;
    line-height: 1.3;
    font-weight: 700;
}

.nbmr-field label span {
    color: var(--nbmr-muted);
    font-weight: 400;
}

.nbmr-field input,
.nbmr-field select {
    display: block;
    width: 100%;
    min-height: 46px;
    margin: 0;
    border: 1px solid #454545;
    border-radius: 9px;
    background: #fff !important;
    color: #111 !important;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.3;
    outline: none;
}

.nbmr-field select {
    padding-right: 34px;
}

.nbmr-field input:focus,
.nbmr-field select:focus {
    border-color: #fff;
    box-shadow: 0 0 0 2px rgba(255,255,255,.16);
}

.nbmr-primary,
.nbmr-secondary,
.nbmr-refresh,
.nbmr-vote,
.nbmr-take {
    font-family: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.nbmr-primary {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 9px;
    padding: 10px 14px;
    background: #fff;
    color: #111;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 800;
}

.nbmr-secondary,
.nbmr-refresh {
    min-height: 44px;
    border: 1px solid var(--nbmr-border);
    border-radius: 9px;
    background: #202020;
    color: var(--nbmr-text);
    padding: 9px 13px;
    font-size: 13px;
    font-weight: 800;
}

.nbmr-primary:disabled,
.nbmr-secondary:disabled,
.nbmr-refresh:disabled,
.nbmr-vote:disabled,
.nbmr-take:disabled {
    opacity: .55;
    cursor: wait;
}

.nbmr-feedback,
.nbmr-help-status,
.nbmr-list-status {
    min-height: 18px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--nbmr-muted);
}

.nbmr-feedback {
    text-align: center;
}

.nbmr-feedback.is-success {
    color: #8fe0ae;
}

.nbmr-feedback.is-error,
.nbmr-help-status.is-error {
    color: #ff9d9d;
}

.nbmr-help {
    margin-top: 18px;
    padding: 14px;
}

.nbmr-help-head h3 {
    margin: 0 0 4px;
    color: var(--nbmr-text);
    font-size: 17px;
    line-height: 1.2;
}

.nbmr-help-head p {
    margin: 0 0 12px;
    color: var(--nbmr-muted);
    font-size: 12px;
    line-height: 1.4;
}

.nbmr-search-row {
    display: grid;
    gap: 8px;
}

.nbmr-search-row .nbmr-secondary {
    width: 100%;
}

.nbmr-genre-row {
    margin-top: 14px;
}

.nbmr-music-results {
    display: grid;
    gap: 7px;
    margin-top: 8px;
}

.nbmr-music-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 9px 10px;
    border: 1px solid var(--nbmr-border);
    border-radius: 10px;
    background: #111;
}

.nbmr-music-copy {
    min-width: 0;
}

.nbmr-music-title {
    color: var(--nbmr-text);
    font-size: 13px;
    line-height: 1.25;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.nbmr-music-artist {
    margin-top: 2px;
    color: var(--nbmr-muted);
    font-size: 11px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.nbmr-take {
    min-height: 42px;
    border: 1px solid #4d4d4d;
    border-radius: 8px;
    background: #fff;
    color: #111;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.nbmr-source {
    margin: 9px 0 0;
    color: #818181;
    font-size: 10px;
    line-height: 1.3;
    text-align: right;
}

.nbmr-list-section {
    margin-top: 22px;
}

.nbmr-list-head {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 8px;
}

.nbmr-list-head h3 {
    margin: 0 0 5px;
    color: var(--nbmr-text);
    font-size: 17px;
    line-height: 1.2;
}

.nbmr-list-head p {
    margin: 0;
    color: var(--nbmr-muted);
    font-size: 11px;
    line-height: 1.45;
}

.nbmr-refresh {
    align-self: flex-start;
}

.nbmr-refresh span {
    display: inline-block;
    margin-right: 4px;
    font-size: 16px;
}

.nbmr-list {
    display: grid;
    gap: 8px;
}

.nbmr-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 11px;
    border: 1px solid var(--nbmr-border);
    border-radius: 11px;
    background: var(--nbmr-card);
}

.nbmr-rank {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--nbmr-card-2);
    color: var(--nbmr-muted);
    font-size: 12px;
    font-weight: 800;
}

.nbmr-item-main {
    min-width: 0;
}

.nbmr-title {
    margin: 1px 0 4px;
    color: var(--nbmr-text);
    font-size: 15px;
    line-height: 1.25;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.nbmr-meta {
    min-height: 16px;
    margin-bottom: 8px;
    color: var(--nbmr-muted);
    font-size: 10px;
    line-height: 1.3;
}

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

.nbmr-vote {
    min-width: 70px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid var(--nbmr-border);
    border-radius: 9px;
    padding: 7px 10px;
    background: var(--nbmr-card-2);
    color: var(--nbmr-text);
    font-size: 14px;
    font-weight: 800;
}

.nbmr-vote.is-up-active {
    border-color: var(--nbmr-good);
    background: rgba(53,182,111,.15);
}

.nbmr-vote.is-down-active {
    border-color: var(--nbmr-bad);
    background: rgba(225,102,102,.15);
}

.nbmr-score {
    margin-left: auto;
    color: var(--nbmr-muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.nbmr-inactive {
    padding: 32px 18px;
    text-align: center;
}

.nbmr-inactive h2 {
    margin: 8px 0 6px;
    color: var(--nbmr-text);
    font-size: 20px;
}

.nbmr-inactive p {
    margin: 0;
    color: var(--nbmr-muted);
    font-size: 14px;
    line-height: 1.45;
}

.nbmr-status-dot {
    width: 11px;
    height: 11px;
    margin: 0 auto;
    border-radius: 50%;
    background: #d85b5b;
}

.nbmr-hp,
.nbmr-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (min-width: 560px) {
    .nbmr-app {
        padding-left: 16px;
        padding-right: 16px;
    }

    .nbmr-form-card,
    .nbmr-help {
        padding: 18px;
    }

    .nbmr-search-row {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
    }

    .nbmr-search-row .nbmr-secondary {
        width: auto;
        min-width: 110px;
    }

    .nbmr-list-head {
        flex-direction: row;
        align-items: end;
        justify-content: space-between;
    }

    .nbmr-refresh {
        flex: 0 0 auto;
    }
}

@media (min-width: 768px) {
    .nbmr-app {
        padding-top: 22px;
    }

    .nbmr-head h2 {
        font-size: 28px;
    }

    .nbmr-form {
        grid-template-columns: .75fr 1.35fr auto;
        align-items: end;
    }

    .nbmr-primary {
        width: auto;
        min-width: 160px;
    }

    .nbmr-feedback {
        grid-column: 1 / -1;
    }
}

/* Compact request and search controls; retain 16px inputs on phones. */
.nbmr-app .nbmr-head { margin-bottom: 10px; }
.nbmr-app .nbmr-head h2 { font-size: 20px; }
.nbmr-app .nbmr-head > p:last-child { font-size: 12px; }
.nbmr-app .nbmr-form-card,
.nbmr-app .nbmr-help { padding: 10px; }
.nbmr-app .nbmr-form { gap: 8px; }
.nbmr-app .nbmr-field label { font-size: 12px; margin-bottom: 3px; }
.nbmr-app .nbmr-field input,
.nbmr-app .nbmr-field select {
    min-height: 44px;
    padding: 7px 10px;
    font-size: 16px;
    line-height: 1.25;
    border-radius: 7px;
}
.nbmr-app .nbmr-field select { padding-right: 30px; }
.nbmr-app .nbmr-primary {
    min-height: 44px;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 7px;
}
.nbmr-app .nbmr-search-row .nbmr-secondary {
    padding: 7px 10px;
    font-size: 12px;
}
.nbmr-app .nbmr-feedback:empty { display: none; }
@media (min-width: 560px) {
    .nbmr-app .nbmr-form-card,
    .nbmr-app .nbmr-help { padding: 12px; }
}
@media (min-width: 768px) {
    .nbmr-app .nbmr-head h2 { font-size: 22px; }
    .nbmr-app .nbmr-primary { min-width: 140px; }
}
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
    .nbmr-app .nbmr-field input,
    .nbmr-app .nbmr-field select { font-size: 14px; min-height: 40px; }
    .nbmr-app .nbmr-primary,
    .nbmr-app .nbmr-search-row .nbmr-secondary { min-height: 40px; }
}
