.card.plugin {
  display: flex;
  flex-direction: column;
}

.card.plugin .picture {
  flex: none;
}

.card.plugin .picture.blank {
  flex: none;
  min-height: 0;
  aspect-ratio: 350 / 194;
  background-color: var(--bar);
  background-size: 30px;
}

.plugin .picture .open {
  position: absolute;
  inset: 0;
}

.plugin .picture > img.logo {
  position: absolute;
  inset: 0;
  padding: 12px 44px;
  object-fit: contain;
}

.plugin .state {
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 1;
  padding: 1px 6px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.5;
  color: #ffffff;
  background: rgb(0 0 0 / 0.55);
  pointer-events: none;
}

.plugin .state.public {
  background: rgb(22 120 60 / 0.85);
}

.plugin .name a {
  color: inherit;
  text-decoration: none;
}

.plugin .name a:hover,
.plugin .name a:focus-visible {
  text-decoration: underline;
}

.plugin .name a:focus-visible {
  outline-offset: -2px;
}

.link {
  padding: 0;
  font: inherit;
  color: var(--link);
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
}

.link:hover {
  text-decoration: underline;
}

.link:disabled {
  cursor: progress;
  opacity: 0.6;
}

.shelf {
  margin-bottom: 32px;
}

.shelf h2,
.everyone > h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--heading);
}

.everyone > h2 {
  display: none;
}

.shelf:not([hidden]) ~ .everyone > h2 {
  display: block;
}

.reports {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reports li {
  --cut: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  font-size: 0.95rem;
  color: var(--card-meta);
  overflow-wrap: break-word;
  background: var(--secondary);
}

.reports .report-text {
  flex: 1;
  min-width: 0;
}

.reports p {
  margin: 0;
}

.reports a {
  font-weight: 600;
  color: var(--heading);
}

.reports .reason {
  color: var(--text);
}

.reports .dismiss {
  --corner: 5px;
  flex: none;
  padding: 5px 14px;
  font-size: 0.85rem;
  border: 0;
  cursor: pointer;
}

.load-more {
  display: flex;
  margin: 24px auto 0;
  border: 0;
  cursor: pointer;
}

.load-more[hidden] {
  display: none;
}

.plugin-page,
.editor {
  --field: var(--page);
}

.plugin-page > .note,
.editor > .note {
  margin: 8px 0 0;
  color: var(--card-meta);
}

:is(.plugin-page, .editor) > .note a {
  color: var(--link);
}

.plugin-page .masthead {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  margin-bottom: 18px;
}

.plugin-page .mark {
  --cut: 6px;
  flex: none;
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: var(--secondary);
}

.plugin-page h1 {
  min-width: 0;
  margin: 0;
  font-size: 2.2rem;
  text-align: left;
  overflow-wrap: anywhere;
}

.plugin-page h1 .release {
  font-weight: 500;
  color: var(--card-meta);
  opacity: 0.8;
}

.plugin-page h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--heading);
}

.plugin-page .panel,
.banner,
.gate {
  --corner: 9px;
  --edge: 1px;
  --cut: var(--corner);
  position: relative;
  isolation: isolate;
  background: var(--secondary-edge);
}

.plugin-page .panel::before,
.banner::before,
.gate::before {
  --cut: calc(var(--corner) - 0.586 * var(--edge));
  content: "";
  position: absolute;
  inset: var(--edge);
  z-index: -1;
  background: var(--secondary);
}

.plugin-page .panel,
.plugin-page .panel::before,
.banner,
.banner::before,
.gate,
.gate::before,
.plugin-page .mark,
.plugin-page .media,
.plugin-page .video,
.plugin-page .shots button,
.plugin-page .shots img,
.release-list li,
.reports li,
.editor .box,
.editor .box :is(input, textarea),
.plugin-page .box,
.plugin-page .box textarea {
  clip-path: polygon(
    var(--cut) 0, calc(100% - var(--cut)) 0,
    100% var(--cut), 100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%, var(--cut) 100%,
    0 calc(100% - var(--cut)), 0 var(--cut)
  );
}

.plugin-page .panel {
  padding: 16px 18px;
}

.banner {
  margin: 0 0 18px;
  padding: 10px 16px;
}

.plugin-page .layout {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr);
  gap: 24px;
  align-items: start;
}

.plugin-page .side,
.plugin-page .content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.plugin-page .content {
  gap: 16px;
}

.plugin-page .big {
  --corner: 9px;
  justify-content: center;
  gap: 12px;
  padding: 13px 20px;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.3;
  border: 0;
  cursor: pointer;
}

.plugin-page .big svg {
  flex: none;
  width: 26px;
  height: 26px;
}

.plugin-page .share-row {
  display: flex;
  gap: 8px;
}

.plugin-page .share-link {
  --corner: 7px;
  flex: 1;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: 0;
  cursor: pointer;
}

