/* ==========================================================================
   Fretboard Lab — interactive guitar fretboard (/guitar)
   Scoped to .gt-app; every class is `gt-` prefixed so nothing here can
   collide with the global stylesheet. Colours inherit the site tokens
   (--bg, --surface, --border, --text, --muted, --accent) from style.css.
   ========================================================================== */

.gt-app {
    --gt-nut-w: 56px;
    --gt-row-h: 52px;
    --gt-dot: 33px;

    /* Interval colours — these are functional, not decorative:
       the learner reads the shape by role, not by note name. */
    --gt-root: #fb7185;
    --gt-third: #fbbf24;
    --gt-fifth: #22d3ee;
    --gt-seventh: #c084fc;
    --gt-other: #94a3b8;

    --gt-ok: #34d399;
    --gt-bad: #f87171;

    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Electric leans on the site's indigo; acoustic switches to warm amber. */
.gt-app[data-guitar="electric"] {
    --gt-accent: var(--accent);
    --gt-accent-ink: #0b0c1a;
    --gt-accent-soft: var(--accent-glow);
    --gt-wood-a: #2c2018;
    --gt-wood-b: #453023;
    --gt-wood-c: #1b1310;
    --gt-nut: #d8dee6;
    --gt-edge: #0a0a0b;
}

.gt-app[data-guitar="acoustic"] {
    --gt-accent: #f0a04b;
    --gt-accent-ink: #2a1a06;
    --gt-accent-soft: rgba(240, 160, 75, 0.22);
    --gt-wood-a: #6b431f;
    --gt-wood-b: #8d5c2e;
    --gt-wood-c: #4a2d14;
    --gt-nut: #f0e6d2;
    --gt-edge: #2a1a0c;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.gt-head {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.gt-head-text {
    margin-right: auto;
}

.gt-title {
    font-size: 1.5rem;
    margin-bottom: 6px;
}

.gt-sub {
    font-size: 0.875rem;
    color: var(--muted);
    max-width: 46ch;
}

/* --------------------------------------------------------------------------
   Controls: segmented toggles, chips, buttons
   -------------------------------------------------------------------------- */

.gt-seg {
    display: inline-flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 3px;
    gap: 2px;
}

.gt-seg-label {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0 8px;
}

.gt-seg button {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-family: var(--font);
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.gt-seg button:hover {
    color: var(--text);
}

.gt-seg button[aria-pressed="true"] {
    background: var(--gt-accent);
    color: var(--gt-accent-ink);
}

/* Ghost variant stays neutral — used where the accent would compete. */
.gt-seg--ghost button[aria-pressed="true"] {
    background: #1c1c20;
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--border-hover);
}

.gt-chip {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    border-radius: 999px;
    padding: 6px 13px;
    font-family: var(--font);
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.3;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.gt-chip:hover {
    color: var(--text);
    border-color: var(--border-hover);
}

.gt-chip[aria-pressed="true"] {
    background: var(--gt-accent);
    border-color: var(--gt-accent);
    color: var(--gt-accent-ink);
}

.gt-chip--sm {
    padding: 5px 11px;
    font-size: 0.78rem;
}

.gt-chip--note {
    min-width: 46px;
    text-align: center;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

.gt-btn {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 8px 15px;
    font-family: var(--font);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.gt-btn:hover {
    border-color: var(--border-hover);
    background: #17171a;
}

.gt-btn--primary {
    background: var(--gt-accent);
    border-color: var(--gt-accent);
    color: var(--gt-accent-ink);
    font-weight: 600;
}

.gt-btn--primary:hover {
    background: var(--gt-accent);
    border-color: var(--gt-accent);
    filter: brightness(1.08);
}

.gt-select {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 8px 11px;
    font-family: var(--font);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
}

.gt-sep {
    width: 1px;
    height: 22px;
    background: var(--border);
    margin: 0 3px;
}

/* --------------------------------------------------------------------------
   Mode tabs
   -------------------------------------------------------------------------- */

.gt-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 18px;
    overflow-x: auto;
}

.gt-tabs button {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 11px 16px;
    white-space: nowrap;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.gt-tabs button:hover {
    color: var(--text);
}

.gt-tabs button[aria-selected="true"] {
    color: var(--text);
    border-bottom-color: var(--gt-accent);
}

/* --------------------------------------------------------------------------
   Control panels
   -------------------------------------------------------------------------- */

.gt-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 18px;
}

.gt-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.gt-row + .gt-row {
    margin-top: 12px;
}

.gt-lab {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    flex: none;
    min-width: 62px;
}

.gt-lab--auto {
    min-width: auto;
}

.gt-hint {
    font-size: 0.8125rem;
    color: var(--muted);
    line-height: 1.6;
    margin-top: 10px;
}

.gt-hint strong {
    color: var(--text);
    font-weight: 600;
}

.gt-kbd {
    background: var(--surface);
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    border-radius: 4px;
    padding: 1px 6px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--muted);
}

/* --------------------------------------------------------------------------
   The fretboard
   -------------------------------------------------------------------------- */

.gt-boardwrap {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
}

.gt-boardwrap::-webkit-scrollbar {
    height: 8px;
}

.gt-boardwrap::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 999px;
}

.gt-frame {
    display: flex;
    min-width: 760px;
}

.gt-gutter {
    flex: none;
    width: 30px;
    display: flex;
    flex-direction: column;
    padding-top: 9px;
}

.gt-sname {
    height: var(--gt-row-h);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--muted);
}

