:root {
  color-scheme: dark;
  --bg: #18191b;
  --panel: #222326;
  --line: #393b40;
  --text: #ededee;
  --muted: #adafb6;
  --accent: #c7b3df;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: #d7c5ec;
}
button,
input,
textarea {
  font: inherit;
}
button,
a,
input,
textarea {
  outline-offset: 5px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
.shell {
  max-width: 1560px;
  margin: auto;
  padding: 0 max(44px, env(safe-area-inset-right)) 0
    max(44px, env(safe-area-inset-left));
}
.topbar {
  height: 93px;
  display: flex;
  align-items: center;
  gap: 36px;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-size: 30px;
  letter-spacing: -1px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 20px;
}
.spark {
  font-size: 33px;
}
.twitch {
  font-size: 17px;
  color: var(--muted);
  border-left: 1px solid #666;
  padding-left: 30px;
  display: flex;
  gap: 13px;
  align-items: center;
}
.twitch span:first-child {
  color: var(--accent);
  font-size: 25px;
}
.twitch-mobile-label,
.viewer-touch-hint {
  display: none;
}
.gallery-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 44px 0 38px;
  gap: 24px;
}
.gallery-heading > div {
  border-left: 6px solid #98969f;
  padding-left: 25px;
}
h1 {
  font-size: clamp(32px, 4vw, 51px);
  letter-spacing: -1.8px;
  line-height: 1.15;
  margin: 0 0 10px;
  font-weight: 650;
}
.gallery-heading p {
  font-size: 24px;
  color: var(--muted);
  margin: 0;
  letter-spacing: -0.4px;
}
.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--muted);
}
.gallery {
  columns: 3;
  column-gap: 22px;
}
@media (min-width: 1920px) {
  .gallery {
    columns: 4;
  }
}
.author-links {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}
.social-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
}
.social-link svg {
  flex: 0 0 22px;
}
.social-link > span:first-of-type {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.social-link small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.author-page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}
.author-page-links .social-link {
  max-width: 100%;
}
#author-dialog {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
}
#author-dialog::backdrop {
  background: #000a;
}
.author-dialog-close {
  display: block;
  margin-left: auto;
}
.author-card h2 {
  overflow-wrap: anywhere;
  font-size: 30px;
  margin: 12px 0;
}
[data-link-suggestions] {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}
[data-link-suggestions]:empty {
  display: none;
}
[data-link-suggestions] button {
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
}
.art-card {
  break-inside: avoid;
  margin: 0 0 22px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 9px;
  overflow: hidden;
}
.art-image {
  display: block;
  overflow: hidden;
}
.art-image img {
  display: block;
  width: 100%;
  height: auto;
}
.progressive-image {
  position: relative;
}
.progressive-image > picture {
  position: absolute;
  inset: 0;
  display: block;
}
.art-image .quality-image,
.single-image .quality-image {
  height: 100%;
  object-fit: contain;
  opacity: 0;
}
.progressive-image.is-ready .quality-image {
  opacity: 1;
}
.progressive-image .no-js-image {
  opacity: 1;
}
.progressive-image.is-ready .image-placeholder {
  opacity: 0;
}
.art-caption {
  padding: 16px 19px;
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.art-title {
  display: block;
  margin-bottom: 8px;
}
.version-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 10px;
  border-radius: 7px;
  background: #202127e6;
  border: 1px solid #55545e;
  font-size: 12px;
}
.version-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 4px 12px;
}
.version-choice {
  flex: 0 0 100px;
  padding: 7px;
  border: 1px solid #3c3d46;
  border-radius: 8px;
  background: #222329;
  font-size: 12px;
}
.version-choice img {
  display: block;
  width: 84px;
  height: 70px;
  object-fit: contain;
  margin-bottom: 7px;
}
.version-choice span {
  display: block;
  overflow-wrap: anywhere;
}
.version-choice[aria-current="true"] {
  outline: 2px solid #c8bbd6;
  outline-offset: 2px;
}
.viewer-versions-section {
  min-width: 0;
  max-width: 720px;
  width: 100%;
  margin: auto;
  padding: 8px 14px 0;
}
.versions-admin {
  margin-top: 40px;
}
.version-admin-image {
  width: 100%;
  height: 180px;
  object-fit: contain;
}
.version-admin-card {
  min-width: 0;
}
select {
  width: 100%;
  background: #18191d;
  color: inherit;
  border: 1px solid #45464d;
  border-radius: 8px;
  padding: 12px;
}
#selected-preview {
  max-height: 400px;
  object-fit: contain;
}
#viewer .viewer-stage > button[hidden],
#viewer [hidden] {
  display: none;
}
#viewer.work-only #viewer-canvas {
  grid-column: 1 / -1;
}
dialog#viewer.zen[open] {
  grid-template-rows: minmax(0, 1fr);
}
#viewer.zen > .viewer-bar,
#viewer.zen > .viewer-versions-section,
#viewer.zen .viewer-zoom,
#viewer.zen > .viewer-hint,
#viewer.zen .viewer-stage > button {
  display: none;
}
#viewer.zen .viewer-stage {
  padding: 0;
  grid-template-columns: minmax(0, 1fr);
}
#viewer.zen #viewer-canvas {
  grid-column: 1 / -1;
}
#zen-exit {
  position: absolute;
  z-index: 2;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  min-height: 44px;
  padding: 10px 14px;
  background: #222329e6;
  border: 1px solid #45464d;
  border-radius: 8px;
}
.muted {
  color: var(--muted);
  line-height: 1.65;
}
.tiny {
  font-size: 12px;
  color: var(--muted);
}
.footer {
  margin-top: 58px;
  border-top: 1px solid var(--line);
  padding: 25px 0 30px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.empty {
  text-align: center;
  padding: 90px 24px;
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.empty-star {
  font-size: 56px;
  color: #8d8799;
  display: block;
}
.empty h2 {
  font-size: 25px;
}
.button {
  background: #e6e2ec;
  color: #202025;
  padding: 13px 19px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 600;
  display: inline-block;
  line-height: 1.4;
  font-size: 14px;
}
.button:hover {
  background: #fff;
  color: #161619;
}
.secondary {
  background: transparent;
  color: var(--text);
  border-color: #56565f;
}
.secondary:hover {
  background: #313136;
  color: #fff;
}
.text-button {
  border: 0;
  background: none;
  color: var(--muted);
  padding: 10px 0;
  cursor: pointer;
  font-size: 14px;
}
.text-button:hover {
  color: #fff;
}
.danger {
  color: #efa8a8;
}
.back {
  display: inline-block;
  color: var(--muted);
  font-size: 14px;
  margin: 25px 0;
}
.single-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 40px;
}
.single-image img {
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
}
.single-image {
  display: block;
}
.single-grid aside {
  padding-top: 30px;
}
.single-grid h1 {
  font-size: 34px;
  margin-top: 12px;
}
.description {
  white-space: pre-wrap;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.admin-nav {
  display: flex;
  gap: 30px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.admin-nav form {
  margin-left: auto;
}
.dev-banner {
  font-size: 12px;
  background: #302b39;
  border: 1px solid #4c405e;
  padding: 12px 16px;
  border-radius: 6px;
  color: #d9caec;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 36px 0 25px;
}
.section-heading h1 {
  font-size: 36px;
  margin: 10px 0;
}
.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 10px;
  padding: 26px;
  margin-bottom: 22px;
}
.panel h2 {
  font-size: 21px;
}
.panel p {
  line-height: 1.7;
}
.stats {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 22px;
}
.stats strong {
  display: block;
  font-size: 28px;
  margin-top: 17px;
  letter-spacing: -0.7px;
}
.stats small {
  font-size: 14px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0;
}
.stats p {
  font-size: 13px;
}
.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.admin-card {
  padding: 0;
  overflow: hidden;
}
.admin-card img {
  width: 100%;
  height: 250px;
  object-fit: contain;
  background: #151517;
  display: block;
}
.admin-card > div {
  padding: 20px;
}
.admin-card h2 {
  font-size: 18px;
  overflow-wrap: anywhere;
}
.admin-card p,
.admin-card a {
  font-size: 14px;
}
.status {
  display: inline-block;
  background: #35313c;
  color: #d5c7e7;
  border-radius: 4px;
  font-size: 11px;
  padding: 5px 8px;
}
.status::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status--published {
  background: #20392d;
  color: #a7dfb9;
}
.status--draft {
  background: #3c3220;
  color: #efcc8c;
}
.status--trash {
  background: #3e292d;
  color: #e6b4bc;
}
.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}
.editor-preview {
  position: sticky;
  top: 22px;
  text-align: center;
}
.editor-preview img {
  max-width: 100%;
  max-height: 600px;
  object-fit: contain;
}
.editor-preview .actions {
  justify-content: center;
}
.editor-preview .image-placeholder {
  display: block;
  width: 100%;
  height: auto;
}
.editor-preview .quality-image {
  width: 100%;
  height: 100%;
  opacity: 0;
}
label {
  display: block;
  font-size: 14px;
  margin-bottom: 22px;
  line-height: 1.7;
}
input:not([type="hidden"]),
textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 1px solid #4d4e56;
  color: var(--text);
  background: #1a1b1e;
  border-radius: 6px;
  padding: 12px;
  resize: vertical;
}
input[type="file"] {
  font-size: 13px;
}
textarea {
  min-height: 110px;
}
.required {
  color: #d9c5ed;
}
.upload-zone {
  border: 1px dashed #696471;
  border-radius: 8px;
  padding: 24px;
  background: #1d1e21;
}
.upload-zone span {
  font-size: 12px;
  display: block;
  margin-top: 10px;
  overflow-wrap: anywhere;
}
.upload-zone.is-dragging {
  border-color: #d6c4ed;
  background: #34303d;
  outline: 2px solid #9d88b5;
  outline-offset: 3px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}
