:root {
  color-scheme: dark;

  --ink: #ececec;
  --muted: #8d8d96;
  --accent: #a78bfa;
  --rule: #2c2c33;
  --bg: #0d0d10;
  --brown: #a98a67;

  --surface: #16161a;
  --surface-raised: #1e1e24;

  --radius: 8px;
  --radius-sm: 5px;
  --radius-lg: 14px;

  --edge: rgba(255, 255, 255, 0.09);
  --lip: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
  --glow: 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent),
    0 12px 40px -14px color-mix(in srgb, var(--accent) 80%, transparent);

  --label: 0.68rem;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;

  --narrow: 26rem;
  --small: 34rem;
  --medium: 42rem;
  --wide: 72rem;

  --brand-size: 1.6rem;
  --nav-pad: 0.75rem;
  --nav-height: calc(var(--nav-pad) * 2 + var(--brand-size) * 1.6);
}

a {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 75%, transparent);
  outline-offset: 3px;
}

body {
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  background-image:
    radial-gradient(
      70rem 34rem at 50% -12rem,
      color-mix(in srgb, var(--accent) 14%, transparent),
      transparent 70%
    ),
    repeating-linear-gradient(
      to right,
      rgba(255, 255, 255, 0.022) 0 1px,
      transparent 1px 4.5rem
    );
  box-sizing: border-box;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  font-family: system-ui, sans-serif;
  line-height: 1.6;
  margin: 0;
  min-height: 100dvh;
  padding: calc(var(--nav-height) + 0.35rem) 2rem 3.5rem;
}

footer {
  backdrop-filter: blur(16px) saturate(140%);
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  border-top: 1px solid var(--edge);
  bottom: 0;
  color: var(--muted);
  font-size: 0.85rem;
  left: 0;
  padding: 0.6rem 0;
  position: fixed;
  right: 0;
  text-align: center;
  z-index: 10;
}

footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 150ms ease;
}

footer a:hover,
footer a:focus-visible {
  color: var(--ink);
}

form {
  background: linear-gradient(var(--surface-raised), var(--surface));
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
  box-shadow: var(--lip);
  box-sizing: border-box;
  margin: 0 auto;
  max-width: var(--medium);
  padding: 2rem;
  width: 100%;
}

form div {
  margin-bottom: 1.25rem;
}

form div > span {
  display: inline-block;
  font-size: 0.9rem;
  padding-right: 0.75rem;
}

form ul {
  color: #e5817e;
  font-size: 0.9rem;
  margin: 0 0 1.25rem;
}

h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

input[type="checkbox"] {
  accent-color: var(--accent);
  height: 1rem;
  width: 1rem;
}

input[type="file"] {
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 100%;
}

input[type="text"],
input[type="url"],
input[type="email"],
input[type="password"],
textarea {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  box-sizing: border-box;
  color: var(--ink);
  font: inherit;
  padding: 0.7rem 0.85rem;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  width: 100%;
}

input[type="text"]:hover,
input[type="url"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
textarea:hover {
  border-color: #454545;
}

input:focus-visible,
textarea:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--ring);
  outline: none;
}