.gt-sname small {
    font-size: 0.6rem;
    color: #61616a;
    margin-left: 2px;
}

.gt-boardcol {
    flex: 1;
    min-width: 0;
}

.gt-board {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--gt-edge);
    padding: 9px 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45), inset 0 0 60px rgba(0, 0, 0, 0.5);
    background:
        repeating-linear-gradient(91deg, rgba(0, 0, 0, 0.14) 0 2px, transparent 2px 9px),
        linear-gradient(180deg, var(--gt-wood-c), var(--gt-wood-b) 30%, var(--gt-wood-a) 78%, var(--gt-wood-c));
}

.gt-rows {
    position: relative;
    z-index: 2;
}

.gt-srow {
    display: flex;
    height: var(--gt-row-h);
    position: relative;
}

/* The string itself. Starts at the nut so it never crosses the open column. */
.gt-srow::after {
    content: "";
    position: absolute;
    left: var(--gt-nut-w);
    right: 0;
    top: 50%;
    height: var(--gt-sw, 2px);
    transform: translateY(-50%);
    border-radius: 2px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), #9aa6b2 45%, #5c6773);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
    pointer-events: none;
    z-index: 1;
}

.gt-srow[data-s="5"] { --gt-sw: 4px; }
.gt-srow[data-s="4"] { --gt-sw: 3.4px; }
.gt-srow[data-s="3"] { --gt-sw: 2.8px; }
.gt-srow[data-s="2"] { --gt-sw: 2.2px; }
.gt-srow[data-s="1"] { --gt-sw: 1.7px; }
.gt-srow[data-s="0"] { --gt-sw: 1.4px; }

/* Wound strings (low E, A, D) get a visible winding texture. */
.gt-srow[data-s="5"]::after,
.gt-srow[data-s="4"]::after,
.gt-srow[data-s="3"]::after {
    background:
        repeating-linear-gradient(74deg, rgba(0, 0, 0, 0.32) 0 1px, transparent 1px 3px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.8), #93a0ac 45%, #525d68);
}

/* Fret sizing. `--gt-grow` is set per cell by guitar.js from the real fret
   spacing formula; the same three selectors drive the board, the inlay
   overlay and the fret-number strip so all three layers stay aligned. */
.gt-cell,
.gt-inlay,
.gt-nums span {
    flex: var(--gt-grow) 0 0;
    min-width: 46px;
}

/* Cells carry the fret wire as a 2px right border. Since box-sizing is
   border-box, that border is excluded before free space is shared out, so
   the overlay and label layers need the same border — transparent — or they
   drift a couple of pixels out of step across the neck. */
.gt-inlay,
.gt-nums span {
    border-right: 2px solid transparent;
}

/* `.gt-nums span` is specificity 0-1-1, so the open-column modifier has to
   match it or the fret labels drift out of line with the board. */
