@font-face {
    font-display: swap;
    font-family: "Figurato";
    font-style: normal;
    font-weight: 400;
    src: url("../fonts/Figurato.otf") format("opentype");
}

@font-face {
    font-display: swap;
    font-family: "TtvMusic";
    font-style: normal;
    font-weight: 400;
    src: url("../fonts/abc2svg.ttf") format("truetype");
}

.ttv-app {
    --ttv-ink: #172132;
    --ttv-muted: #66758a;
    --ttv-line: #d7e0ed;
    --ttv-line-strong: #bdcadb;
    --ttv-soft: #f6f8fb;
    --ttv-accent: #126fc2;
    --ttv-accent-soft: #e7f2ff;
    --ttv-accent-2: #2b7d69;
    --ttv-accent-2-soft: #e7f5f0;
    --ttv-card: rgba(255, 255, 255, 0.98);
    --ttv-cell: rgba(255, 255, 255, 0.96);
    --ttv-shadow: 0 10px 26px rgba(23, 33, 50, 0.07);
    --ttv-layout-width: 920px;
    --ttv-title-height: 28px;
    --ttv-scale-content-height: 132px;
    --ttv-armure-content-height: var(--ttv-scale-content-height);
    --ttv-chord-content-height: 152px;
    --ttv-ttv-main-text: clamp(0.82rem, 1.55vw, 1.18rem);
    --ttv-ttv-paren-text: clamp(0.72rem, 1.25vw, 0.92rem);
    color: var(--ttv-ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    left: auto;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: none;
    overflow-x: visible;
    padding: 0 8px;
    position: relative;
    transform: none;
    width: 100vw;
}

.ttv-app,
.ttv-app * {
    box-sizing: border-box;
}

.ttv-toolbar {
    align-items: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
    border: 1px solid #cfdbea;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(23, 33, 50, 0.08);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 auto 10px;
    max-width: var(--ttv-layout-width);
    padding: 6px;
    width: 100%;
}

.ttv-is-simple .ttv-toolbar {
    display: none;
}

.ttv-toolbar-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    column-gap: 5px;
    row-gap: 5px;
    justify-content: flex-end;
    margin-left: auto;
}

.ttv-toolbar > * {
    align-self: center;
}

.ttv-app button,
.ttv-app [role="button"],
.ttv-app svg[tabindex] {
    -webkit-tap-highlight-color: transparent;
}

.ttv-app button:focus,
.ttv-app [role="button"]:focus,
.ttv-app svg[tabindex]:focus,
.ttv-app .ttv-answer:focus {
    outline: none;
}

.ttv-field {
    display: grid;
    gap: 0;
    min-width: min(100%, 164px);
}

.ttv-field select,
.ttv-toolbar button {
    border: 1px solid #cad7e6;
    border-radius: 8px;
    font: 0.8rem/1.1 inherit;
    min-height: 26px;
}

