:root {
  color-scheme: light;
  --ink: #172f35; --secondary: #4c6568; --line: #d5dfdc; --teal: #006764;
  font: 16px/1.55 Inter, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  background: #f4f6f3; color: var(--ink);
}
* { box-sizing: border-box; }
body, h1, h2, p, ul, dl, dd { margin: 0; }
button, select, input { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button:focus-visible, select:focus-visible, input:focus-visible, video:focus-visible { outline: 3px solid #008c88; outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { width: min(1240px, calc(100% - 72px)); margin-inline: auto; }
.masthead { background: #fff; border-bottom: 1px solid var(--line); }
.masthead-inner, .page-title, .list-heading, .player-heading, #paging {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.masthead-inner { min-height: 68px; }
.institution { color: var(--secondary); font-size: .85rem; }
.institution strong { display: inline-block; color: var(--teal); font-size: 1rem; margin-left: .45rem; }
.quiet, select { background: white; border: 1px solid #bfcfcb; border-radius: 7px; padding: 6px 12px; font-size: .85rem; }
.quiet:hover:not(:disabled), select:hover { background: #eef5f2; }
button:disabled { cursor: default; opacity: .45; }
.main { padding-block: clamp(26px, 4vw, 54px); }
h1 { font-size: clamp(1.65rem, 3.5vw, 2.6rem); line-height: 1.2; letter-spacing: -.055em; }
h2 { font-size: 1.1rem; letter-spacing: -.035em; }
.page-title { margin-bottom: 26px; }
.layout { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(0, 1.65fr); gap: 20px; align-items: start; }
.panel, .login-card { background: white; border: 1px solid var(--line); border-radius: 12px; }
.library { overflow: hidden; }
.list-heading, .player-heading { padding: 20px 22px; border-bottom: 1px solid var(--line); }
#count { font-size: .82rem; color: var(--teal); margin-left: 5px; white-space: nowrap; }
#items { list-style: none; padding: 0; max-height: 68svh; overflow-y: auto; }
#items li + li { border-top: 1px solid #e4ebe8; }
.record { display: block; border: 0; background: #fff; width: 100%; padding: 15px 22px; text-align: left; }
.record:hover { background: #f4f8f5; }
.record[aria-pressed="true"] { background: #e5f1ee; box-shadow: inset 4px 0 var(--teal); }
.record:focus-visible { outline-offset: -4px; }
.record-title { font-weight: 650; font-size: .98rem; font-variant-numeric: tabular-nums; }
.record-meta { margin-top: 6px; display: flex; align-items: center; gap: 9px; color: var(--secondary); font-size: .78rem; }
.tag { display: inline-block; background: #e5efec; color: #205c57; padding: 2px 8px; border-radius: 5px; font-size: .74rem; font-weight: 700; }
.record[aria-pressed="true"] .tag { background: #cee5dd; }
.short-id, .identifier dd { font-family: ui-monospace, Consolas, monospace; }
.file-size { margin-left: auto; }
#status, #placeholder { padding: 25px 22px; color: var(--secondary); }
#paging { padding: 12px 20px; font-size: .8rem; border-top: 1px solid var(--line); }
.player-panel { overflow: hidden; }
#player { display: block; width: 100%; aspect-ratio: 16 / 9; background: #11282b; object-fit: contain; }
#details { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 24px; }
dt { font-size: .78rem; color: var(--secondary); }
dd { margin-top: 3px; overflow-wrap: anywhere; font-size: .9rem; }
.identifier dd { font-size: .82rem; }
.error { color: #a02427; font-size: .9rem; }
#play-error { padding: 12px 22px 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.login-page { min-height: 100svh; display: grid; place-items: center; border-top: 5px solid var(--teal); padding: 22px; }
.login-card { width: min(100%, 440px); padding: clamp(24px, 6vw, 44px); box-shadow: 0 12px 40px #1735310b; }
.login-card .institution { font-size: .75rem; margin-bottom: 28px; }
.login-card .institution strong { font-size: .86rem; }
.login-card h1 { font-size: 2rem; }
.intro { margin: 10px 0 24px; color: var(--secondary); }
.login-form { display: grid; gap: 7px; }
.login-form label { font-size: .86rem; font-weight: 650; }
.login-form input { width: 100%; border: 1px solid #afc2be; border-radius: 6px; padding: 10px; margin-bottom: 9px; }
.primary { margin-top: 6px; padding: 11px; border: 0; border-radius: 6px; background: var(--teal); color: white; font-weight: 700; }
@media (max-width: 760px) {
  .wrap { width: calc(100% - 32px); }
  .layout { grid-template-columns: 1fr; }
  #items { max-height: 270px; }
  .main { padding-block: 24px; }
  .institution strong { display: block; margin: 0; }
  .login-card .institution strong { display: inline-block; margin-left: 4px; }
  .page-title { margin-bottom: 18px; }
  #details { padding: 18px; gap: 14px; }
  .list-heading, .player-heading { padding: 14px 16px; }
}