label {
  color: var(--ink);
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

label:has(input[type="checkbox"]) {
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: #666;
  cursor: pointer;
  display: inline-flex;
  gap: 0.4rem;
  margin: 0 0.35rem 0.35rem 0;
  padding: 0.3rem 1.1rem;
  transition: background 240ms ease, border-color 240ms ease, color 240ms ease;
  user-select: none;
}

label:has(input[type="checkbox"]) input[type="checkbox"] {
  clip-path: inset(50%);
  height: 1px;
  position: absolute;
  width: 1px;
}

label:has(input[type="checkbox"]:checked) {
  background: color-mix(in srgb, var(--accent) 14%, var(--bg));
  border-color: var(--accent);
  color: var(--accent);
}

label:has(input[type="checkbox"]:focus-visible) {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

li {
  margin-bottom: 0.5rem;
}

nav {
  align-items: center;
  backdrop-filter: blur(16px) saturate(140%);
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  border-bottom: 1px solid var(--edge);
  display: grid;
  gap: clamp(0.5rem, 1vw, 1rem);
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  left: 0;
  padding: var(--nav-pad) clamp(1rem, 2vw, 2rem);
  position: fixed;
  right: 0;
  top: 0;
  z-index: 10;
}

nav.bare {
  border-bottom: 0;
}

nav a {
  text-decoration: none;
}

nav .account {
  align-items: center;
  display: flex;
  gap: 1rem;
  grid-column: 3;
  justify-self: end;
}

nav .account button {
  white-space: nowrap;
}

nav .account button {
  font-size: var(--label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

nav .brand {
  color: var(--ink);
  font-size: var(--brand-size);
  font-weight: 600;
  grid-column: 2;
  letter-spacing: 0.3em;
  position: relative;
  text-transform: uppercase;
  white-space: nowrap;
}

nav .brand em {
  font-style: italic;
}

nav:not(.bare) .brand {
  font-size: clamp(0.72rem, 1.35vw, 1.6rem);
  letter-spacing: clamp(0.05em, 0.35vw, 0.3em);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

nav .menu {
  align-items: center;
  display: flex;
  gap: 1rem;
  grid-column: 1;
  justify-self: start;
  position: relative;
}

nav .menu-links {
  align-items: center;
  display: flex;
  gap: clamp(0.15rem, 1vw, 1rem);
}

nav .menu-links a {
  border-radius: 4px;
  font-size: clamp(0.68rem, 0.78vw, 0.78rem);
  letter-spacing: clamp(0.05em, 0.13vw, 0.16em);
  padding: 0.2rem clamp(0.2rem, 0.55vw, 0.55rem);
  position: relative;
  text-transform: uppercase;
  transition: background 150ms ease, color 150ms ease;
  white-space: nowrap;
}

nav .menu-links a:hover,
nav .menu-links a:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

nav .menu a.current {
  color: var(--ink);
}

nav .menu a.current::after {
  background: linear-gradient(
    to right,
    transparent,
    color-mix(in srgb, var(--accent) 70%, transparent),
    transparent
  );
  bottom: -0.35rem;
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  right: 0;
}

nav .menu-toggle {
  background: none;
  border: 0;
  display: none;
  height: 0.9rem;
  padding: 0;
  width: 1.4rem;
}

nav .menu-toggle::before {
  background: var(--ink);
  box-shadow: 0 0.35rem var(--ink), 0 0.7rem var(--ink);
  content: "";
  display: block;
  height: 2px;
  width: 1.4rem;
}

nav form {
  background: none;
  border: 0;
  display: inline;
  margin: 0;
  padding: 0;
}

nav span {
  color: var(--muted);
  font-size: 0.9rem;
}

p {
  max-width: var(--medium);
}

::placeholder {
  color: var(--muted);
  opacity: 0.3;
}

textarea {
  field-sizing: content;
  min-height: 6rem;
}

ul {
  padding-left: 1.25rem;
}

.alert,
.notice {
  animation: flash-in 250ms ease-out;
  backdrop-filter: blur(6px);
  background: rgba(10, 10, 10, 0.85);
  border-left: 3px solid;
  border-radius: 0 4px 4px 0;
  color: var(--ink);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  margin: 0;
  padding: 0.55rem 1.25rem;
  text-transform: uppercase;
  transition: opacity 600ms ease;
}

.alert {
  border-left-color: #e0524f;
}

.notice {
  border-left-color: var(--accent);
}

.alert.is-gone,
.notice.is-gone {
  opacity: 0;
}

.alert:empty,
.notice:empty {
  display: none;
}

.attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.attachments > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-bottom: 0;
  min-width: 0;
}

/* The viewer fills the column, so the player can sit level with the
   pagination row and the file inputs land on the same line */
.attachments .pdf-mini {
  flex: 1 1 auto;
  height: auto;
  min-height: 12rem;
}

/* Taller than any browser's minimum, so this height is honoured everywhere */
.attachments audio {
  height: 2.5rem;
  margin-top: auto;
}

/* Grows to the player's natural height so both control rows match */
.attachments .pdf-pagination {
  align-items: center;
  display: flex;
  min-height: 2.5rem;
}

/* The viewer's inner divs would otherwise pick up the form's div spacing */
.attachments .pdf div {
  margin-bottom: 0;
}

.attachments label {
  font-weight: 600;
  text-align: center;
}

.attachment {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 0.25rem;
}

.boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.boxes a,
.boxes .score-sheet {
  align-items: center;
  aspect-ratio: 3 / 2;
  display: flex;
  justify-content: center;
  padding: 0.75rem 1rem;
  text-align: center;
  text-decoration: none;
}

.boxes a:not(.icon):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

.boxes li {
  flex: 0 0 15rem;
  margin: 0;
  position: relative;
}

.boxes li > a,
.boxes .score-tile > a:not(.edit-pencil),
.boxes .score-sheet {
  background: var(--category);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  isolation: isolate;
  overflow: hidden;
  padding: 0;
  transition: box-shadow 250ms ease, border-color 250ms ease;
}

.boxes .score-tile > a:not(.edit-pencil):hover,
.boxes .score-tile > a:not(.edit-pencil):focus-visible {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ink) 45%, transparent);
}

.boxes li:nth-child(8n + 1) {
  --category: #7b4bd8;
}

.boxes li:nth-child(8n + 2) {
  --category: #1f8f92;
}

.boxes li:nth-child(8n + 3) {
  --category: #b8761f;
}

.boxes li:nth-child(8n + 4) {
  --category: #b23b6f;
}

.boxes li:nth-child(8n + 5) {
  --category: #2f6fb8;
}

.boxes li:nth-child(8n + 6) {
  --category: #3f8f5a;
}

.boxes li:nth-child(8n + 7) {
  --category: #8f5ad8;
}

.boxes li:nth-child(8n) {
  --category: #b85a2f;
}

.boxes.portrait {
  margin-top: 0.75rem;
}

.boxes.portrait li {
  flex: 0 0 14rem;
}

.boxes.portrait a,
.boxes.portrait .score-sheet {
  align-items: stretch;
  aspect-ratio: 17 / 22;
}

.boxes .score-sheet.is-empty {
  opacity: 0.55;
}

.pdf-thumb {
  background: #fff;
  height: 100%;
  min-height: 0;
}

.pdf-thumb .pdf-page {
  overflow: hidden;
}

.boxes img {
  filter: invert(1);
  height: 100%;
  mix-blend-mode: screen;
  object-fit: cover;
  transition: filter 250ms ease;
  width: 100%;
}

.boxes li:hover img {
  filter: invert(1) brightness(0.55);
}

.back-arrow {
  font-size: 1.6em;
  line-height: 0;
  vertical-align: -0.1em;
}

.box-title {
  color: var(--muted);
  display: block;
  font-size: var(--label);
  letter-spacing: 0.22em;
  padding-top: 0.7rem;
  text-align: center;
  text-transform: uppercase;
}

.boxes.titles a {
  font-style: italic;
}

.boxes .button.icon {
  height: 1.5rem;
  opacity: 1;
  padding: 0.5rem;
  position: absolute;
  right: 0;
  top: 0;
  width: 1.5rem;
}

.boxes .button.icon img {
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.8));
  opacity: 0.85;
}

