/* Compact theme selections use the visual language of each theme. */
html[data-design="classic"] .classic-settings-page .design-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-width:620px}
html[data-design="classic"] .classic-settings-page .design-options button{display:flex;align-items:center;gap:12px;min-width:0;min-height:76px;padding:8px 10px;background:#fff;color:var(--ink);border:1px solid var(--line);border-radius:6px}
html[data-design="classic"] .classic-settings-page .design-options button[aria-pressed="true"]{border-color:var(--accent);outline:1px solid var(--accent);outline-offset:0}
html[data-design="classic"] .classic-settings-page .design-options img{display:block;width:94px;max-width:42%;height:auto;aspect-ratio:1.455;object-fit:cover;border:1px solid var(--line);border-radius:3px;flex:none}
html[data-design="classic"] .classic-settings-page .design-options strong{display:block;margin:0;font:600 14px/1.3 Arial,Helvetica,sans-serif;overflow-wrap:anywhere}
@media(max-width:520px){
 html[data-design="classic"] .classic-settings-page .design-options button{flex-direction:column;align-items:stretch;justify-content:start;gap:6px;min-height:0;padding:8px}
 html[data-design="classic"] .classic-settings-page .design-options img{width:100%;max-width:100%}
 html[data-design="classic"] .classic-settings-page .design-options strong{font-size:13px}
}
/* Commander keeps directory rows, now with a small screenshot beside the name. */
html[data-design="commander"] .commander-settings-page .settings-directory tr:has(.theme-directory-choice)>td{height:auto!important;vertical-align:middle!important}
html[data-design="commander"] .commander-settings-page .settings-directory button.theme-directory-choice{display:flex!important;align-items:center!important;gap:10px!important;min-height:64px!important;height:auto!important;width:100%!important;padding:4px!important;text-align:left!important;white-space:normal!important}
html[data-design="commander"] .commander-settings-page .theme-directory-choice img{display:block;width:82px;height:auto;aspect-ratio:1.455;object-fit:cover;border:1px solid currentColor;flex:none}
html[data-design="commander"] .commander-settings-page .theme-directory-choice span{min-width:0;overflow-wrap:anywhere}
@media(max-width:360px){html[data-design="commander"] .commander-settings-page .theme-directory-choice img{width:64px}html[data-design="commander"] .commander-settings-page .settings-directory button.theme-directory-choice{gap:6px!important}}
/* Keep the three launcher icon previews grouped together on wide screens. */
/* The full-size panes have a Back row in addition to F2. */
html[data-design="commander"] .directory-trail{display:none!important}
html[data-design="commander"] body.pane-embedded.directory-open .directory-trail{display:block!important}
html[data-design="commander"] main .directory-back {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 4px 8px;
  border: 0;
  background: transparent !important;
  color: inherit !important;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
html[data-design="commander"] main .directory-back:focus-visible {
  outline: 1px solid var(--line);
  outline-offset: -3px;
}
/* Short descriptions explain each theme alongside its screenshot. */
html[data-design="classic"] .classic-settings-page .theme-choice-copy{display:block;min-width:0}
html[data-design="classic"] .classic-settings-page .theme-choice-description{display:block;margin-top:4px;color:var(--muted);font:400 12px/1.35 Arial,Helvetica,sans-serif;overflow-wrap:normal}
html[data-design="commander"] .commander-settings-page .theme-directory-choice .theme-choice-copy{display:block;min-width:0}
html[data-design="commander"] .commander-settings-page .theme-directory-choice .theme-choice-description{display:block;margin-top:4px;font-size:14px!important;line-height:1.25!important;overflow-wrap:normal}

/* Balance visible artwork within the common Classic page-header area. */
html[data-design="classic"] body[data-section="downloads"] #sectionArt { transform: scale(1.3); }
html[data-design="classic"] body[data-section="install"] #sectionArt { transform: scale(1.3); }
html[data-design="classic"] body[data-section="updates"] #sectionArt { transform: scale(1.55); }
html[data-design="classic"] body[data-section="about"] #sectionArt { transform: scale(.99); }
@media (max-width: 760px) {
  html[data-design="classic"] body[data-section="updates"] #sectionArt { transform: scale(1.35); }
  html[data-design="classic"] body[data-section="downloads"] #sectionArt,
  html[data-design="classic"] body[data-section="install"] #sectionArt { transform: scale(1.2); }
}
html[data-design="classic"] body:is([data-section="downloads"], [data-section="install"], [data-section="updates"], [data-section="about"]) #sectionArt { transform-origin: right center; }

/* Align the six Classic home cards on a shared picture and text grid. */
html[data-design="classic"] .home-grid[aria-label="Explore archive sections"] { grid-auto-rows: 1fr; }
html[data-design="classic"] .home-grid[aria-label="Explore archive sections"] .home-card { grid-template-rows: auto minmax(60px, auto) auto; align-content: start; row-gap: 8px; }
html[data-design="classic"] .home-grid[aria-label="Explore archive sections"] .home-art { grid-row: 1 / 4; align-self: center; height: 118px; }
html[data-design="classic"] .home-grid[aria-label="Explore archive sections"] .home-art img { height: 118px; max-height: 100%; object-fit: contain; }
html[data-design="classic"] .home-grid[aria-label="Explore archive sections"] .home-copy h2 { align-self: start; }
@media (max-width: 760px) {
  html[data-design="classic"] .home-grid[aria-label="Explore archive sections"] .home-card { grid-template-rows: auto minmax(53px, auto) auto; }
  html[data-design="classic"] .home-grid[aria-label="Explore archive sections"] .home-art, html[data-design="classic"] .home-grid[aria-label="Explore archive sections"] .home-art img { height: 90px; }
}

/* Balance the remaining Classic page-heading illustrations. */
html[data-design="classic"] body[data-section="cassettes"] #sectionArt { transform: scale(1.45); transform-origin: right center; }
html[data-design="classic"] body[data-section="settings"] #sectionArt { transform: scale(1.25); transform-origin: right center; }
html[data-design="classic"] body[data-section="about"] #sectionArt { transform: scale(1.2); }
@media (max-width: 760px) {
  html[data-design="classic"] body[data-section="cassettes"] #sectionArt { transform: scale(1.28); }
  html[data-design="classic"] body[data-section="settings"] #sectionArt,
  html[data-design="classic"] body[data-section="about"] #sectionArt { transform: scale(1.12); }
}
html[data-design="classic"] .home-grid[aria-label="Explore archive sections"] .home-card[href="#cassettes"] .home-art img { transform: scale(1.35); transform-origin: center; }
@media (max-width: 760px) {
  html[data-design="classic"] .home-grid[aria-label="Explore archive sections"] .home-card[href="#cassettes"] .home-art img { transform: scale(1.25); }
}

/* Keep the Android installation card tidy on narrow Classic screens. */
html[data-design="classic"] .android-install-guide .apk-download { display: flex; width: fit-content; max-width: 100%; margin: 4px auto 18px; text-align: center; }
@media (min-width: 761px) {
  html[data-design="classic"] .android-install-guide .apk-download { margin-left: 0; margin-right: auto; }
}
@media (max-width: 760px) {
  html[data-design="classic"] .android-install-guide > .eyebrow { font-size: clamp(8px, 2.35vw, 11px) !important; letter-spacing: .06em; white-space: nowrap; }
  html[data-design="classic"] .android-install-guide > h2 { font-size: clamp(18px, 5.4vw, 28px); white-space: nowrap; }
  html[data-design="classic"] .android-install-guide .apk-download { box-sizing: border-box; padding-inline: 12px; font-size: clamp(13px, 3.8vw, 16px); white-space: nowrap; }
}

/* Align the Classic search heading and close control on one row. */
html[data-design="classic"] #detail:has(#archiveSearch) > .close { position: absolute; top: 36px; right: 36px; float: none; }
html[data-design="classic"] #detail:has(#archiveSearch) #detailBody > .eyebrow { display: flex; align-items: center; min-height: 36px; margin: 0 52px 16px 0; }
@media (max-width: 760px) {
  html[data-design="classic"] #detail:has(#archiveSearch) > .close { top: 22px; right: 22px; }
}

/* Keep the Classic listening player close to the playlist filters. */
html[data-design="classic"] body[data-section="music"] #resultLine { display: none; }
html[data-design="classic"] body[data-section="music"] #tidalPlayer { margin-top: 16px; }

/* Keep each Records title on the intended two lines. */
html[data-design="classic"] .home-grid[aria-label="Records"] .records-title-line { white-space: nowrap; font: inherit; letter-spacing: inherit; color: inherit; text-transform: none; }
@media (max-width: 760px) {
  html[data-design="classic"] .home-grid[aria-label="Records"] .home-copy h2 { font-size: clamp(16px, 5vw, 22px); }
}

/* Classic phone header: a simple menu icon on the left of the centered brand. */
@media (max-width: 760px) {
  html[data-design="classic"] .brand-header .home-toggle { display: none; }
  html[data-design="classic"] .brand-header .menu-toggle,
  html[data-design="classic"] .brand-header .menu-toggle:hover,
  html[data-design="classic"] .brand-header .menu-toggle[aria-expanded="true"] {
    grid-column: 1; grid-row: 1;
    border: 0; border-radius: 0; background: transparent; box-shadow: none;
  }
  html[data-design="classic"] .brand-header .wordmark { grid-column: 2; grid-row: 1; }
}

/* Compact cassette name and Remember option on the Classic phone player. */
html[data-design="classic"] #tidalPlayer .phone-cassette-name { display: none; }
@media (max-width: 760px) {
  html[data-design="classic"] #tidalPlayer .deck-chassis { margin: 4px 0 !important; }
  html[data-design="classic"] #tidalPlayer .deck-chassis > .deck-track-info { padding-top: 12px !important; }
  html[data-design="classic"] #tidalPlayer .classic-track-copy { gap: 3px; }
  html[data-design="classic"] #tidalPlayer .tidal-preview-note { margin-top: 5px; line-height: 1.4; }
  html[data-design="classic"] #tidalPlayer .classic-cinema-help-link:not([hidden]) { margin-bottom: 0 !important; }
  html[data-design="classic"] #tidalPlayer .classic-cassette-picker {
    display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center;
    gap: 8px; min-width: 0; margin-top: 6px; padding-top: 6px; border-top: 1px solid #b9c1b6;
  }
  html[data-design="classic"] #tidalPlayer .classic-cassette-picker-label,
  html[data-design="classic"] #tidalPlayer .classic-cassette-picker [data-open-cassette-choice] { display: none; }
  html[data-design="classic"] #tidalPlayer .phone-cassette-name {
    display: block; min-width: 0; color: var(--ink); overflow-wrap: anywhere;
    font: 400 13px/1.4 Arial,Helvetica,sans-serif;
  }
  html[data-design="classic"] #tidalPlayer .phone-cassette-name .phone-cassette-select { color: inherit; font: inherit; font-weight: 700; letter-spacing: inherit; text-transform: none; text-decoration: underline; cursor: pointer; }
  html[data-design="classic"] #tidalPlayer .classic-cassette-picker .player-cassette-remember { display: flex; align-items: center; gap: 5px; min-height: 36px; margin: 0; white-space: nowrap; color: var(--ink); font: 400 12px/1.3 Arial,Helvetica,sans-serif; letter-spacing: normal; text-transform: none; }
  html[data-design="classic"] #tidalPlayer .classic-cassette-picker .player-cassette-remember input { flex: 0 0 16px; width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
}

