/* V25 · review workflow, recovery states and keyboard-safe controls */
.skip-link {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 400;
  padding: .7rem 1rem;
  border-radius: .75rem;
  background: #155fc8;
  color: #fff;
  font-weight: 760;
  text-decoration: none;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}

.review-toolbar {
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
  padding: .72rem 1rem .78rem;
}

.review-workflow {
  display: grid;
  width: 100%;
  min-width: 0;
  margin: 0;
  align-self: start;
  justify-items: stretch;
}

.filters {
  display: grid;
  width: 100%;
  max-width: none;
  justify-items: stretch;
  gap: .3rem;
}

.filter-group {
  display: grid;
  width: 100%;
  max-width: 100%;
  grid-template-columns: 4.1rem minmax(0, 1fr);
  align-items: center;
  gap: .48rem;
}

.filter-group__label {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 760;
  letter-spacing: .04em;
  white-space: nowrap;
}

.filter-group__options {
  display: flex;
  min-width: 0;
  gap: .28rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-group__options::-webkit-scrollbar {
  display: none;
}

.filter-group--status .filter-group__options {
  width: max-content;
  max-width: 100%;
  padding: .14rem;
  border: 1px solid rgba(91, 112, 141, .12);
  border-radius: .72rem;
  background: rgba(255, 255, 255, .36);
}

.filter--status {
  display: inline-flex;
  min-height: 2rem;
  padding: .34rem .48rem .34rem .58rem;
  align-items: center;
  gap: .36rem;
  border-color: transparent;
  border-radius: .58rem;
  background: transparent;
}

.filter--status strong {
  display: inline-grid;
  min-width: 1.34rem;
  min-height: 1.34rem;
  padding: 0 .28rem;
  place-items: center;
  border-radius: .45rem;
  background: rgba(91, 112, 141, .1);
  color: var(--muted);
  font-size: .68rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.filter--status[aria-pressed="true"] {
  border-color: rgba(10, 103, 214, .24);
  background: #176bcf;
  color: #fff;
  box-shadow: 0 .3rem .75rem rgba(20, 92, 180, .2);
}

.filter--status[aria-pressed="true"] strong {
  background: rgba(255, 255, 255, .2);
  color: #fff;
}

.review-loading,
.review-load-error {
  grid-column: 1 / -1;
  width: 100%;
}

.review-loading {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .9rem;
}

.review-loading__cover {
  aspect-ratio: 3 / 4;
  border-radius: 1rem;
  background:
    linear-gradient(100deg, transparent 24%, rgba(255, 255, 255, .72) 42%, transparent 62%),
    rgba(211, 220, 233, .72);
  background-size: 240% 100%;
  animation: review-skeleton 1.25s ease-in-out infinite;
}

.review-loading p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  text-align: center;
}

@keyframes review-skeleton {
  to { background-position: -140% 0; }
}

.review-load-error {
  display: grid;
  min-height: 18rem;
  padding: 2rem;
  place-content: center;
  justify-items: center;
  gap: .65rem;
  border: 1px solid rgba(91, 112, 141, .14);
  border-radius: 1rem;
  background: rgba(255, 255, 255, .56);
  text-align: center;
}

.review-load-error p {
  max-width: 34rem;
  margin: 0;
  color: var(--muted);
}

.card__focus-nav {
  position: absolute;
  top: .72rem;
  left: 50%;
  z-index: 4;
  display: flex;
  min-height: 2.75rem;
  padding: .2rem;
  align-items: center;
  gap: .2rem;
  border: 1px solid rgba(91, 112, 141, .14);
  border-radius: .8rem;
  background: rgba(247, 250, 255, .9);
  box-shadow: 0 .5rem 1.5rem rgba(37, 52, 76, .11);
  transform: translateX(-50%);
  backdrop-filter: blur(1rem);
  -webkit-backdrop-filter: blur(1rem);
}

.card__focus-nav button {
  min-width: 4.2rem;
  min-height: 2.35rem;
  padding: .42rem .62rem;
  border: 0;
  border-radius: .6rem;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: .76rem;
  font-weight: 740;
}

.card__focus-nav button:hover:not(:disabled),
.card__focus-nav button:focus-visible:not(:disabled) {
  background: rgba(10, 132, 255, .11);
  color: #0a67c7;
}

.card__focus-nav button:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: .42;
}