.gt-cell--open,
.gt-inlay--open,
.gt-nums span.gt-num--open {
    flex: 0 0 var(--gt-nut-w);
    min-width: 0;
}

.gt-inlay--open,
.gt-nums span.gt-num--open {
    border-right-width: 6px; /* matches the nut */
}

.gt-cell {
    position: relative;
    display: grid;
    place-items: center;
    height: 100%;
    padding: 0;
    background: transparent;
    border: 0;
    border-right: 2px solid transparent;
    cursor: pointer;
    z-index: 2;
}

.gt-cell--fret {
    border-right-color: rgba(196, 206, 216, 0.62);
    box-shadow:
        inset -3px 0 4px -3px rgba(255, 255, 255, 0.28),
        inset -4px 0 5px -4px rgba(0, 0, 0, 0.5);
}

.gt-cell--last {
    border-right-color: transparent;
}

.gt-cell--open {
    border-right: 6px solid var(--gt-nut);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.32));
}

.gt-cell:hover .gt-dot--ghost {
    opacity: 0.5;
}

.gt-cell:focus-visible {
    outline: 2px solid var(--gt-accent);
    outline-offset: -3px;
    border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Note markers
   -------------------------------------------------------------------------- */

.gt-dot {
    width: var(--gt-dot);
    height: var(--gt-dot);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: var(--gt-c, #94a3b8);
    color: #0a1016;
    pointer-events: none;
    user-select: none;
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.5),
        inset 0 -2px 4px rgba(0, 0, 0, 0.18),
        inset 0 2px 3px rgba(255, 255, 255, 0.35);
    transition: opacity 0.18s ease, transform 0.12s ease, background 0.18s ease;
}

.gt-dot--hidden { opacity: 0; }
.gt-dot--faint { opacity: 0.8; }

.gt-dot--ghost {
    opacity: 0.16;
    background: #cfd8e3;
    box-shadow: none;
    font-weight: 600;
}

.gt-dot--root {
    font-size: 0.82rem;
    box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.35), 0 2px 8px rgba(0, 0, 0, 0.55);
}

/* Muted-string ✕ at the nut */
.gt-dot--marker {
    background: transparent;
    color: #e9eef4;
    font-size: 0.95rem;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
}

.gt-dot--q {
    background: var(--gt-accent);
    color: var(--gt-accent-ink);
    box-shadow: 0 0 0 4px var(--gt-accent-soft), 0 2px 8px rgba(0, 0, 0, 0.5);
}

.gt-dot--ok {
    background: var(--gt-ok) !important;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.28) !important;
}

.gt-dot--bad {
    background: var(--gt-bad) !important;
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.28) !important;
}

.gt-cell:active .gt-dot:not(.gt-dot--hidden) {
    transform: scale(0.9);
}

@keyframes gt-ping {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.32); }
    100% { transform: scale(1); }
}

.gt-dot--ping {
    animation: gt-ping 0.38s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    .gt-dot--ping { animation: none; }
    .gt-dot { transition: none; }
}

/* --------------------------------------------------------------------------
   Inlays & fret numbers
   -------------------------------------------------------------------------- */

.gt-inlays {
    position: absolute;
    inset: 9px 0;
    display: flex;
    z-index: 1;
    pointer-events: none;
}

.gt-inlay {
    position: relative;
}

.gt-inlay i {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.75), rgba(214, 224, 236, 0.34));
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45), inset 0 -1px 2px rgba(0, 0, 0, 0.2);
}

.gt-inlay i.gt-inlay-a { top: 27%; }
.gt-inlay i.gt-inlay-b { top: 73%; }

.gt-nums {
    display: flex;
    margin-top: 9px;
    /* matches the board's 1px border so the labels line up with the frets */
    padding: 0 1px;
}

.gt-nums span {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: #61616a;
    font-variant-numeric: tabular-nums;
}

.gt-nums span.gt-num--mark { color: var(--muted); }
.gt-nums span.gt-num--twelve { color: var(--gt-accent); }

/* --------------------------------------------------------------------------
   Legend
   -------------------------------------------------------------------------- */

.gt-legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 14px;
}

.gt-legend i {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    vertical-align: -1px;
}