.button,
button,
input[type="submit"] {
  background: var(--accent);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  line-height: 1.2;
  padding: 0.35rem 1.1rem;
  transition: background 150ms ease, transform 150ms ease;
}

.button.save,
input[type="submit"] {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  color: var(--ink);
  font-size: var(--label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.button.save:hover,
.button.save:focus-visible,
input[type="submit"]:hover,
input[type="submit"]:focus-visible {
  background: color-mix(in srgb, var(--accent) 38%, transparent);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.button:active,
button:active,
input[type="submit"]:active {
  transform: translateY(1px);
}

.button {
  display: inline-block;
  text-decoration: none;
  white-space: nowrap;
}

.button.icon {
  background: none;
  border: 0;
  box-sizing: content-box;
  display: inline-flex;
  height: 1.95rem;
  opacity: 0.75;
  padding: 0;
  width: 1.95rem;
}

.button.icon img {
  display: block;
  height: 100%;
  width: 100%;
}

.button.cancel {
  background: none;
  border-color: var(--rule);
  color: var(--muted);
  font-size: var(--label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.button.cancel:hover,
.button.cancel:focus-visible {
  background: color-mix(in srgb, #9b111e 22%, transparent);
  border-color: color-mix(in srgb, #9b111e 70%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #9b111e 70%, transparent);
  color: #f0a3a3;
}

.button.cancel:focus-visible {
  outline-color: color-mix(in srgb, #c2313f 80%, transparent);
}

.chips {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
}

.chips .featured {
  margin-left: auto;
  margin-right: 0;
}

.chips label:not(.featured) {
  border-color: color-mix(in srgb, var(--category) 55%, transparent);
  color: var(--ink);
}

.chips label:not(.featured):has(input:checked) {
  background: var(--category);
  border-color: var(--category);
  color: #fff;
}

.chips label:not(.featured):has(input:focus-visible) {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--category) 30%, transparent);
}

label.featured:has(input:checked) {
  border-color: #f0b429;
  color: #f0b429;
}

label.featured:has(input:focus-visible) {
  box-shadow: 0 0 0 3px color-mix(in srgb, #f0b429 25%, transparent);
}

.deck.bio {
  --deck-width: var(--wide);

  margin-top: clamp(1.25rem, 3vh, 3rem);
}

.bio-avatar {
  border: 1px solid var(--edge);
  border-radius: 50%;
  flex: none;
  height: 10rem;
  object-fit: cover;
  width: 10rem;
}

.bio-body {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
}

.bio-text p {
  margin-top: 0;
}

.bio-text p:last-child {
  margin-bottom: 0;
}

.field {
  text-align: center;
}

.field-row {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: 6rem 1fr;
  margin-bottom: 0.75rem;
}

.field-row label {
  color: var(--muted);
  font-size: var(--label);
  letter-spacing: 0.14em;
  margin: 0;
  text-align: right;
  text-transform: uppercase;
}

.file-field {
  align-items: center;
  display: flex;
  gap: 0.75rem;
}

.file-field input[type="file"] {
  height: 0;
  opacity: 0;
  position: absolute;
  width: 0;
}

.file-field button,
.thumbnail-override-controls button {
  background: none;
  border: 1px solid var(--rule);
  color: var(--ink);
  font-size: var(--label);
  letter-spacing: 0.14em;
  padding: 0.35rem 0.9rem;
  text-transform: uppercase;
}

.file-field button:hover,
.thumbnail-override-controls button:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: color-mix(in srgb, var(--ink) 35%, transparent);
}

.file-field input[type="file"]:focus-visible + button {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.edit-pencil,
.boxes a.edit-pencil {
  align-items: center;
  aspect-ratio: 1;
  background: rgba(0, 0, 0, 0.8);
  border-radius: var(--radius-sm) 0 0 0;
  bottom: 0;
  display: flex;
  height: 1.7rem;
  justify-content: center;
  opacity: 0.9;
  padding: 0.3rem;
  position: absolute;
  right: 0;
  transition: box-shadow 150ms ease, opacity 150ms ease;
  width: 1.7rem;
  z-index: 1;
}

.boxes a.edit-pencil {
  background: rgba(0, 0, 0, 0.88);
  border-radius: var(--radius-sm) 0 var(--radius) 0;
  opacity: 0.95;
}

.edit-pencil::before {
  background: var(--ink);
  content: "";
  height: 100%;
  mask: url("/assets/pencil-0569a226.svg") center / contain no-repeat;
  transition: background 150ms ease;
  width: 100%;
}

.edit-pencil:hover,
.edit-pencil:focus-visible {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 35%, transparent);
  opacity: 1;
}

.edit-pencil:hover::before,
.edit-pencil:focus-visible::before {
  background: #8b5cf6;
}

.film-description,
.film-director {
  margin: 0 auto 1rem;
  text-align: center;
}

.film-edit-area {
  aspect-ratio: 16 / 9;
  display: block;
  left: 0.75rem;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 0;
}

.film-edit-area .edit-pencil {
  pointer-events: auto;
}

.film-hero .edit-pencil {
  bottom: 1rem;
  right: 1rem;
}

.film-hero {
  background:
    linear-gradient(
      120deg,
      color-mix(in srgb, #f0b429 9%, transparent),
      transparent 55%
    ),
    linear-gradient(var(--surface-raised), var(--surface));
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
  border-top: 2px solid #f0b429;
  box-shadow: var(--lip);
  margin: 0 auto 2rem;
  max-width: var(--wide);
  overflow: hidden;
  position: relative;
  width: 100%;
}

.film-hero .deck-bar {
  border-bottom: 1px solid var(--edge);
  color: color-mix(in srgb, #f0b429 75%, var(--muted));
}

.film-hero-body {
  align-items: stretch;
  display: flex;
  gap: 2.5rem;
  padding: 1.5rem;
}

.film-hero-poster {
  background: none;
  border: 0;
  flex: 2 1 0;
  min-width: 0;
  padding: 0;
}

.film-hero-details {
  flex: 1 1 0;
}

.film-hero-details h2 {
  font-size: clamp(1.1rem, 2.6vw, 1.75rem);
  font-style: italic;
  margin: 0 0 0.15rem;
}

.film-hero-details .film-description,
.film-hero-details .film-meta {
  font-size: clamp(0.75rem, 1.5vw, 1rem);
  margin: 0 0 0.75rem;
  text-align: left;
}

.deck {
  background: linear-gradient(var(--surface), color-mix(in srgb, var(--surface) 50%, transparent));
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
  box-shadow: var(--lip);
  margin: 0 auto;
  max-width: var(--deck-width, var(--wide));
  overflow: hidden;
  width: 100%;
}

.deck + .deck {
  margin-top: 2rem;
}

.deck-bar {
  align-items: center;
  border-bottom: 1px solid var(--edge);
  color: var(--muted);
  display: flex;
  font-size: var(--label);
  justify-content: space-between;
  letter-spacing: 0.22em;
  padding: 0.7rem 1.25rem;
  text-transform: uppercase;
}

.deck-bar.accent-bar {
  color: var(--bar-color);
}

.deck-count {
  font-family: var(--mono);
  letter-spacing: 0.14em;
}

.deck-ruler {
  border-bottom: 1px solid var(--edge);
  color: color-mix(in srgb, var(--muted) 60%, transparent);
  display: flex;
  font-family: var(--mono);
  font-size: 0.6rem;
  justify-content: space-between;
  padding: 0.3rem 1.25rem;
}

.deck-ruler span {
  border-left: 1px solid var(--edge);
  flex: 1;
  padding-left: 0.35rem;
}

.film-reel {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 1.5rem 1.25rem;
  scroll-padding: 1.25rem;
  scroll-snap-type: x mandatory;
}

.film-reel.fitted {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  overflow-x: visible;
  scroll-snap-type: none;
}

.film-reel li {
  border-left: 3px solid var(--clip-color);
  border-radius: var(--radius) var(--radius) var(--radius) var(--radius);
  flex: 0 0 19rem;
  margin: 0;
  overflow: hidden;
  padding-left: 0.75rem;
  position: relative;
  scroll-snap-align: start;
}

.clip-number {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.6rem;
  left: 1.15rem;
  letter-spacing: 0.1em;
  opacity: 0.7;
  position: absolute;
  top: 0.4rem;
  z-index: 1;
}

.clip-body {
  background: color-mix(in srgb, var(--clip-color) 14%, transparent);
  border-radius: 0 0 var(--radius) var(--radius);
  display: block;
  padding: 0.55rem 0.7rem 0.7rem;
}

.films {
  width: 100%;
}

.film-card {
  background: none;
  border: 0;
  display: block;
  padding: 0;
  text-align: left;
  width: 100%;
}

.film-card:disabled {
  cursor: default;
}

.film-poster {
  align-items: center;
  aspect-ratio: 16 / 9;
  background: linear-gradient(var(--surface-raised), var(--surface));
  border: 1px solid var(--edge);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--lip);
  display: flex;
  justify-content: center;
  overflow: hidden;
  position: relative;
  transition: box-shadow 250ms ease, border-color 250ms ease;
}

.film-card:hover:not(:disabled) .film-poster,
.film-card:focus-visible .film-poster {
  border-color: color-mix(in srgb, var(--ink) 35%, transparent);
}

.film-no-thumbnail {
  color: var(--muted);
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  transform: rotate(-29.36deg);
  white-space: nowrap;
}

.film-play {
  align-items: center;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 50%;
  display: flex;
  height: 3rem;
  justify-content: center;
  position: absolute;
  width: 3rem;
}

.film-play::before {
  border-bottom: 0.6rem solid transparent;
  border-left: 1rem solid #e0524f;
  border-top: 0.6rem solid transparent;
  content: "";
  margin-left: 0.25rem;
}

.film-thumbnail {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.film-card-title {
  color: var(--ink);
  display: block;
  font-style: italic;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.film-card-director,
.film-card-duration {
  color: var(--muted);
}

.film-meta {
  align-items: baseline;
  color: var(--muted);
  display: flex;
  font-size: var(--label);
  gap: 1rem;
  justify-content: space-between;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.film-duration,
.film-card-duration {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

.film-meta > * {
  margin: 0;
}

.film-modal {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  color: var(--ink);
  max-width: var(--wide);
  padding: 1.5rem;
  width: 90vw;
}

.film-modal::backdrop {
  background: rgba(0, 0, 0, 0.75);
}

.film-modal h2 {
  font-style: italic;
  margin: 0 0 1rem;
  text-align: center;
}

.film-modal button {
  display: block;
  margin: 1rem auto 0;
}

.find-me {
  --deck-width: var(--small);
}

.find-me-details {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem;
}

.find-me-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.find-me-group + .find-me-group {
  border-top: 1px solid var(--edge);
  margin-top: 0.9rem;
  padding-top: 0.9rem;
}

.find-me-label {
  color: var(--muted);
  font-size: var(--label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.find-me-logo {
  background: var(--row-color);
  flex: none;
  height: 1.1rem;
  mask: var(--logo) center / contain no-repeat;
  width: 1.1rem;
}

.find-me-name {
  align-items: center;
  display: flex;
  gap: 0.45rem;
}

.find-me-row {
  align-items: baseline;
  border-left: 3px solid var(--row-color);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink);
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 7rem 1fr;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  transition: background 150ms ease;
}

.find-me-row:hover,
.find-me-row:focus-visible {
  background: color-mix(in srgb, var(--row-color) 16%, transparent);
}

.flashes {
  align-items: start;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  left: 1rem;
  pointer-events: none;
  position: fixed;
  top: calc(var(--nav-height) + 0.75rem);
  z-index: 20;
}

.form-actions {
  align-items: center;
  border-top: 1px solid var(--rule);
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 0;
  padding-top: 1.25rem;
}

.form-section {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  margin: 0 0 0.25rem;
  padding-bottom: 0;
  text-transform: uppercase;
}


.mininav {
  align-items: center;
  display: grid;
  font-size: var(--label);
  gap: 1.25rem;
  grid-template-columns: 1fr auto 1fr;
  height: 1.6rem;
  letter-spacing: 0.16em;
  margin: 0 0 0.75rem;
  text-transform: uppercase;
}

.mininav > * {
  grid-column: 2;
  justify-self: center;
}

.mininav a {
  border-radius: 4px;
  padding: 0.2rem 0.55rem;
  text-decoration: none;
  transition: background 150ms ease;
}

.mininav a:hover,
.mininav a:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.mininav .category-links {
  display: flex;
  gap: 0.35rem;
}

.mininav .category-links a {
  border: 1px solid color-mix(in srgb, var(--category) 55%, transparent);
  border-radius: 999px;
  color: var(--ink);
  padding: 0.2rem 0.8rem;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.mininav .category-links a.current {
  background: var(--category);
  border-color: var(--category);
  color: #fff;
}

.mininav .far-left {
  grid-column: 1;
  justify-self: start;
  white-space: nowrap;
}

.mininav .far-right {
  align-items: center;
  display: flex;
  gap: 1rem;
  grid-column: 3;
  justify-self: end;
}

.mininav form {
  background: none;
  border: 0;
  display: flex;
  margin: 0;
  padding: 0;
  width: auto;
}

.page-title {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  margin: 0.75rem 0 2rem;
  position: relative;
  text-align: center;
  text-transform: uppercase;
}

.page-title.work {
  font-style: italic;
}

.page-header {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.pdf {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 0;
  width: 100%;
}

.pdf.is-empty,
audio.is-empty {
  opacity: 0.4;
  pointer-events: none;
}

.pdf-empty {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.9rem;
  height: 100%;
  justify-content: center;
}

.pdf canvas {
  display: block;
  margin: 0 auto;
}

.pdf-mini {
  height: 12rem;
  margin-bottom: 0.5rem;
}

.pdf-mini .pdf-pagination {
  font-size: 0.75rem;
  gap: 0.75rem;
}

.pdf-mini .pdf-pagination button {
  font-size: 1.1rem;
  height: 1.4rem;
  width: 1.4rem;
}

.pdf-mini .pdf-zoom {
  display: none;
}

/* Nothing to pan without zoom, so the page never needs to scroll */
.pdf-mini .pdf-page {
  overflow: hidden;
}

.audio-mini {
  height: 2rem;
  margin-bottom: 0.5rem;
  width: 100%;
}

.pdf-page {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.pdf-pagination[hidden] {
  display: none;
}

.pdf-pagination {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.85rem;
  gap: 1.25rem;
  justify-content: center;
  letter-spacing: 0.04em;
}

.pdf-pagination button {
  background: none;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  font-size: 1.5rem;
  height: 2rem;
  line-height: 1;
  padding: 0;
  transition: background 150ms ease, opacity 150ms ease;
  width: 2rem;
}

.pdf-pagination button:hover:not(:disabled) {
  background: color-mix(in srgb, var(--ink) 12%, transparent);
}

.pdf-pagination button:disabled {
  cursor: default;
  opacity: 0.25;
}

.pdf-zoom {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  margin-left: 1rem;
}

.pdf-zoom button {
  font-size: 1.1rem;
}

.score-description {
  margin: 0 auto 1rem;
  text-align: center;
}

.score-frame {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.score-media {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1rem;
  min-height: 0;
}

.score-media audio {
  margin: 0 auto;
  max-width: 100%;
  width: 30rem;
}

.score-modal {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  color: var(--ink);
  max-width: 90vw;
  padding: 1.5rem;
  width: fit-content;
}

.score-modal::backdrop {
  background: rgba(0, 0, 0, 0.75);
}

.score-modal h2 {
  font-style: italic;
  margin: 0 0 1rem;
  text-align: center;
}

/* Wide enough to zoom into, and it grows with the canvas once zoom outruns that */
.score-modal .pdf-page {
  flex: none;
  height: 65vh;
  margin: 0 auto;
  max-width: 100%;
  min-width: min(52rem, 85vw);
  width: fit-content;
}

.score-modal > button {
  display: block;
  margin: 1rem auto 0;
}

.score-tile {
  display: block;
  position: relative;
}

.session {
  margin-top: 2rem;
  max-width: var(--narrow);
}

.thumbnail-override {
  display: block;
  height: 100%;
  object-fit: contain;
  transition: opacity 150ms ease;
  width: 100%;
}

.thumbnail-override-preview {
  align-items: center;
  aspect-ratio: 16 / 9;
  background: var(--bg);
  box-sizing: border-box;
  padding: 0;
  border: 1px dashed var(--rule);
  border-radius: var(--radius);
  display: flex;
  justify-content: center;
  overflow: hidden;
  width: 8rem;
}

.thumbnail-override-preview:has(.thumbnail-override) {
  border-style: solid;
}

.thumbnail-override-preview.is-removing .thumbnail-override {
  opacity: 0.3;
}

.thumbnail-override-row {
  align-items: center;
}

.thumbnail-override-controls {
  align-items: start;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.video {
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 6px;
  display: block;
  margin: 0 auto;
  max-width: var(--wide);
  width: 100%;
}

.video.is-loading {
  visibility: hidden;
}

.video.is-empty {
  align-items: center;
  background: var(--surface);
  color: var(--muted);
  display: flex;
  justify-content: center;
  opacity: 0.4;
  pointer-events: none;
}

.visually-hidden {
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@keyframes flash-in {
  from {
    opacity: 0;
    transform: translateX(-0.75rem);
  }
}

@media (max-width: 60rem) {
  :root {
    --brand-size: 1rem;
  }

  nav .menu-links {
    display: none;
  }

  nav .menu {
    margin: calc(var(--nav-pad) * -1) 0 calc(var(--nav-pad) * -1) -2rem;
    padding: var(--nav-pad) 1.5rem var(--nav-pad) 2rem;
  }

  nav .menu:hover .menu-links,
  nav .menu:focus-within .menu-links {
    align-items: start;
    background: var(--bg);
    border: 1px solid var(--rule);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    left: 0;
    padding: 0.9rem 1.25rem;
    left: 2rem;
    position: absolute;
    top: 100%;
    white-space: nowrap;
  }

  .mininav .wide-only {
    display: none;
  }

  nav .menu a.current::after {
    display: none;
  }

  nav .menu-toggle {
    display: block;
  }
}

@media (max-width: 40rem) {
  .deck.bio {
    margin-top: 1.25rem;
  }
}
