:root {
  color-scheme: dark;
  --ink: #1c1927;
  --paper: #262231;
  --field: #312b40;
  --edge: #4d435f;
  --text: #f5edf9;
  --muted: #c5bacf;
  --accent: #e2c0ff;
  --accent-ink: #2c1839;
  --coral: #ffad91;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--ink); color: var(--text); }
a { color: inherit; }
button, input { font: inherit; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { width: min(100% - 42px, 1090px); margin-inline: auto; }
.top { border-bottom: 1px solid var(--edge); }
.top-inner { min-height: 64px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 760; font-size: 20px; letter-spacing: -.045em; text-decoration: none; }
nav { display: flex; gap: 13px; margin-left: auto; }
nav a { color: var(--muted); text-decoration: none; font-size: 13px; }
nav a:hover, .sheet a:hover { color: var(--coral); }
.edition, .label, .pill, .meta, .feedback, .clip small {
  font: 650 11px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.edition { margin-left: 8px; padding-left: 15px; border-left: 1px solid var(--edge); color: var(--muted); }
.intro {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(210px, 1fr);
  gap: 15px 20px; align-items: end; padding: 30px 0 23px;
}
.label { color: var(--accent); letter-spacing: .105em; margin: 0; }
.marker { display: inline-block; width: 8px; height: 8px; margin-inline-end: 5px; background: var(--coral); border-radius: 2px; }
h1 { margin: 7px 0 0; font-size: clamp(36px, 6.3vw, 69px); line-height: 1; letter-spacing: -.071em; }
.intro > p { margin: 0 0 2px; max-width: 38ch; line-height: 1.58; color: var(--muted); }
.workspace { display: grid; grid-template-columns: minmax(236px, .9fr) minmax(0, 2.25fr); gap: 13px; align-items: start; }
.panel, .sheet { min-width: 0; border: 1px solid var(--edge); border-radius: 13px; background: var(--paper); }
.shelf { padding: 15px; }
.shelf-head, .player-head { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
h2 { font-size: 21px; line-height: 1.1; letter-spacing: -.035em; margin: 0; overflow-wrap: anywhere; }
.shelf h2, .sheet h2 { margin-top: 5px; }
.pill { color: var(--muted); border: 1px solid var(--edge); border-radius: 5px; padding: 4px 6px; white-space: nowrap; }
.clip-list { list-style: none; margin: 11px -3px; padding: 3px; display: grid; gap: 6px; max-height: 270px; overflow: auto; }
.clip {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px;
  width: 100%; padding: 9px 8px; border: 1px solid var(--edge); border-radius: 6px;
  background: var(--field); color: var(--text); text-decoration: none; text-align: left; cursor: pointer;
}
.clip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; font-weight: 660; }
.clip small { color: var(--muted); font-size: 10px; }
.clip:hover, .clip[aria-current="true"] { border-color: var(--accent); }
.clip[aria-current="true"] span { color: var(--accent); }
.local { border-top: 1px solid var(--edge); padding-top: 12px; }
.drop { position: relative; display: grid; gap: 4px; border: 1px dashed #8a75a4; padding: 10px; border-radius: 8px; cursor: pointer; }
.drop:hover, .drop:focus-within, .drop[data-over] { background: var(--field); border-color: var(--accent); }
.drop input { position: absolute; inline-size: 1px; block-size: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
.drop strong { font-size: 13px; }
.drop strong span, .clear { color: var(--accent); }
.drop small, .local > p { color: var(--muted); font-size: 12px; }
.local > p { margin: 7px 0; }
.clear { border: 0; padding: 2px 0; background: transparent; cursor: pointer; font-size: 12px; }
.viewer { padding: 12px; }
.player-head { margin-bottom: 9px; }
video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; border-radius: 7px; background: #15121e; }
.viewer-info { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 0 2px; }
.clip-copy { min-width: 0; }
.meta, .feedback { color: var(--muted); margin: 5px 0 0; }
.feedback:empty { display: none; }
.download { color: var(--accent-ink); background: var(--accent); padding: 8px 11px; border-radius: 7px; text-decoration: none; font-size: 13px; font-weight: 730; }
.download:hover { background: #f0dcff; }
.download span { margin-left: 4px; }
.sheet { display: grid; grid-template-columns: auto 1fr auto; gap: 9px 19px; align-items: center; margin-top: 13px; padding: 13px 15px; }
.sheet > p { color: var(--muted); font-size: 13px; margin: 0; }
.sheet a { color: var(--accent); font-size: 13px; text-underline-offset: 3px; }
.footer { margin-top: 18px; padding: 13px 0 19px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; border-top: 1px solid var(--edge); color: var(--muted); font-size: 12px; }
@media (max-width: 730px) {
  .wrap { width: calc(100% - 28px); }
  .edition { display: none; }
  .intro, .workspace, .sheet { grid-template-columns: 1fr; }
  .intro { padding: 22px 0 18px; gap: 10px; }
  .workspace { grid-template-areas: "player" "index"; }
  .shelf { grid-area: index; }
  .viewer { grid-area: player; padding: 9px; }
}
