:root {
  --photo-live-accent: var(--hl-header-red, #c8192e);
  --photo-live-canvas: #f5f5f5;
  --photo-live-ink: #232323;
  --photo-live-muted: #8a8a8a;
  --photo-live-line: #eee;
  --photo-live-max: 1180px;
}

.photo-live-cases-page,
.photo-live-cases-page *,
.photo-live-cases-page *::before,
.photo-live-cases-page *::after { box-sizing: border-box; }

html { background: var(--photo-live-canvas); }

body.photo-live-cases-page {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--photo-live-canvas);
  color: var(--photo-live-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.photo-live-cases-page #header { min-height: 76px; }

.photo-live-cases-skip {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 9px 14px;
  background: #fff;
  color: var(--photo-live-accent);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
}

.photo-live-cases-skip:focus { transform: translateY(0); }

.photo-live-cases-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.photo-live-cases-main {
  flex: 1 0 auto;
  min-height: 70vh;
  padding: 10px 0 64px;
  background: var(--photo-live-canvas);
}

.photo-live-cases-shell {
  width: min(var(--photo-live-max), calc(100% - 40px));
  margin: 0 auto;
}

.photo-live-cases-hero {
  position: relative;
  width: 100%;
  margin: 0 0 10px;
  overflow: hidden;
  aspect-ratio: 8 / 3;
  background: #171717;
}

.photo-live-cases-hero__viewport,
.photo-live-cases-hero__track,
.photo-live-cases-hero__slide,
.photo-live-cases-hero__link { width: 100%; height: 100%; }

.photo-live-cases-hero__viewport { overflow: hidden; touch-action: pan-y; }

.photo-live-cases-hero__track {
  display: flex;
  transition: transform 480ms cubic-bezier(.22, .61, .36, 1);
  will-change: transform;
}

.photo-live-cases-hero__slide { flex: 0 0 100%; min-width: 0; }

.photo-live-cases-hero__link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #171717;
  color: #fff;
  text-align: left;
  text-decoration: none;
}

.photo-live-cases-hero__link::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .03) 28%, rgba(0, 0, 0, .72) 100%);
  content: "";
}

.photo-live-cases-hero__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .45s ease;
}

.photo-live-cases-hero__link:hover .photo-live-cases-hero__image { transform: scale(1.025); }

.photo-live-cases-hero__category,
.photo-live-case-card__category {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 3px 8px;
  background: rgba(0, 0, 0, .52);
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.photo-live-cases-hero__title {
  position: absolute;
  z-index: 2;
  right: 30px;
  bottom: 28px;
  left: 30px;
  display: -webkit-box;
  max-width: 900px;
  margin: 0;
  overflow: hidden;
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.photo-live-cases-hero__arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .32);
  cursor: pointer;
  opacity: 0;
  place-items: center;
  transform: translateY(-50%);
  transition: opacity .2s ease, background-color .2s ease;
}

.photo-live-cases-hero:hover .photo-live-cases-hero__arrow,
.photo-live-cases-hero__arrow:focus-visible { opacity: .82; }

.photo-live-cases-hero__arrow:hover { background: rgba(0, 0, 0, .58); }
.photo-live-cases-hero__arrow img { width: 10px; height: 16px; filter: brightness(0) invert(1); }
.photo-live-cases-hero__arrow--prev { left: 12px; }
.photo-live-cases-hero__arrow--next { right: 12px; }

.photo-live-cases-hero__dots {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: 10px;
  left: 0;
  display: flex;
  min-height: 5px;
  justify-content: center;
  gap: 7px;
}

.photo-live-cases-hero__dot {
  width: 18px;
  height: 5px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, .72);
  cursor: pointer;
}

.photo-live-cases-hero__dot.is-active { background: var(--photo-live-accent); }

.photo-live-cases-hero__skeleton,
.photo-live-case-card--skeleton span,
.photo-live-case-card--skeleton i,
.photo-live-case-card--skeleton small {
  background: linear-gradient(90deg, #e8e8e8 25%, #f2f2f2 40%, #e8e8e8 65%);
  background-size: 400% 100%;
  animation: photo-live-loading 1.35s ease infinite;
}

.photo-live-cases-hero__skeleton { width: 100%; height: 100%; }
.photo-live-cases-panel { padding: 20px; background: #fff; }

.photo-live-cases-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  transition: opacity .18s ease;
}

.photo-live-cases-grid.is-loading { opacity: .48; }

.photo-live-case-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--photo-live-line);
  background: #fff;
}

.photo-live-case-card__link {
  display: block;
  width: 100%;
  height: 100%;
  background: #fff;
  color: inherit;
  text-align: left;
  text-decoration: none;
}

.photo-live-case-card__media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 8 / 5;
  background: #1c1c1c;
}

.photo-live-case-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.photo-live-case-card__link:hover .photo-live-case-card__image,
.photo-live-case-card__link:focus-visible .photo-live-case-card__image { transform: scale(1.025); }

.photo-live-case-card__body { display: block; padding: 11px 14px 13px; }