/* Two centered lines for the Classic home-page theme choices. */
html[data-design="classic"] body[data-section="home"] .home-theme-switch {
  display: grid; grid-template-columns: auto auto auto; justify-content: center;
  justify-items: center; column-gap: 10px; row-gap: 0;
}
html[data-design="classic"] body[data-section="home"] .home-theme-switch > span:first-child {
  grid-column: 1 / -1; text-align: center;
}
html[data-design="classic"] body[data-section="home"] .home-theme-switch > button { white-space: nowrap; }
@media (max-width: 400px) {
  html[data-design="classic"] body[data-section="home"] .home-theme-switch { column-gap: 5px; font-size: clamp(9px, 2.7vw, 11px); letter-spacing: .25px; }
}


/* Stack the Classic X7 tube replacement sections on every screen size. */
html[data-design="classic"] .tube-upgrade .tube-grid { grid-template-columns: minmax(0, 1fr); }

/* Commander filter labels, including the spans added by resizable columns, use the selected text color. */
html[data-design="commander"] body #detail.commander-filter-dialog #detailBody *,
html[data-design="commander"] body #detail.commander-filter-dialog > button {
 color:var(--ink)!important;
}
html[data-design="commander"] body #detail.commander-filter-dialog #detailBody .option-directory tbody tr:is(:hover,:focus-within),
html[data-design="commander"] body #detail.commander-filter-dialog #detailBody .option-directory tbody tr:is(:hover,:focus-within) :is(td,button) {
 background:var(--paper)!important;
 color:var(--ink)!important;
}
html[data-design="commander"] body #detail.commander-filter-dialog #detailBody .option-directory tbody tr:focus-within {
 outline:1px solid var(--line)!important;
 outline-offset:-1px;
}