.plugin-page .share-link svg {
  flex: none;
  width: 16px;
  height: 16px;
}

.plugin-page .share-row .like {
  --corner: 7px;
  flex: none;
  width: 44px;
  padding: 0;
  background: var(--dark);
  filter: none;
}

.plugin-page .share-row .like svg {
  width: 20px;
  height: 20px;
}

.plugin-page .share-row .like.on {
  color: var(--link);
}

.plugin-page .creator {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.plugin-page .initial {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  background: var(--accent);
  border-radius: 50%;
}

.plugin-page .who {
  display: grid;
  min-width: 0;
  line-height: 1.35;
}

.plugin-page .who small {
  font-size: 0.8rem;
  color: var(--card-meta);
}

.plugin-page .who a {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--link);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.plugin-page .who a:hover {
  text-decoration: underline;
}

.release-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.release-list li {
  --cut: 6px;
  padding: 10px 12px;
  background: var(--chip);
}

.release-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.plugin-page .release-row:has(.approve) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.release-text {
  flex: 1;
  min-width: 0;
}

.release-text p {
  margin: 0;
}

.release-name {
  font-weight: 600;
  color: var(--heading);
  overflow-wrap: anywhere;
}

.release-name .current {
  margin-left: 6px;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--tagline);
}

.release-facts,
.release-age {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--card-meta);
}

.plugin-page .release-get {
  flex: none;
  margin: -4px -6px 0 0;
  color: var(--accent);
  filter: none;
}

.plugin-page .release-get svg {
  width: 22px;
  height: 22px;
}

.plugin-page .release-get:hover {
  color: var(--accent-hover);
}

.release-notes {
  margin-top: 6px;
  font-size: 0.85rem;
}

.release-notes summary {
  width: fit-content;
  color: var(--link);
  cursor: pointer;
}

.release-notes .prose {
  margin-top: 6px;
}

.release-row .delete {
  flex: none;
  font-size: 0.9rem;
  color: var(--donate);
}

.plugin-page .manage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.plugin-page .manage .button,
.plugin-page .report .button {
  --corner: 6px;
  padding: 6px 16px;
  font-size: 0.9rem;
  border: 0;
  cursor: pointer;
}

.plugin-page .button:disabled {
  cursor: progress;
  opacity: 0.6;
}

.plugin-page .manage .link {
  font-size: 0.9rem;
}

.plugin-page .report {
  display: grid;
  gap: 8px;
}

.plugin-page .report[hidden] {
  display: none;
}

.plugin-page .report .button {
  justify-self: start;
}

.plugin-page .report .hint {
  margin: 0;
  font-size: 0.88rem;
  color: var(--card-meta);
}

.plugin-page .report .hint:empty {
  display: none;
}

.editor .box,
.plugin-page .box {
  --corner: 6px;
  --edge: 2px;
  --cut: var(--corner);
  padding: var(--edge);
  background: var(--secondary-edge);
}

.editor .box:focus-within,
.plugin-page .box:focus-within {
  background: var(--accent);
}

.editor .box :is(input, textarea),
.plugin-page .box textarea {
  --cut: calc(var(--corner) - 0.586 * var(--edge));
  display: block;
  width: 100%;
  padding: 8px 10px;
  font: inherit;
  color: var(--heading);
  background: var(--field);
  border: 0;
  outline: none;
}

.editor .box textarea,
.plugin-page .box textarea {
  resize: vertical;
}

.plugin-page .media {
  --cut: 7px;
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.plugin-page .media img,
.plugin-page .media iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
}

.plugin-page .media .view,
.plugin-page .media .view > a {
  display: block;
  height: 100%;
}

.plugin-page .media .arrow,
.lightbox .arrow {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 40px;
  height: 40px;
  padding: 0;
  color: #fff;
  background: rgb(0 0 0 / 0.5);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transform: translateY(-50%);
}

.plugin-page .media .arrow:hover,
.lightbox .arrow:hover {
  background: rgb(0 0 0 / 0.8);
}

.plugin-page .media .arrow.prev,
.lightbox .arrow.prev {
  left: 12px;
}

.plugin-page .media .arrow.next,
.lightbox .arrow.next {
  right: 12px;
}

.plugin-page .media .arrow::before,
.lightbox .arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 11px;
  border: solid currentColor;
  border-width: 0 0 2.5px 2.5px;
  transform: translate(-30%, -50%) rotate(45deg);
}

.plugin-page .media .arrow.next::before,
.lightbox .arrow.next::before {
  border-width: 2.5px 2.5px 0 0;
  transform: translate(-70%, -50%) rotate(45deg);
}

.plugin-page .gallery-box {
  display: grid;
  gap: 8px;
}

.plugin-page .gallery-box:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.plugin-page .shots .clip {
  position: relative;
}

.plugin-page .shots .clip::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border: 9px solid transparent;
  border-left: 14px solid #fff;
  transform: translate(-30%, -50%);
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.7));
}