/* --------------------------------------------------------------------------
   Quiz
   -------------------------------------------------------------------------- */

.gt-quiz {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    background: #17171a;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
}

.gt-quiz-q {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.gt-quiz-q b {
    color: var(--gt-accent);
}

.gt-fb {
    font-size: 0.85rem;
    font-weight: 500;
    min-height: 20px;
    color: var(--muted);
}

.gt-fb--ok { color: var(--gt-ok); }
.gt-fb--bad { color: var(--gt-bad); }

.gt-stats {
    display: flex;
    gap: 20px;
    margin-left: auto;
    text-align: right;
}

.gt-stat span {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.gt-stat b {
    font-size: 1.25rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Tuner + metronome
   -------------------------------------------------------------------------- */

.gt-util {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 22px;
}

.gt-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 15px 16px;
}

.gt-card h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    margin-bottom: 12px;
}

.gt-card h3 em {
    font-style: normal;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--muted);
    font-weight: 400;
}

.gt-beats {
    display: flex;
    gap: 7px;
    margin-left: auto;
}

.gt-beats i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--border-hover);
    transition: background 0.08s linear, transform 0.08s linear;
}

.gt-beats i.gt-beat--on {
    background: var(--gt-accent);
    transform: scale(1.35);
}

.gt-beats i.gt-beat--on.gt-beat--accent {
    background: var(--gt-root);
}

.gt-range {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 999px;
    background: var(--border-hover);
    outline: none;
    flex: 1;
    min-width: 90px;
}

.gt-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--gt-accent);
    cursor: pointer;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

.gt-range::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border: 0;
    border-radius: 50%;
    background: var(--gt-accent);
    cursor: pointer;
}

.gt-bpm {
    font-size: 1.375rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    min-width: 58px;
}

.gt-bpm small {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--muted);
    margin-left: 3px;
}

/* --------------------------------------------------------------------------
   Utilities & responsive
   -------------------------------------------------------------------------- */

.gt-is-hidden {
    display: none !important;
}

