/* ===== TABIFY TUNER (tune.html) ===== */
/* Theme tokens are inherited from styles.css :root. A few tuner-specific ones: */
:root {
    --tuner-green: #3a7d44;
    --tuner-amber: #b8860b;
}

.tune-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    background: var(--bg);
}

.tune-wrap {
    width: 100%;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.tune-card {
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border-dark);
    padding: 2.25rem 2rem;
    text-align: center;
}

.tune-title {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 1.6rem;
    line-height: 1.25;
    margin-bottom: 0.6rem;
}

.tune-sub {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.6rem;
}

.tune-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hidden {
    display: none !important;
}

/* Visually hidden but available to screen readers (ARIA live region). */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

/* ===== TUNER DISPLAY ===== */
.tuner-display {
    margin: 0.5rem 0 1.25rem;
    padding: 1.5rem 1rem 1.25rem;
    border: 1px solid var(--border);
    background: var(--bg);
    transition: border-color 0.2s, background 0.2s;
}

.tuner-display.in-tune {
    border-color: var(--tuner-green);
    background: rgba(58, 125, 68, 0.07);
}

.tuner-note-block {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
}

.tuner-note {
    font-family: var(--serif);
    font-weight: 900;
    font-size: 4.5rem;
    line-height: 1;
    min-width: 2.2ch;
}

.tuner-display.in-tune .tuner-note {
    color: var(--tuner-green);
}

.tuner-arrow {
    font-size: 1.8rem;
    color: var(--border);
    transition: color 0.15s;
}

.tuner-arrow.lit {
    color: var(--tuner-amber);
}

.tuner-octave {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-top: 0.35rem;
    min-height: 1rem;
}

/* ===== CENTS METER ===== */
.tuner-meter {
    position: relative;
    margin: 1.5rem auto 0.5rem;
    max-width: 360px;
}

.tuner-ticks {
    position: relative;
    display: flex;
    justify-content: space-between;
    height: 36px;
    border-bottom: 2px solid var(--border-dark);
}

.tuner-ticks span {
    width: 1px;
    background: var(--border);
    height: 14px;
    align-self: flex-end;
}

.tuner-ticks span.center {
    width: 2px;
    height: 26px;
    background: var(--border-dark);
}

.tuner-needle {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 2px;
    height: 40px;
    background: var(--text);
    transform: translateX(-50%);
    transition: left 0.08s linear;
}

.tuner-display.in-tune .tuner-needle {
    background: var(--tuner-green);
}

.tuner-meter-labels {
    display: flex;
    justify-content: space-between;
    font-family: var(--mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

.tuner-readout {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--text-light);
}

.tuner-status {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    min-height: 1.2rem;
}

@media (max-width: 768px) {
    .tune-card {
        padding: 1.75rem 1.25rem;
    }

    .tune-title {
        font-size: 1.35rem;
    }

    .tuner-note {
        font-size: 3.5rem;
    }

    .tune-actions {
        flex-direction: column;
    }

    .tune-actions .btn {
        width: 100%;
    }
}
