/* ============================================================
   Piano · 五形樂器 — modes.css
   各模式專屬樣式
   ============================================================ */

/* ============================================================
   PIANO MODE
   ============================================================ */
.mode-piano {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
    --white-key-w: 80px;
    --white-key-h: clamp(220px, calc(100dvh - 250px), 340px);
    --black-key-w: 52px;
    --black-key-h: calc(var(--white-key-h) * 0.632);
}
.mode-piano .piano-wrapper {
    flex: 1;
    min-height: 0;
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    align-items: flex-end;
    padding: 18px 0 28px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
}
.mode-piano .piano-wrapper::-webkit-scrollbar { height: 6px; }
.mode-piano .piano-wrapper::-webkit-scrollbar-track { background: transparent; }
.mode-piano .piano-wrapper::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

.mode-zoom-rail {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 8;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(8, 8, 8, 0.78);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
    touch-action: none;
    pointer-events: auto;
}
.mode-zoom-rail .zoom-rail-btn {
    width: 34px;
    height: 30px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font: inherit;
    font-size: 11px;
    letter-spacing: 1px;
    cursor: pointer;
}
.mode-zoom-rail .zoom-rail-btn:active {
    transform: translateY(1px);
}
.mode-zoom-rail .zoom-rail-value {
    min-width: 44px;
    color: var(--accent);
    font-size: 11px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.mode-zoom-rail .zoom-rail-range {
    width: 76px;
    accent-color: var(--accent);
}

.mode-piano .piano-board {
    background: linear-gradient(to bottom, #0a0a0a, #050505);
    padding: 22px 18px 28px 18px;
    border-radius: 14px;
    box-shadow:
        0 30px 70px rgba(0, 0, 0, 0.85),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    display: flex;
    margin: auto;
    border: 1px solid #1a1a1a;
    position: relative;
    contain: layout paint style;
}
.mode-piano .piano-board::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 18px;
    right: 18px;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(212, 169, 96, 0.5) 20%, rgba(212, 169, 96, 0.5) 80%, transparent);
}

