.ow-showcase-dialog[data-gallery-active="mobile"] {
  --showcase-width: 520px;
}

.ow-showcase-dialog[data-gallery-active="ad"] {
  --showcase-width: 830px;
}

.ow-showcase-dialog {
  --showcase-lime: #d9ff43;
  --showcase-muted: #c5c3cd;
  --showcase-line: #fafafa26;
  --showcase-edge: clamp(18px, 3vw, 38px);
  --showcase-gutter: clamp(12px, 4vmin, 42px);
  --showcase-height: min(960px, calc(100dvh - 2 * var(--showcase-gutter)));
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  inline-size: min(var(--showcase-width, 960px), calc(100% - 2 * var(--showcase-gutter)));
  max-inline-size: none;
  block-size: var(--showcase-height);
  max-block-size: var(--showcase-height);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--showcase-line);
  border-radius: 10px;
  background: #15141a;
  color: #fafafa;
  font-family: "Avenir Next", "PingFang SC", system-ui, sans-serif;
}

.ow-showcase-dialog::backdrop {
  background: #08070ccc;
}

.ow-showcase-dialog *,
.ow-showcase-dialog *::before,
.ow-showcase-dialog *::after {
  box-sizing: border-box;
}

.ow-showcase-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  block-size: 100%;
}

.ow-showcase-dialog:has(.ow-showcase-scroll figure:only-child),
.ow-showcase-dialog:has(.ow-showcase-scroll figure:only-child) .ow-showcase-panel {
  block-size: auto;
}

.ow-showcase-dialog:has(.ow-showcase-scroll figure:only-child) .ow-showcase-panel {
  max-block-size: calc(var(--showcase-height) - 2px);
}

.ow-showcase-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(15px, 2.4vw, 26px) var(--showcase-edge) 12px;
}

.ow-showcase-top p,
.ow-showcase-top h2,
.ow-showcase-top form {
  margin: 0;
}

.ow-showcase-brand {
  color: var(--showcase-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
}

.ow-showcase-top h2 {
  margin-block-start: 4px;
  color: #fafafa;
  font: 800 clamp(22px, 3vw, 32px)/1.12 "Avenir Next", "PingFang SC", system-ui, sans-serif;
  letter-spacing: -.025em;
}

.ow-showcase-top form {
  flex: none;
}

.ow-showcase-close,
.ow-showcase-nav button {
  min-block-size: 44px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.ow-showcase-close {
  padding-inline: clamp(9px, 1.6vw, 16px);
  border: 1px solid var(--showcase-line);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
}

.ow-showcase-close:hover {
  border-color: var(--showcase-muted);
}

.ow-showcase-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(4px, 1.6vw, 18px);
  padding-inline: var(--showcase-edge);
  border-block-end: 1px solid var(--showcase-line);
}

.ow-showcase-nav button {
  padding: 7px 4px;
  border-block-end: 2px solid transparent;
  color: var(--showcase-muted);
  font-size: clamp(11px, 1.6vw, 15px);
  font-weight: 700;
  line-height: 1.25;
}

.ow-showcase-nav button:hover,
.ow-showcase-nav button[aria-pressed="true"] {
  color: var(--showcase-lime);
}

.ow-showcase-nav button[aria-pressed="true"] {
  border-block-end-color: var(--showcase-lime);
}

.ow-showcase-nav small {
  margin-inline-start: .5em;
  font-size: .82em;
  font-variant-numeric: tabular-nums;
}

.ow-showcase-scroll {
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
  padding: clamp(18px, 3.2vw, 34px) var(--showcase-edge) clamp(26px, 4vw, 44px);
}

.ow-showcase-stream {
  display: grid;
  gap: clamp(23px, 3.4vw, 40px);
}

.ow-showcase-stream figure {
  display: grid;
  justify-items: center;
  gap: 9px;
  min-inline-size: 0;
  margin: 0;
}

.ow-showcase-stream a {
  display: block;
  inline-size: fit-content;
  max-inline-size: 100%;
  line-height: 0;
  cursor: zoom-in;
}

.ow-showcase-stream img {
  display: block;
  inline-size: auto;
  block-size: auto;
  max-inline-size: 100%;
  max-block-size: min(65dvh, 700px);
  margin-inline: auto;
  object-fit: contain;
  object-position: center;
}

.ow-showcase-stream figcaption {
  display: flex;
  align-items: start;
  justify-content: center;
  gap: 8px;
  color: #fafafa;
  font-size: clamp(13px, 1.6vw, 15px);
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
}

.ow-showcase-stream figcaption small {
  display: block;
  margin-block-start: 3px;
  color: var(--showcase-muted);
  font-size: .875em;
  font-weight: 500;
}

.ow-showcase-stream figcaption [aria-hidden="true"] {
  color: var(--showcase-lime);
}

.ow-showcase-dialog :is(button, a):focus-visible,
.ow .ow-showcase-dialog :is(button, a):focus-visible {
  outline: 2px solid var(--showcase-lime);
  outline-offset: -3px;
}

.ow-showcase-scroll:focus-visible {
  outline: none;
  box-shadow: inset 0 2px var(--showcase-lime);
}

@media (max-width: 540px) {
  .ow-showcase-dialog {
    --showcase-edge: 12px;
    --showcase-gutter: 9px;
    border-radius: 6px;
  }

  .ow-showcase-scroll {
    scrollbar-gutter: auto;
  }
}