.alert,
.warning {
  color: #f0cf99;
}
.alert {
  border: 1px solid #7a6444;
  padding: 16px 20px;
  background: #322c24;
  border-radius: 7px;
}
.login {
  max-width: 540px;
  margin: 80px auto;
  padding: 42px;
}
.login h1 {
  font-size: 34px;
  margin-top: 20px;
}
.login p {
  color: var(--muted);
}
.login .button {
  margin: 12px 0;
}
.login .back {
  display: block;
}
.work-view-switch {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.work-view-switch [aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
}
.work-catalog {
  display: grid;
  gap: 20px;
}
.work-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(100px, 180px);
  gap: 24px;
  align-items: center;
  min-width: 0;
}
.work-card h2 {
  margin-top: 0;
  overflow-wrap: anywhere;
}
.work-card-description {
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.work-card-cover {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg);
  text-align: center;
}
.work-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.work-publication-images {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px;
}
.work-cover-link {
  flex: 0 1 480px;
  min-width: 0;
  max-width: 100%;
}
.work-cover-preview {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
}
.work-other-images {
  display: flex;
  flex: 1 1 160px;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
}
.work-other-image {
  display: grid;
  justify-items: start;
  gap: 6px;
  max-width: 100%;
}
.work-other-image img {
  width: 160px;
  max-width: 100%;
  height: 120px;
  object-fit: contain;
  background: var(--bg);
  border-radius: 6px;
}
.image-source-switch {
  margin-bottom: 24px;
}
.image-source-switch [aria-current] {
  color: var(--accent);
  border-color: var(--accent);
}
.image-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 20px;
}
.image-picker-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.image-picker-card > img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: var(--bg);
}
.image-picker-card > div {
  padding: 16px;
}
.image-picker-card h3 {
  margin-top: 0;
  overflow-wrap: anywhere;
}
.image-picker-card .button {
  width: 100%;
}
.work-catalog[data-view="tiles"] {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}
.work-catalog[data-view="cards"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.work-catalog:is([data-view="cards"], [data-view="tiles"]) .work-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  padding: 12px;
}
.work-catalog:is([data-view="cards"], [data-view="tiles"]) .work-card-cover {
  order: -1;
}
.work-catalog:is([data-view="cards"], [data-view="tiles"]) .work-card-details {
  padding: 4px 8px 8px;
}
@media (max-width: 1000px) {
  .work-catalog[data-view="cards"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .work-catalog[data-view="cards"] {
    grid-template-columns: minmax(0, 1fr);
  }
  .work-card {
    grid-template-columns: minmax(0, 1fr) 100px;
    gap: 12px;
    padding: 14px;
  }
}

.catalog-layout {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr);
  gap: 24px;
  align-items: start;
}
.catalog-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
}
.catalog-list h2 {
  margin-top: 0;
}
.catalog-list a {
  overflow-wrap: anywhere;
}
.work-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 2px 14px;
  margin-bottom: 20px;
}
.work-tab {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 230px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  color: var(--muted);
}
.work-tab span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.work-tab img {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
}
.work-tab.is-active {
  background: #c7b3df18;
  border-color: var(--accent);
  color: var(--text);
}
.work-details {
  max-width: 850px;
}
.work-editor-page .work-tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg, #141416);
  border-bottom: 1px solid var(--line);
}
.work-editor-page section[id] {
  scroll-margin-top: 105px;
}
.work-image-section {
  margin-top: 24px;
}
.work-image-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 1fr);
  gap: 24px;
}
.work-image-preview {
  display: block;
  width: 100%;
  aspect-ratio: auto;
}
.work-image-preview img {
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
}
.work-image-actions {
  margin-top: 20px;
}
@media (max-width: 700px) {
  .work-image-grid {
    grid-template-columns: 1fr;
  }
}
.work-attach {
  margin-top: 24px;
}
.image-filters {
  margin: 20px 0;
}
.image-filters form {
  display: flex;
  align-items: end;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.image-filters label {
  flex: 1;
  min-width: 180px;
  margin: 0;
}
.image-filters .orphan-alert {
  background: #e9b8691a;
  color: #efc77e;
  border-color: #e9b869;
}
.admin-nav {
  flex-wrap: wrap;
}
@media (max-width: 700px) {
  .catalog-layout {
    grid-template-columns: 1fr;
  }
  .work-tab {
    max-width: 190px;
  }
}
.narrow {
  max-width: 800px;
  margin: 45px auto;
}
.narrow h1 {
  margin: 15px 0 25px;
}
.compression-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 14px 0 22px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.compression-summary .text-button {
  padding: 0;
}
.comparison-dialog {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #151517;
  color: var(--text);
  overflow: hidden;
}
.comparison-dialog::backdrop {
  background: #000c;
}
body:has(.comparison-dialog[open]) {
  overflow: hidden;
}
.image-compare {
  --compare-position: 50%;
  --compare-bg: repeating-conic-gradient(#252529 0% 25%, #1c1c20 0% 50%) 50% /
    20px 20px;
  position: absolute;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  background: var(--compare-bg);
}
.image-compare.is-light {
  --compare-bg: repeating-conic-gradient(#f4f4f6 0% 25%, #dcdce0 0% 50%) 50% /
    20px 20px;
}
.image-compare img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  margin: 0;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  background: var(--compare-bg);
  image-rendering: pixelated;
  transform: translate(var(--compare-pan-x, 0px), var(--compare-pan-y, 0px))
    scale(var(--compare-zoom, 1));
}
.image-compare.is-smooth img {
  image-rendering: auto;
}
.compare-original-layer {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--compare-position)) 0 0);
  pointer-events: none;
}
.image-compare.is-zoomed {
  cursor: grab;
  touch-action: none;
}
.image-compare.is-zoomed .compare-position {
  pointer-events: none;
}
.image-compare.is-zoomed .compare-divider {
  pointer-events: auto;
  cursor: ew-resize;
}
.image-compare:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}
.compare-label {
  position: absolute;
  top: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  background: #111c;
  color: #fff;
  font-size: 12px;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.compare-label--original {
  left: 14px;
}
.compare-label--compressed {
  right: 56px;
}
.compare-divider {
  position: absolute;
  z-index: 2;
  inset: 0 auto 0 var(--compare-position);
  width: 2px;
  background: #fff;
  transform: translateX(-50%);
  pointer-events: none;
  box-shadow: 0 0 4px #000;
}
.compare-divider::before {
  content: "";
  position: absolute;
  inset: 0 -21px;
}
.compare-divider span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #19191de6;
  color: #fff;
  font-size: 24px;
  pointer-events: auto;
}
.image-compare .compare-position {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: ew-resize;
  touch-action: none;
}
.image-compare:has(.compare-position:focus-visible) {
  outline: 3px solid #c5adf0;
  outline-offset: -3px;
}
.editor-close {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #111c;
  color: #fff;
  font-size: 20px;
  line-height: 1;
}
.editor-close:hover {
  background: #000;
}
.editor-bar {
  position: absolute;
  z-index: 3;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #19191d;
  box-shadow: 0 6px 24px #0008;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.editor-zoom {
  left: 50%;
  transform: translateX(-50%);
}
.editor-zoom button {
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text);
  font-size: 16px;
}
.editor-zoom button:hover:not(:disabled) {
  background: #313136;
}
.editor-zoom button:disabled {
  cursor: default;
  opacity: 0.4;
}
.editor-zoom button[aria-pressed="true"] {
  background: #c7b3df33;
  color: var(--accent);
}
.editor-zoom output {
  display: inline-block;
  min-width: 46px;
  font-size: 13px;
}
.editor-panel {
  z-index: 2;
  right: 16px;
  width: 270px;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 12px;
}
.editor-color-warning {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 64px;
  z-index: 2;
  margin: 0;
  padding: 8px 12px;
  max-width: 760px;
  font-size: 12px;
  color: var(--text);
  background: #18191be6;
  border-radius: 8px;
}
.editor-panel select {
  padding: 7px 8px;
}
.editor-panel label {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}
.editor-panel label[hidden],
.editor-panel [hidden] {
  display: none;
}
.editor-panel input[type="range"] {
  margin: 4px 0 0;
  padding: 0;
  border: 0;
  background: none;
  accent-color: var(--accent);
}
.compression-progress {
  color: var(--muted);
  font-size: 12px;
}
.compression-progress progress {
  display: block;
  width: 100%;
  height: 6px;
  margin-bottom: 4px;
  accent-color: var(--accent);
}
.editor-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
}
.editor-result .text-button {
  padding: 0;
}
.editor-result .button {
  margin-left: auto;
  padding: 8px 14px;
  white-space: nowrap;
}
.editor-result .button:disabled {
  cursor: default;
}
@media (max-width: 640px) {
  .editor-zoom {
    top: 10px;
    bottom: auto;
  }
  .compare-label {
    top: 58px;
  }
  .compare-label--compressed {
    right: 14px;
  }
  .editor-panel {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    gap: 6px;
  }
  /* Outranks the generic 44px touch height for text inputs. */
  .editor-bar.editor-panel input[type="range"]:not([hidden]) {
    min-height: 28px;
  }
  .editor-panel select {
    min-height: 40px;
  }
}
.form-status {
  color: var(--muted);
}
dialog#viewer {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  border: 0;
  padding: 0;
  background: #111214;
  color: #ededee;
  margin: 0;
  inset: 0;
  overflow: hidden;
}
dialog#viewer[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  /* The fixed-size image frame must not widen the dialog. */
  grid-template-columns: minmax(0, 1fr);
}
dialog::backdrop {
  background: #111;
}
.viewer-bar {
  min-height: 64px;
  padding: max(10px, env(safe-area-inset-top))
    max(24px, env(safe-area-inset-right)) 10px
    max(24px, env(safe-area-inset-left));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid #333;
}
.viewer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.viewer-bar button,
.viewer-stage > button {
  background: #25262b;
  border: 1px solid #41424a;
  color: white;
  border-radius: 6px;
  padding: 9px 14px;
  min-width: 44px;
  min-height: 44px;
}
.viewer-actions a {
  font-size: 13px;
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
}
#viewer-author {
  min-width: 0;
  overflow-wrap: anywhere;
}
.viewer-stage {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
}
.viewer-stage > button {
  font-size: 30px;
  padding: 12px;
  z-index: 1;
}
#viewer-canvas {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  cursor: grab;
}
.viewer-status {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 24px);
  margin: 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: #151515e6;
  color: #ddd;
  font-size: 13px;
  text-align: center;
  pointer-events: none;
}
#viewer-canvas.is-zoomed {
  cursor: move;
}
/* Sized to the fitted art; renditions are layers inside it. */
#viewer-frame {
  position: relative;
  flex: none;
  will-change: transform;
}
#viewer-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}
#viewer-frame img.is-pending {
  opacity: 0;
}
#viewer-frame img.is-entering {
  animation: viewer-layer-in 150ms ease-out;
}
@keyframes viewer-layer-in {
  from {
    opacity: 0;
  }
}
.viewer-zoom {
  bottom: 27px;
}
.viewer-zoom output {
  min-width: 52px;
}
.viewer-hint {
  font-size: 12px;
  color: #aaa;
  text-align: center;
  margin: 10px;
  padding-bottom: env(safe-area-inset-bottom);
}
body:has(dialog[open]) {
  overflow: hidden;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1700px) {
  .shell {
    padding: 0 max(20px, env(safe-area-inset-right)) 0
      max(20px, env(safe-area-inset-left));
  }
}
@media (max-width: 1000px) {
  .shell {
    padding: 0 max(24px, env(safe-area-inset-right)) 0
      max(24px, env(safe-area-inset-left));
  }
  .gallery {
    columns: 2;
  }
  .eyebrow {
    font-size: 11px;
  }
  .gallery-heading > .eyebrow {
    display: none;
  }
  .admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .single-grid {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  .shell {
    padding: 0 max(16px, env(safe-area-inset-right)) 0
      max(16px, env(safe-area-inset-left));
  }
  .topbar {
    min-height: 76px;
    height: auto;
    padding-top: env(safe-area-inset-top);
    gap: 12px;
    justify-content: space-between;
  }
  .brand {
    font-size: 24px;
    gap: 9px;
    min-height: 44px;
  }
  .spark {
    font-size: 25px;
  }
  .twitch {
    font-size: 14px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 24px;
    min-height: 44px;
    gap: 7px;
    flex-shrink: 0;
    align-items: center;
  }
  .twitch span:first-child {
    font-size: 18px;
  }
  .twitch-label {
    display: none;
  }
  .twitch-mobile-label {
    display: inline;
  }
  .gallery-heading {
    margin: 30px 0 26px;
  }
  .gallery-heading > div {
    padding-left: 17px;
    border-width: 4px;
  }
  .gallery-heading h1 {
    font-size: 32px;
    letter-spacing: -1px;
  }
  .gallery-heading p {
    font-size: 16px;
  }
  .gallery {
    columns: 1;
    column-gap: 0;
  }
  .art-card {
    border-radius: 12px;
    margin-bottom: 20px;
  }
  .art-caption {
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.65;
  }
  .art-caption .tiny {
    display: none;
  }
  .footer {
    font-size: 12px;
    margin-top: 32px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
  .footer a,
  .back,
  .admin-nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  button,
  .button {
    min-height: 44px;
  }
  input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
  textarea,
  select {
    min-height: 44px;
    font-size: 16px;
    max-width: 100%;
  }
  .panel,
  .single-grid aside {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .admin-nav {
    gap: 4px 16px;
    font-size: 14px;
    flex-wrap: wrap;
    padding: 12px 0;
  }
  .admin-nav form {
    margin: 0;
  }
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .stats,
  .editor-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .editor-preview {
    position: static;
  }
  .panel {
    padding: 20px;
  }
  .admin-card {
    padding: 0;
  }
  .login {
    margin: 35px auto;
    padding: 28px;
  }
  .login h1 {
    font-size: 29px;
  }
  .single-grid {
    gap: 24px;
  }
  .single-grid aside {
    padding-top: 0;
  }
  .single-grid h1 {
    font-size: 28px;
  }
  .single-image img {
    max-height: 70dvh;
    border-radius: 10px;
  }
  .narrow {
    margin-top: 30px;
  }
  .empty {
    padding: 55px 15px;
  }
}
@media (max-width: 640px), (max-height: 500px) and (pointer: coarse) {
  .viewer-bar {
    padding: max(8px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right)) 8px
      max(12px, env(safe-area-inset-left));
    min-height: 60px;
    gap: 12px;
    font-size: 14px;
  }
  .viewer-stage {
    position: relative;
    padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left);
    gap: 0;
  }
  .viewer-stage > button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px;
    background: #25262bcc;
    font-size: 26px;
  }
  #viewer-prev {
    left: max(6px, env(safe-area-inset-left));
  }
  #viewer-next {
    right: max(6px, env(safe-area-inset-right));
  }
  .viewer-zoom {
    top: auto;
    bottom: 10px;
  }
  .viewer-zoom button {
    min-width: 44px;
    height: 44px;
  }
  .viewer-hint {
    font-size: 12px;
    line-height: 1.4;
    margin: 0;
    padding: 4px 12px calc(8px + env(safe-area-inset-bottom));
  }
  .viewer-desktop-hint {
    display: none;
  }
  .viewer-touch-hint {
    display: inline;
  }
  .viewer-status {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
