/* ZSky Creations Wall — bounded, thumbnail-first, and stable while media loads. */

body.wall-page {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 16% -8%, rgba(115, 245, 173, .07), transparent 30rem),
    radial-gradient(circle at 88% 5%, rgba(98, 217, 255, .065), transparent 28rem),
    var(--void, #07080c);
  color: var(--text, #f3f6fb);
}

.wall-app {
  min-height: 100vh;
  transition: opacity .2s ease;
}

.wall-app[aria-busy="true"] {
  opacity: .38;
  pointer-events: none;
}

.wall-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  min-height: 68px;
  align-items: center;
  gap: 20px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 13, .94);
  backdrop-filter: blur(22px) saturate(125%);
  -webkit-backdrop-filter: blur(22px) saturate(125%);
}

.wall-heading {
  min-width: 168px;
}

.wall-heading h1 {
  margin: 3px 0 0;
  font-family: var(--dp);
  font-size: 18px;
  font-weight: 620;
  letter-spacing: -.02em;
}

.wall-switcher {
  flex: 0 0 auto;
}

.wall-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.wall-live {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ph);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.wall-live .live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 9px currentColor;
  animation: wall-pulse 2s ease-in-out infinite;
}

.wall-live.is-paused {
  color: var(--muted);
}

.wall-live.is-error {
  color: var(--rd);
}

.wall-live.is-paused .live-dot,
.wall-live.is-error .live-dot {
  box-shadow: none;
  animation: none;
}

@keyframes wall-pulse {
  50% { opacity: .35; transform: scale(.8); }
}

.wall-main {
  --wall-gutter: 8px;
  width: 100%;
  padding: 14px var(--wall-gutter) 44px;
}