.plugin-page a.media:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

.plugin-page .media.blank {
  display: grid;
  place-items: center;
  height: 168px;
  aspect-ratio: auto;
  background: var(--secondary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-opacity='.25' stroke-width='1.6'%3E%3Cpath d='M12 3 3 7.5v9L12 21l9-4.5v-9z M3 7.5 12 12l9-4.5M12 12v9'/%3E%3C/svg%3E") center / 44px no-repeat;
}

.plugin-page .media.blank:has(img) {
  background-image: none;
}

.plugin-page .media.blank img {
  width: auto;
  height: 120px;
  max-width: 70%;
}

.plugin-page .shots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
}

.plugin-page .shots button {
  --cut: 6px;
  display: block;
  aspect-ratio: 16 / 9;
  padding: 2px;
  background: var(--secondary-edge);
  border: 0;
  cursor: pointer;
  opacity: 0.7;
}

.plugin-page .shots button:hover {
  opacity: 1;
}

.plugin-page .shots button[aria-current="true"] {
  background: var(--accent);
  opacity: 1;
}

.plugin-page .shots button:focus-visible {
  outline: none;
  background: var(--heading);
  opacity: 1;
}

.plugin-page .shots img {
  --cut: 5px;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.plugin-page .numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
}

.plugin-page .number {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: start;
  column-gap: 10px;
}

.plugin-page .number svg {
  grid-row: span 2;
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.plugin-page .number strong {
  font-size: 1.1rem;
  line-height: 1.25;
  color: var(--heading);
}

.plugin-page .number span {
  font-size: 0.78rem;
  line-height: 1.3;
  color: var(--card-meta);
}

.plugin-page .number + .number {
  padding-left: 24px;
  border-left: 1px solid var(--secondary-edge);
}

.plugin-page .writeup .lead {
  margin: 0 0 10px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--heading);
  overflow-wrap: anywhere;
}

.plugin-page .writeup .lead:last-child {
  margin-bottom: 0;
}

.prose p {
  margin: 0 0 10px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

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

.prose a,
.plugin-page .writeup .lead a {
  color: var(--link);
}

.plugin-page dl {
  display: grid;
  grid-template-columns: fit-content(42%) minmax(0, 1fr);
  gap: 6px 18px;
  margin: 0;
}

.plugin-page dl div {
  display: contents;
}

.plugin-page dt {
  color: var(--card-meta);
  overflow-wrap: break-word;
  hyphens: auto;
}

.plugin-page dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: break-word;
}

