/* ==========================================================
   Tap Tempo Studio v1.5
   TapBpmFinder premium tool UI
   Core intent first, mobile-first, no headings, no clutter
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --tbpm-bg: #050713;
    --tbpm-panel: rgba(11, 16, 32, 0.86);
    --tbpm-panel-2: rgba(15, 22, 42, 0.82);
    --tbpm-panel-3: rgba(20, 29, 54, 0.72);
    --tbpm-text: #f8fafc;
    --tbpm-soft: #dbe7f7;
    --tbpm-muted: rgba(219, 231, 247, 0.66);
    --tbpm-faint: rgba(219, 231, 247, 0.46);
    --tbpm-line: rgba(255, 255, 255, 0.105);
    --tbpm-line-bright: rgba(35, 217, 255, 0.28);
    --tbpm-cyan: #23d9ff;
    --tbpm-blue: #4f8dff;
    --tbpm-violet: #7c5cff;
    --tbpm-pink: #e85dff;
    --tbpm-green: #b8ff3d;
    --tbpm-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.tbpm-wrap,
.tbpm-wrap * {
    box-sizing: border-box;
}

.tbpm-wrap {
    position: relative;
    isolation: isolate;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: clamp(8px, 2vw, 14px);
    color: var(--tbpm-text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.tbpm-wrap button,
.tbpm-wrap input,
.tbpm-wrap select {
    font: inherit;
}

.tbpm-wrap button {
    -webkit-tap-highlight-color: transparent;
}

/* Theme variations kept safe */
.tbpm-theme-light {
    --tbpm-bg: #f6f8ff;
    --tbpm-panel: rgba(255, 255, 255, 0.90);
    --tbpm-panel-2: rgba(255, 255, 255, 0.86);
    --tbpm-panel-3: rgba(241, 246, 255, 0.85);
    --tbpm-text: #0f172a;
    --tbpm-soft: #26344e;
    --tbpm-muted: rgba(15, 23, 42, 0.66);
    --tbpm-faint: rgba(15, 23, 42, 0.46);
    --tbpm-line: rgba(15, 23, 42, 0.11);
    --tbpm-shadow: 0 20px 54px rgba(33, 42, 80, 0.15);
}

.tbpm-theme-midnight {
    --tbpm-bg: #03050d;
}

/* Ambient glow */
.tbpm-ambient {
    position: absolute;
    z-index: -2;
    pointer-events: none;
    filter: blur(16px);
    opacity: 0.82;
}

.tbpm-ambient-one {
    width: min(430px, 58vw);
    height: min(430px, 58vw);
    left: -9%;
    top: -18%;
    background: radial-gradient(circle, rgba(35, 217, 255, 0.19), transparent 65%);
}

.tbpm-ambient-two {
    width: min(480px, 66vw);
    height: min(480px, 66vw);
    right: -10%;
    top: 12%;
    background: radial-gradient(circle, rgba(124, 92, 255, 0.23), transparent 66%);
}

.tbpm-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.105);
    background:
        radial-gradient(circle at 18% 0%, rgba(35, 217, 255, 0.12), transparent 28rem),
        radial-gradient(circle at 92% 10%, rgba(124, 92, 255, 0.14), transparent 32rem),
        linear-gradient(180deg, rgba(255,255,255,0.062), rgba(255,255,255,0.026)),
        rgba(8, 13, 28, 0.86);
    box-shadow:
        var(--tbpm-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.075);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: clamp(14px, 2.8vw, 22px);
}

.tbpm-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent, rgba(35, 217, 255, 0.10), transparent) top / 100% 1px no-repeat,
        linear-gradient(180deg, rgba(255,255,255,0.025), transparent 45%);
}

.tbpm-screen-status {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
    white-space: nowrap !important;
}

/* Main core */
.tbpm-core {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(260px, 0.92fr) minmax(300px, 1.08fr);
    gap: 12px;
    align-items: stretch;
}

.tbpm-result,
.tbpm-tap-pad,
.tbpm-controls,
.tbpm-accuracy-strip {
    border: 1px solid var(--tbpm-line);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.022)),
        rgba(9, 14, 29, 0.74);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.055);
}

