.crop-dialog {
  box-sizing: border-box;
  width: min(1180px, calc(100vw - 24px));
  max-width: none;
  height: min(820px, calc(100vh - 20px));
  height: min(820px, calc(100svh - 20px));
  max-height: none;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  overflow: hidden;
  --crop-head-h: 44px;
  --crop-actions-h: 52px;
  --crop-side-w: 312px;
  --crop-stage-bg: #0A0A0C;
  --crop-scrim: rgba(10, 10, 14, 0.62);
  --crop-stroke: rgba(255, 255, 255, 0.95);
  --crop-grid-line: rgba(255, 255, 255, 0.30);
}
.crop-dialog[open] {
  display: block;
}
.crop-dialog::backdrop {
  background: var(--overlay);
}
.crop-form {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) var(--crop-side-w);
  grid-template-rows: var(--crop-head-h) minmax(0, 1fr) var(--crop-actions-h);
}
.crop-head {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 0 8px 0 16px;
  border-bottom: 1px solid var(--hairline);
}
.crop-head h2 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 600;
}
.crop-close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 20px;
  line-height: 1;
}
.crop-close:hover {
  background: var(--surface-raised);
  color: var(--text);
}
.crop-stage {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  padding: 16px;
  background: var(--crop-stage-bg);
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: default;
}
.crop-frame {
  position: relative;
  overflow: visible;
  flex: 0 0 auto;
  width: 100%;
  height: 100%;
  aspect-ratio: var(--crop-ar, 3 / 2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.crop-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
  transition: filter var(--dur-base) var(--ease-out);
}
.crop-stage[data-loading] .crop-image {
  filter: blur(2px);
}
.crop-box {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border: 1px solid var(--crop-stroke);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.45), 0 0 0 9999px var(--crop-scrim);
  cursor: grab;
  touch-action: none;
}
.crop-box[data-dragging] {
  cursor: grabbing;
}
.crop-box[data-pristine] {
  border-style: dashed;
}
.crop-box[data-pristine] .crop-grid {
  display: none;
}
.crop-box:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 2px;
}
.crop-grid {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
  background-image:
    linear-gradient(
      to right,
      var(--crop-grid-line) 1px,
      transparent 1px),
    linear-gradient(
      to bottom,
      var(--crop-grid-line) 1px,
      transparent 1px);
  background-size: 33.3333% 100%, 100% 33.3333%;
  background-position: 0 0;
}
.crop-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  padding: 0;
  margin: 0;
  border: 1px solid #000;
  border-radius: 3px;
  background: #FFFFFF;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
  touch-action: none;
}
.crop-handle::after {
  content: "";
  position: absolute;
  top: -8px;
  right: -8px;
  bottom: -8px;
  left: -8px;
}
@media (pointer: coarse) {
  .crop-handle::after {
    top: -10px;
    right: -10px;
    bottom: -10px;
    left: -10px;
  }
}
.crop-handle:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 1px;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.55);
}
.crop-handle[data-crop-handle=nw] {
  left: 0;
  top: 0;
  cursor: nwse-resize;
}
.crop-handle[data-crop-handle=n] {
  left: 50%;
  top: 0;
  cursor: ns-resize;
}
.crop-handle[data-crop-handle=ne] {
  left: 100%;
  top: 0;
  cursor: nesw-resize;
}
.crop-handle[data-crop-handle=e] {
  left: 100%;
  top: 50%;
  cursor: ew-resize;
}
.crop-handle[data-crop-handle=se] {
  left: 100%;
  top: 100%;
  cursor: nwse-resize;
}
.crop-handle[data-crop-handle=s] {
  left: 50%;
  top: 100%;
  cursor: ns-resize;
}
.crop-handle[data-crop-handle=sw] {
  left: 0;
  top: 100%;
  cursor: nesw-resize;
}
.crop-handle[data-crop-handle=w] {
  left: 0;
  top: 50%;
  cursor: ew-resize;
}
.crop-box[data-crop-tight=corners] .crop-handle[data-crop-handle=n],
.crop-box[data-crop-tight=corners] .crop-handle[data-crop-handle=s],
.crop-box[data-crop-tight=corners] .crop-handle[data-crop-handle=e],
.crop-box[data-crop-tight=corners] .crop-handle[data-crop-handle=w] {
  display: none;
}
.crop-loading {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  background: rgba(10, 10, 14, 0.55);
  color: rgba(255, 255, 255, 0.90);
  font-size: 12px;
  text-align: center;
}
.crop-loading[hidden] {
  display: none;
}
.crop-loading p {
  margin: 0;
  color: inherit;
  font-variant-numeric: tabular-nums;
}
.crop-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: crop-spin 900ms linear infinite;
}
@keyframes crop-spin {
  to {
    transform: rotate(360deg);
  }
}
.crop-failed {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 16px;
  background: rgba(10, 10, 14, 0.88);
  color: #FFFFFF;
  text-align: center;
  font-size: 13px;
}
.crop-failed[hidden] {
  display: none;
}
.crop-failed p {
  margin: 0;
  color: inherit;
}
.crop-failed .button {
  min-height: 32px;
  padding: 6px 14px;
  border-color: rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #FFFFFF;
  font-size: 12.5px;
}
.crop-controls {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  min-height: 0;
  padding: 14px 14px 12px;
  border-left: 1px solid var(--hairline);
  overflow-x: hidden;
  overflow-y: auto;
}
.crop-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.crop-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.crop-reset {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: underline;
}
.crop-reset:hover {
  color: var(--text);
}
.crop-ratios {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 6px;
}
.crop-ratios button {
  height: 30px;
  padding: 0 4px;
  border: 1px solid var(--control-border);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 11.5px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.crop-ratios button:hover {
  background: var(--surface-raised);
}
.crop-ratios button[aria-checked=true] {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--on-primary);
}
.crop-ratios button:focus-visible,
.crop-modes button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.crop-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 6px;
}
.crop-modes button {
  height: 30px;
  padding: 0 4px;
  border: 1px solid var(--control-border);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 11.5px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.crop-modes button:hover {
  background: var(--surface-raised);
}
.crop-modes button[aria-checked=true] {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--on-primary);
}
.crop-size-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 11px;
}
.crop-size-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 0;
  min-width: 0;
}
.crop-size-row input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--control-border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.crop-size-row input[readonly] {
  background: var(--surface-raised);
  color: var(--text-secondary);
}
.crop-readout {
  padding: 9px 11px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--surface-raised);
  color: var(--text-muted);
  font-size: 11px;
  line-height: 17px;
  font-variant-numeric: tabular-nums;
}
.crop-readout p {
  margin: 0;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.crop-readout [data-crop-src] {
  white-space: normal;
  overflow: visible;
}
.crop-readout [data-crop-sel] {
  color: var(--text-secondary);
  font-size: 12px;
}
.crop-readout [data-crop-out] {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
.crop-readout [data-crop-note]:empty {
  display: none;
}
.crop-readout [data-crop-note][data-state=warn] {
  margin-top: 2px;
  padding: 0 6px;
  border-left: 2px solid #F0B429;
  border-radius: 4px;
  background: rgba(250, 204, 21, 0.18);
  color: var(--text);
  white-space: normal;
}
.crop-ratios button[aria-disabled=true],
.crop-modes button[aria-disabled=true],
.crop-sizes[aria-disabled=true] {
  opacity: 0.5;
  pointer-events: none;
}
.crop-sizes {
  width: 100%;
  height: 32px;
  margin-top: 6px;
  padding: 0 8px;
  border: 1px solid var(--control-border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px;
}
.crop-block-sizes {
  margin-bottom: auto;
}
.crop-actions {
  grid-column: 1 / -1;
  grid-row: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0 12px 0 16px;
  border-top: 1px solid var(--hairline);
}
.crop-status {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.crop-status[data-state=error] {
  color: var(--error);
}
.crop-status[data-state=success] {
  color: var(--success);
}
.crop-status[data-state=warn] {
  color: #B45309;
}
.crop-actions-btns {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
}
.crop-actions-btns .button {
  min-height: 32px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
}
.crop-actions-btns .button[aria-disabled=true] {
  opacity: 0.55;
  pointer-events: none;
  cursor: not-allowed;
}
.crop-actions-btns .button[aria-busy=true] {
  cursor: progress;
}
@media (max-width: 1023px) {
  .crop-dialog {
    width: min(1180px, calc(100vw - 20px));
    height: min(760px, calc(100vh - 16px));
    height: min(760px, calc(100svh - 16px));
    --crop-side-w: 272px;
  }
  .crop-ratios {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .crop-controls {
    gap: 12px;
    padding: 12px 14px;
  }
}
@media (max-width: 639px) {
  .crop-dialog {
    width: calc(100vw - 16px);
    height: min(820px, calc(100vh - 16px));
    height: min(820px, calc(100svh - 16px));
  }
}
@media (max-width: 639px), (max-width: 1023px) and (orientation: portrait) {
  .crop-form {
    grid-template-columns: 100%;
    grid-template-rows: var(--crop-head-h) minmax(120px, 1fr) minmax(0, auto) var(--crop-actions-h);
  }
  .crop-stage {
    grid-column: 1;
    grid-row: 2;
  }
  .crop-controls {
    grid-column: 1;
    grid-row: 3;
    order: 3;
    gap: 8px;
    padding: 10px 14px;
    border-left: 0;
    border-top: 1px solid var(--hairline);
  }
  .crop-readout {
    padding: 6px 10px;
    line-height: 15px;
  }
  .crop-ratios {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    mask-image:
      linear-gradient(
        to right,
        transparent 0,
        #000 16px,
        #000 calc(100% - 16px),
        transparent 100%);
    -webkit-mask-image:
      linear-gradient(
        to right,
        transparent 0,
        #000 16px,
        #000 calc(100% - 16px),
        transparent 100%);
  }
  .crop-ratios::-webkit-scrollbar {
    display: none;
  }
  .crop-ratios button {
    flex: 0 0 auto;
    min-width: 62px;
    height: 34px;
    scroll-snap-align: start;
  }
  .crop-handle {
    width: 14px;
    height: 14px;
  }
  .crop-handle::after {
    top: -9px;
    right: -9px;
    bottom: -9px;
    left: -9px;
  }
  .crop-actions {
    grid-row: 4;
    padding: 0 10px 0 12px;
  }
  .crop-status {
    font-size: 11.5px;
  }
}
@media (max-height: 540px) {
  .crop-controls {
    gap: 8px;
    padding: 10px 12px;
  }
  .crop-block-sizes {
    display: none;
  }
  .crop-readout {
    padding: 6px 10px;
    line-height: 15px;
  }
  .crop-readout [data-crop-src] {
    white-space: nowrap;
    overflow: hidden;
  }
  .crop-ratios {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .crop-ratios::-webkit-scrollbar {
    display: none;
  }
  .crop-ratios button {
    flex: 0 0 auto;
    min-width: 58px;
    height: 26px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .crop-spinner {
    animation-duration: 3s;
  }
  .crop-image {
    transition: none;
  }
}
.download-panel {
  padding: 16px;
  border-radius: 8px;
  box-shadow: none;
}
.wallpaper-metadata {
  margin: 0 0 16px;
}
.metadata-heading {
  font-size: 15px;
  margin: 0 0 12px;
}
.metadata-facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 10px;
  margin: 0;
  font-size: 13px;
}
.metadata-facts dt {
  color: var(--text-muted);
}
.metadata-facts dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.metadata-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
}
.download-panel-side {
  padding: 12px;
}
.download-panel-side .wallpaper-metadata {
  margin: 0 0 10px;
}
.download-panel-side .metadata-heading {
  font-size: 13.5px;
  margin: 0 0 8px;
}
[data-filter-toolbar] {
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 12px 12px;
  position: sticky;
  top: var(--header-h,50px);
  z-index: 30;
  align-items: center;
  min-height: 55px;
  background:
    linear-gradient(
      180deg,
      rgb(41, 44, 47),
      rgb(25, 28, 31));
  border-bottom: 1px solid #000;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
[data-filter-toolbar] [hidden] {
  display: none !important;
}
[data-filter-toolbar] select,
[data-filter-toolbar] input[type=text],
[data-filter-toolbar] summary {
  background: #25292d;
  color: #e6ebef;
  border: 1px solid #0d0f11;
  border-top-color: #3b4045;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .05);
  font: inherit;
  font-size: 12px;
  height: 28px;
  min-height: 28px;
  box-sizing: border-box;
  padding: 0 8px;
  border-radius: 3px;
  cursor: pointer;
  min-width: 0;
  max-width: 100%;
}
[data-filter-toolbar] summary {
  list-style: none;
  display: flex;
  position: relative;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 24px;
}
[data-filter-toolbar] summary::-webkit-details-marker {
  display: none;
}
[data-filter-toolbar] details {
  position: relative;
}
[data-filter-toolbar] .chevron {
  font-size: 10px;
  color: #8a949c;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  flex: none;
  pointer-events: none;
  background: inherit;
}
[data-filter-toolbar] [data-filter-dropdown]:not([open]) .filter-menu {
  display: none;
}
[data-filter-toolbar] details[open] .filter-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
  max-width: calc(100vw - 16px);
  max-height: 60vh;
  overflow: auto;
  background:
    linear-gradient(
      180deg,
      #26292c,
      #1e2124);
  border: 1px solid #000;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .5);
  padding: 10px;
  border-radius: 3px;
}
[data-filter-toolbar] .filter-menu label {
  display: flex;
  gap: 6px;
  align-items: center;
  color: #c9d2d8;
  font-size: 13px;
}
[data-filter-toolbar] .filter-menu input[type=text],
[data-filter-toolbar] .filter-menu select {
  width: 100%;
  height: 30px;
  min-height: 30px;
}
[data-filter-toolbar] button,
[data-filter-toolbar] a {
  font: inherit;
  font-size: 12px;
  height: 28px;
  min-height: 28px;
  box-sizing: border-box;
  padding: 0 8px;
  border: 1px solid #0d0f11;
  border-top-color: #3b4045;
  border-radius: 3px;
  text-decoration: none;
  color: #e6ebef;
  background: #2b3035;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
[data-filter-toolbar] button:hover:not(:disabled),
[data-filter-toolbar] a:hover {
  background: #343a40;
  color: #fff;
}
[data-filter-toolbar] .filter-apply {
  background:
    linear-gradient(
      180deg,
      #3a5a10,
      #2c470c);
  border-color: #1a2a06;
  color: #d8ef9a;
}
[data-filter-toolbar] [disabled],
[data-filter-toolbar] [data-unavailable] {
  opacity: .45;
  cursor: not-allowed;
}
[data-filter-toolbar] button:focus-visible,
[data-filter-toolbar] select:focus-visible,
[data-filter-toolbar] a:focus-visible,
[data-filter-toolbar] summary:focus-visible,
[data-filter-toolbar] input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
[data-filter-toolbar] .filter-note {
  color: #98a3ab;
  font-size: 12px;
  margin: 0;
}
[data-filter-toolbar] .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
[data-filter-toolbar] .filter-total {
  color: #c6ccd2;
  font-size: 12px;
  margin-left: auto;
  order: 99;
}
[data-filter-toolbar] [data-filter-status]:empty {
  display: none;
}
[data-filter-toolbar] [data-filter-status] {
  color: #c6ccd2;
  font-size: 12px;
  flex-wrap: wrap;
}
[data-filter-toolbar] [data-filter-group-buttons]:not([hidden]) {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0;
}
[data-filter-toolbar] label.filter-check {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 8px;
  font-size: 12px;
  color: #aab4bb;
  background: #2b3035;
  border: 1px solid #0d0f11;
  border-top-color: #3b4045;
  cursor: pointer;
  user-select: none;
}
[data-filter-toolbar] label.filter-check:first-child {
  border-radius: 3px 0 0 3px;
}
[data-filter-toolbar] label.filter-check:last-child {
  border-radius: 0 3px 3px 0;
}
[data-filter-toolbar] label.filter-check + label.filter-check {
  border-left: 0;
}
[data-filter-toolbar] label.filter-check input[type=checkbox] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: .01;
  clip-path: inset(50%);
  pointer-events: none;
}
[data-filter-toolbar] label.filter-check:has(input:checked) {
  background: var(--purity-sfw);
  color: #14181c;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35);
  font-weight: 700;
}
[data-filter-toolbar] label.filter-check:has(input:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
[data-filter-toolbar] .filter-purity-group button {
  transition:
    background 120ms ease,
    color 120ms ease,
    border-color 120ms ease;
}
[data-filter-toolbar] button[data-filter-purity=sfw] {
  color: var(--purity-sfw);
  border-color: color-mix(in srgb, var(--purity-sfw) 55%, #0d0f11);
}
[data-filter-toolbar] button[data-filter-purity=sketchy] {
  color: var(--purity-sketchy);
  border-color: color-mix(in srgb, var(--purity-sketchy) 55%, #0d0f11);
}
[data-filter-toolbar] button[data-filter-purity=nsfw] {
  color: var(--purity-nsfw);
  border-color: color-mix(in srgb, var(--purity-nsfw) 55%, #0d0f11);
}
[data-filter-toolbar] .filter-purity-group button:hover:not(:disabled):not([aria-pressed=true]) {
  background: #343a40;
  color: var(--purity-hover,#fff);
}
[data-filter-toolbar] .filter-purity-group button[data-filter-purity=sfw]:hover:not(:disabled):not([aria-pressed=true]) {
  color: var(--purity-sfw);
}
[data-filter-toolbar] .filter-purity-group button[data-filter-purity=sketchy]:hover:not(:disabled):not([aria-pressed=true]) {
  color: var(--purity-sketchy);
}
[data-filter-toolbar] .filter-purity-group button[data-filter-purity=nsfw]:hover:not(:disabled):not([aria-pressed=true]) {
  color: var(--purity-nsfw);
}
[data-filter-toolbar] button[data-filter-purity][aria-pressed=true] {
  color: #14181c;
  font-weight: 700;
}
[data-filter-toolbar] button[data-filter-purity=sfw][aria-pressed=true] {
  background: var(--purity-sfw);
  border-color: var(--purity-sfw);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35);
}
[data-filter-toolbar] button[data-filter-purity=sketchy][aria-pressed=true] {
  background: var(--purity-sketchy);
  border-color: var(--purity-sketchy);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35);
}
[data-filter-toolbar] button[data-filter-purity=nsfw][aria-pressed=true] {
  background: var(--purity-nsfw);
  border-color: var(--purity-nsfw);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35);
}
[data-filter-toolbar] button[data-filter-purity][aria-pressed=true]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
.nsfw-dialog {
  width: min(92vw, 380px);
  border: 1px solid #0d0f11;
  border-top-color: #3b4045;
  border-radius: 6px;
  padding: 18px;
  background:
    linear-gradient(
      180deg,
      #26292c,
      #1e2124);
  color: #e6ebef;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .55);
}
.nsfw-dialog::backdrop {
  background: rgba(8, 10, 12, .62);
}
.nsfw-dialog h2 {
  margin: 0 0 8px;
  font-size: 15px;
}
.nsfw-dialog-desc {
  margin: 0 0 12px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #98a3ab;
}
.nsfw-dialog-attest {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  color: #c9d2d8;
  cursor: pointer;
}
.nsfw-dialog-attest input {
  width: 15px;
  height: 15px;
  margin: 2px 0 0;
  accent-color: var(--purity-sfw);
  flex: none;
  cursor: pointer;
}
.nsfw-dialog-error {
  margin: 10px 0 0;
  font-size: 12px;
  color: #e08a80;
}
.nsfw-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}
.nsfw-dialog-actions button {
  height: 30px;
  min-height: 30px;
  padding: 0 12px;
  font: inherit;
  font-size: 12.5px;
  border-radius: 3px;
  border: 1px solid #0d0f11;
  border-top-color: #3b4045;
  background: #2b3035;
  color: #e6ebef;
  cursor: pointer;
}
.nsfw-dialog-actions button:hover:not(:disabled) {
  background: #343a40;
  color: #fff;
}
.nsfw-dialog-actions .nsfw-dialog-confirm {
  background:
    linear-gradient(
      180deg,
      #3a5a10,
      #2c470c);
  border-color: #1a2a06;
  color: #d8ef9a;
}
.nsfw-dialog-actions .nsfw-dialog-confirm:hover:not(:disabled) {
  background:
    linear-gradient(
      180deg,
      #446813,
      #33520e);
  color: #e2f4b0;
}
.nsfw-dialog-actions button:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.nsfw-dialog-actions button:focus-visible,
.nsfw-dialog-attest input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
[data-filter-toolbar] [data-filter-dropdown=color],
[data-filter-toolbar] [data-filter-dropdown=period] {
  display: none !important;
}
[data-filter-toolbar] .filter-purity-group {
  display: flex;
  gap: 4px;
}
[data-filter-toolbar] .filter-purity-group button[disabled] {
  opacity: .45;
  cursor: not-allowed;
}
[data-filter-toolbar] .filter-color-chips {
  display: grid;
  grid-template-columns: repeat(6, 20px);
  gap: 4px;
}
[data-filter-toolbar] .filter-color-chip {
  width: 20px;
  height: 20px;
  border: 1px solid #0d0f11;
  border-radius: 2px;
  padding: 0;
  cursor: not-allowed;
}
[data-filter-toolbar] #ft-order {
  width: 32px;
  min-width: 32px;
  padding: 0 4px;
  text-align: center;
}
[data-filter-toolbar] #ft-perpage {
  width: 48px;
  min-width: 48px;
  padding: 0 4px;
}
html[data-theme=light] [data-filter-toolbar] {
  background:
    linear-gradient(
      180deg,
      #e7e9eb,
      #d4d8dc);
  border-bottom-color: #9aa4aa;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85);
}
html[data-theme=light] [data-filter-toolbar] select,
html[data-theme=light] [data-filter-toolbar] input[type=text],
html[data-theme=light] [data-filter-toolbar] summary {
  background: #f5f6f7;
  color: #24292e;
  border-color: #9da4aa;
  border-top-color: #ffffff;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .06);
}
html[data-theme=light] [data-filter-toolbar] details[open] .filter-menu {
  background: #f3f4f6;
  border-color: #9da4aa;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}
html[data-theme=light] [data-filter-toolbar] .filter-menu label {
  color: #24292e;
}
html[data-theme=light] [data-filter-toolbar] button,
html[data-theme=light] [data-filter-toolbar] a {
  background: #f5f6f7;
  color: #24292e;
  border-color: #9da4aa;
  border-top-color: #fff;
}
html[data-theme=light] [data-filter-toolbar] .filter-apply {
  background: #e4efd2;
  border-color: #9da4aa;
  color: #45670b;
}
html[data-theme=light] [data-filter-toolbar] label.filter-check {
  background: #f5f6f7;
  color: #45515a;
  border-color: #9da4aa;
  border-top-color: #fff;
}
html[data-theme=light] [data-filter-toolbar] label.filter-check:has(input:checked) {
  background: var(--purity-sfw);
  color: #14181c;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .12);
}
html[data-theme=light] [data-filter-toolbar] button[data-filter-purity=sfw] {
  border-color: color-mix(in srgb, var(--purity-sfw) 55%, #9da4aa);
}
html[data-theme=light] [data-filter-toolbar] button[data-filter-purity=sketchy] {
  border-color: color-mix(in srgb, var(--purity-sketchy) 55%, #9da4aa);
}
html[data-theme=light] [data-filter-toolbar] button[data-filter-purity=nsfw] {
  border-color: color-mix(in srgb, var(--purity-nsfw) 55%, #9da4aa);
}
html[data-theme=light] .nsfw-dialog {
  background: #fff;
  border-color: #9da4aa;
  color: #24292e;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .25);
}
html[data-theme=light] .nsfw-dialog-desc {
  color: #5a646c;
}
html[data-theme=light] .nsfw-dialog-attest {
  color: #24292e;
}
html[data-theme=light] .nsfw-dialog-error {
  color: #a33d31;
}
html[data-theme=light] .nsfw-dialog-actions button {
  background: #f5f6f7;
  color: #24292e;
  border-color: #9da4aa;
  border-top-color: #fff;
}
html[data-theme=light] .nsfw-dialog-actions button:hover:not(:disabled) {
  background: #eceef0;
  color: #24292e;
}
html[data-theme=light] .nsfw-dialog-actions .nsfw-dialog-confirm {
  background: #dcebbf;
  border-color: #9da4aa;
  color: #38530a;
}
html[data-theme=light] [data-filter-toolbar] .filter-total,
html[data-theme=light] [data-filter-toolbar] [data-filter-status] {
  color: #3c454d;
}
html[data-theme=light] [data-filter-toolbar] .filter-note {
  color: #45515a;
}
html[data-theme=light] [data-filter-toolbar] button:focus-visible,
html[data-theme=light] [data-filter-toolbar] select:focus-visible,
html[data-theme=light] [data-filter-toolbar] a:focus-visible,
html[data-theme=light] [data-filter-toolbar] summary:focus-visible,
html[data-theme=light] [data-filter-toolbar] input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
html[data-theme=light] [data-filter-toolbar] label.filter-check:has(input:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
@media (max-width: 700px) {
  [data-filter-toolbar] .filter-total {
    display: none;
  }
  [data-filter-toolbar] details {
    position: static;
  }
  [data-filter-toolbar] details[open] .filter-menu {
    position: absolute;
    left: 8px;
    right: 8px;
    top: 100%;
    width: auto;
    min-width: 0;
    max-width: none;
  }
  [data-filter-toolbar] details[open] .filter-menu * {
    min-width: 0;
    max-width: 100%;
  }
  [data-filter-toolbar] select,
  [data-filter-toolbar] input[type=text],
  [data-filter-toolbar] summary {
    height: 32px;
    min-height: 32px;
    font-size: 12px;
  }
  [data-filter-toolbar] button,
  [data-filter-toolbar] a {
    height: 32px;
    min-height: 32px;
  }
  [data-filter-toolbar] label.filter-check {
    height: 32px;
  }
  [data-filter-toolbar] .filter-group-buttons {
    order: 1;
    flex: 1 1 185px;
    max-width: 200px;
  }
  [data-filter-toolbar] [data-filter-dropdown=resolution] {
    order: 2;
    flex: 0 1 auto;
    max-width: 80px;
  }
  [data-filter-toolbar] [data-filter-dropdown=ratio] {
    order: 3;
    flex: 0 1 auto;
    max-width: 110px;
  }
  [data-filter-toolbar] [data-filter-dropdown=tags] {
    order: 4;
    flex: 1 1 52px;
    min-width: 0;
    max-width: 80px;
  }
  [data-filter-toolbar] [data-filter-dropdown=sort] {
    order: 5;
    flex: 1 1 60px;
    min-width: 0;
    max-width: 110px;
  }
  [data-filter-toolbar] #ft-order,
  [data-filter-toolbar] [data-filter-order-toggle] {
    order: 6;
    flex: 0 0 auto;
    width: 32px;
    min-width: 32px;
  }
  [data-filter-toolbar] #ft-perpage {
    order: 7;
    flex: 0 0 auto;
    width: 46px;
    min-width: 46px;
  }
  [data-filter-toolbar] .filter-apply {
    order: 8;
    flex: 0 0 auto;
    padding: 0 10px;
  }
  [data-filter-toolbar] [data-filter-clear] {
    order: 9;
    flex: 0 0 auto;
    padding: 0 8px;
  }
  [data-filter-toolbar] [data-filter-status] {
    order: 10;
    flex-basis: 100%;
  }
  [data-filter-toolbar] details[data-filter-dropdown=resolution] summary {
    white-space: nowrap;
  }
}
.page-size-control {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
}
.page-size-control select {
  margin-left: .5rem;
  padding: .4rem;
  border: 1px solid var(--border);
  border-radius: .4rem;
  background: var(--surface);
  color: inherit;
}
.pagination .ellipsis {
  padding: 0 .25rem;
}
:root {
  --header-h: 50px;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  box-sizing: border-box;
  height: 50px;
  background:
    linear-gradient(
      180deg,
      rgb(41, 44, 47) 0%,
      rgb(25, 28, 31) 100%);
  border-bottom: 1px solid #000;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.header-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  height: 49px;
  min-height: 49px;
  max-width: none;
  padding: 0 12px;
  gap: 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-right: 12px;
  flex: none;
  white-space: nowrap;
  line-height: 1;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: #f2f4f6;
  text-decoration: none;
}
.brand svg {
  width: 26px;
  height: 26px;
  flex: none;
}
.brand-text {
  font-size: 20px;
  white-space: nowrap;
}
#main-nav {
  display: flex;
  flex-direction: row;
  width: auto;
  flex: none;
  height: 49px;
  margin-left: 10px;
  padding: 0;
  gap: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
#main-nav a,
#main-nav button,
#main-nav .more-summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 49px;
  min-height: 49px;
  padding: 0 8px;
  font-size: 13px;
  text-decoration: none;
  background: transparent;
  border: 0;
  border-left: 1px solid rgba(0, 0, 0, .5);
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, .05);
}
#main-nav svg {
  width: 16px;
  height: 16px;
}
#main-nav .nav-latest {
  color: #addd33;
}
#main-nav .nav-random {
  color: #ee7733;
}
#main-nav .more-summary {
  color: #58a9eb;
  list-style: none;
}
.more-summary::-webkit-details-marker {
  display: none;
}
#main-nav a:hover,
#main-nav a:focus-visible,
#main-nav button:not(:disabled):hover,
#main-nav .more-summary:hover,
#main-nav .more-summary:focus-visible,
#main-nav .header-more[open] .more-summary {
  background: rgba(255, 255, 255, .07);
  color: #fff;
}
#main-nav a[aria-current] {
  box-shadow: inset 0 -2px 0 currentColor, inset 1px 0 0 rgba(255, 255, 255, .05);
}
#main-nav .more-caret {
  width: 12px;
  height: 12px;
  transition: transform 140ms ease;
}
.header-more[open] .more-caret {
  transform: rotate(180deg);
}
.header-more {
  position: relative;
  height: 49px;
}
#main-nav .more-pop {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 340px;
  max-width: calc(100vw - 16px);
  padding: 6px;
  gap: 2px;
  background:
    linear-gradient(
      180deg,
      #26292c,
      #1e2124);
  border: 1px solid #000;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .5);
}
#main-nav .header-more:not([open]) .more-pop {
  display: none;
}
#main-nav .more-pop a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  gap: 8px;
  min-width: 0;
  min-height: 36px;
  height: auto;
  padding: 4px 8px;
  font-size: 12px;
  line-height: 16px;
  white-space: normal;
  overflow-wrap: anywhere;
  color: #f2f4f6;
  border: 0;
  border-radius: 3px;
  box-shadow: none;
}
#main-nav .more-pop a svg {
  width: 22px;
  min-width: 22px;
  height: 22px;
  flex: 0 0 22px;
  padding: 3px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, .35);
  border-radius: 3px;
}
#main-nav .more-pop a:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}
.header-image-search {
  flex: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.header-text-search-panel {
  display: contents;
}
.header-search {
  display: flex;
  align-items: center;
  gap: 4px;
}
.header-search input[type=search] {
  width: 140px;
  min-width: 0;
  height: 30px;
  padding: 2px 8px;
  font-size: 13px;
}
.icon-btn,
.text-search-toggle {
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-btn,
.menu-glyph {
  box-sizing: border-box;
  border: 1px solid #101315;
  border-radius: 3px;
  background:
    linear-gradient(
      180deg,
      #30353a,
      #20252a);
  color: #cbd0d4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.menu-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  flex: none;
  pointer-events: none;
}
.icon-btn svg,
.text-search-toggle svg,
.menu-glyph svg {
  width: 16px;
  height: 16px;
}
.menu-toggle {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
}
.icon-btn:hover,
.menu-toggle:hover .menu-glyph {
  background:
    linear-gradient(
      180deg,
      #3a4046,
      #292f35);
  border-color: #69737d;
  color: #fff;
}
.icon-btn:active,
.menu-toggle:active .menu-glyph,
.menu-toggle[aria-expanded=true] .menu-glyph {
  background:
    linear-gradient(
      180deg,
      #182129,
      #253544);
  border-color: #58a9eb;
  color: #e3f2ff;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35);
}
.menu-toggle:focus-visible {
  outline: none;
}
.menu-toggle:focus-visible .menu-glyph {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.text-search-toggle {
  display: none;
}
.header-file {
  display: none;
}
.header-image-pane {
  position: absolute;
  right: 8px;
  top: 50px;
  width: min(500px, calc(100vw - 16px));
  max-height: 70vh;
  overflow: auto;
  z-index: 70;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
}
.header-image-pane:not(:has([data-image-search-status]:not(:empty))):not(:has([data-image-search-results] > *)) {
  display: none;
}
.theme-control {
  position: relative;
  flex: none;
  height: 30px;
  width: 84px;
  box-sizing: border-box;
  margin-left: auto;
  padding: 0;
  border: 1px solid #55595e;
  border-radius: 3px;
  background: rgba(255, 255, 255, .06);
}
.theme-control::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 12px;
  border: 4px solid transparent;
  border-top-color: #c8cdd2;
  pointer-events: none;
}
.theme-control select {
  -webkit-appearance: none;
  appearance: none;
  height: 28px;
  min-height: 28px;
  width: 100%;
  font-size: 13px;
  padding: 2px 20px 2px 6px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #f2f4f6;
  color-scheme: dark;
}
.theme-control select option,
.theme-control select optgroup {
  background-color: #25282c;
  color: #f2f4f6;
}
.theme-control > label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
a:focus-visible,
button:focus-visible,
select:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}
:root:not(.js) .header-row {
  height: auto;
  min-height: 49px;
  flex-wrap: wrap;
}
:root:not(.js) #main-nav {
  display: flex;
  position: static;
  width: 100%;
  height: auto;
  flex-wrap: wrap;
}
:root:not(.js) .menu-toggle,
:root:not(.js) .text-search-toggle {
  display: none;
}
@media (min-width: 1101px) {
  .js .menu-toggle {
    display: none;
  }
}
@media (max-width: 1100px) {
  .js .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .js #main-nav:not(.is-open) {
    display: none;
  }
  #main-nav.is-open {
    display: flex;
    position: absolute;
    top: 50px;
    left: 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    z-index: 75;
    background: #202326;
    padding: 4px 8px;
    border-bottom: 1px solid #000;
  }
  #main-nav .more-pop {
    position: fixed;
    left: 8px;
    right: 8px;
    top: 50px;
    width: auto;
    max-width: none;
  }
  :root[data-theme=light] #main-nav.is-open {
    background: #e2e5e8;
    border-bottom-color: #9aa0a5;
  }
}
@media (max-width: 1100px) {
  .js .text-search-toggle {
    display: inline-flex;
  }
  .js .header-text-search-panel {
    display: none;
    position: absolute;
    left: 8px;
    right: 8px;
    top: 50px;
    z-index: 75;
    width: auto;
    padding: 6px;
    background: #22252a;
    border: 1px solid #000;
    border-radius: 3px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .5);
  }
  .js .header-text-search-panel.is-open {
    display: block;
  }
}
@media (max-width: 600px) {
  .header-search input[type=search] {
    flex: 1;
    width: auto;
    height: 32px;
  }
  .icon-btn,
  .text-search-toggle {
    width: 32px;
    height: 32px;
    min-width: 32px;
  }
  .theme-control {
    display: none;
  }
  .theme-control select {
    height: 30px;
  }
  .brand {
    gap: 6px;
  }
  .brand-text {
    font-size: 18px;
  }
  .brand svg {
    width: 22px;
    height: 22px;
  }
}
@media (max-width: 360px) {
  .header-row {
    padding: 0 4px;
    gap: 4px;
  }
  .theme-control {
    width: 68px;
  }
}
:root[data-theme=light] .site-header {
  background:
    linear-gradient(
      180deg,
      #d9dcdf,
      #c2c7cb);
  border-bottom-color: #9aa0a5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85);
  color: #17171a;
}
:root[data-theme=light] .brand {
  color: #17171a;
}
:root[data-theme=light] #main-nav a,
:root[data-theme=light] #main-nav button,
:root[data-theme=light] #main-nav .more-summary {
  border-left-color: rgba(0, 0, 0, .18);
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, .5);
  color: #2c3236;
}
:root[data-theme=light] #main-nav .nav-latest {
  color: #5a7a10;
}
:root[data-theme=light] #main-nav .nav-random {
  color: #b34700;
}
:root[data-theme=light] #main-nav .more-summary {
  color: #1d6fb8;
}
:root[data-theme=light] #main-nav a:hover,
:root[data-theme=light] #main-nav a:focus-visible,
:root[data-theme=light] #main-nav .more-summary:hover,
:root[data-theme=light] #main-nav .header-more[open] .more-summary {
  background: rgba(255, 255, 255, .55);
  color: #111;
}
:root[data-theme=light] #main-nav .more-pop {
  background: #f3f4f6;
  border-color: #9aa0a5;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .15);
}
:root[data-theme=light] #main-nav .more-pop a {
  color: #17171a;
}
:root[data-theme=light] .theme-control {
  background: #eef0f2;
  border-color: #9aa0a5;
}
:root[data-theme=light] .theme-control select {
  color: #17171a;
  color-scheme: light;
}
:root[data-theme=light] .theme-control select option,
:root[data-theme=light] .theme-control select optgroup {
  background-color: #eef0f2;
  color: #17171a;
}
:root[data-theme=light] .theme-control::after {
  border-top-color: #3a3f44;
}
:root[data-theme=light] .header-text-search-panel {
  background: #f3f4f6;
  border-color: #9aa0a5;
}
:root[data-theme=light] .icon-btn,
:root[data-theme=light] .menu-glyph {
  background:
    linear-gradient(
      180deg,
      #f2f4f6,
      #d8dde1);
  border-color: #959ea6;
  color: #343a40;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85);
}
:root[data-theme=light] .icon-btn:hover,
:root[data-theme=light] .menu-toggle:hover .menu-glyph {
  background:
    linear-gradient(
      180deg,
      #fff,
      #e8edf1);
  border-color: #667581;
  color: #1d2933;
}
:root[data-theme=light] .icon-btn:active,
:root[data-theme=light] .menu-toggle:active .menu-glyph,
:root[data-theme=light] .menu-toggle[aria-expanded=true] .menu-glyph {
  background:
    linear-gradient(
      180deg,
      #c8dceb,
      #dfebf4);
  border-color: #287cb9;
  color: #174d76;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .15);
}
.preview-canvas {
  min-width: 0;
  align-self: start;
  border-radius: 8px;
}
.preview-canvas .picture-wrap {
  max-width: 100%;
  border-radius: 8px;
  overflow: hidden;
}
.preview-canvas .picture-wrap img {
  width: 100%;
  height: auto;
  max-width: 100%;
}
.wallpaper-preview.phone .detail-picture {
  aspect-ratio: auto;
}
.wallpaper-preview.phone .detail-picture img {
  object-fit: contain;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(calc(100svh - var(--detail-chrome, 152px)), 1600px);
  margin: auto;
}
@media (min-width: 1024px) {
  .wallpaper-preview.phone .detail-picture img {
    object-fit: contain;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(calc(100svh - var(--detail-chrome, 152px)), 1600px);
    margin: auto;
  }
}
@media (min-width: 1440px) {
  .wallpaper-preview.phone .detail-picture img {
    object-fit: contain;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(calc(100svh - var(--detail-chrome, 152px)), 1600px);
    margin: auto;
  }
}
.preview-dialog img {
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 70svh;
  object-fit: contain;
}
@media (min-width: 1024px) {
  .wallpaper-preview {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
  }
  .preview-canvas,
  .wallpaper-preview.phone .preview-canvas {
    flex: 1 1 auto;
    min-height: 0;
    align-self: stretch;
    position: relative;
    width: auto;
    margin-inline: 0;
  }
  .preview-canvas .picture-wrap {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    max-width: none;
  }
  .preview-canvas picture {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
  }
  .preview-canvas .picture-wrap img,
  .wallpaper-preview.phone .preview-canvas .picture-wrap img {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    margin: auto;
    width: auto;
    height: auto;
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
  }
  .preview-controls {
    flex: 0 0 auto;
  }
}
.header-row .auth-control {
  flex: none;
  display: flex;
  align-items: center;
  margin-left: 8px;
}
.header-row .auth-control .auth-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 11px;
  box-sizing: border-box;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .01em;
  color: #cfd4d8;
  text-decoration: none;
  border: 1px solid #101315;
  border-radius: 3px;
  background:
    linear-gradient(
      180deg,
      #4a4f55 0%,
      #3b4046 55%,
      #34383d 100%);
}
.header-row .auth-control .auth-link:hover {
  color: #fff;
  text-decoration: none;
  background:
    linear-gradient(
      180deg,
      #565c63 0%,
      #454b51 55%,
      #3d4247 100%);
}
@media (min-width: 1101px) {
  .header-row .header-image-search {
    flex: 1 1 auto !important;
    max-width: 520px;
    margin: 0 auto;
  }
  .header-row .header-image-search .text-search-toggle {
    display: none !important;
  }
  .header-row .header-text-search-panel {
    display: block !important;
    position: static !important;
    width: 100% !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
}
.header-row .header-search {
  display: flex !important;
  align-items: center;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 2px;
  overflow: hidden;
  height: 31px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35);
}
.header-row .header-search input[type=search] {
  flex: 1 !important;
  height: 31px !important;
  min-height: 31px !important;
  background: transparent !important;
  border: 0 !important;
  color: #e6ebef !important;
  padding: 0 10px !important;
  font-size: 13px;
}
.header-row .header-search input[type=search]::placeholder {
  color: #9aa4ad;
  opacity: 1;
}
.header-row .header-search input[type=search]:focus {
  outline: none;
}
.header-row .header-search .icon-btn {
  border: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
}
:root[data-theme=light] .header-row .header-search {
  background: rgba(255, 255, 255, .72);
  border-color: rgba(0, 0, 0, .18);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .06);
}
:root[data-theme=light] .header-row .header-search input[type=search] {
  color: #17171a !important;
}
:root[data-theme=light] .header-row .header-search input[type=search]::placeholder {
  color: #5a646c;
}
:root[data-theme=light] .header-row .header-search .icon-btn {
  color: #46505a;
  background: transparent !important;
}
body:has(.home-hero) {
  background-color: #0a2a3d;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0'/%3E%3C/filter%3E%3Crect width='160' height='160' fill='%23000' filter='url(%23g)'/%3E%3C/svg%3E"),
    linear-gradient(
      180deg,
      rgba(3, 18, 30, .45) 0%,
      rgba(3, 18, 30, 0) 22%),
    linear-gradient(
      105deg,
      #07263d 0%,
      #08385a 10%,
      #0b4869 24%,
      #0c5274 42%,
      #0c5577 58%,
      #0b4b6b 72%,
      #0d5275 88%,
      #0f5578 100%);
  background-size:
    160px 160px,
    100% 100%,
    100% 100%;
  background-attachment:
    scroll,
    fixed,
    fixed;
  background-repeat:
    repeat,
    no-repeat,
    no-repeat;
  background-position:
    top left,
    center,
    center;
}
body:has(.home-hero) .site-header {
  display: none;
}
body:has(.home-hero) [data-filter-toolbar] {
  background: rgba(8, 30, 44, .55);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.home-hero {
  position: relative;
  padding: 22px 16px 18px;
  text-align: center;
  overflow: hidden;
  background: none;
  border-bottom: 0;
}
.home-hero .hero-band {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: var(--container-list, 1280px);
  margin: 0 auto;
  text-align: left;
}
.home-hero .hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  text-decoration: none;
}
.home-hero .hero-brand-text {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.035em;
  color: #f2f7f6;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
}
.home-hero .hero-tiles {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex: 1 1 auto;
}
.home-hero .hero-tile {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100px;
  height: 70px;
  border-radius: 3px;
  background:
    linear-gradient(
      to top,
      rgba(0, 0, 0, .5) 0,
      rgba(0, 0, 0, .1) 100%);
  color: #cfd8dc;
  font-size: 13px;
  text-decoration: none;
  transition: background-color .15s, box-shadow .15s;
}
.home-hero .hero-tile svg {
  width: 22px;
  height: 22px;
}
.home-hero .hero-tile:hover {
  background: rgba(0, 0, 0, .1);
  box-shadow: 0 0 3px rgba(0, 0, 0, .5) inset;
  text-decoration: none;
}
.home-hero .hero-tile:hover svg {
  filter: brightness(1.25);
}
.home-hero .tile-latest {
  color: #ad3;
}
.home-hero .tile-random {
  color: #e73;
}
.home-hero .tile-sizes {
  color: #b760f0;
}
.home-hero .tile-tools {
  color: #d55;
}
.home-hero .tile-desktop {
  color: #fb3;
}
.home-hero .hero-auth {
  flex: 0 0 auto;
}
.home-hero .hero-auth-link {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 3px;
  background: rgba(47, 111, 168, .92);
  color: #eef6fb;
  font-size: 13px;
  text-decoration: none;
}
.home-hero .hero-auth-link:hover {
  background: #3b82c4;
  text-decoration: none;
}
.home-hero .hero-search {
  display: flex;
  align-items: center;
  max-width: 680px;
  height: 45px;
  margin: 14px auto 0;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 2px;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, .6);
  overflow: hidden;
}
.home-hero .hero-search:focus-within {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(63, 184, 164, .55);
}
.home-hero .hero-search input[type=search] {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 16px;
  background: transparent;
  border: 0;
  color: #eaf1ef;
  font-size: 15px;
}
.home-hero .hero-search input[type=search]::placeholder {
  color: #8d9ea5;
  opacity: 1;
}
.home-hero .hero-search input[type=search]:focus {
  outline: none;
}
.home-hero .hero-search button {
  flex: none;
  width: 52px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, .10);
  color: #b9c8ce;
  cursor: pointer;
}
.home-hero .hero-search button:hover {
  background: rgba(255, 255, 255, .06);
  color: #fff;
}
.home-hero .hero-search svg {
  width: 20px;
  height: 20px;
}
.home-hero .hero-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 11px;
  max-width: 80%;
  margin: 12px auto 0;
  font-size: 12.5px;
  line-height: 1.5;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, .4);
}
.home-hero .hero-tags a {
  display: inline-block;
  padding: 0 2px;
  color: #99ff99;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 2px;
  transition: background-color .15s, color .15s;
}
.home-hero .hero-tags a::before {
  content: "#";
  opacity: .6;
}
.home-hero .hero-tags a.pop-tag-med {
  font-size: 1.35em;
  line-height: 1.35;
}
.home-hero .hero-tags a.pop-tag-lg {
  font-size: 1.7em;
  line-height: 1.25;
  font-weight: 600;
}
.home-hero .hero-tags a:nth-child(3n) {
  filter: saturate(80%);
}
.home-hero .hero-tags a:nth-child(4n+1) {
  filter: saturate(150%);
}
.home-hero .hero-tags a:nth-child(5n+3) {
  filter: saturate(110%);
}
.home-hero .hero-tags a:hover {
  background-color: #3d5c3d;
  color: #99ff99;
  text-decoration: none;
}
:root[data-theme=light] body:has(.home-hero) {
  background-color: #eaf1f5;
  background-image:
    radial-gradient(
      118% 90% at 39% 10%,
      rgba(150, 205, 224, .85),
      transparent 62%),
    linear-gradient(
      140deg,
      #eaf1f5 0%,
      #dfeaf1 30%,
      #d7e6ef 55%,
      #e8f0f4 100%);
  background-size: 100% 100%, 100% 100%;
  background-attachment: fixed, fixed;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}
:root[data-theme=light] .home-hero .hero-brand-text {
  color: #14201d;
  text-shadow: none;
}
:root[data-theme=light] .home-hero .hero-tile {
  background:
    linear-gradient(
      to top,
      rgba(0, 0, 0, .12) 0,
      rgba(0, 0, 0, .02) 100%);
}
:root[data-theme=light] body:has(.home-hero) [data-filter-toolbar] {
  background: rgba(255, 255, 255, .72);
  border-bottom-color: #dfe3e5;
}
:root[data-theme=light] .home-hero .hero-search {
  background: rgba(255, 255, 255, .9);
  border-color: #c3cbcf;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .06);
}
:root[data-theme=light] .home-hero .hero-search input[type=search] {
  color: #14201d;
}
:root[data-theme=light] .home-hero .hero-search input[type=search]::placeholder {
  color: #6b7a80;
}
:root[data-theme=light] .home-hero .hero-search button {
  color: #46565c;
  border-left-color: #dfe3e5;
}
:root[data-theme=light] .home-hero .hero-tags {
  text-shadow: none;
}
:root[data-theme=light] .home-hero .hero-tags a {
  color: #1c7a3c;
}
:root[data-theme=light] .home-hero .hero-tags a:hover {
  background-color: #d5efd5;
  color: #14612e;
}
@media (max-width: 760px) {
  .home-hero {
    padding: 12px 12px 14px;
  }
  .home-hero .hero-band {
    flex-wrap: wrap;
    gap: 10px;
  }
  .home-hero .hero-brand-text {
    font-size: 20px;
  }
  .home-hero .hero-auth {
    margin-left: auto;
  }
  .home-hero .hero-tiles {
    order: 3;
    flex: 1 0 100%;
    gap: 4px;
    justify-content: space-between;
  }
  .home-hero .hero-tile {
    flex: 1 1 0;
    width: auto;
    height: 56px;
    gap: 3px;
    font-size: 11px;
  }
  .home-hero .hero-tile svg {
    width: 18px;
    height: 18px;
  }
  .home-hero .hero-search {
    height: 40px;
    margin-top: 10px;
  }
}
@media (max-width: 600px) {
  .home-hero .hero-tags {
    max-width: 100%;
    font-size: 12px;
    gap: 0 9px;
  }
  .home-hero .hero-tags a:nth-child(n+19) {
    display: none;
  }
}
