@charset "UTF-8";

.gallery-page .g-films {
  outline: none;
  scroll-margin-top: 8px;
}

.gallery-page .g-film-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.gallery-page .g-film-choice {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 7px 7px 12px;
  border: 1px solid var(--edge);
  border-radius: 16px;
  color: var(--ink);
  background: rgba(15, 23, 42, 0.75);
  text-align: left;
}

.gallery-page .g-film-choice:is(:hover, [aria-expanded='true']) {
  border-color: #7dd3fc;
  background: rgba(22, 43, 64, 0.9);
}

.gallery-page .g-film-cover {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  background: #060911 url('../public/videos/bento-films-grid.webp') 0 0 / 200% 200% no-repeat;
}

.gallery-page [data-film-choice='1'] .g-film-cover {
  background-position: 100% 0;
}

.gallery-page [data-film-choice='2'] .g-film-cover {
  background-position: 0 100%;
}

.gallery-page [data-film-choice='3'] .g-film-cover {
  background-position: 100% 100%;
}

.gallery-page .g-film-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  color: #fff;
  background: rgba(8, 12, 20, 0.7);
}

.gallery-page .g-film-choice:is(:hover, :focus-visible) .g-film-play {
  color: #090d16;
  background: #f1f5f9;
}

.gallery-page .g-film-duration {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 5px;
  color: #fff;
  background: rgba(8, 12, 20, 0.86);
  font: 500 13px/1.3 'Geist Mono', monospace;
}

.gallery-page .g-film-name {
  padding: 0 5px;
  font-weight: 650;
  line-height: 1.25;
}

.gallery-page .g-film-dialog {
  width: min(calc(100% - 24px), 960px);
  max-height: calc(100% - 24px);
  margin: auto;
  padding: 12px;
  border: 1px solid #54657e;
  border-radius: 18px;
  color: #f1f5f9;
  background: #111827;
  overflow: auto;
}

.gallery-page .g-film-dialog::backdrop {
  background: rgba(6, 9, 15, 0.84);
}

.gallery-page .g-film-dialog-head,
.gallery-page .g-film-dialog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 4px 4px 10px;
}

.gallery-page .g-film-dialog-head h3 {
  font-size: clamp(17px, 2.5vw, 23px);
  line-height: 1.15;
}

.gallery-page .g-film-dialog video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-height: 70dvh;
  border-radius: 10px;
  background: #060911;
}

.gallery-page .g-film-dialog-foot {
  align-items: baseline;
  padding: 10px 4px 2px;
  color: #cbd5e1;
  font-size: 14px;
}

.gallery-page .g-film-close {
  min-height: 44px;
  margin-left: auto;
  padding: 0 14px;
  border: 1px solid #54657e;
  border-radius: 999px;
  background: #1e293b;
  color: #f1f5f9;
}

.gallery-page .g-film-source {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.gallery-page .g-film-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.gallery-page .g-film-status:empty {
  position: absolute;
}

.gallery-page .g-film-archive .g-section {
  margin-top: 20px;
}

@media (max-width: 959px) {
  .gallery-page .g-film-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (max-width: 600px) {
  .gallery-page .g-films {
    margin-top: 22px;
  }

  .gallery-page .g-film-name {
    font-size: 14px;
    padding: 0 2px;
  }
}

.gallery-page .g-bobina-box {
  display: grid;
  grid-template-columns: minmax(0, 1.78fr) minmax(290px, 0.92fr);
  gap: 10px;
  align-items: stretch;
}

.gallery-page .g-bobina-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(11, 15, 25, 0.96), rgba(7, 10, 17, 0.99));
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 0;
}

.gallery-page .g-bobina-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #060911;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 22px 52px rgba(0, 0, 0, 0.52);
  transition: box-shadow 0.28s ease;
}

.gallery-page .g-bobina-stage.is-playing {
  box-shadow:
    inset 0 0 0 1px rgba(56, 189, 248, 0.34),
    0 22px 56px rgba(2, 132, 199, 0.2);
}

.gallery-page .g-bobina-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #060911;
}

.gallery-page .g-bobina-overlay {
  position: absolute;
  inset: 0;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
}

.gallery-page .g-bobina-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.gallery-page .g-bobina-open {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.95);
  color: #090d16;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid #ffffff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  transition: background-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.gallery-page .g-bobina-open:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(125, 211, 252, 0.36);
}

.gallery-page .g-bobina-controls {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.gallery-page .g-bobina-ctrl {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(9, 13, 22, 0.82);
  backdrop-filter: blur(14px);
  color: #f1f5f9;
  font-size: 13px;
  font-weight: 500;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.gallery-page .g-bobina-ctrl:hover {
  background: rgba(30, 41, 59, 0.92);
  border-color: rgba(125, 211, 252, 0.55);
}

.gallery-page .g-bobina-ctrl svg {
  width: 16px;
  height: 16px;
}

.gallery-page .g-bobina-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 4px;
}

.gallery-page .g-bobina-now,
.gallery-page .g-bobina-time {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #94a3b8;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.gallery-page .g-bobina-now {
  color: #7dd3fc;
}

.gallery-page .g-bobina-rail {
  flex: 1 1 auto;
  min-width: 80px;
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.gallery-page .g-bobina-rail:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
  border-radius: 6px;
}

.gallery-page .g-bobina-rail-track {
  position: relative;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.22);
  overflow: visible;
}