.tbpm-result {
    position: relative;
    min-height: 210px;
    padding: clamp(18px, 3.2vw, 28px);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.tbpm-result::after {
    content: "";
    position: absolute;
    inset: auto -8% -45% -8%;
    height: 68%;
    background: radial-gradient(ellipse at center, rgba(35, 217, 255, 0.13), transparent 66%);
    pointer-events: none;
}

.tbpm-result-top {
    position: absolute;
    top: 18px;
    left: 22px;
    right: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tbpm-result-label,
.tbpm-field > span,
.tbpm-feel span,
.tbpm-accuracy-strip span {
    color: rgba(219, 231, 247, 0.58);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tbpm-confidence-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    max-width: 140px;
    padding: 0 11px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.052);
    color: rgba(248,250,252,0.76);
    font-size: 11px;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
}

.is-locked .tbpm-confidence-pill {
    border-color: rgba(184, 255, 61, 0.34);
    background: rgba(184, 255, 61, 0.10);
    color: #d9ff8c;
}

.is-good .tbpm-confidence-pill {
    border-color: rgba(35, 217, 255, 0.30);
    background: rgba(35, 217, 255, 0.09);
    color: #a8f4ff;
}

.is-low .tbpm-confidence-pill {
    border-color: rgba(232, 93, 255, 0.30);
    background: rgba(232, 93, 255, 0.09);
    color: #ffc6fb;
}

.tbpm-bpm-line {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 26px;
}

.tbpm-bpm {
    display: inline-block;
    min-width: 0.9em;
    color: #ffffff;
    font-size: clamp(58px, 10vw, 98px);
    line-height: 0.88;
    font-weight: 900;
    letter-spacing: -0.075em;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 32px rgba(35, 217, 255, 0.13);
}

.tbpm-bpm-unit {
    color: var(--tbpm-cyan);
    font-size: clamp(13px, 1.8vw, 18px);
    font-weight: 900;
    letter-spacing: 0.035em;
}

.tbpm-result-meta {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.tbpm-result-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    color: rgba(219, 231, 247, 0.72);
    background: rgba(255,255,255,0.050);
    border: 1px solid rgba(255,255,255,0.075);
    font-size: 13px;
    font-weight: 650;
}

.tbpm-result-meta strong {
    color: #ffffff;
    font-weight: 900;
}

/* Tap pad */
.tbpm-tap-pad {
    position: relative;
    min-height: 210px;
    border-radius: 24px;
    color: #ffffff;
    cursor: pointer;
    overflow: hidden;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    background:
        radial-gradient(circle at 50% 20%, rgba(255,255,255,0.22), transparent 9rem),
        linear-gradient(135deg, #21c5f8 0%, #4b88ff 48%, #7c5cff 100%);
    border-color: rgba(35, 217, 255, 0.34);
    box-shadow:
        0 18px 46px rgba(35, 125, 255, 0.18),
        inset 0 1px 0 rgba(255,255,255,0.18);
    transition:
        transform 160ms ease,
        filter 160ms ease,
        box-shadow 160ms ease;
    touch-action: manipulation;
    user-select: none;
}

.tbpm-tap-pad:hover,
.tbpm-tap-pad:focus-visible {
    filter: brightness(1.08) saturate(1.12);
    box-shadow:
        0 22px 58px rgba(35, 217, 255, 0.24),
        0 0 0 1px rgba(255,255,255,0.16) inset,
        inset 0 1px 0 rgba(255,255,255,0.22);
}

.tbpm-tap-pad:active,
.tbpm-tap-pad.is-tapping {
    transform: scale(0.985);
    filter: brightness(1.14) saturate(1.16);
}

.tbpm-ripple-layer {
    position: absolute;
    inset: 12px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.16);
    pointer-events: none;
}

.tbpm-tap-pad::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0.22), transparent 12%),
        conic-gradient(from 90deg, transparent, rgba(255,255,255,0.20), transparent 32%);
    opacity: 0;
    transform: scale(0.72);
    transition: opacity 160ms ease, transform 220ms ease;
}

.tbpm-tap-pad.is-tapping::before {
    opacity: 0.72;
    transform: scale(1);
}

.tbpm-tap-icon {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255,255,255,0.18);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}

.tbpm-tap-text,
.tbpm-tap-help {
    position: relative;
    z-index: 1;
}

.tbpm-tap-text {
    font-size: clamp(34px, 5vw, 50px);
    line-height: 0.95;
    font-weight: 900;
    letter-spacing: -0.07em;
}

.tbpm-tap-help {
    color: rgba(255,255,255,0.82);
    font-size: 13px;
    font-weight: 800;
}

/* Controls */
.tbpm-controls {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    border-radius: 20px;
}

.tbpm-control,
.tbpm-mini-button,
.tbpm-input-action button {
    appearance: none;
    border: 0;
    border-radius: 14px;
    min-height: 48px;
    padding: 0 14px;
    cursor: pointer;
    color: rgba(248,250,252,0.90);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.070), rgba(255,255,255,0.030)),
        rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.09);
    font-size: 15px;
    font-weight: 850;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.tbpm-control:hover,
