@font-face {
  font-family: "Work Sans";
  src: url("/work-sans-v19-latin-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Work Sans";
  src: url("/work-sans-v19-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "DM Serif Display";
  src: url("/dm-serif-display-v15-latin-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: light;
  --charcoal: #1e1e1e;
  --ink: #0f0f0f;
  --magenta: #b72f6d;
  --magenta-dark: #9a1351;
  --blue: #1172b3;
  --bg: #f4f4f1;
  --paper: #fff;
  --muted: #575653;
  --line: #deddd7;
  --serif: "DM Serif Display", Georgia, serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.5 "Work Sans", Arial, sans-serif; }
header { background: var(--charcoal); color: white; }
header::after { content: ""; display: block; height: .5rem; background: linear-gradient(90deg, var(--charcoal) 50%, var(--magenta) 50%); }
.top, main { width: min(100%, 980px); margin-inline: auto; padding-inline: clamp(16px, 4vw, 36px); }
.top { min-height: 96px; padding-block: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: clamp(10px, 3vw, 20px); }
.brand img { display: block; width: clamp(90px, 25vw, 148px); height: auto; }
.brand-name { font: 1.28rem/1.1 var(--serif); border-left: 1px solid #6f6f6f; padding-left: clamp(10px, 3vw, 20px); }
#account { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; font-size: .875rem; }
#account button { background: transparent; color: white; border-color: #ababab; }
main { padding-block: clamp(22px, 5vw, 44px) calc(48px + var(--keyboard-space, 0px)); }
nav, .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
nav { margin-bottom: 24px; }
button, input, textarea, select { font: inherit; }
button {
  background: var(--paper); color: var(--ink); border: 1px solid #b1b0aa; border-radius: 4px;
  min-height: 44px; padding: 8px 14px; cursor: pointer;
}
button.primary, nav button[aria-current] { background: var(--magenta-dark); color: white; border-color: var(--magenta-dark); }
button:hover:not(:disabled) { box-shadow: inset 0 0 0 1px currentColor; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
header :focus-visible { outline-color: #fff; }
h1, h2, p { margin: 0 0 12px; }
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: 1.15; }
h1 { font-size: clamp(2.15rem, 6vw, 3rem); color: var(--magenta-dark); }
h2 { font-size: clamp(1.35rem, 3vw, 1.65rem); }
.hero { margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.hero p { margin-bottom: 0; color: var(--muted); }
.panel { padding: clamp(16px, 3vw, 24px); background: var(--paper); border: 1px solid var(--line); border-radius: 5px; margin-bottom: 14px; }
.muted, small { color: var(--muted); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; align-items: start; }
label { display: block; margin-bottom: 12px; font-weight: 600; }
input:not([type=checkbox]), textarea, select {
  display: block; width: 100%; margin-top: 5px; padding: 9px 10px; min-height: 44px; background: white;
  border: 1px solid #a6a59f; border-radius: 4px; color: var(--ink); font-weight: 400;
}
input[type=file] { max-width: 100%; }
textarea { resize: vertical; }
.list { list-style: none; padding: 0; margin: 10px 0 0; }
.list li { border-top: 1px solid var(--line); padding: 9px 0; }
.archive-layout .list { max-height: 62vh; overflow: auto; }
.piece { display: flex; align-items: baseline; gap: 10px; overflow-wrap: anywhere; }
.piece-text { min-width: 0; }
.number { flex: none; min-width: 2rem; text-align: center; padding: 1px 5px; color: #0b588a; background: #e8f3fa; border-radius: 3px; font-size: .875rem; }
.status, .concert-tag { display: inline-block; border-radius: 3px; padding: 2px 7px; color: var(--magenta-dark); background: #f8e9f0; font-size: .875rem; }
.status { margin-bottom: 10px; }
.concert-tags { display: flex; flex-wrap: wrap; gap: 4px 7px; margin-top: 4px; }
.concert-tag { max-width: 100%; overflow-wrap: anywhere; }
.pick { max-height: 360px; overflow: auto; margin-bottom: 12px; }
.pick label { display: flex; align-items: center; gap: 9px; border-bottom: 1px solid var(--line); margin: 0; padding: 9px 3px; font-weight: 400; min-height: 44px; }
.pick input { width: 18px; height: 18px; flex: none; accent-color: var(--magenta-dark); }
#draft + .actions { margin-top: 12px; }
#message { padding: 10px 14px; background: #e8f3fa; color: #0b4d79; border-radius: 4px; }
#message.error { background: #f8e9f0; color: var(--magenta-dark); }
.login { max-width: 460px; margin: clamp(16px, 5vh, 48px) auto; }
.note { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 680px) { .split { display: block; } }
@media (max-width: 420px) {
  .top { min-height: 76px; }
  .brand { gap: 8px; }
  .brand-name { padding-left: 8px; font-size: 1.12rem; }
  #account { gap: 4px; }
  #account button { padding-inline: 8px; }
}

.work-search-controls { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 12px; }
.work-search-controls label { flex: 1; min-width: 0; margin: 0; }
.work-search-controls .search-done { flex: none; }
.work-search .pick { max-height: var(--search-results-height, 360px); overscroll-behavior-y: contain; }