.plugin-page dd.hash {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

@media (prefers-color-scheme: dark) {
  .plugin-page .release-get,
  .plugin-page .number svg { color: var(--accent-hover); }
  .plugin-page .release-get:hover { color: var(--heading); }
  .plugin-page .media.blank { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-opacity='.3' stroke-width='1.6'%3E%3Cpath d='M12 3 3 7.5v9L12 21l9-4.5v-9z M3 7.5 12 12l9-4.5M12 12v9'/%3E%3C/svg%3E"); }
  .plugin-page .media.blank:has(img) { background-image: none; }
}

@media (max-width: 700px) {
  .plugin-page h1 { font-size: 1.75rem; }
  .plugin-page .mark { width: 44px; height: 44px; }
  .plugin-page .layout { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
  .plugin-page .side, .plugin-page .content { display: contents; }
  .plugin-page .layout > * > * { order: 20; }
  .plugin-page .media,
  .plugin-page .gallery-box { order: 1; }
  .plugin-page .shots { order: 2; }
  .plugin-page .numbers { order: 3; }
  .plugin-page .big { order: 4; }
  .plugin-page .share-row { order: 5; }
  .plugin-page .creator { order: 6; }
  .plugin-page .writeup { order: 7; }
  .plugin-page .releases { order: 9; }
  .plugin-page .specs { order: 10; }
  .plugin-page .manage { order: 11; }
  .plugin-page .report-link { order: 12; align-self: flex-start; }
  .plugin-page .report { order: 13; }
  .plugin-page .media.blank { height: 132px; }
  .plugin-page .media.blank img { height: 96px; }
}

@media (max-width: 600px) {
  #tools select.line { grid-column: 1 / -1; }
  .plugin-page h1 { font-size: 1.6rem; }
  .plugin-page .panel { padding: 14px; }
  .plugin-page .big { padding: 12px 16px; font-size: 1.2rem; }
  .plugin-page .number + .number { padding-left: 16px; }
  .plugin-page .numbers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
  .plugin-page .shots { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 380px) {
  .plugin-page .numbers { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
  .plugin-page .number + .number { padding-left: 0; border-left: 0; }
  .plugin-page dl { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .plugin-page dd { margin-bottom: 8px; }
}

.crumbs {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: var(--tagline);
}

.crumbs a {
  color: var(--link);
  text-decoration: none;
}

.crumbs a:hover {
  text-decoration: underline;
}

.plugin-page .masthead .edit {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  color: var(--tagline);
}

.plugin-page .masthead .edit:hover {
  color: var(--heading);
}

.plugin-page .masthead .edit svg {
  width: 28px;
  height: 28px;
}

.plugin-page .moderation h2 {
  margin: 0 0 4px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--tagline);
}

.plugin-page .state-line {
  margin: 0 0 10px;
  color: var(--heading);
}

.plugin-page .report-link {
  justify-self: start;
  font-size: 0.85rem;
  color: var(--tagline);
}

.plugin-page .report-link:hover {
  color: var(--heading);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(0 0 0 / 0.92);
}

html.lightbox-open,
html.lightbox-open body {
  overflow: hidden;
}

.lightbox .frame {
  width: min(94vw, calc((100vh - 96px) * 16 / 9));
  aspect-ratio: 16 / 9;
}

.lightbox .frame img,
.lightbox .frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
}

.lightbox .close {
  position: absolute;
  top: 8px;
  right: 14px;
  z-index: 1;
  padding: 4px 8px;
  font-size: 2.4rem;
  line-height: 1;
  color: #fff;
  background: none;
  border: 0;
  cursor: pointer;
  opacity: 0.85;
}

.lightbox .close:hover {
  opacity: 1;
}

.lightbox .arrow {
  width: 48px;
  height: 48px;
}

.lightbox .count {
  position: absolute;
  bottom: 14px;
  left: 50%;
  margin: 0;
  font-size: 0.85rem;
  color: #fff;
  opacity: 0.8;
  transform: translateX(-50%);
}

:is(.plugin-page, .editor) .scan {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  color: var(--tagline);
}

:is(.plugin-page, .editor) .release-text .scan {
  margin-top: 4px;
}

:is(.plugin-page, .editor) .scan svg {
  flex: none;
  width: 16px;
  height: 16px;
}

:is(.plugin-page, .editor) .scan.clean svg {
  color: var(--link);
}

:is(.plugin-page, .editor) .scan.flagged svg {
  color: var(--donate);
}

:is(.plugin-page, .editor) .scan.weak svg {
  color: var(--tagline);
}

:is(.plugin-page, .editor) .scan a {
  color: var(--link);
}

.plugin-page .scan-badge {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-top: -4px;
  color: var(--tagline);
}

.plugin-page .scan-badge svg {
  width: 22px;
  height: 22px;
}

.plugin-page .scan-badge.clean {
  color: var(--link);
}

.plugin-page .scan-badge.flagged {
  color: var(--donate);
}

.plugin-page .scan-badge.weak {
  color: var(--tagline);
}

.plugin-page .scan-badge.pending {
  opacity: 0.5;
}

.plugin-page a.scan-badge:hover {
  filter: brightness(1.2);
}

.release-name .current.pending {
  color: #9a6400;
}

.plugin-page .release-row .approve {
  --corner: 6px;
  flex: none;
  grid-row: 2;
  grid-column: 1;
  justify-self: start;
  margin-top: 2px;
  padding: 4px 12px;
  font-size: 0.8rem;
  border: 0;
  cursor: pointer;
}

.editor [hidden] {
  display: none !important;
}

.editor-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 20px;
}

.editor-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  min-width: 0;
}

.editor h1 {
  min-width: 0;
  margin: 0;
  font-size: 2rem;
  text-align: left;
  overflow-wrap: anywhere;
}

.editor-icon {
  --cut: 6px;
  flex: none;
  width: 48px;
  height: 48px;
  background: var(--secondary);
}

.editor-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.editor-head .state {
  --cut: 4px;
  padding: 2px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--secondary-text);
  background: var(--secondary-edge);
}

.editor-head .state.public {
  color: #ffffff;
  background: rgb(22 120 60);
}

.editor-head .state.pending {
  color: #3d2a00;
  background: #f2c14e;
}

.editor-head .button {
  --corner: 6px;
  padding: 7px 18px;
  font-size: 0.9rem;
}

.editor-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  grid-template-areas: "tabs ." "main side";
  gap: 0 32px;
  align-items: start;
}

.editor-tabs {
  grid-area: tabs;
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--secondary-edge);
}

.editor-tabs a {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-weight: 600;
  color: var(--tagline);
  white-space: nowrap;
  text-decoration: none;
  box-shadow: inset 0 -3px 0 transparent;
}

.editor-tabs a:hover {
  color: var(--heading);
  box-shadow: inset 0 -3px 0 var(--secondary-edge);
}

.editor-tabs a[aria-selected="true"] {
  color: var(--heading);
  box-shadow: inset 0 -3px 0 var(--accent);
}

.editor-tabs a:focus-visible {
  outline-offset: -2px;
}