.wall-loaded {
  margin-left: 4px;
  color: var(--dim);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.wall-loaded strong {
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

/* Display controls — type filter + column density. */

.wall-controls {
  position: sticky;
  /* --wall-topbar-h is measured in JS; 68px matches the topbar's min-height
     and is only the fallback before the first measurement lands. */
  top: var(--wall-topbar-h, 68px);
  z-index: 25;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 18px;
  /* Full-bleed: cancel the main gutter so no tile shows in the edges. */
  margin: 0 calc(var(--wall-gutter, 8px) * -1) 10px;
  padding: 8px calc(var(--wall-gutter, 8px) + 6px) 8px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 13, .94);
  backdrop-filter: blur(22px) saturate(125%);
  -webkit-backdrop-filter: blur(22px) saturate(125%);
}

.wall-control {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.wall-control-type {
  flex: 1 1 420px;
}

.wall-control-density {
  flex: 0 0 auto;
}

.wall-controls .wall-control-label {
  margin-right: 1px;
  color: var(--dim);
  font-size: 6px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.wall-segment {
  display: inline-flex;
  padding: 1px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, .02);
}

.wall-controls .wall-seg {
  min-height: 19px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .03em;
  cursor: pointer;
  transition: color .16s ease, background .16s ease;
}

.wall-controls .wall-seg:hover {
  color: var(--text);
}

.wall-controls .wall-seg.is-active {
  background: var(--ph-soft);
  color: var(--ph);
}

.wall-chips {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.wall-controls .wall-chip {
  display: inline-flex;
  min-height: 19px;
  align-items: center;
  gap: 4px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .02em;
  white-space: nowrap;
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}

.wall-controls .wall-chip:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.wall-controls .wall-chip.is-active {
  border-color: rgba(115, 245, 173, .45);
  background: var(--ph-soft);
  color: var(--ph);
}

/* Dim a chip the media segment has already ruled out, but keep it clickable —
   picking it re-widens the media filter rather than dead-ending. */
.wall-controls .wall-chip.is-muted {
  opacity: .38;
}

.wall-controls .wall-chip-count {
  color: var(--dim);
  font-size: 7px;
  font-variant-numeric: tabular-nums;
}

.wall-controls .wall-chip.is-active .wall-chip-count {
  color: rgba(115, 245, 173, .72);
}

.wall-controls .wall-chips-note {
  color: var(--dim);
  font-size: 8px;
}

/* Engine chips sit behind a hairline after the kind chips so the two facet
   families read as separate axes (a kind AND an engine), not one long list. */
.wall-controls .wall-chips-engine {
  padding-left: 8px;
  border-left: 1px solid var(--line);
}

.wall-controls .wall-chips-engine:empty {
  display: none;
}

.wall-controls .wall-reset {
  min-height: 19px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .09em;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .16s ease;
}

.wall-controls .wall-reset:hover {
  color: var(--text);
}

.wall-controls .wall-range {
  width: 132px;
  height: 19px;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.wall-controls .wall-range::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 999px;
  background: var(--line-strong);
}

.wall-controls .wall-range::-moz-range-track {
  height: 3px;
  border-radius: 999px;
  background: var(--line-strong);
}

.wall-controls .wall-range::-webkit-slider-thumb {
  width: 11px;
  height: 11px;
  margin-top: -4px;
  border: 0;
  border-radius: 50%;
  background: var(--ph);
  box-shadow: 0 0 10px rgba(115, 245, 173, .45);
  -webkit-appearance: none;
  appearance: none;
}

.wall-controls .wall-range::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 50%;
  background: var(--ph);
  box-shadow: 0 0 10px rgba(115, 245, 173, .45);
}

.wall-controls .wall-range:focus-visible,
.wall-controls .wall-seg:focus-visible,
.wall-controls .wall-chip:focus-visible,
.wall-controls .wall-reset:focus-visible {
  outline: 2px solid rgba(115, 245, 173, .82);
  outline-offset: 2px;
}

.wall-controls .wall-range-value {
  min-width: 46px;
  color: var(--ph);
  font-family: var(--dp);
  font-size: 9px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.wall-banner {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 4px 12px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 107, 121, .25);
  border-radius: 10px;
  background: var(--rd-soft);
  color: var(--rd);
  font-family: var(--dp);
  font-size: 11px;
}

.wall-banner button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}

.wall-grid {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 320px;
}

.wall-col {
  flex: 1 1 0;
  min-width: 0;
}

.wall-tile,
.wall-skeleton {
  position: relative;
  min-width: 0;
  margin: 0 0 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  contain: layout paint style;
}

.wall-tile {
  min-height: 90px;
}

.wall-tile.is-new {
  animation: wall-enter .28s ease-out;
}

@keyframes wall-enter {
  from { opacity: 0; transform: scale(.975); }
}

.wall-media-link,
.wall-video-trigger {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: rgba(255, 255, 255, .025);
  color: inherit;
  cursor: pointer;
}

.wall-media-link:focus-visible,
.wall-video-trigger:focus-visible,
.wall-banner button:focus-visible {
  outline: 2px solid rgba(115, 245, 173, .82);
  outline-offset: -3px;
}

.wall-tile img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform .25s ease, opacity .18s ease;
}

.wall-tile video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease, opacity .18s ease;
}

.wall-tile:hover img,
.wall-tile:hover .wall-motion-preview {
  transform: scale(1.025);
}

.wall-tile video {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #050608;
}

.wall-tile .wall-motion-preview {
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}

.wall-video-trigger.is-motion-ready .wall-motion-preview {
  opacity: 1;
}

.wall-video-trigger.is-motion-ready img {
  opacity: 0;
}

.wall-tile .wall-playback {
  position: absolute;
  inset: 0;
  z-index: 2;
  object-fit: contain;
  background: #050608;
}

.wall-video-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(98,217,255,.13), transparent 48%),
    linear-gradient(315deg, rgba(169,145,255,.13), transparent 52%),
    #0d1018;
}

.wall-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  place-items: center;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 50%;
  background: rgba(5, 7, 11, .72);
  box-shadow: 0 8px 24px rgba(0,0,0,.32);
  backdrop-filter: blur(8px);
  transition: opacity .18s ease, transform .18s ease;
}

.wall-video-trigger.is-motion-ready .wall-play {
  opacity: 0;
  transform: translate(-50%, -50%) scale(.82);
}

.wall-video-trigger.is-motion-ready:hover .wall-play,
.wall-video-trigger.is-motion-ready:focus-visible .wall-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(.92);
}

.wall-play svg {
  width: 17px;
  height: 17px;
  transform: translateX(1px);
  fill: #fff;
}