.card__focus-nav span {
  min-width: 3.5rem;
  color: var(--muted);
  font-size: .72rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

:root[data-theme="dark"] .filter-group--status .filter-group__options,
:root[data-theme="dark"] .review-load-error,
:root[data-theme="dark"] .card__focus-nav {
  border-color: rgba(213, 232, 255, .12);
  background: rgba(24, 31, 43, .82);
}

:root[data-theme="dark"] .filter--status[aria-pressed="true"] {
  border-color: rgba(122, 190, 255, .36);
  background: #2678cf;
  color: #fff;
}

:root[data-theme="dark"] .review-loading__cover {
  background:
    linear-gradient(100deg, transparent 24%, rgba(255, 255, 255, .08) 42%, transparent 62%),
    rgba(39, 49, 66, .86);
  background-size: 240% 100%;
}

@media (max-width: 70rem) {
  .review-toolbar {
    display: grid;
  }

  .review-workflow,
  .filters {
    width: 100%;
    justify-items: start;
  }

  .filter-group {
    width: 100%;
  }
}

@media (max-width: 53.99rem) {
  .review-toolbar {
    gap: .8rem;
  }

  .filter-group {
    grid-template-columns: minmax(0, 1fr);
    gap: .28rem;
  }

  .filter-group__label {
    padding-left: .18rem;
  }

  .filter,
  .filter--status,
  .card__confirm-top,
  .card__delete,
  .image-download-action,
  .image-feedback-trigger,
  .card__focus-nav button {
    min-height: 44px;
  }

  .review-loading {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
  }

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

  .card__focus-nav {
    position: static;
    width: 100%;
    padding: .55rem 4rem .25rem .7rem;
    justify-content: center;
    border: 0;
    border-radius: 0;
    background: rgba(239, 244, 251, .9);
    box-shadow: none;
    transform: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .card--focused .card__focus-tabs {
    padding-top: .25rem;
  }

  :root[data-theme="dark"] .card__focus-nav {
    background: rgba(19, 25, 35, .94);
  }
}

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

/* V29 · batch-level confirmed-content export */
.card__content-id {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.card--focused .card__meta {
  justify-content: flex-end;
}

.copy-footer-actions--locked .action {
  grid-column: 1 / -1;
}

.card__sheet-select {
  position: absolute;
  z-index: 5;
  top: .62rem;
  right: .62rem;
  display: inline-flex;
  min-height: 2rem;
  padding: .28rem .5rem;
  align-items: center;
  gap: .32rem;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 999px;
  background: rgba(247, 250, 255, .9);
  color: #44536a;
  cursor: pointer;
  font-size: .68rem;
  font-weight: 760;
  box-shadow: 0 .35rem 1rem rgba(25, 38, 58, .16);
  backdrop-filter: blur(.8rem);
  -webkit-backdrop-filter: blur(.8rem);
}

.card__sheet-select input {
  width: .9rem;
  height: .9rem;
  margin: 0;
  accent-color: #176bcf;
}

.card__sheet-select.is-selected {
  border-color: rgba(23, 107, 207, .35);
  background: rgba(232, 243, 255, .95);
  color: #0f5cac;
}

.card--cover.is-sheet-selected {
  box-shadow:
    0 0 0 .18rem rgba(23, 107, 207, .34),
    0 1rem 2.6rem rgba(31, 91, 164, .17);
}

.batch-sheet-export {
  display: grid;
  width: 100%;
  margin-top: .55rem;
  min-height: 3.2rem;
  padding: .48rem .52rem;
  grid-template-columns: minmax(10rem, 1fr) auto auto auto auto;
  align-items: center;
  gap: .42rem;
  border: 1px solid rgba(107, 124, 153, .18);
  border-radius: .86rem;
  background: rgba(248, 251, 255, .68);
  box-shadow:
    0 .42rem 1.2rem rgba(36, 54, 82, .08),
    inset 0 1px 0 rgba(255, 255, 255, .92);
}

.batch-sheet-export[hidden] {
  display: none;
}

.batch-sheet-export__intro {
  display: grid;
  min-width: 0;
  gap: .08rem;
}

.batch-sheet-export__intro strong {
  color: var(--ink);
  font-size: .74rem;
}

.batch-sheet-export__intro span {
  overflow: hidden;
  color: var(--muted);
  font-size: .64rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-sheet-export__count {
  padding: 0 .42rem;
  color: var(--muted);
  font-size: .72rem;
  white-space: nowrap;
}

.batch-sheet-export__count strong {
  color: var(--ink);
  font-size: .84rem;
  font-variant-numeric: tabular-nums;
}

.batch-sheet-export button {
  min-height: 2.35rem;
  padding: .42rem .66rem;
  border-radius: .68rem;
  cursor: pointer;
  font: inherit;
  font-size: .7rem;
  font-weight: 760;
}

.batch-sheet-export__utility {
  border: 1px solid rgba(91, 112, 141, .14);
  background: rgba(91, 112, 141, .07);
  color: var(--ink);
}

.batch-sheet-export__trigger {
  min-width: 6.7rem;
  border: 1px solid rgba(23, 107, 207, .35);
  background: linear-gradient(135deg, #168cff, #356fe2);
  color: #fff;
  box-shadow: 0 .38rem .9rem rgba(23, 107, 207, .22);
}

.batch-sheet-export button:disabled {
  cursor: not-allowed;
  opacity: .42;
  box-shadow: none;
}

:root[data-theme="dark"] .card__sheet-select,
:root[data-theme="dark"] .batch-sheet-export {
  border-color: rgba(211, 225, 247, .13);
  background: rgba(22, 30, 42, .9);
  color: #dce8f7;
  box-shadow:
    0 1rem 2.8rem rgba(0, 0, 0, .3),
    inset 0 1px 0 rgba(255, 255, 255, .06);
}

:root[data-theme="dark"] .card__sheet-select.is-selected {
  border-color: rgba(93, 166, 255, .35);
  background: rgba(41, 82, 130, .92);
  color: #d7ebff;
}

@media (max-width: 53.99rem) {
  .batch-sheet-export {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: .38rem;
  }

  .batch-sheet-export__intro {
    grid-column: 1 / -1;
  }

  .batch-sheet-export__count,
  .batch-sheet-export__utility {
    justify-self: start;
  }

  #batch-sheet-clear {
    display: none;
  }

  .batch-sheet-export button {
    min-height: 44px;
    white-space: nowrap;
  }

  .batch-sheet-export__trigger {
    justify-self: end;
  }
}
