:root {
  --bg-0: #0a111f;
  --bg-1: #0f1b2f;
  --ink: #eef3ff;
  --ink-muted: #aab6cd;
  --accent: #65d3ff;
  --accent-2: #75f2c5;
  --card: rgba(13, 21, 36, 0.86);
  --radius-xl: 28px;
  --radius-md: 14px;
  --gutter: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: #0a111f;
  overscroll-behavior-y: none;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Avenir Next", "SF Pro Rounded", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: linear-gradient(170deg, var(--bg-0) 0%, var(--bg-1) 55%, var(--bg-0) 100%);
  display: grid;
  place-items: center;
  padding: 24px 12px;
  overscroll-behavior-y: none;
}

body.image-viewer-open {
  overflow: hidden;
}

.app-shell {
  width: min(460px, 100%);
  overflow: hidden;
  position: relative;
  isolation: isolate;
  overscroll-behavior-y: contain;
}

.top-bar {
  padding: calc(14px + var(--safe-top)) 16px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
}

.logo-icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
  flex: 0 0 auto;
}

.logo-word {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.logo-accent {
  color: var(--accent);
}

.camera-stage {
  position: relative;
  margin: 0 var(--gutter);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #060b14;
  aspect-ratio: 3 / 4;
  touch-action: none;
  -webkit-touch-callout: none;
  user-select: none;
  transform-origin: top center;
  max-height: 1200px;
  transition: opacity 0.28s ease, transform 0.32s ease, max-height 0.32s ease, margin 0.32s ease, border-color 0.24s ease;
}

@supports not (aspect-ratio: 1 / 1) {
  .camera-stage::before {
    content: "";
    display: block;
    padding-top: 133.3333%;
  }
}

.app-shell.has-frozen-capture:not(.is-reviewing-capture) .camera-stage {
  opacity: 0;
  transform: translateY(-10px) scale(0.965);
  max-height: 0;
  margin-top: 0;
  margin-bottom: 0;
  border-color: transparent;
  pointer-events: none;
}

.app-shell.is-reviewing-capture .camera-stage {
  opacity: 1;
  transform: translateY(0) scale(1);
  max-height: 1200px;
  margin-top: 0;
  margin-bottom: 0;
  border-color: rgba(255, 255, 255, 0.12);
  pointer-events: auto;
}

#video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #05080f;
  transform: scaleX(-1);
}

.captured-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
  background: #05080f;
  opacity: 1;
  transition: opacity 0.24s ease;
  will-change: opacity;
}

.captured-preview.is-fading-out {
  opacity: 0;
}

.video-environment #video {
  transform: none;
}

.scan-frame {
  position: absolute;
  inset: 12% 10%;
  border-radius: 28px;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.08);
  pointer-events: none;
}

.scan-frame::before,
.scan-frame::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  height: 1.8px;
  background: linear-gradient(90deg, transparent, rgba(117, 242, 197, 0.8), transparent);
  animation: pulse 1.8s infinite;
  opacity: 0;
}

.scan-active .scan-frame::before,
.scan-active .scan-frame::after {
  opacity: 1;
}

.scan-frame::before {
  top: 28%;
  animation-delay: 0.12s;
}

.scan-frame::after {
  top: 68%;
  animation-delay: 0.44s;
}

.stage-hint {
  position: absolute;
  left: 50%;
  top: 22px;
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.005em;
  color: rgba(238, 243, 255, 0.94);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
  transition: opacity 0.18s ease;
  opacity: 0.95;
}

.stage-hint.hidden {
  opacity: 0;
}

.zoom-badge {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  pointer-events: none;
  min-width: 58px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 15, 27, 0.68);
  color: rgba(238, 243, 255, 0.98);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.capture-review {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 16px;
  padding: 22px 18px 18px;
  background:
    linear-gradient(180deg, rgba(5, 9, 16, 0.06) 0%, rgba(5, 9, 16, 0.12) 42%, rgba(5, 9, 16, 0.82) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.app-shell.is-reviewing-capture .capture-review {
  opacity: 1;
  pointer-events: auto;
}

.capture-review-copy {
  display: grid;
  gap: 6px;
  max-width: 86%;
}

.capture-review.is-loading .capture-review-copy,
.capture-review.is-loading .capture-review-choices {
  visibility: hidden;
  pointer-events: none;
}

.capture-review-loading {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 10px;
  min-width: 144px;
}

.capture-review-loading.hidden {
  display: none;
}

.capture-review-spinner {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

.capture-review-loading-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: rgba(238, 243, 255, 0.92);
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.42);
}

.capture-review-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 2px 2px 4px;
}