.tbpm-mini-button:hover,
.tbpm-input-action button:hover {
    transform: translateY(-1px);
    color: #ffffff;
    background: rgba(255,255,255,0.080);
    border-color: rgba(35,217,255,0.18);
}

.tbpm-control-primary {
    color: #03101f;
    background: linear-gradient(135deg, #23d9ff, #4f8dff 55%, #7c5cff);
    border-color: rgba(255,255,255,0.16);
    box-shadow: 0 12px 26px rgba(35, 217, 255, 0.16);
}

.tbpm-control-primary:hover {
    color: #03101f;
    filter: brightness(1.06);
}

/* Accuracy strip */
.tbpm-accuracy-strip {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    border-radius: 20px;
}

.tbpm-accuracy-strip div {
    min-height: 66px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    padding: 12px 14px;
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.052), rgba(255,255,255,0.020)),
        rgba(255,255,255,0.026);
    border: 1px solid rgba(255,255,255,0.065);
    min-width: 0;
}

.tbpm-accuracy-strip strong {
    color: #ffffff;
    font-size: 19px;
    line-height: 1;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Panels */
.tbpm-panel {
    position: relative;
    z-index: 2;
    margin-top: 10px;
    border-radius: 22px;
    border: 1px solid var(--tbpm-line);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.048), rgba(255,255,255,0.020)),
        rgba(9, 14, 29, 0.66);
    overflow: hidden;
}

.tbpm-panel summary {
    list-style: none;
    cursor: pointer;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px;
    color: var(--tbpm-text);
    font-size: 16px;
    font-weight: 900;
}

.tbpm-panel summary::-webkit-details-marker {
    display: none;
}

.tbpm-panel summary i {
    width: 10px;
    height: 10px;
    border-right: 2px solid rgba(248,250,252,0.74);
    border-bottom: 2px solid rgba(248,250,252,0.74);
    transform: rotate(45deg) translateY(-2px);
    transition: transform 170ms ease;
}

.tbpm-panel[open] summary i {
    transform: rotate(225deg) translateY(-2px);
}

.tbpm-panel-body {
    border-top: 1px solid rgba(255,255,255,0.075);
    padding: 14px;
}

.tbpm-field-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 10px;
}

.tbpm-field {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.tbpm-field select,
.tbpm-field input {
    width: 100%;
    min-width: 0;
    height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.09);
    background: rgba(255,255,255,0.045);
    color: var(--tbpm-text);
    padding: 0 13px;
    outline: none;
    font-weight: 750;
}

.tbpm-field select:focus,
.tbpm-field input:focus {
    border-color: rgba(35,217,255,0.36);
    box-shadow: 0 0 0 3px rgba(35,217,255,0.09);
}

.tbpm-input-action {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-width: 0;
}

.tbpm-input-action button {
    min-width: 72px;
    height: 48px;
}

.tbpm-tip-card,
.tbpm-feel {
    margin-top: 10px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.075);
    background: rgba(255,255,255,0.035);
    padding: 13px 14px;
}

.tbpm-tip-card strong {
    display: block;
    color: var(--tbpm-text);
    font-size: 14px;
    font-weight: 900;
    margin-bottom: 4px;
}

.tbpm-tip-card p {
    margin: 0;
    color: var(--tbpm-muted);
    font-size: 13px;
    line-height: 1.55;
}

.tbpm-feel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tbpm-feel strong {
    color: var(--tbpm-text);
    font-size: 14px;
    font-weight: 850;
    text-align: right;
}

/* History */
.tbpm-history-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.tbpm-mini-button {
    min-height: 44px;
    padding: 0 14px;
}

.tbpm-mini-ghost {
    color: var(--tbpm-muted);
}

.tbpm-history {
    list-style: none;
    display: grid;
    gap: 8px;
    padding: 0;
    margin: 0;
}

.tbpm-history li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    padding: 10px 13px;
    border-radius: 15px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.07);
    color: var(--tbpm-muted);
    font-size: 13px;
}

.tbpm-history strong {
    color: var(--tbpm-text);
}

.tbpm-history small {
    color: var(--tbpm-faint);
    font-weight: 650;
}

.tbpm-history .tbpm-empty {
    justify-content: center;
    text-align: center;
    color: var(--tbpm-faint);
}

/* States */
.tbpm-wrap.is-locked .tbpm-result {
    border-color: rgba(184,255,61,0.22);
}

.tbpm-wrap.is-good .tbpm-result {
    border-color: rgba(35,217,255,0.22);
}