.wall-grid.is-dense .wall-play {
  width: 30px;
  height: 30px;
}

.wall-grid.is-dense .wall-play svg {
  width: 12px;
  height: 12px;
}

.wall-grid.is-dense .wall-meta {
  padding: 16px 6px 5px;
}

.wall-grid.is-ultra-dense .wall-play {
  width: 22px;
  height: 22px;
  border-width: 0;
}

.wall-grid.is-ultra-dense .wall-play svg {
  width: 9px;
  height: 9px;
}

/* Below ~105px the kind label ellipsises to nothing anyway — keep the age. */
.wall-grid.is-ultra-dense .wall-meta strong {
  display: none;
}

.wall-meta {
  position: absolute;
  inset: auto 0 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 25px 9px 8px;
  background: linear-gradient(transparent, rgba(4,6,9,.82));
  pointer-events: none;
}

.wall-meta strong,
.wall-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wall-meta strong {
  color: #f4f7fb;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.wall-meta span {
  flex: 0 0 auto;
  color: #b1bac8;
  font-size: 8px;
}

.wall-meta .wall-meta-engine {
  margin-left: 5px;
  color: var(--ph);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: .06em;
}

.wall-skeleton {
  height: 220px;
  background:
    linear-gradient(100deg, transparent 20%, rgba(255,255,255,.055) 45%, transparent 70%),
    rgba(255,255,255,.025);
  background-size: 240% 100%;
  animation: wall-shimmer 1.4s linear infinite;
}

.wall-skeleton:nth-child(3n) { height: 300px; }
.wall-skeleton:nth-child(4n + 1) { height: 170px; }

@keyframes wall-shimmer {
  to { background-position: -240% 0; }
}

.wall-empty {
  flex: 1 1 100%;
  display: grid;
  min-height: 280px;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--muted);
  font-family: var(--dp);
  font-size: 13px;
  text-align: center;
}

.wall-sentinel {
  height: 64px;
}

.wall-end {
  padding: 18px;
  color: var(--dim);
  font-size: 8px;
  letter-spacing: .15em;
  text-align: center;
  text-transform: uppercase;
}

@media (max-width: 820px) {
  .wall-topbar {
    gap: 10px;
    padding-inline: 13px;
  }

  .wall-heading {
    display: none;
  }

  .wall-actions {
    gap: 7px;
  }

  .wall-live {
    padding-inline: 9px;
  }

  .wall-main {
    --wall-gutter: 6px;
    padding: 12px var(--wall-gutter) 38px;
  }

  .wall-controls {
    padding-bottom: 7px;
  }

  .wall-control-type {
    flex-basis: 100%;
  }

  /* Now that the bar never scrolls away, 4 rows of wrapped chips would eat a
     fifth of a phone screen — keep it to one swipeable row. */
  .wall-control-type {
    flex-wrap: nowrap;
  }

  .wall-controls .wall-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .wall-controls .wall-chips::-webkit-scrollbar {
    display: none;
  }

  .wall-controls .wall-chip {
    flex: 0 0 auto;
  }

  .wall-controls .wall-range {
    width: 120px;
  }

  .wall-grid {
    gap: 6px;
  }

  .wall-tile,
  .wall-skeleton {
    margin-bottom: 6px;
  }

  .wall-tile,
  .wall-skeleton {
    border-radius: 10px;
  }
}

@media (max-width: 560px) {
  .wall-switcher .workspace-tab {
    padding-inline: 7px;
  }

  .wall-live span:last-child {
    display: none;
  }

  .wall-live {
    width: 38px;
    justify-content: center;
    padding: 0;
  }

  #wall-refresh {
    width: 38px;
    padding: 0;
  }

  #wall-refresh span {
    display: none;
  }

  .wall-controls {
    gap: 10px;
  }

  .wall-control-density {
    flex: 1 1 100%;
  }

  .wall-controls .wall-range {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }

  .wall-play {
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wall-live .live-dot,
  .wall-skeleton,
  .wall-tile.is-new {
    animation: none;
  }

  .wall-tile img,
  .wall-tile video,
  .wall-play {
    transition: none;
  }

  .wall-controls .wall-seg,
  .wall-controls .wall-chip,
  .wall-controls .wall-reset {
    transition: none;
  }
}
