.record-rack { min-width: 0; color: var(--ink, #1c2d3e); }
.rack-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.rack-eyebrow { margin: 0 0 7px; color: #638270; font-size: 10px; line-height: 1.5; font-weight: 700; letter-spacing: 1.5px; }
.rack-heading h2 { margin: 0 0 7px; font-size: clamp(24px, 3vw, 30px); line-height: 1.2; letter-spacing: -.8px; }
.rack-heading > div > p:last-child { margin: 0; color: var(--muted, #647485); font-size: 14px; line-height: 1.7; }
.rack-refresh { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex-shrink: 0; font-size: 13px; }
.rack-refresh .icon { width: 16px; height: 16px; }
.rack-filters { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(180px, 1fr); gap: 12px; }
.rack-search { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0 14px; border: 1px solid var(--line, #dce3e9); border-radius: 11px; background: #fff; color: var(--muted, #647485); }
.rack-search > .icon { width: 18px; height: 18px; flex-shrink: 0; }
.rack-search input { min-width: 0; margin: 0; padding: 13px 0; border: 0; box-shadow: none; background: transparent; font-size: 14px; font-weight: 400; }
.rack-search:focus-within { outline: 2px solid var(--blue, #315edf); outline-offset: 2px; }
.rack-search input:focus { box-shadow: none; }
.rack-class-filter select { min-height: 48px; margin: 0; border-color: var(--line, #dce3e9); border-radius: 11px; font-size: 14px; font-weight: 400; }
.rack-overview-note { margin: 12px 0 23px; color: var(--muted, #647485); font-size: 12px; line-height: 1.7; }
.rack-status { margin: 15px 0; color: #52705b; font-size: 13px; line-height: 1.6; }
.rack-status:empty { display: none; }
.rack-status.error { color: #a83d45; }
.rack-group { min-width: 0; margin-bottom: 18px; border: 1px solid var(--line, #dce3e9); border-radius: 17px; background: #fff; }
.rack-group > summary { display: flex; align-items: center; gap: 14px; padding: 20px 23px; border-radius: 16px; list-style: none; cursor: pointer; }
.rack-group > summary::-webkit-details-marker { display: none; }
.rack-group[open] > summary { border-bottom: 1px solid #e8ece9; border-radius: 16px 16px 0 0; }
.rack-group > summary:hover { background: #fafcf9; }
.rack-group > summary:focus-visible, .record-rack button:focus-visible, .rack-record-strip:focus-visible { outline: 3px solid var(--blue, #315edf); outline-offset: 3px; }
.rack-group-icon { display: grid; place-items: center; width: 43px; height: 43px; flex: 0 0 43px; border-radius: 50%; background: #edf3e9; color: #597453; }
.rack-group-icon .icon { width: 25px; height: 25px; }
.rack-group-name { flex: 1; min-width: 0; }
.rack-group-name strong { display: block; font-size: 18px; line-height: 1.4; letter-spacing: -.3px; overflow-wrap: anywhere; }
.rack-group-name small { display: block; margin-top: 4px; font-size: 12px; line-height: 1.5; color: var(--muted, #647485); }
.rack-group-toggle { flex-shrink: 0; color: #8b9b91; transition: transform .15s; }
.rack-group[open] .rack-group-toggle { transform: rotate(180deg); }
.rack-lanes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 23px; padding: 23px; }
.rack-lane { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; }
.rack-lane-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; margin-bottom: 12px; }
.rack-lane-heading > div:first-child { display: flex; align-items: center; gap: 8px; }
.rack-lane-heading h3 { margin: 0; font-size: 15px; line-height: 1.4; color: #324b3f; font-weight: 700; }
.rack-lane-symbol { display: grid; place-items: center; color: #78917d; }
.rack-lane-symbol .icon { width: 17px; height: 17px; }
.rack-lane-home .rack-lane-heading h3 { color: #51496a; }
.rack-lane-home .rack-lane-symbol { color: #9185a9; }
.rack-lane-count { display: grid; place-items: center; min-width: 22px; padding: 1px 6px; border-radius: 6px; background: #eef2ec; color: #75806d; font-size: 11px; line-height: 1.6; }
.rack-lane-home .rack-lane-count { background: #f0edf6; color: #857697; }
.rack-scroll-actions { display: flex; gap: 4px; }
.rack-scroll-actions button { display: grid; place-items: center; width: 28px; height: 28px; padding: 0 0 2px; border: 1px solid #e0e5df; border-radius: 7px; background: #fff; font-size: 22px; line-height: 1; color: #637362; }
.rack-scroll-actions button:hover:not(:disabled) { background: #eef4e9; }
.rack-record-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 196px; align-items: stretch; justify-content: start; gap: 13px; min-width: 0; overflow-x: auto; padding: 15px 13px 18px; border: 1px solid #e1e6de; border-bottom: 7px solid #cad5c7; border-radius: 12px 12px 6px 6px; background: #f4f6f1; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: #becdb8 #f4f6f1; }
.rack-lane-home .rack-record-strip { border-color: #e4e0eb; border-bottom-color: #d3cbdf; background: #f7f4fa; scrollbar-color: #c7bcd7 #f7f4fa; }
.rack-record { min-width: 0; scroll-snap-align: start; --rack-cover: #dfeeda; --rack-cover-ink: #375740; --rack-label: #b8df91; }
.rack-color-language { --rack-cover: #e9e2f4; --rack-cover-ink: #615077; --rack-label: #cbb4e9; }
.rack-color-maths { --rack-cover: #e0eaf6; --rack-cover-ink: #45617e; --rack-label: #a3caec; }
.rack-color-humanities { --rack-cover: #f4e8d8; --rack-cover-ink: #7f6341; --rack-label: #e7c28f; }
.rack-color-computing { --rack-cover: #dcefeb; --rack-cover-ink: #3c716c; --rack-label: #91d4cb; }
.rack-color-arts { --rack-cover: #f4e1e6; --rack-cover-ink: #865264; --rack-label: #e9b0c0; }
.rack-color-general { --rack-cover: #e4e8ee; --rack-cover-ink: #53667d; --rack-label: #bccce2; }
.rack-record-open { display: flex; flex-direction: column; width: 100%; height: 100%; min-width: 0; padding: 0; border: 1px solid #d5ddd3; border-radius: 10px; background: #fff; text-align: left; box-shadow: 0 3px 6px #26362906; transition: border-color .15s, box-shadow .15s; }
.rack-record-open:hover { border-color: #8fa58c; box-shadow: 0 5px 12px #26362910; }
.rack-sleeve { position: relative; display: flex; flex-direction: column; justify-content: space-between; width: 100%; height: 119px; flex: 0 0 119px; padding: 14px; overflow: hidden; border-radius: 9px 9px 0 0; background: var(--rack-cover); color: var(--rack-cover-ink); }
.rack-format { position: relative; z-index: 1; font-size: 10px; line-height: 1.4; letter-spacing: 1.5px; font-weight: 800; }
.rack-sleeve-subject { position: relative; z-index: 1; max-width: 105px; font-size: 16px; line-height: 1.2; font-weight: 750; letter-spacing: -.3px; overflow-wrap: anywhere; }
.rack-vinyl { position: absolute; right: -34px; bottom: -11px; display: grid; place-items: center; width: 118px; height: 118px; border-radius: 50%; border: 2px solid #3a4d60; background: repeating-radial-gradient(circle,#26384a 0 7px,#3a4d60 8px 9px,#26384a 10px 15px); }
.rack-vinyl > i { position: relative; display: block; width: 41px; height: 41px; border-radius: 50%; background: var(--rack-label); }
.rack-vinyl > i::after { content: ""; position: absolute; width: 5px; height: 5px; inset: 0; margin: auto; border-radius: 50%; background: #26384a; }
.rack-record-info { display: flex; flex-direction: column; flex: 1; min-width: 0; width: 100%; padding: 13px; }
.rack-access { display: block; margin: 0 0 8px; color: #598046; font-size: 10px; line-height: 1.5; font-weight: 650; }
.rack-access > span { white-space: nowrap; }
.rack-access-shared { color: #6e7a6c; }
.rack-access-set { color: #466b96; }
.rack-access-homework { color: #81649c; }
.rack-record-info > strong { display: block; margin-bottom: 8px; color: var(--ink, #1c2d3e); font-size: 14px; line-height: 1.5; letter-spacing: -.15px; overflow-wrap: anywhere; }
.rack-record-meta, .rack-record-audience { display: block; margin: 0 0 5px; color: var(--muted, #647485); font-size: 11px; line-height: 1.6; }
.rack-record-audience { color: #7c6c8a; }
.rack-keywords { display: block; margin-top: 4px; color: #8a9786; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.rack-record-action { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 15px; color: #5f7560; font-size: 11px; font-weight: 650; }
.rack-record-action .icon { width: 14px; height: 14px; flex-shrink: 0; }
.rack-lane-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; padding: 11px 2px 0; }
.rack-lane-actions button { display: inline-flex; align-items: center; gap: 5px; padding: 4px 0; font-size: 11px; line-height: 1.6; text-align: left; }
.rack-lane-actions .icon { width: 13px; height: 13px; }
.rack-lane-empty { min-height: 218px; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 26px 21px; border: 1px dashed #d9e0d3; border-bottom: 5px solid #dbe3d7; border-radius: 12px 12px 6px 6px; background: #f7f9f4; text-align: center; }
.rack-lane-home .rack-lane-empty { background: #faf8fc; border-color: #e3ddea; }
.rack-lane-empty > span { display: grid; place-items: center; margin-bottom: 13px; color: #91a38a; }
.rack-lane-empty .icon { width: 31px; height: 31px; }
.rack-lane-empty strong { font-size: 13px; line-height: 1.5; font-weight: 650; color: #74846a; }
.rack-lane-empty p { max-width: 270px; margin: 7px 0 0; color: #8a9684; font-size: 12px; line-height: 1.7; }
.rack-empty { padding: 45px 24px; border: 1px dashed var(--line, #dce3e9); border-radius: 15px; background: #ffffff80; text-align: center; }
.rack-empty > span { display: block; margin-bottom: 14px; color: #799272; }
.rack-empty > span .icon { width: 33px; height: 33px; }
.rack-empty h3 { margin: 0 0 9px; font-size: 20px; }
.rack-empty p { margin: 0 0 20px; color: var(--muted, #647485); font-size: 14px; line-height: 1.7; }
.rack-empty button { font-size: 13px; }
.rack-tracklist { width: min(570px, calc(100vw - 28px)); max-height: calc(100dvh - 40px); padding: 25px; border: 1px solid var(--line, #dce3e9); border-radius: 17px; background: #fff; color: var(--ink, #1c2d3e); }
.rack-tracklist::backdrop { background: #0c16266b; }
.rack-tracklist > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.rack-tracklist h2 { margin: 0; font-size: 22px; line-height: 1.4; overflow-wrap: anywhere; }
.rack-tracklist > header > button { flex-shrink: 0; }
.rack-tracklist-note { margin: 15px 0 8px; color: var(--muted, #647485); font-size: 13px; }
.rack-tracklist-lessons { display: grid; }
.rack-tracklist-lessons button { display: flex; align-items: center; gap: 14px; padding: 16px 3px; border-bottom: 1px solid #e9eeea; text-align: left; }
.rack-tracklist-lessons button:hover { background: #f5f8f2; }
.rack-tracklist-lessons button > span { flex: 0 0 22px; color: #94a18e; font-size: 11px; }
.rack-tracklist-lessons button > strong { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.rack-tracklist-lessons .icon { flex-shrink: 0; width: 17px; height: 17px; color: #81947b; }
.rack-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
/* Share the heading, shelf and action rows across both lanes. Card content can
   grow naturally while the two shelf edges and their controls stay aligned. */
@supports (grid-template-rows: subgrid) {
  .rack-lanes { grid-template-rows: auto auto auto; row-gap: 0; }
  .rack-lane { grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }
}
@media (max-width: 1150px) {
  .rack-lanes { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; gap: 25px; }
  .rack-lane { grid-row: auto; grid-template-rows: auto auto auto; }
  .rack-record-strip { grid-auto-columns: 204px; }
  .rack-lane-empty { min-height: 170px; }
}
@media (max-width: 650px) {
  .rack-heading { align-items: flex-start; gap: 13px; }
  .rack-heading > div { min-width: 0; }
  .rack-heading > div > p:last-child { font-size: 13px; }
  .rack-refresh { padding: 9px 10px; font-size: 12px; }
  .rack-refresh .icon { display: none; }
  .rack-filters { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .rack-overview-note { font-size: 11px; }
  .rack-group > summary { padding: 16px; gap: 11px; }
  .rack-group-icon { width: 36px; height: 36px; flex-basis: 36px; }
  .rack-group-icon .icon { width: 22px; height: 22px; }
  .rack-group-name strong { font-size: 16px; }
  .rack-group-name small { font-size: 11px; }
  .rack-lanes { padding: 17px 13px; gap: 23px; }
  .rack-record-strip { grid-auto-columns: 184px; gap: 11px; padding-inline: 10px; }
  .rack-sleeve { height: 112px; flex-basis: 112px; }
  .rack-sleeve-subject { max-width: 94px; font-size: 15px; }
  .rack-vinyl { right: -41px; }
  .rack-lane-heading { padding-inline: 3px; }
  .rack-lane-actions { padding-inline: 3px; }
  .rack-tracklist { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { .rack-group-toggle, .rack-record-open { transition: none; } .rack-record-strip { scroll-behavior: auto; } }