.capture-review-choices.hidden {
  display: none;
}

.capture-review-choices::-webkit-scrollbar {
  display: none;
}

.capture-review-choice {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  padding: 7px;
  display: grid;
  gap: 6px;
  color: var(--ink);
  background: rgba(7, 14, 25, 0.78);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.capture-review-choice.is-selected {
  border-color: rgba(101, 211, 255, 0.95);
  background: rgba(10, 23, 38, 0.9);
  box-shadow: 0 14px 28px rgba(29, 110, 150, 0.28);
  transform: translateY(-1px);
}

.capture-review-choice-thumb {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  object-fit: cover;
  display: block;
  background: #05080f;
}

.capture-review-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.capture-review-sub {
  font-size: 0.83rem;
  line-height: 1.45;
  color: rgba(238, 243, 255, 0.84);
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.capture-review-sub:empty {
  display: none;
}

.capture-review-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.capture-review-actions .action-btn {
  width: 100%;
  min-height: 52px;
}

.app-shell.is-reviewing-capture .scan-frame,
.app-shell.is-reviewing-capture .stage-hint,
.app-shell.is-reviewing-capture .zoom-badge {
  display: none;
}

.app-shell.is-preparing-capture-review #video {
  opacity: 0;
}

.camera-fallback {
  position: absolute;
  inset: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.93rem;
  line-height: 1.45;
  background: linear-gradient(150deg, rgba(7, 13, 24, 0.94), rgba(9, 17, 31, 0.94));
}

.camera-fallback-message {
  max-width: 22ch;
}

.camera-fallback.is-loading .camera-fallback-message {
  color: rgba(238, 243, 255, 0.9);
}

.camera-fallback-spinner {
  width: 30px;
  height: 30px;
}

.camera-fallback.hidden {
  display: none;
}

.actions {
  padding: 14px var(--gutter) 0;
  display: flex;
  justify-content: flex-end;
  max-height: 80px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.24s ease, transform 0.28s ease, max-height 0.3s ease, padding 0.3s ease;
}

.app-shell.has-frozen-capture .actions {
  opacity: 0;
  transform: translateY(-8px);
  max-height: 0;
  padding-top: 0;
  pointer-events: none;
}

.action-btn {
  border: none;
  border-radius: 14px;
  padding: 13px 12px;
  min-height: 56px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  color: #091225;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 22px rgba(71, 201, 255, 0.2);
  transition: transform 0.16s ease, opacity 0.16s ease;
}

.action-btn.secondary {
  color: var(--ink);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.action-btn:active {
  transform: translateY(1px) scale(0.99);
}

.action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.action-btn.compact {
  padding: 0;
  font-size: 0.74rem;
  border-radius: 11px;
  width: 44px;
  min-height: 56px;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.action-btn.secondary.compact {
  border: none;
  background: transparent;
  color: var(--ink-muted);
}

.action-btn.compact svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fallback-open-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  color: #091225;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 22px rgba(71, 201, 255, 0.2);
}

.scan-meter {
  margin: 0 var(--gutter);
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(8, 16, 30, 0.62);
  backdrop-filter: blur(8px);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.24s ease, transform 0.24s ease, max-height 0.28s ease, margin 0.28s ease, padding 0.28s ease, border-color 0.24s ease;
}

.scan-meter.active {
  margin: 12px var(--gutter) 2px;
  padding: 12px;
  border-color: rgba(255, 255, 255, 0.14);
  max-height: 120px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scan-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.scan-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.scan-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.2s linear;
}

.scan-sub {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--ink-muted);
  min-height: 2.4em;
}

.result-sheet {
  margin: 12px var(--gutter) 0;
  border-radius: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(160deg, rgba(8, 14, 26, 0.94), rgba(11, 20, 34, 0.96));
  padding: 0 14px 0;
  min-height: 0;
  opacity: 0;
  transform: translateY(16px);
  max-height: 0;
  margin-top: 0;
  pointer-events: none;
  overflow: hidden;
  transition: opacity 0.3s ease, transform 0.34s ease, max-height 0.36s ease, margin 0.3s ease, padding 0.3s ease;
}

.result-sheet.is-dragging {
  transition: none;
}

.result-sheet.visible {
  opacity: 1;
  transform: translateY(0);
  max-height: 9999px;
  margin-top: 12px;
  padding: 10px 14px calc(14px + var(--safe-bottom));
  min-height: 250px;
  pointer-events: auto;
}

.sheet-handle {
  position: relative;
  display: block;
  width: 112px;
  height: 34px;
  margin: -4px auto 8px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: grab;
  touch-action: none;
}

.app-shell:not(.has-frozen-capture) .sheet-handle {
  pointer-events: none;
}

.sheet-handle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.23);
  transform: translate(-50%, -50%);
}

