.sj-gallery {
  color-scheme: dark;
  color: #f7f1ff;
  background:
    radial-gradient(ellipse at 12% 22%, #63399165, transparent 49%),
    radial-gradient(ellipse at 93% 16%, #185e7060, transparent 48%),
    linear-gradient(160deg, #1b132a, #0e101b 70%);
  border: 1px solid #594674;
  border-radius: 24px;
  box-shadow: 0 24px 66px #09041366, inset 0 1px #cba8f11c;
  min-width: 0;
  padding: clamp(10px, 2.4vw, 28px);
}

.sj-gallery [hidden] { display: none; }
.sj-gallery-slides {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 12px;
}
.sj-gallery[data-enhanced] .sj-gallery-slides {
  display: block;
  overflow: visible;
  touch-action: pan-y pinch-zoom;
}
.sj-gallery .sj-gallery-slide {
  margin: 0;
  min-width: 0;
  scroll-snap-align: start;
}
.sj-monitor {
  position: relative;
  isolation: isolate;
  padding: clamp(6px, 1.25vw, 15px) clamp(6px, 1.2vw, 14px) 0;
  border: 1px solid #656274;
  border-bottom-color: #383247;
  border-radius: clamp(10px, 1.9vw, 20px);
  background: linear-gradient(145deg, #333143, #171823 35%, #11121d 69%, #272338);
  box-shadow: inset 0 1px 0 #ffffff24, inset 0 0 0 2px #ffffff08, 0 16px 40px #090611a8;
}
.sj-monitor::before {
  content: "";
  position: absolute;
  top: clamp(2px, .45vw, 5px);
  left: 50%;
  translate: -50% 0;
  inline-size: clamp(3px, .55vw, 6px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 35%, #857a99, #242633 46%, #0b0c11 65%);
  box-shadow: 0 0 0 1px #88819842;
}
.sj-monitor-screen {
  border: 1px solid #090910;
  border-radius: clamp(5px, .9vw, 10px);
  overflow: hidden;
  background: #100c19;
}
.sj-monitor-screen img {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}
.sj-monitor-chin {
  position: relative;
  display: grid;
  place-items: center;
  height: clamp(15px, 2.6vw, 29px);
  color: #a5a0b7;
  font: 700 clamp(5px, .75vw, 8px) / 1 system-ui, sans-serif;
  letter-spacing: .28em;
}
.sj-monitor-chin i {
  position: absolute;
  right: clamp(3px, 1vw, 10px);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #9affec;
  box-shadow: 0 0 8px #36f8d5;
}
.sj-monitor-stand {
  position: relative;
  height: clamp(22px, 4.5vw, 54px);
  margin-bottom: clamp(6px, 1.4vw, 16px);
  background: radial-gradient(ellipse at 50% 93%, #9f62ff39, transparent 46%);
}
.sj-monitor-stand::before,
.sj-monitor-stand::after {
  content: "";
  position: absolute;
  left: 50%;
  translate: -50% 0;
}
.sj-monitor-stand::before {
  top: 0;
  height: 82%;
  width: 13%;
  clip-path: polygon(19% 0, 81% 0, 98% 100%, 2% 100%);
  background: linear-gradient(#11101e, #343044 88%, #171323);
}
.sj-monitor-stand::after {
  bottom: 8%;
  width: 29%;
  height: 19%;
  border-radius: 90% 90% 42% 42% / 100% 100% 50% 50%;
  background: linear-gradient(#50485e, #231b32);
  box-shadow: 0 5px 15px #0905149e, 0 1px 0 #927caa61 inset;
}
.sj-gallery-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: clamp(10px, 1.7vw, 18px) 3px;
}
.sj-gallery-caption h3 {
  margin: 0 0 6px;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  color: #f7f1ff;
}
.sj-gallery-caption p {
  color: #d8cce6;
  line-height: 1.5;
  margin: 0;
  max-width: 65ch;
}
.sj-gallery-caption a {
  color: #e4baff;
  font-size: .85rem;
  font-weight: 700;
  white-space: nowrap;
  text-underline-offset: 4px;
}
.sj-gallery-caption a:hover { color: white; }

.sj-gallery-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #6653817a;
  border-radius: 16px;
  background: linear-gradient(165deg, #282035bf, #1a1627);
  box-shadow: inset 0 1px 0 #ffffff0f;
}
.sj-gallery-symbols { position: absolute; }
.sj-gallery-launcher-label {
  margin: 0 0 8px 4px;
  color: #c7bad7;
  font: 700 .65rem / 1.2 system-ui, sans-serif;
  letter-spacing: .16em;
}
.sj-gallery-shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(66px, 1fr));
  gap: 6px;
}
.sj-gallery button {
  font: inherit;
  cursor: pointer;
  color: #e9dff4;
  border: 1px solid #543e6d;
  background: #221732;
}
.sj-gallery button:hover { background: #35234e; }
.sj-gallery :is(a, button):focus-visible {
  outline: 2px solid #e3b8ff;
  outline-offset: 2px;
}
.sj-gallery-shortcuts button {
  --shortcut-accent: #d9b1ff;
  --shortcut-surface: #563787;
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
  padding: 7px 4px;
  border-color: transparent;
  border-radius: 11px;
  background: transparent;
  text-align: center;
}
.sj-gallery-shortcuts button:hover {
  background: #ffffff0d;
  border-color: #ffffff1c;
}
.sj-gallery-shortcuts button[aria-current="true"] {
  color: #fff;
  background: #b58aea20;
  border-color: #bf9de780;
}
.sj-gallery-icon {
  display: grid;
  place-items: center;
  width: clamp(36px, 4.3vw, 49px);
  aspect-ratio: 1;
  color: var(--shortcut-accent);
  background: linear-gradient(145deg, var(--shortcut-surface), #191626 90%);
  border: 1px solid currentColor;
  border-radius: 12px;
  box-shadow: inset 0 1px 1px #ffffff35, 0 4px 10px #09061170;
}
.sj-gallery-icon svg {
  width: 55%;
  height: 55%;
}
.sj-gallery-shortcuts button[aria-current="true"] .sj-gallery-icon {
  box-shadow: inset 0 1px 1px #ffffff40, 0 0 14px var(--shortcut-surface);
}
.sj-gallery-shortcuts [data-shortcut="bowl"] { --shortcut-accent: #91f3dc; --shortcut-surface: #225f60; }
.sj-gallery-shortcuts [data-shortcut="chat"] { --shortcut-accent: #a5d7ff; --shortcut-surface: #285490; }
.sj-gallery-shortcuts [data-shortcut="alerts"] { --shortcut-accent: #ffaddf; --shortcut-surface: #824274; }
.sj-gallery-shortcuts [data-shortcut="winner"] { --shortcut-accent: #ffe39b; --shortcut-surface: #795627; }
.sj-gallery-shortcuts [data-shortcut="history"] { --shortcut-accent: #bff2a5; --shortcut-surface: #3a6134; }
.sj-gallery-shortcuts [data-shortcut="help"] { --shortcut-accent: #c5c5ff; --shortcut-surface: #4c498c; }
.sj-gallery-shortcut-name {
  font-size: .74rem;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.sj-gallery-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sj-gallery-nav button {
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  border-radius: 10px;
  padding: 0;
}
.sj-gallery-count {
  color: #d8cce6;
  font-size: .76rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sj-gallery-status {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .sj-gallery-controls { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 9px; }
  .sj-gallery-nav { justify-content: space-between; }
  .sj-gallery-caption { flex-wrap: wrap; }
  .sj-gallery-shortcuts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
