:root {
  color-scheme: dark;
  --bg:#0d0c10;
  --panel:#18151c;
  --line:#343039;
  --text:#f4f0eb;
  --sub:#b5afbc;
  --lav:#d7bee9;
  --green:#a9d9b1;
  font:
    15px/1.4 Arial,
    Helvetica,
    sans-serif;
  background: var(--bg);
  color: var(--text);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background:
    radial-gradient(
      ellipse at 80% -35%,
      #312539 0,
      transparent 55%);
  min-height: 100svh;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: .49;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #dec4f3;
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}
.mast {
  height: 65px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding-inline: max(5vw, calc((100% - 1060px)/2));
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
  color: var(--sub);
  font-size: 13px;
}
.brand {
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.06em;
  font-size: 23px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.mast-rule {
  height: 20px;
  width: 1px;
  background: var(--line);
}
.coin-link {
  margin-left: auto;
  color: var(--lav);
}
main {
  max-width: 1100px;
  padding: 0 20px 50px;
  margin: auto;
}
.intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: clamp(36px, 6vw, 72px) 0 30px;
}
.kicker {
  font: 10px/1.5 ui-monospace, monospace;
  letter-spacing: .11em;
  color: var(--lav);
  margin: 0 0 8px;
}
.intro h1,
h2 {
  margin: 0;
  line-height: .99;
  letter-spacing: -.045em;
  font-family: Georgia, serif;
  font-weight: 500;
}
.intro h1 {
  font-size: clamp(46px, 7vw, 77px);
}
#subtitle,
.gate p {
  color: var(--sub);
  margin: 12px 0 0;
}
.quiet,
.accent,
.btn {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #211d26;
  padding: 9px 13px;
  color: var(--text);
  font-size: 13px;
  min-height: 40px;
  font-weight: 600;
}
.accent {
  background: var(--lav);
  color: #211627;
  border-color: var(--lav);
}
.quiet:hover,
.btn:hover {
  background: #302a37;
}
.gate {
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: 12px;
  background: var(--panel);
  max-width: 560px;
}
.gate label {
  display: block;
  font-weight: 600;
}
.gate p {
  font-size: 14px;
}
.entry {
  display: flex;
  gap: 8px;
  margin-top: 15px;
}
.entry input {
  flex: 1;
  min-width: 60px;
}
input,
textarea,
select {
  background: #19161d;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 11px;
  min-height: 40px;
}
code {
  overflow-wrap: anywhere;
  color: var(--text);
}
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: end;
  margin-bottom: 13px;
}
.filter-bar label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--sub);
}
select {
  min-width: 155px;
}
.filter-bar .search {
  flex: 1;
  max-width: 420px;
}
.filter-bar .quiet {
  margin-left: auto;
}
.columns,
.item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 165px 125px;
  align-items: center;
  gap: 15px;
}
.columns {
  font: 11px/1.4 ui-monospace, monospace;
  color: var(--sub);
  padding: 12px 15px;
  border-block: 1px solid var(--line);
}
.item {
  width: 100%;
  min-height: 80px;
  text-align: left;
  color: var(--text);
  background: none;
  padding: 10px 15px;
  border: 0;
  border-bottom: 1px solid var(--line);
}
.item:hover {
  background: #1b171f;
}
.cell {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
}
.thumb {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 54px;
  overflow: hidden;
  border: 1px solid #43374a;
  border-radius: 5px;
  background:
    linear-gradient(
      140deg,
      #403348,
      #201c23);
  color: var(--lav);
  font-size: 16px;
}
.thumb canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.caption {
  min-width: 0;
}
.cut-name {
  display: block;
  font-weight: 650;
  font-size: 16px;
  overflow-wrap: anywhere;
}
.metadata,
.updated {
  display: block;
  font-size: 12px;
  color: var(--sub);
}
.metadata {
  margin-top: 3px;
}
.state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  font-size: 12px;
}
.state:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--st,#bfb6c3);
}
.state[data-state=pending] {
  --st:#edbd86;
}
.state[data-state=approved],
.state[data-state=published] {
  --st:var(--green);
}
.state[data-state=changes_requested] {
  --st:#d7b8ee;
}
#empty,
#notice,
#detail-notice {
  color: var(--sub);
  font-size: 14px;
}
#notice:empty,
#detail-notice:empty {
  display: none;
}
#empty {
  padding: 25px 0;
}
#pager {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 16px;
}
#count {
  color: var(--sub);
  font: 12px ui-monospace, monospace;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #17141b;
  color: var(--text);
  width: min(740px, 94vw);
  max-height: 92svh;
  padding: 0;
}
dialog::backdrop {
  background: #060609c9;
}
.sheet {
  padding: 23px;
}
.sheet-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}
.sheet-head h2 {
  font-size: clamp(28px, 5vw, 43px);
  overflow-wrap: anywhere;
}
.detail-body {
  display: grid;
  grid-template-columns: minmax(145px, 200px) minmax(0, 1fr);
  gap: 22px;
  margin-top: 22px;
}
#player {
  border-radius: 8px;
  overflow: hidden;
  background: #100e12;
  min-height: 90px;
  align-self: start;
}
#player video {
  display: block;
  width: 100%;
  max-height: 40svh;
  background: #0a090b;
}
#player p {
  padding: 10px;
  color: var(--sub);
  font-size: 12px;
}
.facts {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: start;
  gap: 8px 14px;
  font-size: 13px;
}
.facts dt {
  color: var(--sub);
}
.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.note {
  font-size: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border-left: 2px solid var(--lav);
  padding: 0 0 0 11px;
}
.sheet form {
  border-top: 1px solid var(--line);
  padding-top: 15px;
  margin-top: 17px;
}
.sheet textarea {
  display: block;
  width: 100%;
  min-height: 66px;
  resize: vertical;
  margin: 6px 0 13px;
}
.sheet label {
  font-size: 13px;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sheet footer {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.sheet small {
  color: var(--sub);
  display: block;
  margin-bottom: 10px;
}
@media (max-width: 670px) {
  main {
    padding-inline: 16px;
  }
  .mast {
    height: 55px;
    padding-inline: 16px;
    gap: 8px;
  }
  .mast-rule {
    margin: 0 3px;
  }
  .intro {
    margin: 32px 0 22px;
  }
  .intro .quiet {
    font-size: 12px;
  }
  .filter-bar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .filter-bar .search {
    min-width: 0;
  }
  .filter-bar .search input {
    width: 100%;
  }
  select {
    min-width: 0;
    width: 100%;
  }
  .filter-bar .quiet {
    min-width: 0;
  }
  input,
  select,
  textarea {
    font-size: 16px;
  }
  .columns,
  .item {
    grid-template-columns: minmax(0, 1fr) 102px;
    gap: 8px;
    padding-inline: 2px;
  }
  .columns span:last-child,
  .updated {
    display: none;
  }
  .cell {
    gap: 9px;
  }
  .thumb {
    width: 37px;
    height: 47px;
  }
  .cut-name {
    font-size: 14px;
  }
  .state {
    white-space: normal;
    line-height: 1.25;
  }
  .state:before {
    flex: none;
  }
  .item {
    min-height: 71px;
  }
  .sheet {
    padding: 16px;
  }
  .detail-body {
    gap: 12px;
    grid-template-columns: minmax(135px, .95fr) minmax(0, 1fr);
  }
  .facts {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .facts dd {
    margin-bottom: 5px;
  }
  .gate {
    padding: 15px;
  }
  .state,
  .metadata,
  .updated {
    font-size: 11px;
  }
}
@media (max-width: 420px) {
  .filter-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .filter-bar .quiet {
    grid-column: 1/-1;
    padding: 4px 0;
    min-height: 29px;
    border: 0;
    background: none;
  }
  .intro {
    align-items: start;
  }
  .sheet-head {
    gap: 8px;
  }
  .actions {
    gap: 5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

@media (max-width: 680px) {
  body[data-feed="agent"] > .mast {
    height: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding-block: 8px 4px;
    gap: 0 8px;
  }

  body[data-feed="agent"] > .mast > .brand {
    grid-column: 1 / -1;
    justify-self: center;
  }

  body[data-feed="agent"] > .mast > .mast-rule { display: none; }
  body[data-feed="agent"] > .mast > .coin-link {
    display: flex;
    align-items: center;
    min-height: 44px;
  }
}