.sheet-handle:active {
  cursor: grabbing;
}

.sheet-handle:focus-visible {
  outline: 2px solid rgba(101, 211, 255, 0.8);
  outline-offset: 3px;
}

.sheet-head {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 10px;
  gap: 12px;
}

.sheet-head-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.sheet-query {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(5, 10, 19, 0.72);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24);
}

.sheet-query img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sheet-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.18;
}

.results-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.provider-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.provider-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.provider-title {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.provider-status {
  font-size: 0.7rem;
  color: var(--ink-muted);
  text-align: right;
}

.provider-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.result-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 10px;
  align-items: stretch;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translateY(8px) scale(0.99);
  animation: cardIn 0.3s ease forwards;
}

.result-thumb {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  width: 112px;
  height: 144px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: var(--ink-muted);
  overflow: hidden;
}

.result-thumb.is-expandable {
  cursor: zoom-in;
}

.result-thumb.empty {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px;
}

.result-thumb-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-x;
}

.result-thumb-track::-webkit-scrollbar {
  display: none;
}

.result-thumb-frame {
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  background: rgba(255, 255, 255, 0.04);
}

.result-thumb-frame.is-fallback {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px;
  line-height: 1.3;
}

.result-thumb-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.result-thumb-status {
  position: absolute;
  right: 6px;
  bottom: 6px;
  min-width: 34px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #f7fbff;
  background: rgba(6, 13, 25, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.result-body {
  padding: 10px 10px 9px 0;
  display: grid;
  align-content: center;
  gap: 5px;
}

.result-name {
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.26;
  max-height: 2.52em;
  overflow: hidden;
}

.result-meta {
  color: var(--ink-muted);
  font-size: 0.73rem;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.result-reference {
  color: rgba(228, 237, 255, 0.72);
  font-size: 0.7rem;
  letter-spacing: 0.01em;
}

.result-price {
  color: #e8ffef;
  font-size: 0.84rem;
  font-weight: 700;
}

.score-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.result-rank {
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.score-track {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  overflow: hidden;
}

.score-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: inherit;
}

.empty-state {
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  padding: 36px 12px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  background: rgba(5, 10, 19, 0.45);
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: calc(18px + var(--safe-top)) 16px calc(18px + var(--safe-bottom));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overscroll-behavior: contain;
  transition: opacity 0.24s ease, visibility 0s linear 0.24s;
}

.image-viewer.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.24s ease;
}

.image-viewer-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(4, 10, 18, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.image-viewer-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  height: min(78vh, 640px);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.24s ease;
}

.image-viewer.is-visible .image-viewer-backdrop {
  opacity: 1;
}

.image-viewer.is-visible .image-viewer-shell {
  opacity: 1;
}

.image-viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.image-viewer-close {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(238, 243, 255, 0.94);
  background: rgba(8, 15, 27, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.26);
}

.image-viewer-close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.image-viewer-stage {
  position: relative;
  min-height: 0;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 13, 24, 0.88);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.34);
}

.image-viewer-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}

.image-viewer-track::-webkit-scrollbar {
  display: none;
}

.image-viewer-frame {
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  display: grid;
  place-items: center;
  padding: 18px 18px 96px;
}

.image-viewer-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.image-viewer-status {
  position: absolute;
  top: 14px;
  right: 14px;
  min-width: 44px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(247, 251, 255, 0.96);
  background: rgba(6, 13, 25, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.image-viewer-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 58px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, rgba(8, 15, 27, 0.88), rgba(10, 18, 31, 0.94));
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.image-viewer-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.image-viewer-title {
  color: rgba(238, 243, 255, 0.96);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-viewer-subtitle {
  color: rgba(170, 182, 205, 0.96);
  font-size: 0.74rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-viewer-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: rgba(170, 182, 205, 0.96);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.image-viewer-link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hidden {
  display: none !important;
}

@keyframes pulse {
  0% { transform: scaleX(0.94); opacity: 0.15; }
  50% { transform: scaleX(1); opacity: 0.85; }
  100% { transform: scaleX(0.94); opacity: 0.15; }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 380px) {
  .top-bar {
    padding-inline: 12px;
  }

  .capture-review {
    padding: 20px 16px 16px;
  }

  .capture-review-copy {
    max-width: 100%;
  }

  .capture-review-title {
    font-size: 1.12rem;
  }
}