/* Classic phone archive search: keep the form and result text in proportion. */
@media (max-width: 760px) {
  html[data-design="classic"] #detail:has(#archiveSearch) #detailBody > .eyebrow {
    font-size: 10px;
    line-height: 1.4;
  }
  html[data-design="classic"] #detail:has(#archiveSearch) .classic-filter-panel label {
    font-size: 10px;
    line-height: 1.4;
  }
  html[data-design="classic"] #detail:has(#archiveSearch) .classic-filter-panel :is(input, select) {
    min-height: 44px;
    height: 44px;
    font-size: 16px;
    line-height: 1.3;
  }
  html[data-design="classic"] #detail:has(#archiveSearch) .classic-search-reset {
    min-height: 44px;
    height: auto;
    font-size: 11px;
  }
  html[data-design="classic"] #detail:has(#archiveSearch) #archiveSearchResults {
    margin-top: 12px;
    color: var(--muted);
    font: 400 13px/1.5 Arial, Helvetica, sans-serif;
    overflow-wrap: anywhere;
  }
  html[data-design="classic"] #detail:has(#archiveSearch) #archiveSearchResults > p {
    margin: 0 0 10px;
    font: inherit;
  }
  html[data-design="classic"] #detail:has(#archiveSearch) .classic-search-results button {
    min-height: 44px;
    font: 400 14px/1.45 Arial, Helvetica, sans-serif;
    overflow-wrap: anywhere;
  }
}