.photo-live-case-card__title {
  display: -webkit-box;
  min-height: 44.8px;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--photo-live-ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  text-wrap: wrap;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.photo-live-case-card__meta {
  display: flex;
  min-width: 0;
  color: var(--photo-live-muted);
  font-size: 13px;
  line-height: 1.55;
}

.photo-live-case-card__meta + .photo-live-case-card__meta { margin-top: 2px; }
.photo-live-case-card__meta-label { flex: 0 0 auto; }
.photo-live-case-card__meta-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-live-case-card__meta time { font-family: Arial, sans-serif; }

.photo-live-cases-empty {
  grid-column: 1 / -1;
  min-height: 270px;
  display: grid;
  padding: 48px 24px;
  color: var(--photo-live-muted);
  text-align: center;
  place-content: center;
}

.photo-live-cases-empty strong { color: #555; font-size: 20px; font-weight: 500; }
.photo-live-cases-empty p { margin: 9px 0 0; font-size: 14px; }

.photo-live-cases-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 28px;
}

.photo-live-cases-pagination__status {
  margin: 0;
  color: var(--photo-live-muted);
  font-size: 13px;
  line-height: 36px;
  white-space: nowrap;
}

.photo-live-cases-pagination__controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.photo-live-cases-pagination__button {
  display: grid;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #dedede;
  background: #fff;
  color: #555;
  cursor: pointer;
  font: 14px/1 Arial, sans-serif;
  place-items: center;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}

.photo-live-cases-pagination__button:hover:not(:disabled),
.photo-live-cases-pagination__button:focus-visible,
.photo-live-cases-pagination__button.is-current {
  border-color: var(--photo-live-accent);
  background: var(--photo-live-accent);
  color: #fff;
}

.photo-live-cases-pagination__button.is-current { cursor: default; }
.photo-live-cases-pagination__button:disabled { cursor: not-allowed; opacity: .38; }
.photo-live-cases-pagination__button--arrow { padding: 0; }
.photo-live-cases-pagination__button--arrow img { width: 8px; height: 13px; opacity: .72; }

.photo-live-cases-pagination__button--arrow:hover:not(:disabled) img,
.photo-live-cases-pagination__button--arrow:focus-visible img { filter: brightness(0) invert(1); opacity: 1; }

.photo-live-cases-pagination__ellipsis { min-width: 20px; color: var(--photo-live-muted); text-align: center; }
.photo-live-case-card--skeleton { min-height: 276px; padding: 0 0 14px; }
.photo-live-case-card--skeleton span { display: block; width: 100%; aspect-ratio: 8 / 5; }

.photo-live-case-card--skeleton i,
.photo-live-case-card--skeleton small { display: block; height: 12px; margin: 14px 14px 0; }

.photo-live-case-card--skeleton i { width: 72%; }
.photo-live-case-card--skeleton small { width: 55%; }
.photo-live-case-card--skeleton small + small { width: 48%; margin-top: 7px; }

.photo-live-cases-page button:focus-visible,
.photo-live-cases-page a:focus-visible { outline: 3px solid rgba(200, 25, 46, .34); outline-offset: 3px; }

@keyframes photo-live-loading {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

@media (max-width: 991px) {
  .photo-live-cases-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .photo-live-cases-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  html,
  body.photo-live-cases-page,
  .photo-live-cases-main { background: #fff; }

  .photo-live-cases-page #header { min-height: 50px; }
  .photo-live-cases-main { padding: 10px 0 36px; }
  .photo-live-cases-shell { width: 100%; padding: 0 15px; }
  .photo-live-cases-hero { margin-bottom: 20px; aspect-ratio: 8 / 3; }

  .photo-live-cases-hero__title {
    right: 12px;
    bottom: 12px;
    left: 12px;
    font-size: 18px;
    line-height: 1.4;
  }

  .photo-live-cases-hero__category { top: 10px; left: 10px; }
  .photo-live-cases-hero__arrow { width: 32px; height: 32px; opacity: .72; }
  .photo-live-cases-hero__arrow--prev { left: 8px; }
  .photo-live-cases-hero__arrow--next { right: 8px; }
  .photo-live-cases-hero__dots { bottom: 7px; gap: 5px; }
  .photo-live-cases-hero__dot { width: 14px; height: 4px; }
  .photo-live-cases-panel { padding: 0; }
  .photo-live-cases-grid { gap: 10px; }

  .photo-live-case-card__category {
    top: 8px;
    left: 8px;
    padding: 2px 6px;
    font-size: 11px;
  }

  .photo-live-case-card__body { padding: 8px 9px 7px; }

  .photo-live-case-card__title {
    min-height: 42px;
    margin-bottom: 6px;
    font-size: 15px;
    line-height: 1.4;
  }

  .photo-live-case-card__meta { font-size: 12px; line-height: 1.5; }
  .photo-live-case-card--skeleton { min-height: 216px; }
  .photo-live-cases-pagination { display: block; padding-top: 22px; }
  .photo-live-cases-pagination__status { line-height: 1.5; text-align: center; }
  .photo-live-cases-pagination__controls { margin-top: 12px; justify-content: center; gap: 5px; }
  .photo-live-cases-pagination__button { min-width: 34px; height: 34px; padding: 0 8px; }
  .photo-live-cases-pagination__button--arrow { padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .photo-live-cases-hero__track,
  .photo-live-cases-hero__image,
  .photo-live-cases-grid,
  .photo-live-case-card__image { transition: none; }

  .photo-live-cases-hero__skeleton,
  .photo-live-case-card--skeleton span,
  .photo-live-case-card--skeleton i,
  .photo-live-case-card--skeleton small { animation: none; }
}
