/* V12 · compact review queue + side-by-side focus workspace */
.card__review-layout {
  min-width: 0;
}

.card:not(.card--focused) .copy-display__title {
  display: -webkit-box;
  min-height: 3.5rem;
  max-height: 3.5rem;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card:not(.card--focused) .copy-display__body {
  display: -webkit-box;
  min-height: 6rem;
  max-height: 6rem;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.card:not(.card--focused) .copy-display__tags {
  min-height: 4rem;
  max-height: 4rem;
  overflow: hidden;
  align-content: start;
}

.card:not(.card--focused) .card__facts {
  display: none;
}

.card:not(.card--focused) .card__media {
  min-height: 0;
}

.card:not(.card--focused) .card__copy {
  padding: .8rem;
}

.card:not(.card--focused) .review-state {
  min-height: 2.1rem;
  margin-top: .5rem;
  padding: .38rem .55rem;
}

.card:not(.card--focused) .copy-display {
  gap: .65rem;
  margin-top: .65rem;
}

.card:not(.card--focused) .gallery {
  grid-auto-flow: row;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  padding: .6rem;
}

.card:not(.card--focused) .gallery__item:not(:first-child),
.card:not(.card--focused) .image-feedback {
  display: none;
}

.card:not(.card--focused) .gallery__item img {
  width: 100%;
  height: 10.25rem;
  max-height: none;
  object-fit: contain;
  object-position: center;
}

.card:not(.card--focused) .gallery__item figcaption {
  display: none;
}

.card:not(.card--focused) .card__actions {
  grid-template-columns: 1fr;
  padding: .65rem .8rem .8rem;
}

.card:not(.card--focused) .action--focus {
  grid-column: auto;
}

.card__focus-tabs,
.card__focus-close {
  display: none;
}

body.card-focus-open {
  overflow: hidden;
}

.card-focus-backdrop {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  cursor: default;
}

body.card-focus-open .review-panel {
  z-index: 100;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.card--focused {
  position: fixed;
  top: 50%;
  left: 50%;
  display: grid;
  overflow: hidden;
  border-color: rgba(255, 255, 255, .38);
  background: rgba(245, 248, 253, .94);
  box-shadow:
    0 2rem 7rem rgba(0, 0, 0, .38),
    inset 0 1px 0 rgba(255, 255, 255, .84);
  transform: translate(-50%, -50%);
}

@keyframes focus-workspace-in {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + .7rem)) scale(.985);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.card--focused .card__focus-close {
  position: absolute;
  top: .85rem;
  right: .85rem;
  z-index: 5;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(96, 117, 148, .18);
  border-radius: 50%;
  background: rgba(238, 243, 251, .88);
  color: var(--soft);
  cursor: pointer;
  font-size: 1.45rem;
  line-height: 1;
  box-shadow:
    0 .35rem 1rem rgba(36, 50, 72, .12),
    inset 0 1px 0 rgba(255, 255, 255, .9);
  backdrop-filter: blur(1rem) saturate(160%);
  -webkit-backdrop-filter: blur(1rem) saturate(160%);
}

.card--focused .card__review-layout {
  display: grid;
  min-height: 0;
  overflow: hidden;
}

.card--focused .card__copy,
.card--focused .card__media {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(10, 132, 255, .38) rgba(118, 118, 128, .08);
  scrollbar-width: thin;
}

.card--focused .copy-display__title,
.card--focused .copy-display__body,
.card--focused .copy-display__tags {
  min-height: 0;
  max-height: none;
}

.card--focused .review-actions {
  position: sticky;
  bottom: -.2rem;
  z-index: 2;
  margin: 1rem -.3rem 0;
  padding: .8rem .3rem .25rem;
  background: linear-gradient(to bottom, transparent, rgba(245, 248, 253, .96) 24%);
}

.card--focused .card__facts {
  display: grid;
}

.card--focused .card__media {
  border-top: 0;
  border-bottom: 0;
  border-left: 1px solid var(--line);
}

.card--focused .gallery {
  display: grid;
  grid-auto-flow: row;
  grid-template-columns: minmax(0, 1fr);
  overflow: visible;
  scroll-snap-type: none;
}

.card--focused .gallery__item {
  scroll-snap-align: none;
}

.card--focused .image-feedback {
  display: block;
}

.card--focused .card__actions {
  position: relative;
  z-index: 2;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  background: rgba(239, 244, 251, .92);
  backdrop-filter: blur(1.5rem) saturate(165%);
  -webkit-backdrop-filter: blur(1.5rem) saturate(165%);
}

:root[data-theme="dark"] .card--focused {
  border-color: rgba(213, 232, 255, .18);
  background: rgba(15, 20, 29, .97);
  box-shadow:
    0 2rem 7rem rgba(0, 0, 0, .58),
    inset 0 1px 0 rgba(255, 255, 255, .12);
}

:root[data-theme="dark"] .card-focus-backdrop {
  background: rgba(0, 0, 0, .62);
}

:root[data-theme="dark"] .card--focused .card__focus-close {
  border-color: rgba(213, 232, 255, .14);
  background: rgba(43, 53, 71, .9);
  color: #f5f5f7;
  box-shadow:
    0 .4rem 1.2rem rgba(0, 0, 0, .28),
    inset 0 1px 0 rgba(255, 255, 255, .12);
}

:root[data-theme="dark"] .card--focused .review-actions {
  background: linear-gradient(to bottom, transparent, rgba(15, 20, 29, .98) 24%);
}

:root[data-theme="dark"] .card--focused .card__media {
  background: rgba(7, 10, 16, .62);
}

:root[data-theme="dark"] .card--focused .card__actions {
  border-top-color: rgba(213, 232, 255, .1);
  background: rgba(19, 25, 35, .94);
}

@media (max-width: 53.99rem) {
  .card--focused {
    top: .4rem;
    right: .4rem;
    bottom: .4rem;
    left: .4rem;
    transform: none;
  }

  @keyframes focus-workspace-mobile-in {
    from {
      opacity: 0;
      transform: translateY(.6rem) scale(.99);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  .card--focused .card__focus-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .35rem;
    padding: .7rem 4rem .55rem .7rem;
    border-bottom: 1px solid var(--line);
    background: rgba(239, 244, 251, .9);
  }

  .card--focused .card__focus-tabs button {
    min-height: 2.75rem;
    padding: .5rem .7rem;
    border: 1px solid transparent;
    border-radius: .85rem;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-weight: 720;
  }

  .card--focused .card__focus-tabs button[aria-pressed="true"] {
    border-color: rgba(10, 132, 255, .2);
    background: rgba(10, 132, 255, .12);
    color: #0875db;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75);
  }

  .card--focused .card__review-layout {
    min-height: 0;
    overflow: hidden;
  }

  .card--focused .card__copy,
  .card--focused .card__media {
    width: 100%;
    height: 100%;
    border: 0;
  }

  .card--focused.card--pane-copy .card__media,
  .card--focused.card--pane-media .card__copy {
    display: none;
  }

  .card--focused .card__actions {
    padding: .65rem .7rem .75rem;
  }

  :root[data-theme="dark"] .card--focused .card__focus-tabs {
    border-bottom-color: rgba(213, 232, 255, .1);
    background: rgba(19, 25, 35, .94);
  }

  :root[data-theme="dark"] .card--focused .card__focus-tabs button[aria-pressed="true"] {
    border-color: rgba(74, 163, 255, .24);
    background: rgba(10, 132, 255, .18);
    color: #8dc8ff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .card--focused {
    animation: none;
  }
}

/* V13 · Xiaohongshu-style cover feed */

.card--cover {
  min-width: 0;
  overflow: hidden;
}

.card__cover-entry {
  display: grid;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.card__cover-media {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 3 / 4;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.card__cover-media img {
  position: absolute;
  display: block;
  object-fit: contain;
  object-position: center;
  transition: transform 220ms ease;
}

.card__cover-entry:hover .card__cover-media img {
  transform: scale(1.018);
}

.card__cover-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-weight: 760;
  letter-spacing: -.015em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card__cover-empty {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--muted);
  font-size: .85rem;
}

.card__cover-entry:focus-visible {
  outline: .2rem solid rgba(10, 132, 255, .45);
  outline-offset: -.2rem;
}

:root[data-theme="dark"] .card__cover-media {
  border-bottom-color: rgba(213, 232, 255, .09);
}

@media (min-width: 54rem) {
}

@media (min-width: 82rem) {
}

@media (max-width: 39rem) {

  .card--cover {
    border-radius: 1rem;
  }

  .card__cover-title {
    min-height: 3.9rem;
    padding: .7rem .7rem .8rem;
    font-size: .9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card__cover-media img {
    transition: none;
  }
}

/* V14 · on-demand floating batch inspector */
.workspace {
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 54rem) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
  }
}

.side-panel {
  position: fixed;
  width: min(22rem, calc(100vw - 2rem));
  height: auto;
  min-height: 0;
  grid-template-rows: auto auto auto;
  align-content: start;
  overflow-x: hidden;
  overflow-y: auto;
  padding: .75rem;
  border: 1px solid rgba(255, 255, 255, .54);
  border-radius: 1.55rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(236, 243, 252, .7)),
    rgba(255, 255, 255, .68);
  box-shadow:
    0 1.6rem 5rem rgba(31, 52, 82, .24),
    inset 0 1px 0 rgba(255, 255, 255, .94);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(2rem) saturate(185%);
  -webkit-backdrop-filter: blur(2rem) saturate(185%);
}

body.batch-panel-open .side-panel {
  opacity: 1;
  pointer-events: auto;
}

.side-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .2rem .2rem .05rem .35rem;
}

.side-panel__head .eyebrow {
  margin-bottom: .15rem;
  font-size: .62rem;
}

.side-panel__head strong {
  color: var(--text);
  font-size: 1rem;
}

.side-panel__close {
  display: grid;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(77, 103, 140, .16);
  border-radius: 50%;
  background: rgba(255, 255, 255, .68);
  color: var(--soft);
  cursor: pointer;
  font: inherit;
  font-size: 1.35rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}

.batch-panel-toggle {
  position: fixed;
  display: flex;
  align-items: center;
  gap: .55rem;
  border: 1px solid rgba(255, 255, 255, .58);
  color: #0875db;
  cursor: pointer;
  transition:
    width 180ms ease,
    opacity 160ms ease,
    transform 180ms ease;
  backdrop-filter: blur(1.35rem) saturate(170%);
  -webkit-backdrop-filter: blur(1.35rem) saturate(170%);
}

.batch-panel-toggle svg {
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.batch-panel-toggle span {
  max-width: 0;
  overflow: hidden;
  font-weight: 760;
  opacity: 0;
  white-space: nowrap;
  transition:
    max-width 180ms ease,
    opacity 130ms ease;
}

body.batch-panel-open .batch-panel-toggle,
body.card-focus-open .batch-panel-toggle {
  pointer-events: none;
}

.batch-panel-scrim {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

body.batch-panel-open .batch-panel-scrim {
  opacity: 1;
  pointer-events: auto;
}

:root[data-theme="dark"] .side-panel {
  border-color: rgba(213, 232, 255, .16);
  background:
    linear-gradient(145deg, rgba(37, 47, 64, .92), rgba(14, 19, 28, .9)),
    rgba(11, 15, 22, .88);
  box-shadow:
    0 1.7rem 5rem rgba(0, 0, 0, .5),
    inset 0 1px 0 rgba(255, 255, 255, .12);
}

:root[data-theme="dark"] .side-panel__close,
:root[data-theme="dark"] .batch-panel-toggle {
  border-color: rgba(213, 232, 255, .15);
  background:
    linear-gradient(145deg, rgba(53, 67, 91, .9), rgba(24, 31, 44, .88)),
    rgba(17, 22, 31, .84);
  color: #8dc8ff;
  box-shadow:
    0 .65rem 1.8rem rgba(0, 0, 0, .3),
    inset 0 1px 0 rgba(255, 255, 255, .12);
}

:root[data-theme="dark"] .batch-panel-scrim {
  background: rgba(0, 0, 0, .32);
}

@media (min-width: 54rem) {
}

@media (min-width: 82rem) {
  .content-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 53.99rem) {
  .side-panel {
    width: auto;
    padding: .65rem;
    border-radius: 1.35rem;
  }

  .batch-panel-toggle span {
    max-width: 5rem;
    opacity: 1;
  }

  .batch-panel-scrim {
    background: rgba(7, 12, 20, .42);
    backdrop-filter: blur(.35rem);
    -webkit-backdrop-filter: blur(.35rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .side-panel,
  .batch-panel-toggle,
  .batch-panel-toggle span,
  .batch-panel-scrim {
    transition: none;
  }
}

/* V15 · editorial cover shelf + compact spatial review */

.topbar__identity {
  gap: 0;
}

.topbar__wordmark-wrap {
  display: flex;
  width: fit-content;
  align-items: center;
  border: 1px solid rgba(190, 145, 53, .18);
  border-radius: 999px;
}

.topbar__wordmark-icon {
  position: relative;
  display: block;
  flex: 0 0 2rem;
  overflow: hidden;
  border: 1px solid rgba(222, 176, 73, .26);
  border-radius: 50%;
}

.topbar__wordmark-icon img {
  top: -2.72rem;
  left: -8.22rem;
}

:root[data-theme="dark"] .topbar__wordmark-wrap {
  border-color: rgba(236, 190, 84, .2);
  background: linear-gradient(110deg, rgba(255, 244, 214, .1), rgba(255, 255, 255, .035));
}

.review-panel {
  background: rgba(235, 240, 247, .54);
}

.review-toolbar {
  padding: 1rem 1.15rem;
}

.content-grid {
  gap: .9rem;
  padding: .9rem;
  align-items: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card--cover {
  align-self: start;
  padding: .35rem;
  border: 1px solid rgba(91, 112, 141, .17);
  border-radius: 1.05rem;
  background: rgba(250, 252, 255, .92);
  box-shadow:
    0 .55rem 1.5rem rgba(42, 58, 82, .08),
    inset 0 1px 0 rgba(255, 255, 255, .94);
  transition:
    transform 180ms cubic-bezier(.2, .8, .2, 1),
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.card--cover:hover {
  border-color: rgba(10, 132, 255, .25);
  box-shadow:
    0 .85rem 2.2rem rgba(35, 55, 84, .14),
    inset 0 1px 0 rgba(255, 255, 255, .96);
  transform: translateY(-.16rem);
}

.card__cover-entry {
  border-radius: .8rem;
}

.card__cover-media {
  border: 1px solid rgba(83, 104, 133, .12);
  border-radius: .8rem;
  background:
    linear-gradient(145deg, rgba(222, 229, 239, .9), rgba(244, 247, 251, .96)),
    #edf1f6;
}

.card__cover-media img {
  inset: .18rem;
  width: calc(100% - .36rem);
  height: calc(100% - .36rem);
  border-radius: .65rem;
}

.card__cover-title {
  min-height: 3.55rem;
  padding: .65rem .55rem .55rem;
  font-size: .94rem;
  line-height: 1.42;
}

:root[data-theme="dark"] .review-panel {
  background: rgba(6, 10, 16, .48);
}

:root[data-theme="dark"] .card--cover {
  border-color: rgba(213, 232, 255, .12);
  background: rgba(22, 28, 38, .96);
  box-shadow:
    0 .65rem 1.8rem rgba(0, 0, 0, .24),
    inset 0 1px 0 rgba(255, 255, 255, .08);
}

:root[data-theme="dark"] .card--cover:hover {
  border-color: rgba(94, 177, 255, .28);
  box-shadow:
    0 1rem 2.4rem rgba(0, 0, 0, .36),
    inset 0 1px 0 rgba(255, 255, 255, .1);
}

:root[data-theme="dark"] .card__cover-media {
  border-color: rgba(213, 232, 255, .08);
  background:
    linear-gradient(145deg, rgba(8, 12, 18, .96), rgba(18, 24, 33, .96)),
    #0c1119;
}

@media (min-width: 40rem) {
  .content-grid {
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  }
}

@media (min-width: 54rem) {
  .content-grid {
    grid-template-columns: repeat(auto-fill, minmax(12.8rem, 15rem));
    justify-content: center;
  }
}

.batch-panel-toggle {
  left: 1rem;
  z-index: 75;
  transform: none;
  touch-action: manipulation;
  isolation: isolate;
}

.batch-panel-toggle::before,
.batch-panel-toggle::after {
  pointer-events: none;
}

.side-panel {
  bottom: auto;
  left: 1rem;
  z-index: 76;
  transform: translate(-.35rem, -.3rem) scale(.82);
  transform-origin: top left;
  transition:
    transform 300ms cubic-bezier(.2, .82, .2, 1),
    opacity 180ms ease,
    filter 260ms ease;
  filter: blur(.35rem);
}

body.batch-panel-open .side-panel {
  transform: none;
  filter: blur(0);
}

body.batch-panel-open .batch-panel-toggle,
body.card-focus-open .batch-panel-toggle {
  opacity: 0;
  transform: scale(.82);
}

.batch-panel-scrim {
  z-index: 74;
  background: rgba(13, 24, 40, .035);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.batch-panel-intro .side-panel {
  animation: batch-intro-breathe 680ms ease-out both;
}

@keyframes batch-intro-breathe {
  from {
    opacity: 0;
    transform: translate(-.6rem, -.5rem) scale(.72);
    filter: blur(.55rem);
  }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

.card-focus-backdrop {
  z-index: 101;
  background: rgba(7, 12, 20, .38);
  opacity: 1;
  animation: focus-backdrop-in 220ms ease-out both;
  backdrop-filter: blur(.35rem);
  -webkit-backdrop-filter: blur(.35rem);
}

.card-focus-backdrop--closing {
  animation: focus-backdrop-out 200ms ease-in both;
}

@keyframes focus-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes focus-backdrop-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

.card--focused {
  z-index: 102;
  animation: focus-card-pop-in 320ms cubic-bezier(.2, .84, .2, 1) both;
  transform-origin: center;
}

.card--focused.card--steady {
  animation: none;
}

.card--focused.card--closing {
  animation: focus-card-pop-out 210ms cubic-bezier(.4, 0, .8, .2) both;
  pointer-events: none;
}

@keyframes focus-card-pop-in {
  from {
    opacity: 0;
    filter: blur(.45rem);
    transform:
      translate(calc(-50% + var(--focus-dx, 0px)), calc(-50% + var(--focus-dy, 0px)))
      scale(var(--focus-scale, .84));
  }
  62% {
    opacity: 1;
    filter: blur(0);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes focus-card-pop-out {
  from {
    opacity: 1;
    filter: blur(0);
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    opacity: 0;
    filter: blur(.35rem);
    transform:
      translate(calc(-50% + var(--focus-dx, 0px)), calc(-50% + var(--focus-dy, 0px)))
      scale(var(--focus-scale, .84));
  }
}

.card--focused .card__review-layout {
  grid-template-areas: "media copy";
}

.card--focused .card__media {
  grid-area: media;
  overflow: hidden;
  border: 0;
  border-right: 1px solid var(--line);
}

.card--focused .card__copy {
  grid-area: copy;
}

.card--focused .card__meta {
  padding-right: 3rem;
}

.card--focused .review-state {
  margin: .75rem 0;
  padding: .55rem .7rem;
}

.card--focused .copy-display {
  gap: .75rem;
  margin-top: .7rem;
}

.card--focused .copy-display__section {
  gap: .35rem;
}

.card--focused .copy-display__title {
  padding: .72rem .8rem;
  font-size: 1.02rem;
}

.card--focused .copy-display__body {
  padding: .72rem .8rem;
  font-size: .94rem;
  line-height: 1.65;
}

.card--focused .copy-display__tags {
  gap: .3rem;
  padding: .55rem .65rem;
}

.card--focused .tag {
  padding: .32rem .48rem;
  font-size: .78rem;
}

.card--focused .card__facts {
  margin-top: .75rem;
  padding-top: .75rem;
  font-size: .82rem;
}

.card--focused .gallery {
  height: 100%;
  min-height: 0;
}

.focused-gallery-nav {
  display: flex;
  align-items: center;
  justify-content: center;
}

.focused-gallery-nav button {
  border: 1px solid rgba(96, 117, 148, .16);
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: .78rem;
  font-weight: 760;
}

.focused-gallery-nav > span {
  color: var(--muted);
  font-weight: 720;
  letter-spacing: .04em;
}

.focused-gallery-nav button[aria-pressed="true"] {
  border-color: rgba(10, 132, 255, .28);
  background: rgba(10, 132, 255, .14);
  color: #0875db;
}

.card--focused .gallery__item {
  display: grid;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.card--focused .gallery__preview {
  position: relative;
  display: grid;
  min-height: 0;
  place-items: center;
}

.card--focused .gallery__item img {
  position: absolute;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

.card--focused .gallery__item figcaption {
  font-size: .76rem;
}

.card--focused .image-feedback {
  overflow-y: auto;
}

.card--focused .image-feedback__composer {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.card--focused .image-feedback__composer .action {
  width: auto;
  min-width: 7rem;
}

.card--focused .card__actions {
  min-height: 3.7rem;
  padding: .55rem .75rem .65rem;
}

:root[data-theme="dark"] .focused-gallery-nav button[aria-pressed="true"] {
  border-color: rgba(91, 173, 255, .28);
  background: rgba(10, 132, 255, .18);
  color: #8dc8ff;
}

:root[data-theme="dark"] .card--focused .gallery__preview {
  background: rgba(4, 7, 11, .72);
}

.filter,
.side-panel__close,
.focused-gallery-nav button {
  min-height: 44px;
}

.side-panel__close {
  width: 44px;
  min-width: 44px;
  height: 44px;
}

@media (max-width: 53.99rem) {

  .side-panel {
    right: .5rem;
    bottom: .5rem;
    left: .5rem;
    transform: translate(-.2rem, -.2rem) scale(.88);
  }

  body.batch-panel-open .batch-panel-toggle,
  body.card-focus-open .batch-panel-toggle {
    transform: scale(.84);
  }

  .card--focused {
    animation-name: focus-card-mobile-in;
  }

  .card--focused.card--closing {
    animation-name: focus-card-mobile-out;
  }

  @keyframes focus-card-mobile-in {
    from {
      opacity: 0;
      filter: blur(.35rem);
      transform: translateY(.65rem) scale(.94);
    }
    to {
      opacity: 1;
      filter: blur(0);
      transform: none;
    }
  }

  @keyframes focus-card-mobile-out {
    from {
      opacity: 1;
      transform: none;
    }
    to {
      opacity: 0;
      transform: translateY(.45rem) scale(.95);
    }
  }

  .card--focused .card__review-layout {
    grid-template-areas: none;
  }

  .card--focused .card__media {
    border: 0;
  }

  .card--focused .image-feedback__composer {
    grid-template-columns: minmax(0, 1fr);
  }

  .card--focused .image-feedback {
    overflow: visible;
  }

  .card--focused .image-feedback__composer .action {
    width: 100%;
  }

}

@media (max-width: 39rem) {
  .content-grid {
    gap: .65rem;
    padding: .65rem;
  }

  .card--cover {
    padding: .28rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card--cover,
  .card--focused,
  .card-focus-backdrop,
  .side-panel,
  body.batch-panel-intro .side-panel {
    animation: none;
    transition: none;
  }
}

/* V16 · composed identity + social review cards + single-layer media workspace */

.topbar__identity > div {
  display: grid;
  justify-items: start;
}

.topbar__identity h1 {
  margin-top: .08rem;
}

.topbar__wordmark-wrap {
  min-height: 2rem;
  margin-top: .5rem;
  margin-left: 0;
  padding: .15rem .65rem .15rem .18rem;
  gap: .5rem;
  overflow: visible;
  border-color: rgba(190, 145, 53, .14);
  background: linear-gradient(110deg, rgba(255, 250, 236, .52), rgba(255, 255, 255, .08));
}

.topbar__wordmark-icon {
  width: 2.15rem;
  height: 2.15rem;
  flex-basis: 2.15rem;
  border-color: rgba(222, 176, 73, .32);
  background: #8a6b43;
  box-shadow:
    0 .18rem .7rem rgba(180, 122, 9, .2),
    inset 0 1px 0 rgba(255, 255, 255, .42);
}

.topbar__wordmark-icon img {
  position: static;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.02);
}

.topbar__wordmark-copy {
  color: #67563a;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", "Songti SC", serif;
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: .08em;
}

.topbar__wordmark-copy span {
  color: #a56c00;
  font-size: 1.08em;
  font-weight: 800;
}

:root[data-theme="dark"] .topbar__wordmark-copy {
  color: #ddcba7;
}

.card__cover-social {
  display: flex;
  min-width: 0;
  padding: 0 .55rem .6rem;
  align-items: center;
  justify-content: space-between;
  gap: .55rem;
  color: var(--muted);
}

.card__cover-author {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: .45rem;
}

.card__cover-avatar {
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  flex: 0 0 1.75rem;
  place-items: center;
  border: 1px solid rgba(185, 130, 20, .2);
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(255, 245, 210, .94), rgba(235, 190, 91, .44)),
    #f5dfaa;
  color: #8d5d00;
  font-family: "Kaiti SC", "STKaiti", serif;
  font-size: .83rem;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.card__cover-author > span:last-child {
  display: grid;
  min-width: 0;
  gap: .05rem;
  text-align: left;
}

.card__cover-author b,
.card__cover-author small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card__cover-author b {
  color: var(--soft);
  font-size: .68rem;
  font-weight: 720;
}

.card__cover-author small {
  font-size: .62rem;
}

.card__cover-signal {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: .25rem;
  font-size: .64rem;
  font-weight: 680;
  white-space: nowrap;
}

.card__cover-signal svg {
  width: .95rem;
  height: .95rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
}

:root[data-theme="dark"] .card__cover-avatar {
  border-color: rgba(244, 198, 99, .24);
  background: linear-gradient(145deg, rgba(111, 83, 28, .78), rgba(57, 45, 25, .86));
  color: #f3d48f;
}

.batch-panel-toggle {
  top: auto;
  bottom: 1rem;
  width: 3rem;
  min-width: 3rem;
  min-height: 3rem;
  padding: .62rem;
  overflow: hidden;
  border-color: rgba(255, 255, 255, .5);
  border-radius: .95rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(229, 239, 250, .72)),
    rgba(255, 255, 255, .66);
  box-shadow:
    0 .45rem 1.35rem rgba(43, 69, 105, .12),
    inset 0 1px 0 rgba(255, 255, 255, .9);
}

.batch-panel-toggle svg {
  width: 1.7rem;
  height: 1.7rem;
}

.batch-panel-toggle span,
.batch-panel-toggle:hover span,
.batch-panel-toggle:focus-visible span {
  max-width: 0;
  opacity: 0;
}

.batch-panel-toggle:hover,
.batch-panel-toggle:focus-visible {
  width: 8.25rem;
  transform: translateY(-.08rem);
}

.batch-panel-toggle:hover span,
.batch-panel-toggle:focus-visible span {
  max-width: 5rem;
  opacity: 1;
}

.side-panel {
  top: 6.75rem;
  max-height: calc(100dvh - 7.75rem);
}

.card-focus-backdrop--steady {
  animation: none;
}

.card--focused {
  border-radius: 1.3rem;
}

.card--focused .card__media {
  background: rgba(225, 233, 244, .4);
}

.focused-gallery-nav {
  min-height: 2.75rem;
  gap: .65rem;
}

.focused-gallery-nav button {
  display: grid;
  width: 2.75rem;
  min-width: 2.75rem;
  height: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  place-items: center;
  border-color: rgba(86, 108, 138, .16);
  background: rgba(255, 255, 255, .74);
  color: var(--soft);
  box-shadow:
    0 .25rem .8rem rgba(43, 58, 82, .09),
    inset 0 1px 0 rgba(255, 255, 255, .92);
  transition:
    transform 150ms ease,
    background 150ms ease,
    color 150ms ease;
}

.focused-gallery-nav button:hover:not(:disabled),
.focused-gallery-nav button:focus-visible:not(:disabled) {
  background: rgba(255, 255, 255, .96);
  color: #0875db;
  transform: translateY(-1px);
}

.focused-gallery-nav button:disabled {
  cursor: default;
  opacity: .3;
}

.focused-gallery-nav button svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.focused-gallery-nav > span {
  min-width: 3.6rem;
  text-align: center;
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
}

.focused-gallery-nav > span strong {
  color: var(--text);
  font-size: .9rem;
}

.card--focused .gallery__preview {
  border: 1px solid rgba(86, 108, 138, .1);
  border-radius: 1rem;
  background: rgba(255, 255, 255, .86);
  cursor: default;
}

.card--focused .gallery__item img {
  border-radius: .75rem;
}

.card--focused .image-feedback {
  margin-top: .25rem;
  padding: .55rem .6rem;
}

.card--focused .image-feedback__composer textarea {
  min-height: 2.9rem;
  max-height: 4.8rem;
}

:root[data-theme="dark"] .focused-gallery-nav button {
  border-color: rgba(213, 232, 255, .12);
  background: rgba(31, 39, 53, .82);
}

@media (max-width: 67rem) and (min-width: 54rem) {
  .card--focused .card__review-layout {
    grid-template-columns: minmax(30rem, 1.35fr) minmax(19rem, .82fr);
  }
}

@media (max-width: 53.99rem) {

  .topbar__wordmark-wrap {
    max-width: none;
    margin-left: 0;
  }

  .topbar__wordmark-copy {
    overflow: visible;
    font-size: .94rem;
    text-overflow: clip;
    white-space: normal;
  }

  .batch-panel-toggle {
    top: auto;
    bottom: .75rem;
    left: .65rem;
    width: 2.85rem;
    min-width: 2.85rem;
    min-height: 2.85rem;
    transform: none;
  }

  .batch-panel-toggle:hover,
  .batch-panel-toggle:focus-visible {
    width: 2.85rem;
    transform: none;
  }

  .batch-panel-toggle:hover span,
  .batch-panel-toggle:focus-visible span {
    max-width: 0;
    opacity: 0;
  }

  .side-panel {
    top: .5rem;
    max-height: none;
  }

  .card--focused {
    border-radius: 1.1rem;
  }

  .card--focused.card--steady {
    animation: none;
  }

  .card--focused .card__review-layout {
    display: block;
  }

  .card--focused .gallery {
    padding: .55rem;
  }

  .focused-gallery-nav {
    min-height: 2.75rem;
  }
}

@media (max-width: 39rem) {
  .topbar__wordmark-icon {
    width: 1.9rem;
    height: 1.9rem;
    flex-basis: 1.9rem;
  }

  .card__cover-social {
    display: grid;
    padding-right: .35rem;
    padding-left: .35rem;
    grid-template-columns: minmax(0, 1fr);
    gap: .32rem;
  }

  .card__cover-author b {
    max-width: none;
  }

  .card__cover-signal {
    padding-left: 2.18rem;
    font-size: .6rem;
  }
}

/* V17 · persistent compact batch rail on review-sized screens */
@media (min-width: 70rem) {
  .workspace {
    grid-template-columns: 15.25rem minmax(0, 1fr);
    gap: .9rem;
    align-items: start;
  }

  .review-panel {
    order: 0;
  }

  .content-grid {
    grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
    justify-content: stretch;
  }

  .side-panel,
  body.batch-panel-open .side-panel {
    position: sticky;
    top: 1rem;
    right: auto;
    bottom: auto;
    left: auto;
    z-index: 10;
    display: grid;
    width: auto;
    height: auto;
    min-height: 0;
    max-height: calc(100dvh - 2rem);
    padding: .65rem;
    gap: .6rem;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, .48);
    border-radius: 1.2rem;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, .7), rgba(235, 242, 250, .58)),
      rgba(255, 255, 255, .58);
    box-shadow:
      0 .8rem 2.4rem rgba(31, 52, 82, .11),
      inset 0 1px 0 rgba(255, 255, 255, .86);
    opacity: 1;
    pointer-events: auto;
    filter: none;
    transform: none;
    transition: none;
    backdrop-filter: blur(1.4rem) saturate(155%);
    -webkit-backdrop-filter: blur(1.4rem) saturate(155%);
  }

  .side-panel__head {
    padding: .15rem .25rem 0;
  }

  .side-panel__head .eyebrow {
    font-size: .58rem;
  }

  .side-panel__head strong {
    font-size: .92rem;
  }

  .side-panel__close,
  .batch-panel-toggle,
  .batch-panel-scrim {
    display: none;
  }

  .side-panel .panel {
    padding: .72rem;
    border-radius: .9rem;
    box-shadow:
      0 .35rem 1rem rgba(42, 58, 82, .06),
      inset 0 1px 0 rgba(255, 255, 255, .72);
  }

  .side-panel .panel__head {
    margin-bottom: .55rem;
    font-size: .72rem;
  }

  .side-panel .panel__head strong {
    font-size: .76rem;
  }

  .side-panel .metrics {
    gap: .35rem;
  }

  .side-panel .metric {
    min-height: 3.75rem;
    padding: .48rem .38rem;
    border-radius: .7rem;
  }

  .side-panel .metric span {
    white-space: nowrap;
  }

  .side-panel .metric strong {
    margin-top: .35rem;
    font-size: 1.22rem;
  }

  .side-panel .batch-facts {
    grid-template-columns: 2.35rem minmax(0, 1fr);
    gap: .38rem .48rem;
    margin-top: .72rem;
    padding-top: .68rem;
    font-size: .72rem;
    line-height: 1.5;
  }

  .side-panel .batch-direction {
    min-height: 1.55rem;
    padding: .18rem .34rem;
    font-size: .64rem;
  }

  .side-panel .batch-direction strong {
    font-size: .66rem;
  }

  .side-panel .history-select-wrap {
    min-height: 2.65rem;
  }

  .side-panel .history-list {
    min-height: 2.65rem;
    padding: .5rem 2rem .5rem .58rem;
    font-size: .68rem;
  }

  :root[data-theme="dark"] .side-panel,
  :root[data-theme="dark"] body.batch-panel-open .side-panel {
    border-color: rgba(213, 232, 255, .12);
    background:
      linear-gradient(145deg, rgba(27, 34, 47, .9), rgba(14, 19, 28, .86)),
      rgba(14, 19, 28, .9);
    box-shadow:
      0 .9rem 2.8rem rgba(0, 0, 0, .24),
      inset 0 1px 0 rgba(255, 255, 255, .08);
  }
}

/* V19 · low-frequency image feedback sheet */
.card--focused .gallery__item {
  position: relative;
}

.card--focused .gallery__item figcaption {
  display: flex;
  min-height: 2.75rem;
  padding: .35rem .25rem 0;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
}

.card--focused .gallery__item figcaption > span {
  min-width: 0;
}

.image-feedback-trigger {
  min-height: 2.25rem;
  padding: .35rem .65rem;
  flex: 0 0 auto;
  border: 1px solid rgba(93, 116, 148, .15);
  border-radius: 999px;
  background: rgba(255, 255, 255, .4);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: .7rem;
  font-weight: 680;
}

.image-feedback-trigger:hover,
.image-feedback-trigger:focus-visible {
  border-color: rgba(10, 132, 255, .3);
  background: rgba(10, 132, 255, .09);
  color: #0875db;
}

.image-feedback-dialog {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: none;
  padding: 1rem;
  place-items: center;
}

.image-feedback-dialog.is-open {
  display: grid;
}

.image-feedback-dialog__scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(5, 9, 16, .5);
  backdrop-filter: blur(.35rem);
  -webkit-backdrop-filter: blur(.35rem);
}

.image-feedback-dialog__panel {
  position: relative;
  z-index: 1;
  width: min(30rem, calc(100% - 1rem));
  max-height: calc(100% - 2rem);
  padding: .8rem;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, .52);
  border-radius: 1.15rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .92), rgba(236, 243, 252, .86)),
    var(--panel);
  box-shadow:
    0 1.5rem 4rem rgba(5, 12, 24, .32),
    inset 0 1px 0 rgba(255, 255, 255, .92);
  backdrop-filter: blur(1.8rem) saturate(170%);
  -webkit-backdrop-filter: blur(1.8rem) saturate(170%);
}

.image-feedback-dialog__head {
  display: flex;
  padding: .1rem .1rem .65rem .25rem;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.image-feedback-dialog__head > div {
  display: grid;
  gap: .18rem;
}

.image-feedback-dialog__head span {
  color: #0875db;
  font-size: .58rem;
  font-weight: 760;
  letter-spacing: .12em;
}

.image-feedback-dialog__head strong {
  color: var(--text);
  font-size: .95rem;
}

.image-feedback-dialog__head > button {
  display: grid;
  width: 2.75rem;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(93, 116, 148, .16);
  border-radius: 50%;
  background: rgba(255, 255, 255, .56);
  color: var(--soft);
  cursor: pointer;
  font: inherit;
  font-size: 1.25rem;
}

.card--focused .image-feedback-dialog .image-feedback {
  display: block;
  max-height: none;
  margin: 0;
  padding: .75rem;
  overflow: visible;
}

.image-feedback-dialog .image-feedback__composer {
  grid-template-columns: minmax(0, 1fr);
}

.image-feedback-dialog .image-feedback__composer .action {
  width: 100%;
}

:root[data-theme="dark"] .image-feedback-trigger {
  border-color: rgba(213, 232, 255, .12);
  background: rgba(26, 34, 47, .56);
}

:root[data-theme="dark"] .image-feedback-dialog__panel {
  border-color: rgba(213, 232, 255, .14);
  background:
    linear-gradient(145deg, rgba(28, 36, 50, .97), rgba(14, 19, 28, .96)),
    #121924;
  box-shadow:
    0 1.5rem 4rem rgba(0, 0, 0, .58),
    inset 0 1px 0 rgba(255, 255, 255, .09);
}

:root[data-theme="dark"] .image-feedback-dialog__head > button {
  border-color: rgba(213, 232, 255, .12);
  background: rgba(38, 48, 65, .78);
}

@media (max-width: 53.99rem) {
  .card--focused {
    width: auto;
    height: auto;
  }

  .card--focused .gallery__item figcaption {
    align-items: flex-start;
  }

  .image-feedback-trigger {
    min-height: 2.5rem;
  }

  .image-feedback-dialog {
    padding: .5rem;
  }

  .image-feedback-dialog__panel {
    width: min(31rem, 100%);
    max-height: calc(100% - 1rem);
  }
}

/* V18 · stable in-place carousel + compact review composition */
.card__cover-avatar,
:root[data-theme="dark"] .card__cover-avatar {
  border-color: rgba(218, 54, 70, .32);
  background:
    linear-gradient(145deg, #ff6875, #bd2338),
    #d72f45;
  color: #fff;
  box-shadow:
    0 .18rem .55rem rgba(177, 24, 48, .25),
    inset 0 1px 0 rgba(255, 255, 255, .34);
}

.card--focused {
  width: min(88vw, 72rem);
  height: min(92dvh, 54rem);
  grid-template-rows: minmax(0, 1fr);
}

.card--focused .card__review-layout {
  grid-template-columns: minmax(28rem, 1.05fr) minmax(23rem, .95fr);
}

.card--focused .card__copy {
  padding: .9rem .95rem 1rem;
}

.card--focused .gallery {
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  padding: .65rem;
}

.card--focused .gallery__item {
  grid-template-rows: minmax(0, 1fr) auto auto;
}

.gallery__stage {
  position: relative;
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
  overscroll-behavior-x: contain;
}

.card--focused .gallery__preview {
  width: min(100%, 27rem);
  height: 100%;
  margin: 0 auto;
  padding: .3rem;
  overflow: visible;
}

.card--focused .gallery__item img {
  inset: .3rem;
  width: calc(100% - .6rem);
  height: calc(100% - .6rem);
}

.gallery__arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 2.75rem;
  min-width: 2.75rem;
  height: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(94, 116, 147, .2);
  border-radius: 50%;
  background: rgba(244, 248, 253, .88);
  color: #33445b;
  cursor: pointer;
  box-shadow:
    0 .35rem 1rem rgba(28, 42, 61, .2),
    inset 0 1px 0 rgba(255, 255, 255, .94);
  transform: translateY(-50%);
  backdrop-filter: blur(1rem) saturate(165%);
  -webkit-backdrop-filter: blur(1rem) saturate(165%);
  transition:
    background 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

.gallery__arrow--previous {
  left: .65rem;
}

.gallery__arrow--next {
  right: .65rem;
}

.gallery__arrow:hover:not(:disabled),
.gallery__arrow:focus-visible:not(:disabled) {
  background: rgba(255, 255, 255, .98);
  color: #0875db;
}

.gallery__arrow:active:not(:disabled) {
  transform: translateY(-50%) scale(.94);
}

.gallery__arrow:disabled {
  opacity: .22;
  cursor: default;
}

.gallery__arrow svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.gallery__counter {
  position: absolute;
  right: 50%;
  bottom: .75rem;
  z-index: 3;
  min-width: 3.5rem;
  padding: .28rem .55rem;
  border: 1px solid rgba(94, 116, 147, .16);
  border-radius: 999px;
  background: rgba(244, 248, 253, .82);
  color: var(--muted);
  font-size: .7rem;
  font-variant-numeric: tabular-nums;
  font-weight: 720;
  text-align: center;
  transform: translateX(50%);
  box-shadow: 0 .2rem .65rem rgba(28, 42, 61, .12);
  backdrop-filter: blur(.8rem);
  -webkit-backdrop-filter: blur(.8rem);
}

.gallery__counter strong {
  color: var(--text);
  font-size: .78rem;
}

.card--focused .image-feedback {
  max-height: 6.8rem;
}

.card--focused .review-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  margin-top: .7rem;
  padding-top: .6rem;
}

.card--focused .review-actions > small {
  grid-column: 1 / -1;
  margin: -.1rem 0 0;
  text-align: center;
}

.review-actions__utilities {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
}

.review-actions__utilities .action {
  width: 100%;
}

.review-actions--locked > .action:first-child {
  grid-column: 1 / -1;
}

:root[data-theme="dark"] .gallery__arrow,
:root[data-theme="dark"] .gallery__counter {
  border-color: rgba(213, 232, 255, .14);
  background: rgba(24, 31, 43, .86);
  color: #c3d0e2;
}

@media (max-width: 53.99rem) {
  .card--focused {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .card--focused .gallery__preview {
    width: min(100%, 27rem);
  }

  .gallery__arrow--previous {
    left: .45rem;
  }

  .gallery__arrow--next {
    right: .45rem;
  }

  .card--focused .image-feedback {
    max-height: none;
  }
}

@media (min-width: 70rem) {
  .side-panel .metrics {
    grid-template-columns: .9fr .8fr 1.3fr;
  }

  .side-panel .metric {
    min-width: 0;
    padding-right: .28rem;
    padding-left: .28rem;
    text-align: center;
  }

  .side-panel .metric span {
    overflow: hidden;
    font-size: .6rem;
    text-overflow: ellipsis;
  }

  .side-panel .metric strong,
  .side-panel #image-count {
    margin-top: .42rem;
    overflow: visible;
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.025em;
    white-space: nowrap;
  }

  .side-panel .batch-facts dt,
  .side-panel .batch-facts dd {
    font-size: .7rem;
  }

  .side-panel #batch-directions {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: .3rem;
  }

  .side-panel .batch-direction {
    display: flex;
    width: 100%;
    justify-content: space-between;
    white-space: nowrap;
  }
}

/* V20 · stable local actions + full-screen image inspection */
.confirm-modal {
  z-index: 260;
}

.card--focused .card__copy {
  display: flex;
  flex-direction: column;
}

.card--focused .card__meta {
  align-items: flex-start;
}

.card--focused .card__meta-actions {
  flex-wrap: wrap;
  row-gap: .38rem;
}

.card__confirm-top,
.card__confirm-top--locked,
.card__confirm-top--disabled {
  display: inline-flex;
  min-height: 2.25rem;
  padding: .36rem .68rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(10, 132, 255, .32);
  border-radius: .65rem;
  background: linear-gradient(135deg, #168cff, #3a72e7);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: .72rem;
  font-weight: 780;
  line-height: 1;
  box-shadow:
    0 .24rem .6rem rgba(10, 103, 214, .18),
    inset 0 1px 0 rgba(255, 255, 255, .28);
}

.card__confirm-top:hover:not(:disabled),
.card__confirm-top:focus-visible:not(:disabled) {
  filter: brightness(1.05);
}

.card__confirm-top:disabled,
.card__confirm-top--disabled {
  cursor: not-allowed;
  opacity: .48;
}

.card__confirm-top--locked {
  border-color: rgba(44, 166, 92, .25);
  background: rgba(44, 166, 92, .1);
  color: #26844d;
  box-shadow: none;
  cursor: default;
}

.card__confirm-cluster {
  display: inline-flex;
  min-width: max-content;
  align-items: center;
  gap: .35rem;
}

.card__revoke {
  min-height: 2.25rem;
  padding: .36rem .62rem;
  border: 1px solid rgba(221, 76, 72, .22);
  border-radius: .65rem;
  background: rgba(221, 76, 72, .07);
  color: #b13b3b;
  cursor: pointer;
  font: inherit;
  font-size: .7rem;
  font-weight: 760;
}

.card__revoke:hover:not(:disabled),
.card__revoke:focus-visible:not(:disabled) {
  border-color: rgba(221, 76, 72, .38);
  background: rgba(221, 76, 72, .12);
}

.card__revoke:disabled {
  cursor: wait;
  opacity: .55;
}

.card--focused .card__delete {
  min-width: 2.25rem;
  min-height: 2.25rem;
  padding: .36rem .62rem;
  border-radius: .65rem;
  font-size: .72rem;
}

.copy-footer-actions {
  display: grid;
  width: 100%;
  margin-top: auto;
  padding-top: .9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
}

.copy-footer-actions .action {
  position: static;
  width: 100%;
  min-height: 2.75rem;
}

.copy-footer-actions > small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: .7rem;
  text-align: center;
}

.gallery__caption-actions {
  display: flex;
  min-width: max-content;
  align-items: center;
  justify-content: flex-end;
  gap: .42rem;
}

.image-download-action {
  display: inline-flex;
  min-height: 2.25rem;
  padding: .35rem .68rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(89, 93, 214, .25);
  border-radius: 999px;
  background: rgba(89, 93, 214, .09);
  color: #4f55b9;
  font-size: .7rem;
  font-weight: 720;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.image-download-action:hover,
.image-download-action:focus-visible {
  border-color: rgba(89, 93, 214, .42);
  background: rgba(89, 93, 214, .15);
  color: #363ca2;
}

.image-download-action--disabled {
  border-color: rgba(93, 116, 148, .12);
  background: rgba(93, 116, 148, .06);
  color: var(--muted);
  cursor: not-allowed;
  opacity: .62;
}

.card--focused [data-open-image-preview] {
  cursor: zoom-in;
}

.card--focused [data-open-image-preview]:focus-visible {
  outline: .2rem solid rgba(10, 132, 255, .58);
  outline-offset: -.2rem;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: none;
  padding: 1rem;
  place-items: center;
}

.image-lightbox.is-open {
  display: grid;
}

.image-lightbox__scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(5, 8, 13, .91);
  cursor: zoom-out;
  backdrop-filter: blur(.7rem);
  -webkit-backdrop-filter: blur(.7rem);
}

.image-lightbox__panel {
  position: relative;
  z-index: 1;
  display: grid;
  max-width: calc(100vw - 2rem);
  max-height: calc(100dvh - 2rem);
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
}

.image-lightbox__panel > img {
  display: block;
  width: auto;
  max-width: min(94vw, 78rem);
  height: auto;
  max-height: calc(100dvh - 5.8rem);
  object-fit: contain;
  border-radius: .65rem;
  box-shadow: 0 1.8rem 5rem rgba(0, 0, 0, .55);
}

.image-lightbox__close {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  z-index: 2;
  display: grid;
  width: 2.75rem;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  background: rgba(28, 34, 45, .72);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 1.55rem;
  line-height: 1;
}

.image-lightbox__footer {
  display: flex;
  width: 100%;
  min-height: 3.5rem;
  padding-top: .65rem;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  color: rgba(255, 255, 255, .72);
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
}

.image-lightbox__footer .image-download-action {
  border-color: rgba(154, 174, 255, .32);
  background: rgba(99, 111, 221, .2);
  color: #eef1ff;
}

:root[data-theme="dark"] .card__confirm-top--locked {
  border-color: rgba(101, 220, 141, .25);
  background: rgba(101, 220, 141, .1);
  color: #86e6a7;
}

:root[data-theme="dark"] .image-download-action {
  border-color: rgba(154, 174, 255, .25);
  background: rgba(99, 111, 221, .13);
  color: #bbc7ff;
}

@media (max-width: 53.99rem) {
  .card--focused .card__meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding-right: 2.9rem;
  }

  .card--focused .card__meta-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .card--focused .gallery__item figcaption {
    flex-wrap: wrap;
  }

  .gallery__caption-actions {
    width: 100%;
    min-width: 0;
    justify-content: flex-end;
  }

  .image-download-action,
  .image-feedback-trigger {
    min-height: 2.5rem;
  }

  .image-lightbox {
    padding: .5rem;
  }

  .image-lightbox__panel {
    max-width: calc(100vw - 1rem);
    max-height: calc(100dvh - 1rem);
  }

  .image-lightbox__panel > img {
    max-width: calc(100vw - 1rem);
    max-height: calc(100dvh - 5rem);
  }
}