/* Classic phone home: the archive release is one line below the theme choices. */
@media (max-width: 760px) {
  html[data-design="classic"] body[data-section="home"] .home-theme-switch + .masthead-release {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: center;
    align-items: center;
    gap: 0 7px;
    margin: 16px auto 20px;
    color: var(--muted);
    font: 700 10px/1.5 var(--classic-sans, Arial, sans-serif);
    letter-spacing: .7px;
    white-space: nowrap;
  }
  html[data-design="classic"] body[data-section="home"] .home-theme-switch + .masthead-release :is(.masthead-version, .masthead-date) {
    display: block;
    width: auto;
    text-align: center;
    font: inherit;
  }
  html[data-design="classic"] body[data-section="home"] .home-theme-switch + .masthead-release > .page-share-row {
    grid-column: 1 / -1;
    justify-self: center;
    margin: 20px 0 0;
  }
}
@media (max-width: 760px) {
  html[data-design="classic"] #detail:has(#archiveSearch) .classic-filter-panel select {
    padding-left: 8px;
    padding-right: 8px;
    font-size: 14px;
  }
}

/* Phone theme cards show real narrow-screen views of each theme. */
@media (max-width: 760px) {
  html[data-design="classic"] .classic-settings-page .design-options {
    grid-template-columns: minmax(0, 1fr);
  }
  html[data-design="classic"] .classic-settings-page .design-options button {
    flex-direction: row;
    align-items: flex-start;
    justify-content: start;
    gap: 14px;
    padding: 12px;
    text-align: left;
  }
  html[data-design="classic"] .classic-settings-page .design-options picture {
    display: block;
    flex: 0 0 88px;
    width: 88px;
  }
  html[data-design="classic"] .classic-settings-page .design-options picture img {
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: 375 / 844;
    object-fit: contain;
  }
  html[data-design="classic"] .classic-settings-page .design-options strong {
    font-size: 14px;
  }
}
@media (min-width: 761px) {
  html[data-design="classic"] .classic-settings-page .design-options picture {
    display: block;
    flex: 0 0 94px;
    width: 94px;
    max-width: 42%;
  }
  html[data-design="classic"] .classic-settings-page .design-options picture img {
    width: 100%;
    max-width: 100%;
  }
}