.ttv-field select {
    appearance: none;
    background:
        linear-gradient(45deg, transparent 50%, #516177 50%) right 10px center / 6px 6px no-repeat,
        linear-gradient(135deg, #516177 50%, transparent 50%) right 6px center / 6px 6px no-repeat,
        #fff;
    color: var(--ttv-ink);
    font-weight: 650;
    padding: 0 24px 0 9px;
}

.ttv-field select:focus-visible {
    border-color: #94aac5;
    outline: 2px solid rgba(18, 111, 194, 0.12);
    outline-offset: 1px;
}

.ttv-segmented {
    background: #eaf0f7;
    border: 1px solid #cad7e6;
    border-radius: 999px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-width: 176px;
    overflow: hidden;
    padding: 2px;
    position: relative;
}

.ttv-segmented::before {
    background: var(--ttv-ink);
    border-radius: 999px;
    box-shadow: 0 1px 4px rgba(23, 33, 50, 0.16);
    content: "";
    inset: 2px auto 2px 2px;
    position: absolute;
    transition: transform 0.16s ease;
    width: calc(50% - 2px);
    z-index: 0;
}

.ttv-segmented.is-minor::before {
    transform: translateX(100%);
}

.ttv-segmented button {
    background: transparent;
    border: 0;
    border-radius: 999px;
    color: var(--ttv-muted);
    cursor: pointer;
    font-weight: 700;
    min-width: 0;
    padding: 0 10px;
    position: relative;
    z-index: 1;
}

.ttv-segmented button + button {
    border-left: 0;
}

.ttv-segmented button.is-active {
    background: transparent;
    box-shadow: none;
    color: #fff;
}

.ttv-exercise-toggle {
    background: #fff;
    color: var(--ttv-ink);
    cursor: pointer;
    font-weight: 700;
    padding: 0 10px;
    position: relative;
    z-index: 2;
}

.ttv-exercise-toggle.is-active {
    background: var(--ttv-accent-2);
    border-color: #1f6f5f;
    color: #fff;
}

.ttv-exercise-cluster {
    align-items: center;
    display: inline-flex;
    position: relative;
}

.ttv-exercise-tools {
    align-items: center;
    background: #fff;
    border: 1px solid var(--ttv-line);
    border-radius: 5px 0 0 5px;
    color: var(--ttv-ink);
    display: inline-flex;
    gap: 0;
    height: 20px;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
    right: calc(100% - 1px);
    top: 50%;
    transform: translate(24px, -50%);
    transition: max-width 0.2s ease, opacity 0.16s ease, transform 0.2s ease;
    z-index: 1;
}

.ttv-toolbar-actions.is-exercise-open .ttv-exercise-tools {
    max-width: 58px;
    opacity: 1;
    pointer-events: auto;
    transform: translate(0, -50%);
}

.ttv-tray-button {
    background: transparent;
    color: inherit;
    cursor: pointer;
    display: block;
    fill: none;
    height: 15px;
    margin: 0 7px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 15px;
}

.ttv-tray-button:hover {
    color: var(--ttv-accent);
}

.ttv-icon-button {
    align-items: center;
    background: #fff;
    border: 1px solid var(--ttv-line);
    border-radius: 999px;
    color: var(--ttv-ink);
    cursor: pointer;
    display: inline-flex;
    height: 26px;
    justify-content: center;
    min-height: 26px;
    padding: 0;
    width: 26px;
}

.ttv-icon-button:hover {
    background: #fff;
}

.ttv-icon-button svg {
    fill: none;
    height: 15px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 15px;
}

.ttv-fullscreen {
    background: #fff;
    color: var(--ttv-ink);
    cursor: pointer;
    padding: 0;
}

.ttv-fullscreen .ttv-fullscreen-exit {
    display: none;
}

.ttv-fullscreen.is-active .ttv-fullscreen-enter {
    display: none;
}

.ttv-fullscreen.is-active .ttv-fullscreen-exit {
    display: block;
}

.ttv-app:fullscreen,
.ttv-app.is-fullscreen {
    background: #fff;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 100vh;
    justify-content: center;
    max-width: none;
    overflow: auto;
    padding: 24px;
    width: 100vw;
}

.ttv-app:-webkit-full-screen {
    background: #fff;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 100vh;
    justify-content: center;
    max-width: none;
    overflow: auto;
    padding: 24px;
    width: 100vw;
}

.ttv-app:fullscreen .ttv-toolbar,
.ttv-app.is-fullscreen .ttv-toolbar,
.ttv-app:-webkit-full-screen .ttv-toolbar {
    flex-wrap: nowrap;
    max-width: 920px;
    position: sticky;
    top: 0;
    width: min(920px, calc(100vw - 48px));
    z-index: 5;
}

.ttv-app:fullscreen .ttv-toolbar-actions,
.ttv-app.is-fullscreen .ttv-toolbar-actions,
.ttv-app:-webkit-full-screen .ttv-toolbar-actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
}

.ttv-app:fullscreen .ttv-field,
.ttv-app.is-fullscreen .ttv-field,
.ttv-app:-webkit-full-screen .ttv-field {
    flex: 0 0 auto;
}

.ttv-app:fullscreen .ttv-content,
.ttv-app.is-fullscreen .ttv-content,
.ttv-app:-webkit-full-screen .ttv-content {
    width: 100%;
}

.ttv-grid-wrap {
    overflow-x: auto;
    width: 100%;
}

.ttv-content {
    display: grid;
    gap: 14px;
}

.ttv-details {
    display: grid;
    gap: 10px;
}

.ttv-ttv-view {
    background: var(--ttv-card);
    border: 1px solid var(--ttv-line);
    border-radius: 8px;
    box-shadow: var(--ttv-shadow);
    display: grid;
    gap: 0;
    margin: 0 auto;
    max-width: var(--ttv-layout-width);
    padding: 0;
    width: 100%;
}

.ttv-ttv-view h2 {
    background: var(--ttv-soft);
    border-bottom: 1px solid var(--ttv-line);
    border-radius: 8px 8px 0 0;
    color: #38465a;
    font-size: 0.72rem;
    font-weight: 750;
    line-height: 1.1;
    margin: 0;
    padding: 7px 8px;
    text-align: center;
}

.ttv-details-title {
    color: var(--ttv-ink);
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
}

.ttv-study-view {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(340px, 1fr) minmax(120px, 0.24fr);
    margin: 0 auto;
    max-width: var(--ttv-layout-width);
    width: 100%;
}

.ttv-study-view:has(> :only-child),
.ttv-chords-split:has(> :only-child) {
    grid-template-columns: 1fr;
}

.ttv-study-column,
.ttv-study-panel {
    background: var(--ttv-card);
    border: 1px solid var(--ttv-line);
    border-radius: 8px;
    box-shadow: var(--ttv-shadow);
    display: grid;
    gap: 0;
    grid-template-rows: var(--ttv-title-height) 1fr;
    overflow: hidden;
    padding: 0;
}

.ttv-study-column {
    align-content: stretch;
    position: relative;
}

.ttv-study-column h2 {
    background: var(--ttv-soft);
    border-bottom: 1px solid var(--ttv-line);
    color: #38465a;
    font-size: 0.72rem;
    font-weight: 750;
    height: var(--ttv-title-height);
    line-height: 1.1;
    margin: 0;
    padding: 7px 8px;
    text-align: center;
}

.ttv-study-panel {
    align-items: center;
    border: 0;
    display: grid;
    grid-template-rows: 1fr;
    justify-items: center;
    padding: 0;
    position: relative;
}

.ttv-study-column:has(.ttv-scale-music) {
    height: calc(var(--ttv-title-height) + var(--ttv-scale-content-height));
}

.ttv-study-column:has(> .ttv-armure-answer) {
    height: calc(var(--ttv-title-height) + var(--ttv-armure-content-height));
}

.ttv-scale-music {
    align-items: center;
    background: transparent;
    border: 0;
    cursor: pointer;
    display: grid;
    justify-items: center;
    height: var(--ttv-scale-content-height);
    min-height: 0;
    overflow-x: hidden;
    overflow-y: hidden;
    padding: 0;
    place-self: center;
    position: relative;
    width: 100%;
}

.ttv-scale-render {
    display: grid;
    gap: 2px;
    justify-items: center;
    min-width: 0;
    position: relative;
    transform: translateY(-18px);
    width: 100%;
}

.ttv-scale-music .ttv-abc-slot {
    display: grid;
    justify-content: center;
    justify-items: center;
    max-height: 100%;
    max-width: 100%;
    width: 100%;
}

.ttv-scale-music svg {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    object-fit: contain;
    overflow: visible;
}

.ttv-scale-music.is-hidden {
    background: transparent;
}

.ttv-scale-question {
    left: 50%;
    position: absolute;
    top: calc(50% - 18px);
    transform: translate(-50%, -50%);
    z-index: 2;
}

.ttv-scale-music svg .ttv-raised-minor {
    color: #f00;
    fill: #f00;
}

.ttv-scale-music svg .ttv-scale-degree {
    fill: var(--ttv-muted);
    font-weight: 700;
}

.ttv-scale-music svg .bW,
.ttv-scale-music svg .bthW {
    stroke: var(--ttv-ink) !important;
}

.ttv-step-markers {
    display: none;
    height: 18px;
    left: 0;
    margin: 0;
    max-width: 100%;
    pointer-events: none;
    position: relative;
    width: 100%;
}

.ttv-step-markers.is-positioned {
    display: block;
    margin-top: -4px;
}

.ttv-step-markers.is-svg-positioned {
    display: none;
}

.ttv-step-markers.is-positioned > span {
    left: 50%;
    position: absolute;
    top: 0;
    transform: translateX(-50%);
}

.ttv-step-markers.is-positioned .ttv-step-whole {
    width: 18px;
}

.ttv-step-markers.is-positioned .ttv-step-half {
    width: 12px;
}

.ttv-step-whole {
    align-self: start;
    border-top: 1.5px solid var(--ttv-accent);
    border-radius: 999px 999px 0 0;
    height: 8px;
    justify-self: center;
    width: 68%;
}

.ttv-step-gap {
    display: none;
}

.ttv-step-half {
    color: var(--ttv-accent-2);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    text-align: center;
}

.ttv-svg-step-whole {
    fill: none;
    stroke: var(--ttv-accent);
    stroke-linecap: round;
    stroke-width: 1.3;
}

.ttv-svg-step-half {
    fill: var(--ttv-accent-2);
    font: 700 9px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-anchor: middle;
}

.ttv-svg-step-markers {
    display: inline;
}

.ttv-chords-split {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(260px, 3fr) minmax(280px, 4fr);
    margin: 0 auto;
    max-width: var(--ttv-layout-width);
    width: 100%;
}

.ttv-chords-view {
    background: var(--ttv-card);
    border: 1px solid var(--ttv-line);
    border-radius: 8px;
    box-shadow: var(--ttv-shadow);
    display: grid;
    gap: 0;
    grid-template-rows: var(--ttv-title-height) var(--ttv-chord-content-height);
    height: calc(var(--ttv-title-height) + var(--ttv-chord-content-height));
    overflow: hidden;
    position: relative;
    width: 100%;
}

.ttv-clef-cycle {
    background: #fff;
    border: 1px solid var(--ttv-line-strong);
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(23, 33, 50, 0.08);
    color: #38465a;
    cursor: pointer;
    display: grid;
    height: 26px;
    left: 7px;
    min-width: 26px;
    padding: 0;
    place-items: center;
    position: absolute;
    top: 7px;
    z-index: 3;
}

.ttv-clef-icon {
    display: block;
    height: 22px;
    overflow: visible;
    width: 22px;
}

.ttv-clef-glyph {
    fill: currentColor;
    font-family: "Apple Symbols", "Noto Music", "Bravura Text", "TtvMusic", serif;
    font-size: 22px;
}

.ttv-clef-glyph-treble {
    font-size: 24px;
}

.ttv-clef-glyph-bass {
    font-size: 20px;
}

.ttv-clef-glyph-alto {
    font-size: 22px;
}

.ttv-clef-cycle:hover,
.ttv-clef-cycle:focus-visible {
    border-color: var(--ttv-accent);
    color: var(--ttv-accent);
    outline: none;
}

.ttv-chord-headings {
    background: var(--ttv-soft);
    border-bottom: 1px solid var(--ttv-line);
    color: var(--ttv-ink);
    display: grid;
    font-size: 0.72rem;
    font-weight: 650;
    height: var(--ttv-title-height);
    line-height: 1.1;
    text-align: center;
}

.ttv-chord-headings h2 {
    font-size: 0.72rem;
    font-weight: 750;
    grid-column: 1 / -1;
    line-height: 1.1;
    margin: 0;
    padding: 6px 4px;
}

.ttv-chords-staff-wrap {
    display: grid;
    height: var(--ttv-chord-content-height);
    min-height: 0;
    overflow: hidden;
    padding: 3px 8px 14px;
    position: relative;
}

.ttv-chords-staff {
    align-items: center;
    display: grid;
    justify-items: center;
    min-width: 0;
    position: relative;
    transform: translateY(-18px);
    width: 100%;
}

.ttv-chords-staff .ttv-abc-slot {
    display: grid;
    justify-content: center;
    justify-items: center;
    max-width: 100%;
    overflow: visible;
    width: 100%;
}

.ttv-chords-staff svg {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    object-fit: contain;
    overflow: visible;
}

.ttv-chords-staff svg text[class] {
    font-family: "Figurato", serif;
    font-feature-settings: "liga" 1, "clig" 1, "calt" 1, "kern" 1;
    font-kerning: normal;
    font-variant-ligatures: common-ligatures discretionary-ligatures contextual;
    text-rendering: optimizeLegibility;
}

.ttv-chord-mask-grid {
    display: block;
    inset: 0;
    pointer-events: none;
    position: absolute;
    z-index: 2;
}

.ttv-chord-note-mask {
    align-items: center;
    background: #f8fbff;
    border: 1px solid #d8e5f5;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(23, 33, 50, 0.06);
    cursor: pointer;
    display: grid;
    justify-items: center;
    bottom: 0;
    height: auto;
    left: 50%;
    min-width: 0;
    pointer-events: auto;
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    width: 56px;
}

.ttv-chord-note-mask.is-hidden {
    background: #f8fbff;
}

.ttv-chord-note-mask:not(.is-hidden) {
    opacity: 0;
}

.ttv-figure-row {
    border-top: 1px solid var(--ttv-line);
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.ttv-chord-figure {
    align-items: center;
    border-right: 1px solid var(--ttv-line);
    display: inline-flex;
    font-size: 0.76rem;
    font-weight: 700;
    gap: 3px;
    justify-content: center;
    min-height: 50px;
    padding: 2px;
}

.ttv-chord-figure:last-child {
    border-right: 0;
}

.ttv-chord-figure:nth-child(3) {
    border-right: 3px double var(--ttv-line);
}

.ttv-figure-roman {
    color: var(--ttv-accent);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.94em;
    line-height: 1;
}

.ttv-figurato {
    color: var(--ttv-accent);
    display: inline-block;
    font-family: "Figurato", "Bravura Text", "Times New Roman", serif;
    font-feature-settings: "liga" 1, "calt" 1, "kern" 1;
    font-kerning: normal;
    font-size: 1.32rem;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1;
    min-width: 0.9em;
}

.ttv-chord-music {
    align-items: center;
    display: grid;
    min-height: 72px;
    width: 100%;
}

.ttv-chord-music .ttv-question {
    justify-self: center;
}

.ttv-abc-slot svg {
    height: auto;
    max-width: 100%;
}

.ttv-grid {
    background: var(--ttv-line);
    border: 0;
    border-radius: 0 0 8px 8px;
    display: grid;
    gap: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 auto;
    max-width: none;
    min-width: 0;
    overflow: hidden;
    width: 100%;
}

.ttv-cell {
    align-items: stretch;
    background: var(--ttv-cell);
    border: 0;
    border-right: 1px solid var(--ttv-line);
    border-top: 1px solid var(--ttv-line);
    border-radius: 0;
    box-shadow: none;
    display: grid;
    min-height: 52px;
    overflow: hidden;
    transition: background 0.16s ease, box-shadow 0.16s ease;
}

.ttv-cell:nth-child(-n + 3) {
    border-top: 0;
}

.ttv-cell:nth-child(3n) {
    border-right: 0;
}

.ttv-cell.is-selected {
    background: var(--ttv-accent-2-soft);
}

.ttv-cell-major {
    min-height: 62px;
}

.ttv-cell-armure {
    min-height: 40px;
}

.ttv-cell-minor {
    min-height: 78px;
}

.ttv-tone-panel {
    align-items: center;
    display: grid;
    gap: 8px;
    justify-items: center;
    padding: 7px 6px;
    position: relative;
    text-align: center;
    width: 100%;
}

.ttv-question {
    align-items: center;
    background: #fff;
    border: 1.5px dashed var(--ttv-accent);
    border-radius: 999px;
    color: var(--ttv-accent);
    display: inline-flex;
    font-size: 0.85rem;
    font-weight: 750;
    height: 24px;
    justify-content: center;
    width: 34px;
}

.ttv-answer {
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
    line-height: 1.1;
    margin: 0;
    padding: 2px 4px;
    text-align: center;
}

.ttv-tone-answer {
    font-size: var(--ttv-ttv-main-text);
    font-weight: 500;
}

.ttv-blue {
    color: var(--ttv-accent);
}

.ttv-meta {
    color: var(--ttv-muted);
    font-size: 0.88rem;
    line-height: 1.25;
}

.ttv-armure-line {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 100%;
    padding: 4px 6px;
    width: 100%;
}

.ttv-armure-answer {
    font-size: var(--ttv-ttv-main-text);
    font-weight: 500;
    justify-self: center;
}

.ttv-study-column > .ttv-armure-answer {
    align-self: center;
    display: grid;
    gap: 5px;
    font-weight: 650;
    justify-self: center;
    line-height: 1;
    place-items: center;
    text-align: center;
}

.ttv-armure-value {
    font-size: clamp(2.1rem, 6vw, 4.2rem);
    line-height: 1;
}

.ttv-armure-notes {
    color: var(--ttv-muted);
    font-size: clamp(0.56rem, 1.05vw, 0.74rem);
    font-weight: 650;
    line-height: 1;
    white-space: nowrap;
}

.ttv-armure-composite {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    white-space: nowrap;
}

.ttv-parenthetical-answer,
.ttv-minor-markers-answer {
    font-size: var(--ttv-ttv-paren-text);
    font-weight: inherit;
    line-height: 1;
    padding-left: 2px;
    padding-right: 2px;
}

.ttv-armure-line .ttv-question,
.ttv-parenthetical-answer .ttv-question,
.ttv-minor-markers-answer .ttv-question {
    font-size: 0.78rem;
    height: 20px;
    width: 22px;
}

.ttv-parens,
.ttv-comma {
    color: var(--ttv-ink);
    font-size: var(--ttv-ttv-paren-text);
    line-height: 1;
}

.ttv-minor-markers {
    color: #111;
    font-size: var(--ttv-ttv-paren-text);
    font-weight: 500;
    white-space: nowrap;
}

.ttv-raised-text {
    color: #f00;
}

.ttv-preview {
    background: var(--ttv-card);
    border: 1px solid var(--ttv-line);
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(24, 33, 47, 0.16);
    margin-top: 12px;
    overflow: hidden;
}

.ttv-preview-head {
    align-items: center;
    background: var(--ttv-soft);
    border-bottom: 1px solid var(--ttv-line);
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
}

.ttv-preview-head button {
    background: transparent;
    border: 0;
    color: var(--ttv-muted);
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
}

.ttv-preview-body {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    overflow-x: auto;
    padding: 10px;
}

.ttv-abc-block {
    min-width: 0;
}

.ttv-abc-title {
    color: var(--ttv-muted);
    font-size: 0.84rem;
    font-weight: 750;
    margin-bottom: 4px;
}

.ttv-abc-block svg {
    height: auto;
    max-width: 100%;
}

.ttv-abc-fallback {
    background: #111827;
    border-radius: 8px;
    color: #f8fafc;
    font: 0.8rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    margin: 0;
    overflow-x: auto;
    padding: 12px;
    white-space: pre;
}

@media (max-width: 720px) {
    .ttv-app {
        left: auto;
        margin-left: 0;
        margin-right: 0;
        transform: none;
        width: max(430px, 100%);
    }

    .ttv-toolbar {
        align-items: stretch;
        display: grid;
    }

    .ttv-toolbar-actions {
        display: flex;
        justify-content: flex-end;
        margin-left: 0;
    }

    .ttv-toolbar-actions .ttv-fullscreen,
    .ttv-toolbar-actions .ttv-exercise-toggle {
        width: auto;
    }

    .ttv-segmented {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .ttv-segmented button {
        min-width: 0;
        padding: 0 8px;
    }

    .ttv-study-view {
        grid-template-columns: 1fr;
        min-width: 0;
    }

    .ttv-study-panel {
        padding: 0;
    }

    .ttv-chords-split {
        grid-template-columns: 1fr;
    }

    .ttv-chords-view {
        overflow: hidden;
    }

    .ttv-chords-staff-wrap {
        min-height: 104px;
        min-width: 0;
        padding-inline: 4px;
    }

    .ttv-figure-row {
        min-width: 0;
    }

    .ttv-chord-figure {
        font-size: 0.68rem;
        gap: 1px;
    }

    .ttv-cell-major {
        min-height: 58px;
    }

    .ttv-cell-armure {
        min-height: 38px;
    }

    .ttv-cell-minor {
        min-height: 76px;
    }

    .ttv-tone-panel {
        gap: 10px;
        padding: 8px 4px;
    }

    .ttv-tone-answer {
        font-size: var(--ttv-ttv-main-text);
    }

    .ttv-armure-line {
        padding: 4px;
    }

    .ttv-armure-answer {
        font-size: var(--ttv-ttv-main-text);
        padding: 4px 2px;
    }

    .ttv-minor-markers {
        font-size: var(--ttv-ttv-paren-text);
    }

    .ttv-question {
        font-size: 0.8rem;
        height: 23px;
        width: 30px;
    }
}