.editor-tabs .count {
  min-width: 22px;
  padding: 0 7px;
  font-size: 0.78rem;
  line-height: 1.6;
  text-align: center;
  color: var(--card-meta);
  background: var(--chip);
  border-radius: 999px;
}

.editor-tabs .count:empty {
  display: none;
}

.editor-main {
  grid-area: main;
  display: grid;
  gap: 16px;
  min-width: 0;
}

.editor-main form {
  display: grid;
  gap: 16px;
}

.editor-body[data-show="about"] [data-tab]:not([data-tab~="about"]),
.editor-body[data-show="images"] [data-tab]:not([data-tab~="images"]),
.editor-body[data-show="versions"] [data-tab]:not([data-tab~="versions"]) {
  display: none;
}

.editor .block {
  --corner: 9px;
  --edge: 1px;
  --cut: var(--corner);
  position: relative;
  isolation: isolate;
  min-width: 0;
  padding: 20px 22px;
  background: var(--secondary-edge);
}

.editor .block::before {
  --cut: calc(var(--corner) - 0.586 * var(--edge));
  content: "";
  position: absolute;
  inset: var(--edge);
  z-index: -1;
  background: var(--bar);
}

.editor .block,
.editor .block::before,
.editor .icon-frame,
.editor .tile .shot,
.editor .tile.add,
.editor .dropzone {
  clip-path: polygon(
    var(--cut) 0, calc(100% - var(--cut)) 0,
    100% var(--cut), 100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%, var(--cut) 100%,
    0 calc(100% - var(--cut)), 0 var(--cut)
  );
}

.editor .block h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--heading);
}

.editor-body:not(.tabbed) .editor-main {
  counter-reset: step;
}

.editor-body:not(.tabbed) .block > h2::before {
  counter-increment: step;
  content: counter(step);
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font-size: 0.9rem;
  color: #ffffff;
  background: var(--accent);
  border-radius: 50%;
}

.editor .block > p {
  margin: 0 0 14px;
  color: var(--card-meta);
}

.editor .field {
  margin-top: 16px;
}

.editor .block > h2 + .field {
  margin-top: 0;
}

.editor .field.narrow {
  max-width: 240px;
}

.editor .label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.editor .field > label,
.editor .field > .label,
.editor .label-row > label,
.editor .label-row > .label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--heading);
}

.editor .field > label,
.editor .field > .label {
  margin-bottom: 6px;
}

.editor .counter {
  flex: none;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--card-meta);
}

.editor .counter.near {
  color: var(--donate);
}

.editor .field small {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--card-meta);
}

.editor .box :is(input, textarea) {
  font-size: 1rem;
}

.editor .box.invalid {
  background: var(--donate);
}

.editor textarea.line {
  min-height: 3.6em;
  resize: none;
  field-sizing: content;
}

.editor #description {
  min-height: 12em;
}

.editor .dropzone {
  --cut: 8px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 22px 16px;
  text-align: center;
  background: var(--page);
  border: 2px dashed var(--secondary-edge);
  cursor: pointer;
}

.editor .dropzone:hover,
.editor .dropzone.over,
.editor .dropzone:focus-within {
  border-color: var(--accent);
}

.editor .dropzone.ready {
  border-style: solid;
  border-color: var(--accent);
}

.editor .dropzone svg {
  width: 30px;
  height: 30px;
  margin-bottom: 4px;
  color: var(--accent);
}

.editor :is(.dropzone, .pick, .tile.add) input {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  clip-path: inset(50%);
  pointer-events: none;
}

.editor .dropzone-text strong {
  color: var(--link);
}

.editor .dropzone-hint {
  font-size: 0.8rem;
  color: var(--card-meta);
}

.editor .dropzone-file {
  margin-top: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--heading);
  overflow-wrap: anywhere;
}

.editor .dropzone-file:empty {
  display: none;
}

.editor .publish-bar,
.editor .save-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.editor .publish-bar {
  margin-top: 16px;
}

.editor .save-bar {
  margin: 0 -16px;
  padding: 4px 16px 0;
}