/* Commander phone theme rows also show each theme's phone layout. */
@media (max-width: 760px) {
  html[data-design="commander"] .commander-settings-page .theme-directory-choice picture {
    display: block;
    flex: 0 0 70px;
    width: 70px;
  }
  html[data-design="commander"] .commander-settings-page .theme-directory-choice picture img {
    width: 100%;
    height: auto;
    aspect-ratio: 375 / 844;
    object-fit: contain;
  }
}
@media (min-width: 761px) {
  html[data-design="commander"] .commander-settings-page .theme-directory-choice picture {
    display: block;
    flex: 0 0 82px;
    width: 82px;
  }
  html[data-design="commander"] .commander-settings-page .theme-directory-choice picture img {
    width: 100%;
  }
}

/* Testing Equipment: compact search and filtering in each theme. */
html[data-design="classic"] .testing-filter { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)) auto; gap:12px; align-items:end; }
html[data-design="classic"] .testing-filter .testing-filter-search { grid-column:1/-1; }
html[data-design="classic"] .testing-filter button { min-width:110px; }
html[data-design="classic"] .testing-filter-count { margin:12px 2px; color:var(--muted); font:400 12px/1.4 Arial,Helvetica,sans-serif; }
html[data-design="classic"] .testing-filter-results .classic-testing .directory { margin-top:0; }
html[data-design="classic"] .testing-filter-empty { color:var(--muted); font:400 14px/1.5 Arial,Helvetica,sans-serif; }
@media (max-width:760px) {
  html[data-design="classic"] .testing-filter { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 12px; }
  html[data-design="classic"] .testing-filter .testing-filter-search { grid-column:1/-1; }
  html[data-design="classic"] .testing-filter button { min-height:40px; }
  html[data-design="classic"] .testing-filter :is(input,select) { min-height:44px; height:44px; }
  html[data-design="classic"] .testing-filter input { font-size:16px; }
}
html[data-design="commander"] .commander-testing-filter { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:0 0 12px; padding:10px; border:1px solid var(--line); background:var(--paper); color:var(--ink); }
html[data-design="commander"] .commander-testing-filter label { display:grid; gap:4px; color:var(--ink); font:inherit; }
html[data-design="commander"] .commander-testing-filter .testing-filter-search { grid-column:1/-1; }
html[data-design="commander"] .commander-testing-filter :is(input,select,button) { width:100%; min-width:0; min-height:44px; padding:7px; border:1px solid var(--line); border-radius:0; background:var(--paper); color:var(--ink); font:inherit; }
html[data-design="commander"] .commander-testing-filter button { grid-column:1/-1; text-align:left; }
html[data-design="commander"] .testing-filter-count, html[data-design="commander"] .testing-filter-empty { color:var(--ink); font:inherit; }

/* Classic Equipment groups results from the shared filter form. */
html[data-design="classic"] body:not([data-section="equipment"]) #equipment-group-control { display:none !important; }
@media (min-width:761px) {
 html[data-design="classic"] body[data-section="equipment"] #tools { grid-template-columns:repeat(4,minmax(0,1fr)) auto; gap:12px; }
 html[data-design="classic"] body[data-section="equipment"] #tools label.search { grid-column:1/-1; }
 html[data-design="classic"] body[data-section="equipment"] #tools label:not(.search) { grid-column:auto; display:flex; }
 html[data-design="classic"] body[data-section="equipment"] #tools #reset { grid-column:auto; width:auto; min-width:110px; height:40px; min-height:40px; padding:8px 12px; border:1px solid #d8dcd4; color:var(--form-muted); }
}
@media (max-width:760px) {
 html[data-design="classic"] body[data-section="equipment"] #tools { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 12px; }
 html[data-design="classic"] body[data-section="equipment"] #tools label.search { grid-column:1/-1; }
 html[data-design="classic"] body[data-section="equipment"] #tools label:not(.search) { grid-column:auto; display:flex; }
 html[data-design="classic"] body[data-section="equipment"] #tools :is(input,select) { min-height:44px; height:44px; }
 html[data-design="classic"] body[data-section="equipment"] #tools input { font-size:16px; }
 html[data-design="classic"] body[data-section="equipment"] #tools #reset { grid-column:1/-1; min-height:40px; height:40px; padding:8px 12px; border:1px solid #d8dcd4; color:var(--form-muted); }
}
@media (max-width:760px) {
 html[data-design="classic"] body[data-section="equipment"] #tools label:has(:is(#brand,#type,#sort,#equipment-group)) { grid-column:auto !important; display:flex !important; }
}
@media (min-width:761px) {
 html[data-design="classic"] body[data-section="equipment"] #tools label:has(:is(#brand,#type,#sort,#equipment-group)) { grid-column:auto !important; display:flex !important; }
}
html[data-design="classic"] body[data-section="equipment"] #tools label:has(:is(#brand,#type,#sort,#equipment-group)) { align-items:stretch !important; }
html[data-design="classic"] body[data-section="equipment"] #tools label:has(#sort) select { height:44px; min-height:44px; }