@media (max-width: 820px) {
    .gt-util {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Mobile: the board turns 90°.

   Strings become columns running down the screen and frets become rows —
   the standard chord-diagram orientation, low E on the left and the nut at
   the top. A horizontal neck can't fit a phone without side-scrolling, and
   you can never see the whole thing at once.

   No JS and no separate markup: the same DOM flips its flex axes. `--gt-grow`
   (set per cell in guitar.js) drives proportional widths on desktop; here it
   is overridden with a uniform fret height, because a true-to-life 12th fret
   would end up shorter than the note markers sitting in it.
   ========================================================================== */

@media (max-width: 760px) {
    .gt-app {
        --gt-fret-h: 46px;
        --gt-nut-h: 42px;
        --gt-numw: 36px;
        --gt-dot: 30px;
        padding: 0 14px;
    }

    .gt-section {
        padding: 48px 0;
    }

    /* ---- Board ---- */

    .gt-frame {
        flex-direction: column;
        min-width: 0;
    }

    /* String names move above the board, offset by the fret-number column.
       row-reverse puts string 0 (high E) on the right, low E on the left. */
    .gt-gutter {
        flex-direction: row-reverse;
        width: auto;
        height: 22px;
        padding-top: 0;
        /* Clear the number column plus the board's 1px border on each side, so
           the six headers sit exactly over the six string columns. */
        padding-left: calc(var(--gt-numw) + 1px);
        padding-right: 1px;
    }

    .gt-sname {
        flex: 1 1 0;
        height: 100%;
        min-width: 0;
    }

    /* DOM order is [board, nums]; row-reverse renders the numbers to the left. */
    .gt-boardcol {
        display: flex;
        flex-direction: row-reverse;
        align-items: stretch;
    }

    .gt-board {
        flex: 1 1 auto;
        min-width: 0;
        padding: 0;
    }

    .gt-nums {
        flex: 0 0 var(--gt-numw);
        /* Without this the word "open" sets a min-content floor and the column
           grows past its basis, shoving the board out of line with the string
           headers above it. */
        min-width: 0;
        flex-direction: column;
        margin-top: 0;
        padding: 1px 0; /* clears the board's 1px border so rows line up */
    }

    .gt-nums span {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding-right: 7px;
    }

    .gt-nums span.gt-num--open {
        font-size: 0.62rem;
    }

    /* Vertical uses fixed sizes, so the border no longer affects distribution;
       it just has to move to the matching edge. */
    .gt-cell,
    .gt-inlay,
    .gt-nums span {
        flex: 0 0 var(--gt-fret-h);
        min-width: 0;
    }

    .gt-inlay,
    .gt-nums span {
        border-right: 0;
        border-bottom: 2px solid transparent;
    }

    .gt-inlay--open,
    .gt-nums span.gt-num--open {
        border-right-width: 0;
        border-bottom-width: 5px;
    }

    .gt-cell--open,
    .gt-inlay--open,
    .gt-nums span.gt-num--open {
        flex: 0 0 var(--gt-nut-h);
    }

    .gt-rows {
        display: flex;
        flex-direction: row-reverse;
    }

    .gt-srow {
        flex: 1 1 0;
        flex-direction: column;
        height: auto;
        min-width: 0;
    }

    /* The string now runs top-to-bottom, starting below the nut. */
    .gt-srow::after {
        left: 50%;
        right: auto;
        top: var(--gt-nut-h);
        bottom: 0;
        width: var(--gt-sw, 2px);
        height: auto;
        transform: translateX(-50%);
        background: linear-gradient(90deg, rgba(255, 255, 255, 0.85), #9aa6b2 45%, #5c6773);
    }

    .gt-srow[data-s="5"]::after,
    .gt-srow[data-s="4"]::after,
    .gt-srow[data-s="3"]::after {
        background:
            repeating-linear-gradient(164deg, rgba(0, 0, 0, 0.32) 0 1px, transparent 1px 3px),
            linear-gradient(90deg, rgba(255, 255, 255, 0.8), #93a0ac 45%, #525d68);
    }

    /* Fret wires cross the neck, so they move to the bottom edge of each cell. */
    .gt-cell {
        border-right: 0;
        border-bottom: 2px solid transparent;
    }

    .gt-cell--fret {
        border-bottom-color: rgba(196, 206, 216, 0.62);
        box-shadow:
            inset 0 -3px 4px -3px rgba(255, 255, 255, 0.28),
            inset 0 -4px 5px -4px rgba(0, 0, 0, 0.5);
    }

    .gt-cell--last {
        border-bottom-color: transparent;
    }

    .gt-cell--open {
        border-right: 0;
        border-bottom: 5px solid var(--gt-nut);
    }

    .gt-inlays {
        inset: 0;
        flex-direction: column;
    }

    .gt-inlay i {
        width: 14px;
        height: 14px;
    }

    /* The twin 12th-fret dots sit side by side once the neck is upright. */
    .gt-inlay i.gt-inlay-a { top: 50%; left: 27%; }
    .gt-inlay i.gt-inlay-b { top: 50%; left: 73%; }

    /* ---- Controls: full-width rows and thumb-sized targets ---- */

    .gt-head {
        gap: 12px;
    }

    .gt-head-text {
        flex: 1 1 100%;
        margin-right: 0;
    }

    .gt-title {
        font-size: 1.3rem;
    }

    .gt-seg {
        flex: 1 1 auto;
    }

    .gt-seg button {
        flex: 1;
        padding: 9px 12px;
    }

    .gt-lab {
        min-width: 100%;
        margin-bottom: -4px;
    }

    .gt-sep {
        display: none;
    }

    #gt-note-filter,
    #gt-scale-roots,
    #gt-quiz-answers,
    #gt-tuner {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 6px;
        width: 100%;
    }

    #gt-chord-list {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        width: 100%;
    }

    .gt-chip--note,
    #gt-chord-list .gt-chip {
        min-width: 0;
        padding: 10px 4px;
        text-align: center;
    }

    .gt-btn,
    .gt-select {
        padding: 10px 14px;
    }

    .gt-quiz-q {
        font-size: 1rem;
    }

    .gt-stats {
        margin-left: 0;
        text-align: left;
        gap: 24px;
    }

    .gt-scale-select-row .gt-select {
        flex: 1 1 100%;
    }
}