.editor .save-bar.floating {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9;
  margin: 0;
  padding: 12px max(16px, calc((100% - 1136px) / 2));
  background: var(--bar);
  border-top: 1px solid var(--secondary-edge);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.editor .save-bar .unsaved {
  display: none;
  margin: 0;
  font-size: 0.9rem;
  color: var(--card-meta);
}

.editor .save-bar.floating .unsaved {
  display: block;
}

.editor .button {
  --corner: 6px;
  padding: 9px 22px;
  border: 0;
  cursor: pointer;
}

.editor .button:disabled {
  opacity: 0.5;
  cursor: default;
}

.editor .button.primary:disabled::before {
  background: var(--fill);
}

.editor .error,
.editor .done {
  margin: 12px 0 0;
  font-size: 0.92rem;
}

.editor .save-bar .error,
.editor .save-bar .done,
.editor .publish-bar .error,
.editor .publish-bar .done {
  margin: 0;
}

.editor .error {
  color: var(--donate);
}

.editor .done {
  color: var(--accent);
}

.editor .error:empty,
.editor .done:empty {
  display: none;
}

.editor .icon-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

.editor .icon-frame {
  --cut: 8px;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  background: var(--page);
}

.editor .icon-frame img {
  width: 100%;
  height: 100%;
  padding: 6px;
  object-fit: contain;
}

.editor .icon-frame.blank {
  background: var(--page) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-opacity='.25' stroke-width='1.6'%3E%3Cpath d='M12 3 3 7.5v9L12 21l9-4.5v-9z M3 7.5 12 12l9-4.5M12 12v9'/%3E%3C/svg%3E") center / 34px no-repeat;
}

.editor .icon-tools {
  flex: 1 1 220px;
  min-width: 0;
}

.editor .icon-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.editor .pick {
  cursor: pointer;
}

.editor .pick:focus-within {
  --dark: var(--accent);
  --edge: 3px;
}

.editor .gallery-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
}

.editor .gallery-list.over {
  outline: 2px dashed var(--accent);
  outline-offset: 4px;
}

.editor .tile {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.editor .tile .shot {
  --cut: 6px;
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.editor .tile .shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editor .tile.clip .shot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  border: 10px solid transparent;
  border-left: 16px solid #ffffff;
  transform: translate(-30%, -50%);
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.7));
  pointer-events: none;
}

.editor .tile .badge {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 1px 7px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.5;
  color: #ffffff;
  background: var(--accent);
}

.editor .tile-tools {
  display: flex;
  gap: 4px;
}

.editor .tile-tools button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 32px;
  padding: 0;
  color: var(--secondary-text);
  background: var(--page);
  border: 1px solid var(--secondary-edge);
  cursor: pointer;
}

.editor .tile-tools button:hover:not(:disabled) {
  border-color: var(--accent);
}

.editor .tile-tools button:disabled {
  opacity: 0.35;
  cursor: default;
}

.editor .tile-tools .remove {
  margin-left: auto;
}

.editor .tile-tools .remove:hover {
  color: #ffffff;
  background: var(--donate);
  border-color: var(--donate);
}

.editor .tile-tools svg {
  width: 16px;
  height: 16px;
}

.editor .tile.add {
  --cut: 6px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 120px;
  padding: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  color: var(--link);
  background: var(--page);
  border: 2px dashed var(--secondary-edge);
  cursor: pointer;
}

.editor .tile.add:hover,
.editor .tile.add:focus-within {
  border-color: var(--accent);
}

.editor .tile.add .plus svg {
  display: block;
  width: 26px;
  height: 26px;
}

.editor .video-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.editor .video-row .box {
  flex: 1 1 220px;
}

.editor .video-row .button {
  flex: none;
}

.editor .release-list li {
  background: var(--page);
}

.editor .release-row {
  align-items: center;
}

.editor .release-name .current {
  margin-left: 4px;
}

.editor .block.danger .button {
  color: var(--donate);
}

.editor-side {
  grid-area: side;
  position: sticky;
  top: 72px;
  display: grid;
  gap: 8px;
}

.editor-body:not(.tabbed) .editor-side {
  top: 72px;
}

.editor-side .side-label {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--tagline);
}

.editor-side .grid {
  grid-template-columns: minmax(0, 1fr);
}

.gate {
  display: grid;
  gap: 10px;
  max-width: 420px;
  margin: 24px auto 8px;
  padding: 28px;
  text-align: center;
}

.gate h2 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--heading);
}

.gate p {
  margin: 0 0 8px;
  color: var(--card-meta);
}

.gate .button {
  justify-content: center;
}