/* Classic Repair Summaries: one row per instrument, responsive columns. */
html[data-design="classic"] .repair-summaries-page .repair-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
html[data-design="classic"] .repair-summaries-page .repair-summary[open] { grid-column:auto; }
html[data-design="classic"] .repair-summaries-page .repair-summary > summary { min-height:58px; gap:12px; }
html[data-design="classic"] .repair-summaries-page .repair-summary-name { flex:1; min-width:0; font:600 16px/1.4 var(--classic-sans,Arial,sans-serif); overflow-wrap:anywhere; }
@media (max-width:760px) {
 html[data-design="classic"] .repair-summaries-page .repair-grid { grid-template-columns:minmax(0,1fr); }
}

/* Full-size Classic repair cards stack and introduce each record. */
@media (min-width:761px) {
 html[data-design="classic"] .repair-summaries-page .repair-grid { grid-template-columns:minmax(0,1fr); }
 html[data-design="classic"] .repair-summaries-page .repair-summary-copy { display:grid; flex:1; min-width:0; gap:5px; }
 html[data-design="classic"] .repair-summaries-page .repair-summary-description { display:block; color:var(--muted); font:400 13px/1.5 var(--classic-sans,Arial,sans-serif); }
}
@media (max-width:760px) {
 html[data-design="classic"] .repair-summaries-page .repair-summary-copy { flex:1; min-width:0; }
 html[data-design="classic"] .repair-summaries-page .repair-summary-description { display:none; }
}

/* The Classic Repairs links include short descriptions on full-size screens. */
html[data-design="classic"] .repair-entry-description { display:none; }
@media (min-width:761px) {
 html[data-design="classic"] .repair-entry-description { display:block; color:var(--muted); font:400 13px/1.5 var(--classic-sans,Arial,sans-serif); }
}

/* Compact Cassettes collection: keep the filters directly below the statistics. */
html[data-design="classic"] body[data-section="collection"] #sectionMenu { display:none; }
@media (max-width:760px) {
  html[data-design="classic"] body[data-section="collection"] #tools label:has(#sort) { grid-column:1 / span 4; display:flex; flex-direction:column; align-items:stretch; gap:5px; min-width:0; }
  html[data-design="classic"] body[data-section="collection"] #tools label:has(#sort) select { width:100%; min-width:0; height:44px; min-height:44px; }
  html[data-design="classic"] body[data-section="collection"] #tools #reset { grid-column:5 / span 2; width:100%; min-width:0; height:44px; min-height:44px; }
}

@media (min-width:761px) {
  html[data-design="classic"] aside .sidebar-bottom > a[href="#install"] { display:none; }
}

/* Classic section titles use initial capitals at every screen size. */
html[data-design="classic"] :is(.panel h2, .panel h3, .menu-heading h2, .download-section > h2, .equipment-results-title h2) { text-transform:capitalize; }