.tbpm-wrap.is-low .tbpm-result {
    border-color: rgba(232,93,255,0.18);
}

/* Compact mode */
.tbpm-compact .tbpm-shell {
    padding: 12px;
}

.tbpm-compact .tbpm-panel {
    display: none;
}

/* Mobile first refinements */
@media (max-width: 820px) {
    .tbpm-wrap {
        padding: 6px;
    }

    .tbpm-shell {
        border-radius: 24px;
        padding: 10px;
    }

    .tbpm-core {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .tbpm-result,
    .tbpm-tap-pad {
        min-height: 160px;
        border-radius: 20px;
    }

    .tbpm-result {
        padding: 48px 14px 14px;
    }

    .tbpm-result-top {
        top: 13px;
        left: 14px;
        right: 12px;
    }

    .tbpm-bpm {
        font-size: clamp(52px, 16vw, 70px);
        letter-spacing: -0.07em;
    }

    .tbpm-bpm-line {
        margin-top: 6px;
    }

    .tbpm-result-meta {
        margin-top: 11px;
    }

    .tbpm-result-meta span {
        min-height: 30px;
        font-size: 12px;
        padding: 0 10px;
    }

    .tbpm-tap-pad {
        min-height: 126px;
        gap: 5px;
    }

    .tbpm-tap-icon {
        width: 42px;
        height: 42px;
    }

    .tbpm-tap-icon svg {
        width: 23px;
        height: 23px;
    }

    .tbpm-tap-text {
        font-size: clamp(28px, 9vw, 36px);
    }

    .tbpm-tap-help {
        font-size: 12px;
    }

    .tbpm-controls {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
        padding: 6px;
        border-radius: 18px;
    }

    .tbpm-control {
        min-height: 43px;
        border-radius: 12px;
        padding: 0 8px;
        font-size: 14px;
    }

    .tbpm-accuracy-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        padding: 6px;
        border-radius: 18px;
    }

    .tbpm-accuracy-strip div {
        min-height: 58px;
        padding: 10px 9px;
        border-radius: 13px;
    }

    .tbpm-accuracy-strip span {
        font-size: 9px;
        letter-spacing: 0.045em;
    }

    .tbpm-accuracy-strip strong {
        font-size: 14px;
    }

    .tbpm-panel {
        margin-top: 8px;
        border-radius: 18px;
    }

    .tbpm-panel summary {
        min-height: 50px;
        padding: 0 14px;
        font-size: 15px;
    }

    .tbpm-panel-body {
        padding: 12px;
    }

    .tbpm-field-grid {
        grid-template-columns: 1fr;
    }

    .tbpm-feel {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .tbpm-feel strong {
        text-align: left;
    }
}

@media (max-width: 420px) {
    .tbpm-shell {
        padding: 8px;
        border-radius: 22px;
    }

    .tbpm-result,
    .tbpm-tap-pad {
        border-radius: 18px;
    }

    .tbpm-result {
        min-height: 152px;
    }

    .tbpm-tap-pad {
        min-height: 118px;
    }

    .tbpm-bpm {
        font-size: clamp(48px, 15.5vw, 62px);
    }

    .tbpm-bpm-unit {
        font-size: 12px;
    }

    .tbpm-confidence-pill {
        min-height: 25px;
        max-width: 116px;
        padding: 0 9px;
        font-size: 10px;
    }

    .tbpm-controls {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .tbpm-control {
        min-height: 40px;
        font-size: 13px;
        padding: 0 5px;
    }

    .tbpm-accuracy-strip {
        grid-template-columns: 1fr;
    }

    .tbpm-accuracy-strip div {
        min-height: 46px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .tbpm-accuracy-strip strong {
        font-size: 14px;
        max-width: 55%;
        text-align: right;
    }

    .tbpm-input-action {
        grid-template-columns: 1fr;
    }

    .tbpm-input-action button {
        width: 100%;
    }

    .tbpm-history li {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tbpm-wrap *,
    .tbpm-wrap *::before,
    .tbpm-wrap *::after {
        transition-duration: 0.001ms !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* ==========================================================
   v1.5 Final Polish: Inter-only feel + button contrast
   ========================================================== */

.tbpm-wrap,
.tbpm-wrap *,
.tbpm-wrap button,
.tbpm-wrap input,
.tbpm-wrap select,
.tbpm-wrap summary {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
}

/* More modern, less bulky typography */
.tbpm-result-label,
.tbpm-field > span,
.tbpm-feel span,
.tbpm-accuracy-strip span {
    font-weight: 800 !important;
    letter-spacing: 0.045em !important;
}

.tbpm-bpm {
    font-weight: 850 !important;
    letter-spacing: -0.065em !important;
    text-shadow:
        0 0 22px rgba(35, 217, 255, 0.11),
        0 12px 34px rgba(0, 0, 0, 0.22) !important;
}

.tbpm-tap-text {
    font-weight: 850 !important;
    letter-spacing: -0.055em !important;
}

.tbpm-panel summary,
.tbpm-control,
.tbpm-mini-button,
.tbpm-input-action button {
    font-weight: 760 !important;
}

/* Clear premium button contrast, including hover and theme overrides */
.tbpm-control-primary,
.tbpm-control-primary:link,
.tbpm-control-primary:visited,
.tbpm-control-primary:hover,
.tbpm-control-primary:focus,
.tbpm-control-primary:active,
.tbpm-wrap button.tbpm-control-primary,
.tbpm-wrap button.tbpm-control-primary:hover,
.tbpm-wrap button.tbpm-control-primary:focus,
.tbpm-wrap button.tbpm-control-primary:active {
    color: #03101f !important;
    background:
        radial-gradient(circle at 22% 15%, rgba(255,255,255,0.44), transparent 26%),
        linear-gradient(135deg, #4ee9ff 0%, #67a4ff 48%, #9b7cff 100%) !important;
    border-color: rgba(255,255,255,0.20) !important;
    text-shadow: none !important;
    opacity: 1 !important;
    box-shadow:
        0 14px 32px rgba(35, 217, 255, 0.20),
        0 0 0 1px rgba(255,255,255,0.16) inset,
        inset 0 1px 0 rgba(255,255,255,0.44) !important;
}

.tbpm-wrap button.tbpm-control-primary:hover,
.tbpm-wrap button.tbpm-control-primary:focus-visible {
    color: #020617 !important;
    background:
        radial-gradient(circle at 24% 12%, rgba(255,255,255,0.58), transparent 28%),
        linear-gradient(135deg, #8ff2ff 0%, #93b8ff 48%, #b9a3ff 100%) !important;
    filter: none !important;
    transform: translateY(-1px) !important;
    box-shadow:
        0 18px 44px rgba(124, 92, 255, 0.28),
        0 0 26px rgba(35, 217, 255, 0.16),
        0 0 0 1px rgba(255,255,255,0.20) inset,
        inset 0 1px 0 rgba(255,255,255,0.50) !important;
}

/* Improve non-primary controls without dull hover */
.tbpm-control:not(.tbpm-control-primary):hover,
.tbpm-mini-button:hover,
.tbpm-input-action button:hover {
    color: #ffffff !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.105), rgba(255,255,255,0.045)),
        rgba(255,255,255,0.040) !important;
    border-color: rgba(35,217,255,0.24) !important;
}

/* Give the tool a slightly more alive inner surface without extra cards */
.tbpm-shell {
    background:
        radial-gradient(circle at 18% 0%, rgba(35, 217, 255, 0.15), transparent 27rem),
        radial-gradient(circle at 92% 8%, rgba(124, 92, 255, 0.18), transparent 31rem),
        linear-gradient(180deg, rgba(255,255,255,0.070), rgba(255,255,255,0.028)),
        rgba(7, 12, 27, 0.88) !important;
}

.tbpm-result,
.tbpm-controls,
.tbpm-accuracy-strip,
.tbpm-panel {
    border-color: rgba(255,255,255,0.115) !important;
}

.tbpm-tap-pad {
    background:
        radial-gradient(circle at 50% 18%, rgba(255,255,255,0.30), transparent 8.5rem),
        linear-gradient(135deg, #22d2ff 0%, #4b8dff 46%, #805cff 100%) !important;
    color: #ffffff !important;
}

.tbpm-tap-pad:hover,
.tbpm-tap-pad:focus-visible {
    background:
        radial-gradient(circle at 50% 18%, rgba(255,255,255,0.38), transparent 9rem),
        linear-gradient(135deg, #35e1ff 0%, #62a0ff 46%, #9277ff 100%) !important;
    filter: none !important;
}

/* Make copy button easier to read on very small screens */
@media (max-width: 420px) {
    .tbpm-bpm {
        font-size: clamp(44px, 14.5vw, 58px) !important;
    }

    .tbpm-control {
        font-weight: 760 !important;
    }

    .tbpm-control-primary,
    .tbpm-wrap button.tbpm-control-primary:hover,
    .tbpm-wrap button.tbpm-control-primary:focus {
        color: #020617 !important;
    }
}