@media (prefers-color-scheme: dark) {
  .editor .done { color: var(--accent-hover); }
  .release-name .current.pending { color: #f2c14e; }
  .editor .icon-frame.blank { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-opacity='.3' stroke-width='1.6'%3E%3Cpath d='M12 3 3 7.5v9L12 21l9-4.5v-9z M3 7.5 12 12l9-4.5M12 12v9'/%3E%3C/svg%3E"); }
}

@media (max-width: 960px) {
  .editor-body { grid-template-columns: minmax(0, 1fr); grid-template-areas: "tabs" "main"; }
  .editor-side { display: none; }
}

@media (max-width: 600px) {
  .editor h1 { font-size: 1.6rem; }
  .editor-icon { width: 40px; height: 40px; }
  .editor-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(max-content, 1fr); gap: 0; }
  .editor-tabs a { padding: 10px 8px; }
  .editor .block { padding: 16px 14px; }
  .editor .gallery-list { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
  .editor .field.narrow { max-width: none; }
  .gate { padding: 22px 16px; }
}

.editor-body:has(.save-bar.floating) {
  padding-bottom: 72px;
}

.editor .save-bar.floating {
  background: var(--bar);
  border-top: 1px solid var(--accent);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.editor .save-bar.floating .unsaved {
  font-weight: 600;
  color: var(--heading);
}

.editor .save-bar.floating .button.primary {
  --fill: var(--accent);
  --dark: var(--accent-pressed);
  --ink: #ffffff;
}

.editor .save-bar.floating .button.primary:hover {
  --fill: var(--accent-hover);
}

.plugin-page details.specs > summary,
.plugin-page .release-notes > summary {
  cursor: pointer;
  list-style: none;
}

.plugin-page details.specs > summary::-webkit-details-marker,
.plugin-page .release-notes > summary::-webkit-details-marker {
  display: none;
}

.plugin-page details.specs > summary {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--heading);
}

.plugin-page details.specs > summary::after,
.plugin-page .release-notes > summary::after {
  content: " +";
  color: var(--tagline);
}

.plugin-page details.specs[open] > summary::after,
.plugin-page .release-notes[open] > summary::after {
  content: " \2212";
}

.plugin-page details.specs[open] > summary {
  margin-bottom: 12px;
}

.plugin-page .release-notes > summary {
  font-size: 0.8rem;
  color: var(--tagline);
}

.plugin-page .release-notes .release-facts {
  margin: 6px 0 4px;
}

.editor .tile.add {
  font-weight: 400;
  color: var(--tagline);
  border: 2px dashed var(--control-edge);
  clip-path: none;
}

.editor .tile.add:hover,
.editor .tile.add:focus-within {
  color: var(--heading);
  border-color: var(--accent);
}

.editor .tile.add .plus,
.editor .tile.add svg {
  color: var(--tagline);
}

.plugin-page details.specs > summary,
.plugin-page .release-notes > summary {
  display: flex;
  align-items: center;
  gap: 8px;
}

.plugin-page details.specs > summary::after,
.plugin-page .release-notes > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.2s;
}

.plugin-page details.specs[open] > summary::after,
.plugin-page .release-notes[open] > summary::after {
  content: "";
  transform: translateY(3px) rotate(225deg);
}

.editor .dropzone,
.editor .tile.add {
  --cut: 8px;
  background: var(--page);
  border: 1px solid var(--control-edge);
  clip-path: polygon(
    var(--cut) 0, calc(100% - var(--cut)) 0,
    100% var(--cut), 100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%, var(--cut) 100%,
    0 calc(100% - var(--cut)), 0 var(--cut)
  );
  transition: border-color 0.15s, background-color 0.15s;
}

.editor .dropzone {
  gap: 6px;
  padding: 26px 16px;
}

.editor .dropzone svg,
.editor .tile.add .plus svg {
  width: 28px;
  height: 28px;
  color: var(--tagline);
}

.editor .dropzone-text {
  font-size: 0.95rem;
  color: var(--text);
}

.editor .dropzone-text strong {
  color: var(--link);
}

.editor .dropzone:hover,
.editor .dropzone.over,
.editor .dropzone:focus-within,
.editor .tile.add:hover,
.editor .tile.add:focus-within {
  background: var(--secondary);
  border-color: var(--accent);
}

.editor .dropzone.ready {
  border-color: var(--accent);
  border-style: solid;
}

.editor .tile.add {
  font-size: 0.85rem;
  color: var(--text);
}

.prose h2,
.prose h3,
.prose h4 {
  margin: 18px 0 8px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--heading);
}

.prose h2 { font-size: 1.25rem; }
.prose h3 { font-size: 1.1rem; }
.prose h4 { font-size: 1rem; }

.prose > :first-child {
  margin-top: 0;
}

.prose ul,
.prose ol {
  margin: 0 0 10px;
  padding-left: 24px;
}

.prose li {
  margin-bottom: 4px;
}

.prose code {
  padding: 1px 5px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.9em;
  background: var(--secondary-edge);
}

.prose pre {
  margin: 0 0 10px;
  padding: 10px 12px;
  overflow-x: auto;
  background: var(--secondary-edge);
}

.prose pre code {
  padding: 0;
  background: none;
}

.prose blockquote {
  margin: 0 0 10px;
  padding: 4px 14px;
  color: var(--tagline);
  border-left: 3px solid var(--secondary-edge);
}

.prose hr {
  margin: 14px 0;
  border: 0;
  border-top: 1px solid var(--secondary-edge);
}

.editor .modes {
  display: flex;
  gap: 2px;
  margin-bottom: 8px;
}

.editor .modes button {
  padding: 4px 12px;
  font: inherit;
  font-size: 0.85rem;
  color: var(--tagline);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}

.editor .modes button:hover {
  color: var(--heading);
}

.editor .modes button[aria-pressed="true"] {
  color: var(--heading);
  border-bottom-color: var(--accent);
}

.editor .preview {
  min-height: 120px;
  padding: 10px 12px;
  background: var(--page);
  border: 1px solid var(--control-edge);
}