.mode-piano .key {
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.04s ease-out, box-shadow 0.04s ease-out, filter 0.04s;
    touch-action: none;
    will-change: transform;
}
.mode-piano .white-key {
    width: var(--white-key-w);
    height: var(--white-key-h);
    background: linear-gradient(to bottom, #fafafa 0%, #f0f0f0 70%, #d8d8d8 100%);
    border: 1px solid #aaa;
    border-radius: 0 0 8px 8px;
    box-shadow:
        inset 0 1px 0 #fff,
        inset 0 -4px 6px rgba(0, 0, 0, 0.18),
        inset 2px 0 4px rgba(0, 0, 0, 0.06),
        0 5px 0 #888,
        0 10px 16px rgba(0, 0, 0, 0.5);
    z-index: 1;
}
.mode-piano .white-key.active {
    background: linear-gradient(to bottom, #e0e0e0 0%, #c8c8c8 100%);
    transform: translateY(4px);
    box-shadow:
        inset 0 1px 0 #fff,
        inset 0 -3px 5px rgba(0, 0, 0, 0.25),
        0 1px 0 #777,
        0 4px 8px rgba(0, 0, 0, 0.4),
        0 0 30px var(--accent-glow);
}
.mode-piano .black-key {
    width: var(--black-key-w);
    height: var(--black-key-h);
    background: linear-gradient(to bottom, #2a2a2a 0%, #0d0d0d 60%, #050505 100%);
    border-radius: 0 0 5px 5px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        inset 0 -3px 5px rgba(0, 0, 0, 0.6),
        0 5px 0 #000,
        0 8px 12px rgba(0, 0, 0, 0.7);
    margin-left: calc(var(--black-key-w) * -0.5);
    margin-right: calc(var(--black-key-w) * -0.5);
    z-index: 2;
}
.mode-piano .black-key.active {
    background: linear-gradient(to bottom, #1a1a1a 0%, #000 100%);
    transform: translateY(3px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 1px 0 #000,
        0 4px 6px rgba(0, 0, 0, 0.6),
        0 0 22px var(--accent-glow);
}
.mode-piano .key-label {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s;
    letter-spacing: 0.5px;
}
.mode-piano .black-key .key-label { color: #bbb; bottom: 8px; font-size: 10px; }
body.show-labels .mode-piano .key-label { opacity: 1; }

.mode-piano .white-key[data-c-marker="true"]::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--c-piano);
    opacity: 0.4;
}
.mode-piano .white-key[data-c-marker="true"][data-octave="4"]::after {
    opacity: 1;
    box-shadow: 0 0 8px var(--c-piano);
}

.mode-piano .piano-nav {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    padding: 14px 16px 60px 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, transparent 100%);
    z-index: 3;
}
.mode-piano .piano-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 110px;
    min-height: 52px;
    padding: 10px 22px;
    background: linear-gradient(to bottom, #1f1f1f, #141414);
    border: 1px solid var(--line-2);
    border-radius: 14px;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    letter-spacing: 3px;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    -webkit-appearance: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    flex-direction: column;
    line-height: 1.1;
}
.mode-piano .piano-nav-btn:hover {
    background: linear-gradient(to bottom, #2a2a2a, #1a1a1a);
    border-color: var(--accent);
    color: var(--accent);
}
.mode-piano .piano-nav-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.mode-piano .piano-nav-btn .pn-icon {
    font-size: 22px;
    line-height: 1;
    color: var(--accent);
    font-weight: 300;
}
.mode-piano .piano-nav-btn .pn-text {
    font-size: 12px;
    letter-spacing: 3px;
}
.mode-piano .piano-nav-btn .pn-sub {
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--text-faint);
    margin-top: 2px;
}

/* 「中央 C」是主要按鈕，視覺更強 */
.mode-piano .piano-nav-btn.center {
    min-width: 130px;
    background: linear-gradient(to bottom, #2a2014, #1a1408);
    border-color: var(--c-piano);
    box-shadow:
        0 4px 14px rgba(212, 169, 96, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.mode-piano .piano-nav-btn.center:hover {
    background: linear-gradient(to bottom, var(--c-piano), #b8852e);
    color: #1a0f00;
    box-shadow: 0 6px 18px rgba(212, 169, 96, 0.4);
}
.mode-piano .piano-nav-btn.center:hover .pn-sub { color: rgba(0,0,0,0.5); }
.mode-piano .piano-nav-btn.center .pn-text { color: var(--c-piano); }
.mode-piano .piano-nav-btn.center:hover .pn-text { color: #1a0f00; }

/* 左右按鈕的 icon 跟 text 同 row */
.mode-piano .piano-nav-btn:not(.center) {
    flex-direction: row;
}

@media (max-width: 900px) {
    .mode-piano {
        --white-key-w: 68px;
        --white-key-h: clamp(190px, calc(100dvh - 230px), 290px);
        --black-key-w: 44px;
    }
    .mode-piano .piano-nav { padding: 10px 12px 56px 12px; gap: 10px; }
    .mode-piano .piano-nav-btn { min-width: 90px; min-height: 46px; padding: 8px 16px; }
    .mode-piano .piano-nav-btn.center { min-width: 110px; }
}
@media (max-width: 600px) {
    .mode-piano {
        --white-key-w: 56px;
        --white-key-h: clamp(150px, calc(100dvh - 220px), 250px);
        --black-key-w: 36px;
    }
    .mode-piano .piano-nav-btn .pn-text { font-size: 11px; letter-spacing: 2px; }
}
@media (max-height: 520px) {
    .mode-piano {
        --white-key-h: clamp(128px, calc(100dvh - 176px), 238px);
    }
    .mode-piano .piano-wrapper { padding: 8px 0 10px 0; }
    .mode-zoom-rail { top: 8px; right: 10px; transform: scale(0.9); transform-origin: top right; }
    .mode-piano .piano-board { padding: 14px 12px 18px 12px; }
    .mode-piano .piano-nav { padding: 6px 10px 10px 10px; gap: 8px; }
    .mode-piano .piano-nav-btn { min-height: 38px; padding: 6px 12px; }
    .mode-piano .piano-nav-btn .pn-icon { font-size: 18px; }
}

/* ============================================================
   DOTS MODE
   ============================================================ */
.mode-dots {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}
.mode-dots .dots-grid {
    display: grid;
    --dot-size: 64px;
    --dot-gap: 14px;
    --dot-pad: 24px;
    gap: var(--dot-gap);
    padding: var(--dot-pad);
    touch-action: none;
    contain: layout paint style;
    position: relative;
}
.mode-dots .dot {
    width: var(--dot-size);
    height: var(--dot-size);
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #1a1a1a, #0a0a0a);
    border: 1px solid var(--line-2);
    cursor: pointer;
    position: relative;
    transition: transform 0.08s ease-out, border-color 0.15s, box-shadow 0.15s;
    touch-action: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-faint);
    font-size: 10px;
    letter-spacing: 1px;
}
.mode-dots .dot.scale-in {
    border-color: rgba(255, 122, 61, 0.3);
    background: radial-gradient(circle at 35% 30%, #2a1a10, #0d0707);
}
.mode-dots .dot.root {
    border-color: var(--c-dots);
    background: radial-gradient(circle at 35% 30%, #3a1a08, #0d0503);
    box-shadow: 0 0 20px rgba(255, 122, 61, 0.2), inset 0 0 10px rgba(255, 122, 61, 0.1);
}
.mode-dots .dot.active {
    background: radial-gradient(circle at 35% 30%, #ffaa70, var(--c-dots));
    border-color: var(--c-dots);
    transform: scale(0.92);
    box-shadow:
        0 0 30px var(--c-dots),
        0 0 60px rgba(255, 122, 61, 0.5),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
    color: #fff;
}
.mode-dots .dot-label {
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s;
}
body.show-labels .mode-dots .dot-label { opacity: 1; }
.mode-dots .dot.active .dot-label { opacity: 0.8; color: #fff; }

.mode-dots .ripple {
    position: absolute;
    left: 0;
    top: 0;
    width: var(--dot-size);
    height: var(--dot-size);
    border-radius: 50%;
    border: 2px solid var(--c-dots);
    pointer-events: none;
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(1);
    will-change: transform, opacity;
}
.mode-dots .ripple.play {
    animation: ripple-out 0.7s ease-out forwards;
}
@keyframes ripple-out {
    from {
        transform: translate3d(-50%, -50%, 0) scale(1);
        opacity: 0.7;
    }
    to {
        transform: translate3d(-50%, -50%, 0) scale(3.1);
        opacity: 0;
    }
}

.mode-dots .dots-info {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-faint);
    font-size: 10px;
    letter-spacing: 4px;
    pointer-events: none;
}

/* ============================================================
   HEX MODE (Harmonic Table)
   ============================================================ */
.mode-hex {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: radial-gradient(ellipse at center, rgba(77, 208, 200, 0.04), transparent 60%);
    position: relative;
    touch-action: none;
}
.mode-hex svg {
    width: 100%;
    height: 100%;
    display: block;
}
.mode-hex .hex {
    fill: rgba(20, 20, 20, 0.9);
    stroke: rgba(77, 208, 200, 0.18);
    stroke-width: 1;
    cursor: pointer;
    transition: fill 0.1s ease, stroke 0.1s ease;
}
.mode-hex .hex.scale-in {
    fill: rgba(20, 35, 35, 0.95);
    stroke: rgba(77, 208, 200, 0.35);
}
.mode-hex .hex.root {
    fill: rgba(30, 50, 50, 0.95);
    stroke: var(--c-hex);
    stroke-width: 1.5;
    filter: drop-shadow(0 0 6px rgba(77, 208, 200, 0.5));
}
.mode-hex .hex.active {
    fill: var(--c-hex);
    stroke: #fff;
    stroke-width: 1.5;
    filter: drop-shadow(0 0 16px var(--c-hex)) drop-shadow(0 0 30px rgba(77, 208, 200, 0.6));
}
.mode-hex .hex-label {
    fill: rgba(77, 208, 200, 0.5);
    font-size: 10px;
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
    font-family: -apple-system, sans-serif;
    letter-spacing: 0.5px;
    opacity: 0;
    transition: opacity 0.25s;
}
.mode-hex .hex.root + .hex-label,
body.show-labels .mode-hex .hex-label { opacity: 1; }
.mode-hex .hex.active + .hex-label { fill: #000; opacity: 1; font-weight: 600; }
body.show-labels .mode-hex .hex.scale-in + .hex-label { fill: rgba(77, 208, 200, 0.85); }

.mode-hex .hex-info {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-faint);
    font-size: 10px;
    letter-spacing: 4px;
    pointer-events: none;
    text-align: center;
}
.mode-hex .hex-info strong { color: var(--c-hex); font-weight: 500; letter-spacing: 2px; }

/* ============================================================
   STRIP MODE
   ============================================================ */
.mode-strip {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: radial-gradient(ellipse at center, rgba(181, 109, 255, 0.06), transparent 70%);
    overflow: hidden;
    position: relative;
    touch-action: none;
}
.mode-strip .strip-canvas {
    flex: 1;
    position: relative;
    overflow: hidden;
    cursor: crosshair;
    touch-action: none;
}
.mode-strip svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.mode-strip .snap-line {
    stroke: rgba(181, 109, 255, 0.15);
    stroke-width: 1;
}
.mode-strip .snap-line.octave {
    stroke: rgba(181, 109, 255, 0.45);
    stroke-width: 1.5;
}
.mode-strip .snap-line.semi {
    stroke: rgba(181, 109, 255, 0.08);
}
.mode-strip .snap-label {
    fill: rgba(181, 109, 255, 0.6);
    font-size: 10px;
    text-anchor: middle;
    font-family: -apple-system, sans-serif;
    letter-spacing: 1px;
}
.mode-strip .strip-finger {
    position: absolute;
    left: 0;
    top: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(181, 109, 255, 0.9), rgba(181, 109, 255, 0.3));
    border: 2px solid #fff;
    box-shadow: 0 0 30px var(--c-strip), 0 0 60px rgba(181, 109, 255, 0.4);
    pointer-events: none;
    transform: translate3d(0, 0, 0) translate(-50%, -50%);
    transition: opacity 0.1s ease;
    will-change: transform, opacity;
}
.mode-strip .strip-finger.snapped {
    background: radial-gradient(circle, #fff, var(--c-strip));
}
.mode-strip .strip-finger.free {
    background: radial-gradient(circle, #ffaaff, var(--c-strip));
    box-shadow: 0 0 40px #ff66ff, 0 0 80px rgba(255, 102, 255, 0.5);
}

.mode-strip .strip-info {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-faint);
    font-size: 10px;
    letter-spacing: 4px;
    pointer-events: auto;
    touch-action: none;
    text-align: center;
    padding: 8px 12px;
}
.mode-strip .strip-info strong { color: var(--c-strip); font-weight: 500; letter-spacing: 2px; }

.mode-strip .strip-bottom-hint {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-faint);
    font-size: 10px;
    letter-spacing: 3px;
    pointer-events: auto;
    touch-action: none;
    text-align: center;
    opacity: 0.6;
    padding: 8px 12px;
}

/* ============================================================
   CHORDS MODE
   ============================================================ */
.mode-chords {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.mode-chords .chord-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 12px;
    padding: 24px;
    width: min(720px, calc(100% - 32px));
    aspect-ratio: 4 / 3;
    max-height: calc(100% - 76px);
    touch-action: none;
    transform: scale(var(--chord-zoom, 1));
    transform-origin: center;
}
.mode-chords .chord-pad {
    position: relative;
    background: linear-gradient(to bottom, #1a1410, #0a0805);
    border: 1px solid var(--line-2);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    transition: color 0.12s ease, background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    touch-action: none;
}
.mode-chords .chord-pad::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 192, 77, 0.3), transparent);
}
.mode-chords .chord-pad.tonic { border-color: rgba(255, 192, 77, 0.25); }
.mode-chords .chord-pad.subdom { border-color: rgba(180, 140, 60, 0.2); }
.mode-chords .chord-pad.dom { border-color: rgba(255, 100, 100, 0.2); }
.mode-chords .chord-pad.color { border-color: rgba(120, 180, 255, 0.2); }

.mode-chords .chord-pad:hover {
    background: linear-gradient(to bottom, #2a1f15, #14100a);
}
.mode-chords .chord-pad.active {
    background: linear-gradient(to bottom, var(--c-chords), #b8852e);
    color: #1a0f00;
    border-color: var(--c-chords);
    transform: scale(0.97);
    box-shadow:
        0 0 30px rgba(255, 192, 77, 0.5),
        0 0 60px rgba(255, 192, 77, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

.mode-chords .chord-name {
    font-size: 32px;
    font-weight: 300;
    letter-spacing: 1px;
    color: var(--text);
    line-height: 1;
}
.mode-chords .chord-pad.active .chord-name {
    color: #1a0f00;
    font-weight: 500;
}
.mode-chords .chord-roman {
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--c-chords);
    margin-top: 8px;
    opacity: 0.7;
}
.mode-chords .chord-pad.active .chord-roman {
    color: #1a0f00;
    opacity: 1;
}
.mode-chords .chord-notes {
    font-size: 10px;
    color: var(--text-faint);
    margin-top: 4px;
    letter-spacing: 1px;
    opacity: 0;
    transition: opacity 0.25s;
}
body.show-labels .mode-chords .chord-notes { opacity: 1; }
.mode-chords .chord-pad.active .chord-notes { color: rgba(26, 15, 0, 0.7); opacity: 1; }

.mode-chords .chord-key {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-faint);
    font-size: 10px;
    letter-spacing: 4px;
    pointer-events: none;
}
.mode-chords .chord-key strong { color: var(--c-chords); letter-spacing: 2px; }

.mode-chords .chord-bottom-hint {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-faint);
    font-size: 10px;
    letter-spacing: 3px;
    text-align: center;
    pointer-events: none;
    opacity: 0.6;
}

@media (max-width: 700px) {
    .mode-chords .chord-grid { width: 95%; gap: 8px; padding: 14px; }
    .mode-chords .chord-name { font-size: 24px; }
}
@media (max-height: 520px) {
    .mode-chords .chord-grid { gap: 8px; padding: 12px; max-height: calc(100% - 48px); }
    .mode-chords .chord-name { font-size: 22px; }
    .mode-chords .chord-roman { margin-top: 4px; }
    .mode-chords .chord-key,
    .mode-chords .chord-bottom-hint,
    .mode-dots .dots-info,
    .mode-hex .hex-info,
    .mode-strip .strip-bottom-hint { display: none; }
}

/* ============================================================
   TABLET TOUCH (768px+ coarse pointer)
   ============================================================ */
@media (min-width: 768px) and (pointer: coarse) {
    .mode-piano .piano-board { padding: 18px 14px 22px 14px; }
    .mode-piano .piano-nav { padding: 10px 14px 20px 14px; gap: 12px; }
    .mode-piano .piano-nav-btn { min-width: 120px; min-height: 56px; padding: 12px 24px; }
    .mode-piano .piano-nav-btn.center { min-width: 140px; }

    .mode-chords .chord-grid {
        width: min(860px, calc(100% - 48px));
        gap: 14px;
        padding: 20px;
    }
    .mode-chords .chord-name { font-size: 36px; }
    .mode-chords .chord-pad { border-radius: 14px; }
}

@media (min-width: 1024px) and (pointer: coarse) and (orientation: landscape) {
    .mode-piano .piano-nav-btn { min-width: 130px; min-height: 58px; }
    .mode-piano .piano-nav-btn.center { min-width: 150px; }

    .mode-chords .chord-grid {
        width: min(960px, calc(100% - 64px));
        gap: 16px;
    }
    .mode-chords .chord-name { font-size: 40px; }
    .mode-chords .chord-roman { font-size: 13px; letter-spacing: 4px; }
}