.gallery-page .g-bobina-rail-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  transition: width 0.14s linear;
}

.gallery-page .g-bobina-ticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.gallery-page .g-bobina-tick {
  position: absolute;
  top: 50%;
  width: 3px;
  height: 9px;
  border-radius: 2px;
  background: rgba(248, 250, 252, 0.55);
  transform: translate(-50%, -50%);
}

.gallery-page .g-bobina-shots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.gallery-page .g-bobina-shot {
  position: relative;
  overflow: hidden;
  flex: 1 1 130px;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(15, 23, 42, 0.58);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  text-align: left;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.gallery-page .g-bobina-shot::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: var(--shot-prog, 0%);
  background: #38bdf8;
  transition: width 0.18s linear;
}

.gallery-page .g-bobina-shot:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(125, 211, 252, 0.42);
  color: #ffffff;
}

.gallery-page .g-bobina-shot[aria-pressed='true'] {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.5);
}

.gallery-page .g-bobina-shot-num {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: #7dd3fc;
  flex-shrink: 0;
}

.gallery-page .g-bobina-shot-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.gallery-page .g-bobina-playlist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.gallery-page .g-bobina-tab {
  flex: 1 1 auto;
  min-height: 82px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(13, 18, 29, 0.94), rgba(9, 13, 22, 0.98));
  color: var(--ink);
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.gallery-page .g-bobina-tab:hover {
  background: rgba(24, 33, 50, 0.95);
  border-color: rgba(125, 211, 252, 0.42);
}

.gallery-page .g-bobina-tab[aria-selected='true'] {
  background: linear-gradient(145deg, rgba(14, 28, 48, 0.96), rgba(10, 16, 28, 0.98));
  border-color: #38bdf8;
  box-shadow:
    inset 0 0 0 1px rgba(56, 189, 248, 0.45),
    0 14px 32px rgba(2, 132, 199, 0.18);
}

.gallery-page .g-bobina-tab-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: #7dd3fc;
}

.gallery-page .g-bobina-tab-dur {
  color: var(--muted);
}

.gallery-page .g-bobina-tab-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #f8fafc;
}

.gallery-page .g-bobina-tab-desc {
  font-size: 13px;
  line-height: 1.42;
  color: var(--muted);
}

@media (max-width: 1020px) {
  .gallery-page .g-bobina-box {
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery-page .g-bobina-playlist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .gallery-page .g-bobina-main {
    padding: 10px;
    gap: 10px;
  }

  .gallery-page .g-bobina-stage {
    aspect-ratio: auto;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .gallery-page .g-bobina-video {
    aspect-ratio: 16 / 9;
    height: auto;
    border-radius: 12px;
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.1),
      0 14px 32px rgba(0, 0, 0, 0.45);
  }

  .gallery-page .g-bobina-overlay {
    position: static;
    padding: 10px 0 0;
  }

  .gallery-page .g-bobina-bottom {
    width: 100%;
    justify-content: space-between;
  }

  .gallery-page .g-bobina-open {
    flex: 1 1 auto;
    justify-content: center;
    padding: 0 13px;
    font-size: 13px;
  }

  .gallery-page .g-bobina-ctrl span {
    display: none;
  }

  .gallery-page .g-bobina-ctrl {
    padding: 0;
  }

  .gallery-page .g-bobina-bar {
    gap: 8px;
  }

  .gallery-page .g-bobina-now {
    display: none;
  }

  .gallery-page .g-bobina-shots {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-page .g-bobina-playlist {
    grid-template-columns: minmax(0, 1fr);
  }
}


@media (prefers-reduced-motion: no-preference) {
  .gallery-page :where(.g-bobina-tab, .g-bobina-shot, .g-bobina-ctrl, .g-bobina-open, .g-chip, .g-btn, .card-peek, .sector-tile, .style-tile) {
    transition:
      background-color 160ms ease-out,
      border-color 160ms ease-out,
      color 160ms ease-out,
      box-shadow 180ms ease-out,
      scale 240ms ease-out;
    transition-timing-function: ease-out, ease-out, ease-out, ease-out, linear(0, 0.48 16%, 1.07 38%, 0.98 62%, 1.01 82%, 1);
  }

  .gallery-page :where(.g-bobina-tab, .g-bobina-shot, .g-bobina-ctrl, .g-bobina-open, .g-chip, .g-btn, .card-peek):active {
    scale: 0.97;
  }

  .gallery-page .gallery-card {
    transition: border-color 180ms ease-out, box-shadow 220ms ease-out, translate 260ms ease-out;
    transition-timing-function: ease-out, ease-out, linear(0, 0.55 20%, 1.04 48%, 0.99 74%, 1);
  }

  .gallery-page .gallery-card:hover {
    translate: 0 -3px;
  }
}

@media (forced-colors: active) {
  .gallery-page .g-bobina-tab,
  .gallery-page .g-bobina-shot,
  .gallery-page .g-bobina-ctrl,
  .gallery-page .g-bobina-open {
    border: 1px solid CanvasText;
  }
  .gallery-page .g-bobina-tab[aria-selected='true'],
  .gallery-page .g-bobina-shot[aria-pressed='true'] {
    outline: 2px solid Highlight;
  }
}