.editor .preview[hidden],
.editor .box[hidden] {
  display: none;
}

.prerender {
  display: none;
}

.prose table {
  margin: 0 0 12px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.prose th,
.prose td {
  padding: 5px 10px;
  text-align: left;
  border: 1px solid var(--secondary-edge);
}

.prose th {
  background: var(--secondary-edge);
}

.prose img {
  display: block;
  max-width: 100%;
  margin: 8px 0;
}

.prose li.task {
  list-style: none;
  margin-left: -20px;
}

.prose ul ul,
.prose ol ol,
.prose ul ol,
.prose ol ul {
  margin: 2px 0 4px;
}

.prose sup a {
  color: var(--link);
  text-decoration: none;
}

.prose .footnotes {
  margin-top: 16px;
  padding-top: 10px;
  font-size: 0.85rem;
  color: var(--tagline);
  border-top: 1px solid var(--secondary-edge);
}

.editor .save-bar {
  margin: 24px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--secondary-edge);
}

.editor .done {
  color: var(--tagline);
}

.plugin-page .rate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
}

.plugin-page .rate-label {
  margin: 0;
  font-size: 0.9rem;
  color: var(--tagline);
}

.plugin-page .stars {
  display: flex;
  gap: 2px;
}

.plugin-page .star {
  width: 28px;
  height: 28px;
  padding: 0;
  color: var(--control-edge);
  background: none;
  border: 0;
  cursor: pointer;
  transition: color 0.1s;
}

.plugin-page .star svg {
  width: 24px;
  height: 24px;
}

.plugin-page .star.on {
  color: #f0b429;
}

.plugin-page .rate.own .star {
  cursor: default;
}

.editor .preview h2,
.editor .preview h3,
.editor .preview h4 {
  display: block;
  margin: 18px 0 8px;
  font-size: 1.15rem;
  counter-increment: none;
}

.editor .preview h3 { font-size: 1.05rem; }
.editor .preview h4 { font-size: 1rem; }

.editor .preview h2::before,
.editor .preview h3::before,
.editor .preview h4::before {
  content: none;
}

.editor .preview > :first-child {
  margin-top: 0;
}

.starbar {
  position: relative;
  display: inline-block;
  height: 1em;
  line-height: 0;
  vertical-align: -0.15em;
  white-space: nowrap;
}

.starbar .base,
.starbar .fill {
  display: inline-block;
  height: 1em;
  white-space: nowrap;
}

.starbar .base {
  color: var(--control-edge);
}

.starbar .fill {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  color: #f0b429;
}

.starbar svg {
  width: 1em;
  height: 1em;
}

.picture .stats .rated .starbar {
  margin-right: 4px;
  font-size: 11px;
}

.plugin-page .number.rating .starbar {
  margin-right: 4px;
  font-size: 1rem;
}

.plugin-page .number.rating .starbar {
  margin-right: 6px;
  font-size: 1.3rem;
}

.plugin-page .number.rating strong {
  display: inline-flex;
  align-items: center;
}

.plugin-page .number.rating {
  grid-template-columns: auto;
}

.plugin-page .number.rating .starbar span {
  font-size: inherit;
  line-height: 0;
}

.plugin-page .number.rating .starbar .base {
  color: var(--control-edge);
}

.plugin-page .number.rating .starbar .fill {
  color: #f0b429;
}

.plugin-page .number.rating .starbar svg {
  grid-row: auto;
  width: 1em;
  height: 1em;
  color: inherit;
}

.editor .dropzone,
.editor .tile.add {
  --corner: 8px;
  --edge: 1px;
  --cut: var(--corner);
  position: relative;
  isolation: isolate;
  border: 0;
  background: var(--control-edge);
}

.editor .dropzone::before,
.editor .tile.add::before {
  --cut: calc(var(--corner) - 0.586 * var(--edge));
  content: "";
  position: absolute;
  inset: var(--edge);
  z-index: -1;
  background: var(--page);
  clip-path: polygon(
    var(--cut) 0, calc(100% - var(--cut)) 0,
    100% var(--cut), 100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%, var(--cut) 100%,
    0 calc(100% - var(--cut)), 0 var(--cut)
  );
}

.editor .dropzone {
  gap: 4px;
  padding: 22px 16px;
}

.editor .dropzone svg {
  width: 24px;
  height: 24px;
  margin-bottom: 2px;
}

.editor .dropzone:hover,
.editor .dropzone.over,
.editor .dropzone:focus-within,
.editor .tile.add:hover,
.editor .tile.add:focus-within {
  --edge: 2px;
  background: var(--accent);
}

.editor .dropzone:hover::before,
.editor .dropzone.over::before,
.editor .dropzone:focus-within::before,
.editor .tile.add:hover::before,
.editor .tile.add:focus-within::before {
  background: var(--secondary);
}

.editor .dropzone.ready {
  --edge: 2px;
  background: var(--accent);
}