/* Capitalize Classic section titles, including expandable directory headings. */
html[data-design="classic"] body :is(.directory-heading, .classic-playlist-picker summary > span:first-child, #sectionMenu h2, #detailBody h3, #detailBody h4, #detailBody details > summary, .download-saved > summary, #classic-cassette-choice h2, #cinema-help-title) { text-transform:capitalize; }

/* Downloads manuals follow the same section typography and list treatment. */
html[data-design="classic"] body[data-section="downloads"] .compact-manuals { padding:0; margin:0 0 30px; border:0; border-radius:0; background:transparent; box-shadow:none; }
html[data-design="classic"] body[data-section="downloads"] .compact-manuals > h2 { font:400 26px/1.3 var(--classic-serif,Georgia,serif); margin:0 0 6px; }
html[data-design="classic"] body[data-section="downloads"] .compact-manuals .manual-count { font-size:13px; line-height:1.6; margin:0 0 16px; }
html[data-design="classic"] body[data-section="downloads"] .compact-manuals .manual-group { background:#fff; border-left:1px solid var(--line); border-right:1px solid var(--line); padding:0 22px; }
html[data-design="classic"] body[data-section="downloads"] .compact-manuals .manual-group:first-of-type { border-radius:7px 7px 0 0; }
html[data-design="classic"] body[data-section="downloads"] .compact-manuals .manual-group:has(+ [data-manual-empty]) { border-bottom:1px solid var(--line); border-radius:0 0 7px 7px; }
@media (max-width:760px) {
 html[data-design="classic"] body[data-section="downloads"] .compact-manuals > h2 { font-size:23px; }
 html[data-design="classic"] body[data-section="downloads"] .compact-manuals .manual-group { padding:0 16px; }
}

/* Keep the full last-import date legible in the Classic playlist statistics. */
html[data-design="classic"] body[data-section="music"] #stats .stat:last-child b { font-size:clamp(14px,3.3vw,24px); letter-spacing:-.02em; white-space:nowrap; }

/* Full-width Classic settings on larger screens. */
@media (min-width:761px){
 html[data-design="classic"] .classic-settings-page .design-options{width:100%;max-width:none;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
 html[data-design="classic"] .classic-settings-page .design-options button{width:100%;min-height:130px;padding:14px;gap:16px}
 html[data-design="classic"] .classic-settings-page .design-options picture{flex:0 1 40%;width:40%;max-width:200px}
 html[data-design="classic"] .classic-settings-page .design-options strong{font-size:16px}
 html[data-design="classic"] .cassette-icon-settings .cassette-icon-grid{width:100%;max-width:none}
}

/* Use a modest size for the front-view cassette on the page and home card. */
html[data-design="classic"] body[data-section="collection"] #sectionArt { transform:scale(.82); transform-origin:right center; }
html[data-design="classic"] .home-grid[aria-label="Explore archive sections"] .home-card[href="#collection"] .home-art img { transform:scale(.82); transform-origin:center; }

/* Align Classic home artwork with the title while retaining its current size. */
html[data-design="classic"] .home-grid[aria-label="Explore archive sections"] .home-art {
  grid-row: 2 / 4;
  align-self: start;
  align-items: flex-start;
}
html[data-design="classic"] .home-grid[aria-label="Explore archive sections"] .home-art img {
  object-position: center top;
  transform-origin: center top;
}
html[data-design="classic"] .home-grid[aria-label="Explore archive sections"] .home-card:is([href="#collection"], [href="#cassettes"]) .home-art img {
  transform-origin: center top;
}

/* Correct the small horizontal compression in the reel illustration. */
html[data-design="classic"] .home-grid[aria-label="Records"] .home-card[href="#reel-tapes"] .home-art img {
  object-fit: contain;
  transform: scaleX(1.01);
}

/* An embedded Commander pane follows the outer screen for preview frames. */
html[data-design="commander"][data-theme-preview-viewport="wide"] .commander-settings-page .theme-directory-choice picture { display:block; flex:0 0 120px; width:120px; }
html[data-design="commander"][data-theme-preview-viewport="wide"] .commander-settings-page .theme-directory-choice picture img { display:block; width:100%; height:auto; aspect-ratio:1.455; object-fit:cover; }

/* Classic desktop pages fill the content area beside the navigation. */
@media (min-width: 761px) {
 html[data-design="classic"] main,
 html[data-design="classic"] #content,
 html[data-design="classic"] #content > .panel {
  max-width: none;
 }
 html[data-design="classic"] #content > .panel { width: 100%; }
 html[data-design="classic"] body[data-section="install"] .install-guide { max-width: none; width: 100%; }
}
.application-browser-guide + .application-browser-guide { margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.install-guide .application-browser-guide h3 { margin-bottom: .5rem; }
.install-guide .install-source { font-size: .875rem; }
