:root {
  --bg: #F7F7F8;
  --surface: #FFFFFF;
  --surface-2: #FCFCFD;
  --surface-3: #F2F4F7;
  --border: rgba(17, 24, 39, 0.08);
  --border-strong: rgba(17, 24, 39, 0.14);
  --text: #111111;
  --text-secondary: rgba(17, 17, 17, 0.68);
  --text-muted: rgba(17, 17, 17, 0.58);
  --text-dim: rgba(17, 17, 17, 0.38);
  --accent: #EB0000;
  --accent-hover: #C40000;
  --accent-dark: #9F0000;
  --accent-glow: rgba(235, 0, 0, 0.12);
  --button-secondary-bg: #FFF4F4;
  --button-secondary-bg-hover: #FFE4E4;
  --button-secondary-border: rgba(235, 0, 0, 0.22);
  --button-secondary-border-hover: rgba(235, 0, 0, 0.38);
  --button-secondary-text: #9F0000;
  --button-neutral-bg: #FFFFFF;
  --button-neutral-bg-hover: #FFF6F6;
  --button-neutral-border: rgba(17, 24, 39, 0.16);
  --button-neutral-border-hover: rgba(235, 0, 0, 0.24);
  --button-neutral-text: #23262F;
  --gradient: linear-gradient(135deg, #EB0000 0%, #FF4D4D 100%);
  --green: #16A34A;
  --amber: #FFB800;
  --red: #FF4444;
  --warning: #FFB800;
  --info: #4488FF;
  --shadow: 0 18px 42px rgba(16, 24, 40, 0.08);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --sidebar-width: 240px;
  --sidebar-collapsed: 88px;
  --transition: 180ms ease;
  font-synthesis-weight: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

@keyframes progressFill {
  from { width: 0%; }
  to { width: var(--target-width); }
}

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

@keyframes bounceIn {
  0% { opacity: 0; transform: scale(0.3); }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217,45,32,0); }
  50% { box-shadow: 0 0 20px 4px rgba(217,45,32,0.1); }
}

@keyframes fadeOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(20px); }
}

@keyframes fadeOutSimple {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes toastProgress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@keyframes modalScaleOut {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.97); }
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.animate-card,
.card,
button,
input,
.nav-link {
  will-change: transform;
}

html,
body {
  margin: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  overscroll-behavior-x: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  background: transparent;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

#app {
  min-height: 100vh;
  min-height: 100dvh;
}

.loading-screen,
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(217, 45, 32, 0.10), transparent 30%),
    radial-gradient(circle at bottom left, rgba(217, 45, 32, 0.06), transparent 25%),
    var(--bg);
}

.loading-screen {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.10), transparent 34%),
    radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.08), transparent 28%),
    var(--accent);
  color: rgba(255, 255, 255, 0.96);
}

.loading-screen-inner {
  width: min(100%, 760px);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 28px;
  text-align: center;
}

.auth-layout {
  width: min(100%, 460px);
  display: grid;
  gap: 24px;
  align-items: start;
  justify-content: center;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.28);
  backdrop-filter: blur(10px);
  animation: fadeIn 0.2s ease both;
}

.auth-overlay-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  animation: scaleIn 0.25s ease both;
}

.auth-overlay-card {
  width: 100%;
}

.auth-overlay-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.auth-close-button {
  flex: 0 0 auto;
}

.auth-close-button:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(235, 0, 0, 0.16);
}

.auth-close-button:active {
  transform: scale(0.97);
}

.auth-card,
.document-card {
  width: min(100%, 460px);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 32px;
}

.animate-page .auth-card,
.animate-page .document-card {
  animation: scaleIn 0.35s ease both;
}

.document-card {
  width: min(100%, 880px);
}

.auth-layout .auth-card {
  width: 100%;
}

.auth-brand,
.loading-screen {
  text-align: center;
}

.brand-logo {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.sidebar-logo {
  width: 170px;
}

.brand-logo-large {
  width: min(100%, 360px);
  margin: 0 auto 18px;
}

.loading-screen .brand-logo-large {
  width: min(100%, 500px);
  margin: 0 auto;
}

.auth-brand h1,
.loading-screen h1,
.document-card h1,
.page-header h1 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.5px;
}

.auth-brand p,
.loading-screen p,
.page-header p,
.paragraph,
.document-section p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
}

.auth-brand p {
  color: rgba(17, 17, 17, 0.78);
}

.loading-screen h1 {
  color: rgba(255, 255, 255, 0.98);
  max-width: 760px;
}

.loading-screen p {
  color: rgba(255, 255, 255, 0.76);
  max-width: 560px;
}

.auth-form,
.stack,
.settings-stack,
.document-section,
.credits-page {
  display: grid;
  gap: 16px;
}

.auth-form {
  margin-top: 28px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span,
.field-label,
.photo-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--surface-2);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background var(--transition);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.08);
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--accent);
}

.text-link {
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  font-weight: 700;
}

.text-link:hover {
  color: var(--accent-hover);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, opacity var(--transition), border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(235, 0, 0, 0.2);
}

.btn:not(:disabled):active {
  transform: translateY(0) scale(0.98);
}

.btn-primary {
  background: var(--gradient);
  color: #FFFFFF;
  border-color: rgba(159, 0, 0, 0.34);
  box-shadow: 0 8px 20px rgba(235, 0, 0, 0.18);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #D80000 0%, #FF5757 100%);
  box-shadow: 0 10px 24px rgba(235, 0, 0, 0.24);
}

.btn-secondary {
  background: var(--button-secondary-bg);
  border: 1px solid var(--button-secondary-border);
  color: var(--button-secondary-text);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-secondary:hover:not(:disabled) {
  background: var(--button-secondary-bg-hover);
  border-color: var(--button-secondary-border-hover);
  box-shadow: 0 6px 18px rgba(235, 0, 0, 0.12);
}

.btn .spinner {
  animation: fadeIn 0.2s ease forwards, spin 0.7s linear infinite;
}

.btn-danger {
  background: rgba(255, 68, 68, 0.12);
  border: 1px solid rgba(255, 68, 68, 0.24);
  color: #B91C1C;
}

.btn-block {
  width: 100%;
}

.auth-switch {
  margin-top: 20px;
  color: var(--text-secondary);
  text-align: center;
}

.inline-error,
.card-inline-error {
  color: var(--red);
  font-size: 0.84rem;
  line-height: 1.5;
}

.inline-success,
.card-inline-success {
  color: var(--green);
  font-size: 0.84rem;
  line-height: 1.5;
}

.app-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(217, 45, 32, 0.08), transparent 28%),
    radial-gradient(circle at bottom left, rgba(217, 45, 32, 0.05), transparent 20%),
  var(--bg);
}

.app-shell-frame {
  min-height: 100vh;
  transition: filter 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.app-shell-auth-open .app-shell-frame {
  filter: blur(10px);
  transform: scale(0.995);
  pointer-events: none;
  user-select: none;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px 20px 20px;
  background: #FFFFFF;
  border-right: 1px solid var(--border);
}

.animate-page .sidebar {
  animation: fadeInLeft 0.4s ease forwards;
}

.sidebar-brand {
  display: grid;
  gap: 10px;
}

.sidebar-brand-copy {
  display: grid;
  gap: 3px;
}

.sidebar-brand span {
  display: block;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.nav-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 10px;
  color: rgba(17, 17, 17, 0.78);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.nav-link:hover {
  background: #F3F4F6;
  color: var(--text);
  transform: translateX(3px);
}

.nav-link-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
  font-weight: 700;
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.nav-label {
  color: inherit;
  font-weight: 500;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 14px;
}

.sidebar-preview-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.sidebar-preview-card span {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.sidebar-preview-card strong {
  font-size: 0.96rem;
  line-height: 1.5;
}

.sidebar-balance,
.balance-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.sidebar-balance span,
.balance-card span {
  display: block;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.sidebar-balance strong,
.balance-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.3rem;
}

.animate-page .sidebar-balance strong,
.animate-page .balance-card strong {
  animation: countUp 0.4s ease both;
}

.sidebar-balance-low {
  border-color: rgba(255, 184, 0, 0.2);
  background: rgba(255, 184, 0, 0.12);
  color: var(--warning);
}

.sidebar-user {
  display: grid;
  gap: 10px;
}

.sidebar-user span {
  color: var(--text-secondary);
  word-break: break-word;
}

.main-shell {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  padding: 28px 32px 32px;
}

.animate-page .main-shell {
  animation: fadeIn 0.5s ease forwards;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 22px;
}

.animate-page .page-header {
  animation: fadeInDown 0.4s ease forwards;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-content {
  display: grid;
  gap: 20px;
  padding-bottom: 24px;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.sell-workspace-grid {
  grid-template-columns: minmax(320px, 392px) minmax(0, 1fr);
  gap: 18px;
}

.workspace-left,
.workspace-right,
.settings-stack,
.credits-page {
  display: grid;
  gap: 20px;
}

.sell-workspace-grid .workspace-left {
  gap: 16px;
}

.sell-workspace-grid .card {
  padding: 18px 20px;
}

.sell-results-stack {
  gap: 14px;
}

.card,
.modal-card,
.section-card,
.usage-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.card-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.card-clickable:active {
  transform: translateY(0) scale(0.99);
  transition: transform 0.1s ease;
}

.card-header,
.section-card-header,
.modal-header,
.credit-pack-head,
.batch-result-head,
.card-footer,
.section-card-actions,
.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.card-header h3,
.section-card h3,
.modal-header h2,
.document-section h2,
.card h3 {
  margin: 4px 0 0;
  font-size: 1.08rem;
  letter-spacing: -0.3px;
  font-weight: 600;
}

.eyebrow {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}

.dropzone {
  display: grid;
  place-items: center;
  min-height: 188px;
  padding: 18px;
  border-radius: 16px;
  border: 1.5px dashed rgba(217, 45, 32, 0.25);
  background: #FFFFFF;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.dropzone-button {
  width: 100%;
  appearance: none;
  font: inherit;
  color: inherit;
}

.dropzone:hover,
.dropzone-active {
  border-color: rgba(217, 45, 32, 0.55);
  background: rgba(217, 45, 32, 0.03);
  transform: scale(1.01);
}

.dropzone-copy {
  text-align: center;
  display: grid;
  gap: 10px;
}

.dropzone-copy strong {
  font-size: 1rem;
}

.dropzone-copy span {
  color: var(--text-secondary);
  line-height: 1.5;
}

.dropzone-icon,
.empty-illustration {
  width: 48px;
  height: 48px;
  margin: 0 auto;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(217, 45, 32, 0.12);
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 700;
}

.empty-logo {
  width: min(100%, 280px);
  margin: 0 auto;
}

.empty-results-illustration {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  background: rgba(235, 0, 0, 0.10);
  color: var(--accent);
}

.empty-results-illustration svg {
  width: 42px;
  height: 42px;
  display: block;
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 10px;
}

.thumb-card,
.hero-preview {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  min-height: 86px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.animate-page .thumb-card,
.animate-page .hero-preview {
  animation: scaleIn 0.25s ease both;
}

.thumb-card img,
.hero-preview img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.thumb-card {
  cursor: grab;
}

.thumb-card:active {
  cursor: grabbing;
}

.thumb-card-cover {
  border-color: rgba(220, 38, 38, 0.72);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.14);
}

.thumb-card.dragging {
  opacity: 0.4;
  transform: scale(0.95);
}

.thumb-card.drag-over {
  transform: scale(1.05);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.18);
}

.thumb-card.drag-over::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 2px dashed #DC2626;
  border-radius: 12px;
  pointer-events: none;
}

.batch-result-layout {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.batch-result-thumb {
  width: 92px;
  height: 92px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.thumb-card-active {
  border-color: rgba(217, 45, 32, 0.52);
  box-shadow: 0 0 0 2px rgba(217, 45, 32, 0.10);
}

.thumb-remove,
.hero-remove,
.icon-button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--button-neutral-bg);
  border: 1px solid var(--button-neutral-border);
  color: var(--button-neutral-text);
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(17, 24, 39, 0.08);
}

.thumb-remove,
.hero-remove {
  position: absolute;
  top: 8px;
  right: 8px;
}

.thumb-cover-button {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #FFFFFF;
  border: 0;
  color: var(--button-neutral-text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.14);
}

.thumb-cover-button:hover {
  background: #FFFFFF;
  transform: scale(1.08);
  box-shadow: 0 4px 10px rgba(17, 24, 39, 0.12);
}

.thumb-cover-button-active {
  background: #DC2626;
  color: #FFFFFF;
}

.thumb-cover-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #DC2626;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  animation: bounceIn 0.3s ease both;
}

.thumb-grid .thumb-cover-button,
.thumb-grid .thumb-cover-badge {
  display: none;
}

.thumb-drag-handle {
  position: absolute;
  right: 10px;
  bottom: 8px;
  color: rgba(17, 17, 17, 0.38);
  font-size: 14px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.thumb-card:hover .thumb-drag-handle {
  opacity: 1;
}

.thumb-grid-hint {
  margin-top: 10px;
  font-size: 11px;
  color: rgba(0, 0, 0, 0.4);
}

.book-scan-hint {
  margin-top: 10px;
  font-size: 12px;
  color: #B8860B;
  background: rgba(255, 184, 0, 0.06);
  border: 1px solid rgba(255, 184, 0, 0.24);
  border-radius: 10px;
  padding: 10px 12px;
}

.book-series-banner {
  border-radius: 12px;
  padding: 12px 16px;
  display: grid;
  gap: 6px;
}

.book-series-banner-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.book-series-banner p {
  margin: 0;
  font-size: 13px;
}

.book-series-banner-warning {
  background: rgba(255, 184, 0, 0.06);
  border: 1px solid rgba(255, 184, 0, 0.3);
  color: #B8860B;
}

.book-series-banner-success {
  background: rgba(34, 197, 94, 0.06);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #16A34A;
}

.book-option-list {
  display: grid;
  gap: 10px;
}

.book-option-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.75);
}

.book-option-row strong {
  display: block;
  margin-bottom: 4px;
}

.book-option-row p {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.book-option-row span {
  flex: 0 0 auto;
  font-weight: 700;
  white-space: nowrap;
}

.thumb-grid .thumb-card .thumb-cover-button,
.thumb-grid .thumb-card .thumb-cover-badge {
  display: none;
}

.group-preview-card {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
  display: grid;
  gap: 10px;
  position: relative;
}

.group-preview-card.low-confidence {
  border-color: rgba(255, 184, 0, 0.4);
  background: rgba(255, 184, 0, 0.04);
}

.group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.group-number {
  background: #DC2626;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
}

.group-number-muted {
  background: rgba(0, 0, 0, 0.12);
  color: rgba(0, 0, 0, 0.64);
}

.group-category-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.7);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.group-summary {
  font-size: 13px;
  font-weight: 600;
  color: #0A0A0A;
  flex: 1;
}

.group-photo-count {
  font-size: 11px;
  color: rgba(0, 0, 0, 0.4);
}

.group-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(98px, 1fr));
  gap: 10px;
  align-items: start;
}

.group-photos .thumb-cover-button,
.group-photos .thumb-cover-badge {
  display: flex;
}

.group-photo-thumb .thumb-cover-badge {
  bottom: 6px;
}

.empty-group-drop {
  display: grid;
  place-items: center;
  min-height: 82px;
  border: 1px dashed rgba(0, 0, 0, 0.16);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.02);
  color: rgba(0, 0, 0, 0.48);
  text-align: center;
}

.empty-group-drop strong {
  color: rgba(0, 0, 0, 0.7);
  font-size: 13px;
}

.empty-group-drop span {
  font-size: 11px;
}

.unassigned-group-card {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.025);
}

.grouping-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(220, 38, 38, 0.04);
  border: 1px solid rgba(220, 38, 38, 0.08);
}

.grouping-toolbar-copy {
  display: grid;
  gap: 4px;
}

.grouping-toolbar-copy strong {
  font-size: 0.96rem;
}

.grouping-toolbar-copy span {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.grouping-toolbar-meta {
  color: #DC2626;
  font-weight: 600;
}

.grouping-toolbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.group-confidence-warning {
  position: static;
  justify-self: end;
  background: #FFB800;
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
}

.grouping-alert {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 184, 0, 0.08);
  border: 1px solid rgba(255, 184, 0, 0.26);
  color: #8A5A00;
}

.grouping-alert.critical {
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.22);
  color: #B91C1C;
}

.grouping-alert-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 184, 0, 0.18);
  font-size: 13px;
  font-weight: 800;
}

.grouping-alert.critical .grouping-alert-icon {
  background: rgba(220, 38, 38, 0.12);
}

.grouping-alert-content {
  display: grid;
  gap: 2px;
}

.grouping-alert-content strong {
  font-size: 12px;
}

.grouping-alert-content p {
  margin: 0;
  color: inherit;
  font-size: 11px;
  line-height: 1.35;
}

.grouping-alert-action {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(220, 38, 38, 0.24);
  background: #FFFFFF;
  color: #DC2626;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.grouping-alert-action:hover {
  background: rgba(220, 38, 38, 0.06);
}

.group-photo-thumb {
  display: grid;
  grid-template-rows: 80px auto;
  align-items: start;
  gap: 5px;
  position: relative;
  width: 98px;
  height: auto;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
  cursor: pointer;
}

.group-photo-image-frame {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  background: #F3F4F6;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.group-photo-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.group-photo-thumb.thumb-card-cover .group-photo-image-frame {
  border-color: rgba(220, 38, 38, 0.72);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.14);
}

.group-photo-thumb.low-confidence-photo .group-photo-image-frame {
  border: 2px solid #FFB800;
}

.group-photo-thumb.medium-confidence-photo .group-photo-image-frame {
  border: 2px solid rgba(255, 184, 0, 0.55);
}

.photo-confidence-indicator {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFB800;
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-move-btn {
  position: static;
  background: rgba(0, 0, 0, 0.75);
  color: white;
  font-size: 10px;
  padding: 5px 6px;
  border-radius: 7px;
  min-height: 28px;
  opacity: 1;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
  border: none;
  cursor: pointer;
}

.photo-remove-group-btn,
.photo-new-group-btn {
  position: static;
  border: none;
  border-radius: 7px;
  padding: 5px 6px;
  min-height: 28px;
  background: rgba(220, 38, 38, 0.08);
  color: #DC2626;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  opacity: 1;
  transition: background 0.15s ease, transform 0.15s ease;
}

.photo-new-group-btn {
  background: #DC2626;
  color: #FFFFFF;
}

.group-photo-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  width: 98px;
}

.unassigned-photo-thumb .group-photo-actions {
  grid-template-columns: 1fr;
}

.photo-move-btn:active,
.photo-remove-group-btn:active,
.photo-new-group-btn:active {
  transform: scale(0.96);
}

.photo-move-btn:hover {
  background: rgba(0, 0, 0, 0.86);
}

.photo-remove-group-btn:hover {
  background: rgba(220, 38, 38, 0.14);
}

.empty-target-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  height: 38px;
  border: 1px dashed rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  color: rgba(0, 0, 0, 0.45);
  font-size: 11px;
}

.group-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  flex-wrap: wrap;
}

.group-action-btn {
  font-size: 11px;
  color: var(--button-secondary-text);
  background: var(--button-secondary-bg);
  border: 1px solid var(--button-secondary-border);
  border-radius: 8px;
  padding: 6px 12px;
  min-height: 34px;
  cursor: pointer;
  font-weight: 700;
}

.group-action-btn:hover {
  background: var(--button-secondary-bg-hover);
  border-color: var(--button-secondary-border-hover);
}

.group-action-btn-primary {
  color: #FFFFFF;
  border-color: rgba(159, 0, 0, 0.34);
  background: var(--gradient);
  box-shadow: 0 6px 14px rgba(235, 0, 0, 0.14);
}

.group-action-btn-primary:hover {
  background: linear-gradient(135deg, #D80000 0%, #FF5757 100%);
}

.group-action-btn.danger {
  color: #B91C1C;
  border-color: rgba(220, 38, 38, 0.28);
  background: rgba(255, 68, 68, 0.09);
}

.group-fix-box {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding: 12px;
  border: 1px solid rgba(220, 38, 38, 0.14);
  border-radius: 12px;
  background: rgba(220, 38, 38, 0.035);
}

.group-fix-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.group-fix-header strong {
  display: block;
  font-size: 13px;
  color: #0A0A0A;
}

.group-fix-header span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: rgba(0, 0, 0, 0.52);
}

.group-fix-status {
  flex: 0 0 auto;
  margin-top: 0 !important;
  color: #16A34A !important;
  font-size: 11px !important;
  font-weight: 700;
}

.grouping-fix-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(220, 38, 38, 0.04);
  border: 1px solid rgba(220, 38, 38, 0.12);
}

.grouping-fix-summary strong {
  font-size: 14px;
}

.grouping-fix-summary span {
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}

.group-fix-input {
  width: 100%;
  min-height: 58px;
  resize: vertical;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  background: #FFFFFF;
  padding: 9px 10px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.4;
}

.group-fix-input:focus {
  outline: none;
  border-color: rgba(220, 38, 38, 0.45);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.group-fix-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.group-fix-submit {
  min-height: 34px;
  color: #DC2626;
  border-color: rgba(220, 38, 38, 0.22);
  background: #FFFFFF;
  font-weight: 700;
}

.group-fix-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.group-fix-cost {
  color: rgba(0, 0, 0, 0.45);
  font-size: 11px;
}

.group-fix-error {
  color: #DC2626;
  font-size: 12px;
  font-weight: 600;
}

.grouping-refund-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.result-media-card-cover-disabled .thumb-cover-button,
.result-media-card-cover-disabled .thumb-cover-badge,
.result-media-card-cover-disabled .preview-cover-pill {
  display: none;
}

.thumb-move-controls {
  position: absolute;
  top: 8px;
  right: 44px;
  display: none;
  gap: 6px;
}

.thumb-move-button {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 0;
  color: rgba(17, 17, 17, 0.72);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.thumb-move-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.thumb-button {
  width: 100%;
  padding: 0;
  cursor: pointer;
}

.thumb-focus-chip {
  position: absolute;
  left: 8px;
  bottom: 8px;
  min-width: 28px;
  min-height: 28px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.segmented-control {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: #F3F4F6;
  border: 1px solid var(--border);
}

.animate-page .segmented-control {
  animation: fadeInDown 0.35s ease 0.1s both;
}

.segmented-control button {
  min-width: 120px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.segmented-control button.active {
  background: var(--accent);
  color: #FFFFFF;
  font-weight: 700;
}

.segmented-control.compact button {
  min-width: 88px;
  padding: 8px 12px;
}

.selector-button,
.option-card {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--button-neutral-bg);
  border: 1px solid var(--button-neutral-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.selector-button strong,
.option-card strong {
  display: block;
  margin-top: 4px;
}

.selector-button span:last-child {
  color: var(--button-secondary-text);
  font-weight: 700;
}

.option-card-copy {
  display: flex;
  gap: 12px;
  align-items: center;
}

.option-card-copy span {
  display: block;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 4px;
}

.option-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(217, 45, 32, 0.10);
}

.option-card-active,
.selector-button:hover,
.style-card-active {
  border-color: var(--button-secondary-border-hover);
  background: var(--button-neutral-bg-hover);
}

.selector-button:hover,
.option-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.selector-button:active,
.option-card:active {
  transform: translateY(0) scale(0.99);
  transition: transform 0.1s ease;
}

.pill-group,
.badge-row,
.tag-list,
.filter-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-toggle,
.pill,
.platform-pill,
.warning-banner,
.verdict-pill,
.popular-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
}

.pill,
.platform-pill {
  background: rgba(17, 24, 39, 0.06);
  color: var(--text-secondary);
}

.pill-accent {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #FFFFFF;
}

.pill-warning {
  background: rgba(255, 184, 0, 0.12);
  border: 1px solid rgba(255, 184, 0, 0.2);
  color: var(--warning);
}

.pill-success {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #FFFFFF;
}

.pill-danger {
  background: rgba(235, 0, 0, 0.12);
  border: 1px solid rgba(235, 0, 0, 0.2);
  color: var(--accent);
}

.pill-muted {
  background: rgba(17, 24, 39, 0.06);
  color: var(--text-secondary);
}

.pill-toggle {
  background: var(--button-neutral-bg);
  border: 1px solid var(--button-neutral-border);
  color: var(--button-neutral-text);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  font-weight: 600;
}

.pill-toggle-active {
  border-color: var(--accent);
  background: var(--gradient);
  color: #FFFFFF;
  font-weight: 700;
}

.range-label,
.muted {
  color: var(--text-muted);
}

.progress,
.meter-bar {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.08);
  overflow: hidden;
}

.progress span,
.meter-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.verdict-high .meter-bar span {
  background: #D92D20;
}

.verdict-good .meter-bar span {
  background: #A8E000;
}

.verdict-medium .meter-bar span {
  background: #FFB800;
}

.verdict-warn .meter-bar span {
  background: #FF8C00;
}

.verdict-low .meter-bar span {
  background: #FF4444;
}

.empty-card,
.loading-card {
  min-height: 320px;
  display: grid;
  place-items: center;
  text-align: center;
}

.empty-card h3,
.loading-card h3 {
  margin: 18px 0 10px;
}

.empty-card p,
.loading-card p {
  max-width: 520px;
  color: var(--text-secondary);
}

.loading-screen .spinner {
  border-color: rgba(255, 255, 255, 0.28);
  border-top-color: rgba(255, 255, 255, 0.98);
}

.loading-screen-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.loading-screen-debug {
  margin-top: 14px;
  max-width: 640px;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}

.trending-shell {
  display: grid;
  gap: 18px;
}

.trending-shell-loading {
  min-height: 260px;
}

.trending-subcopy {
  margin: -6px 0 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.trending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.trending-brand-card {
  position: relative;
  padding: 20px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid rgba(17, 24, 39, 0.08);
  display: grid;
  gap: 14px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.trending-brand-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  border-color: rgba(217, 45, 32, 0.25);
}

.trending-brand-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  border-radius: 99px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
}

.trending-brand-pill-personal {
  background: var(--accent);
  color: #FFFFFF;
  border: 1px solid var(--accent);
}

.trending-brand-pill-neutral {
  background: rgba(17, 24, 39, 0.06);
  color: rgba(17, 17, 17, 0.48);
  border: 1px solid rgba(17, 24, 39, 0.08);
}

.trending-brand-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding-top: 12px;
}

.trending-brand-head h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.trending-brand-meta {
  margin-top: 6px;
  font-size: 11px;
  color: rgba(217, 45, 32, 0.70);
}

.trending-score {
  display: grid;
  gap: 4px;
  text-align: right;
}

.trending-score span {
  font-size: 11px;
  color: var(--text-muted);
}

.trending-score strong {
  color: var(--accent);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.trending-note {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.trending-listing-stack {
  display: grid;
  gap: 10px;
}

.trending-listing {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.02);
  border: 1px solid rgba(17, 24, 39, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.trending-listing:hover {
  transform: translateY(-2px);
  border-color: rgba(217, 45, 32, 0.24);
  background: rgba(217, 45, 32, 0.03);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.trending-listing-thumb-frame {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: var(--surface-3);
  display: block;
  flex-shrink: 0;
  overflow: hidden;
}

.trending-listing-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.trending-listing-thumb.is-loaded {
  opacity: 1;
}

.trending-listing-thumb.is-hidden {
  display: none;
}

.trending-listing-thumb-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
}

.trending-listing-copy {
  min-width: 0;
}

.trending-listing-copy strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.9rem;
  line-height: 1.45;
}

.trending-listing-copy span {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.trending-hint {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.processing-hero {
  display: grid;
  gap: 18px;
  justify-items: center;
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(217, 45, 32, 0.16);
  border-top-color: var(--accent);
  animation: spin 0.7s linear infinite;
}

.spinner-large {
  width: 36px;
  height: 36px;
  border-width: 3px;
}

.batch-progress,
.usage-grid,
.detail-list,
.market-grid {
  display: grid;
  gap: 12px;
}

.progress-meta,
.sort-row span,
.small {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.batch-result-list {
  display: grid;
  gap: 12px;
}

.batch-result-card {
  padding: 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.batch-result-card:hover {
  transform: translateY(-1px);
  border-color: rgba(200, 255, 0, 0.2);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

.batch-result-card:focus-visible {
  outline: 2px solid rgba(200, 255, 0, 0.36);
  outline-offset: 2px;
}

.batch-result-preview {
  margin: 0;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.batch-thumb-strip {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
}

.batch-thumb-mini {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface);
}

.batch-thumb-more {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.listing-nav-shell,
.listing-nav,
.listing-nav-bar,
.batch-nav {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 12px 20px;
  display: grid;
  gap: 4px;
  justify-items: stretch;
  align-items: center;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.listing-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.listing-nav-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.listing-nav-button,
.listing-nav-arrow,
.listing-nav-prev,
.listing-nav-next {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.7);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.listing-nav-button:hover:not(:disabled),
.listing-nav-arrow:hover:not(:disabled),
.listing-nav-prev:hover:not(:disabled),
.listing-nav-next:hover:not(:disabled) {
  background: #F8F8F8;
  border-color: rgba(0, 0, 0, 0.2);
  color: #0A0A0A;
}

.listing-nav-button:disabled,
.listing-nav-arrow:disabled,
.listing-nav-prev:disabled,
.listing-nav-next:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: #FAFAFA;
}

.listing-nav-counter {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.55);
  font-weight: 500;
  text-align: center;
  flex: 1 1 auto;
}

.listing-nav-back {
  appearance: none;
  border: none;
  background: transparent;
  padding: 6px 0;
  margin: 0 auto;
  font-size: 12px;
  color: #DC2626;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
}

.listing-nav-back:hover {
  text-decoration: underline;
  color: #B91C1C;
}

.listing-nav-hint {
  text-align: center;
  font-size: 11px;
  color: rgba(0, 0, 0, 0.35);
  margin-top: 4px;
}

[data-theme="dark"] .listing-nav-shell,
[data-theme="dark"] .listing-nav,
[data-theme="dark"] .listing-nav-bar,
[data-theme="dark"] .batch-nav {
  background: #1A1A1A;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

[data-theme="dark"] .listing-nav-counter {
  color: rgba(255, 255, 255, 0.55);
}

[data-theme="dark"] .listing-nav-button,
[data-theme="dark"] .listing-nav-arrow,
[data-theme="dark"] .listing-nav-prev,
[data-theme="dark"] .listing-nav-next {
  background: #222222;
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .listing-nav-button:hover:not(:disabled),
[data-theme="dark"] .listing-nav-arrow:hover:not(:disabled),
[data-theme="dark"] .listing-nav-prev:hover:not(:disabled),
[data-theme="dark"] .listing-nav-next:hover:not(:disabled) {
  background: #2A2A2A;
  border-color: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

[data-theme="dark"] .listing-nav-back {
  color: #FF4444;
}

[data-theme="dark"] .listing-nav-back:hover {
  color: #FF6B6B;
}

[data-theme="dark"] .listing-nav-hint {
  color: rgba(255, 255, 255, 0.25);
}

[data-theme="dark"] .thumb-cover-button,
[data-theme="dark"] .thumb-move-button {
  background: rgba(17, 17, 17, 0.88);
  color: rgba(255, 255, 255, 0.78);
  box-shadow: none;
}

[data-theme="dark"] .thumb-grid-hint {
  color: rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .book-scan-hint {
  color: #F4D35E;
  background: rgba(255, 184, 0, 0.10);
  border-color: rgba(255, 184, 0, 0.28);
}

[data-theme="dark"] .book-option-row {
  background: rgba(17, 24, 39, 0.48);
  border-color: rgba(255, 255, 255, 0.10);
}

[data-theme="dark"] .thumb-drag-handle {
  color: rgba(255, 255, 255, 0.42);
}

.listing-exit-left {
  animation: listingSlideOutLeft 0.15s ease forwards;
}

.listing-enter-right {
  animation: listingSlideInRight 0.2s ease forwards;
}

.listing-exit-right {
  animation: listingSlideOutRight 0.15s ease forwards;
}

.listing-enter-left {
  animation: listingSlideInLeft 0.2s ease forwards;
}

@keyframes listingSlideOutLeft {
  to { opacity: 0; transform: translateX(-20px); }
}

@keyframes listingSlideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes listingSlideOutRight {
  to { opacity: 0; transform: translateX(20px); }
}

@keyframes listingSlideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.batch-result-head strong,
.listing-card-body strong,
.credit-pack-head strong {
  font-size: 1rem;
}

.batch-result-head span,
.credit-pack-head span,
.credit-pack-head small {
  display: block;
  color: var(--text-muted);
  margin-top: 4px;
}

.batch-price,
.hero-price,
.listing-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent);
  white-space: nowrap;
}

.result-media-card {
  gap: 14px;
}

.result-media-frame {
  min-height: 260px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  padding: 18px;
}

.result-media-frame img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
}

.result-media-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 88px));
  gap: 10px;
  justify-content: start;
}

.result-media-thumb-card {
  position: relative;
}

.result-media-thumb {
  padding: 0;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.animate-page .result-media-thumb {
  animation: scaleIn 0.25s ease both;
}

.result-media-thumb:hover {
  transform: translateY(-1px);
  border-color: rgba(217, 45, 32, 0.30);
}

.result-media-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.result-media-thumb-active {
  border-color: rgba(217, 45, 32, 0.72);
  box-shadow: 0 0 0 2px rgba(217, 45, 32, 0.12);
}

.result-media-thumb-card-cover .result-media-thumb {
  border-color: rgba(220, 38, 38, 0.72);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.14);
}

.preview-cover-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.96);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.price-option-grid,
.usage-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sell-overview-grid {
  display: grid;
  grid-template-columns: minmax(340px, 460px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.sell-pricing-stack {
  display: grid;
  gap: 14px;
}

.sell-support-stack {
  align-content: start;
}

.sell-marketplace-stack {
  min-width: 0;
}

.sell-secondary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.sell-secondary-span {
  grid-column: 1 / -1;
}

@media (max-width: 720px) {
  .listing-nav-row {
    flex-wrap: wrap;
  }

  .listing-nav-counter {
    order: -1;
    width: 100%;
  }

  .listing-nav-hint {
    display: none;
  }

  .thumb-move-controls {
    display: flex;
  }

  .thumb-drag-handle {
    display: none;
  }
}

.household-overview-grid {
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
}

.household-secondary-grid {
  grid-template-columns: minmax(0, 1fr);
}

.household-summary-card {
  display: grid;
  gap: 14px;
}

.household-price-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.household-price-grid > div {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.household-price-grid span {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.household-price-grid strong {
  color: var(--accent);
  font-size: 1.34rem;
  font-weight: 800;
  line-height: 1.1;
}

.household-value-note {
  margin-top: 2px;
}

.household-market-details {
  overflow: hidden;
}

.household-market-details summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.household-market-details summary::-webkit-details-marker {
  display: none;
}

.household-market-details[open] summary {
  margin-bottom: 14px;
}

.household-market-details-body {
  display: grid;
  gap: 14px;
}

.price-option {
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.price-option:hover {
  transform: translateY(-2px);
  border-color: rgba(217, 45, 32, 0.3);
  background: rgba(217, 45, 32, 0.03);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.price-option span {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.price-option strong {
  font-size: 1.08rem;
}

.price-option-active {
  border-width: 1.5px;
  border-color: var(--accent);
  background: rgba(217, 45, 32, 0.05);
}

.market-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.marketplace-sync-copy {
  margin: 0 0 2px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.rarity-banner-card {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: #dc2626;
}

.rarity-banner-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.rarity-banner-head strong {
  font-size: 0.98rem;
  color: #dc2626;
}

.rarity-banner-copy {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.55;
}

.rarity-indicator-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: var(--text-secondary);
}

.sell-platform-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sell-platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(235, 0, 0, 0.18);
  background: rgba(235, 0, 0, 0.08);
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 600;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.sell-platform-pill:hover {
  transform: translateY(-1px);
  background: rgba(235, 0, 0, 0.12);
  border-color: rgba(235, 0, 0, 0.28);
  box-shadow: 0 8px 18px rgba(235, 0, 0, 0.08);
}

.sell-platform-pill-static {
  cursor: default;
}

.sell-platform-pill-static:hover {
  transform: none;
  box-shadow: none;
}

.marketplace-queue-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.marketplace-queue-bar .btn,
.marketplace-action-row .btn,
.history-actions .btn {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #FFFFFF;
  font-weight: 700;
}

.marketplace-queue-bar .btn:hover:not(:disabled),
.marketplace-action-row .btn:hover:not(:disabled),
.history-actions .btn:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #FFFFFF;
}

.marketplace-queue-bar .btn:disabled,
.marketplace-action-row .btn:disabled,
.history-actions .btn:disabled {
  background: rgba(235, 0, 0, 0.42);
  border-color: rgba(235, 0, 0, 0.42);
  color: rgba(255, 255, 255, 0.92);
}

.marketplace-queue-copy {
  display: grid;
  gap: 4px;
}

.marketplace-queue-copy strong {
  font-size: 0.94rem;
}

.marketplace-queue-copy span {
  color: var(--text-muted);
  line-height: 1.5;
  font-size: 0.82rem;
}

.marketplace-queue-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.marketplace-section-stack {
  display: grid;
  gap: 14px;
}

.marketplace-section {
  display: grid;
  gap: 12px;
}

.marketplace-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.marketplace-section-head h4 {
  margin: 0;
  font-size: 0.98rem;
}

.marketplace-section-head span {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.marketplace-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.marketplace-tile {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.marketplace-tile-head .pill {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #FFFFFF;
}

.marketplace-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.marketplace-tile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.marketplace-tile-head strong {
  display: block;
  font-size: 1rem;
}

.marketplace-tile-head span {
  display: block;
  margin-top: 5px;
  color: var(--text-muted);
  line-height: 1.5;
  font-size: 0.82rem;
}

.marketplace-score-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.marketplace-score-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.marketplace-score-row strong {
  color: var(--text);
}

.marketplace-helper-copy {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.55;
}

.marketplace-launch-button {
  flex: 1;
}

.marketplace-action-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.marketplace-queue-button {
  min-width: 94px;
}

.marketplace-queue-button-active {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #FFFFFF;
}

.market-grid div,
.detail-list div,
.usage-grid div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.market-grid span,
.detail-list span,
.usage-grid span {
  color: var(--text-muted);
}

.status-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-dot,
.signal-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.status-high,
.signal-dot-good {
  background: var(--accent);
}

.status-medium,
.signal-dot-warn {
  background: var(--amber);
}

.status-low,
.signal-dot-bad {
  background: var(--red);
}

.signal-dot-info {
  background: var(--info);
}

.tag {
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(217, 45, 32, 0.10);
  border: 1px solid rgba(217, 45, 32, 0.20);
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
}

.checklist,
.signal-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.checklist li,
.signal-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.checklist li::before {
  content: "•";
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 1;
}

.filter-strip {
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.animate-page .filter-strip {
  animation: fadeInDown 0.35s ease 0.1s both;
}

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

.filter-tab {
  flex-shrink: 0;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--surface-2);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.filter-tab-active {
  background: var(--accent);
  color: #0A0A0A;
  border-color: transparent;
}

.sort-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.sort-row select {
  width: auto;
  min-width: 160px;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.history-page {
  display: grid;
  gap: 18px;
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.history-card {
  display: grid;
  gap: 16px;
}

.history-card-top {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.history-thumb {
  width: 108px;
  height: 108px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.history-thumb-empty {
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #FFFFFF;
  background: var(--accent);
}

.history-card-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.history-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.history-card-head h3 {
  margin: 4px 0 0;
}

.history-price {
  white-space: nowrap;
  font-size: 1.05rem;
  color: var(--accent);
}

.history-subtitle {
  margin: 0;
  color: var(--text-secondary);
}

.history-description {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.listing-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid rgba(17, 24, 39, 0.08);
  transition: border-color var(--transition), transform var(--transition);
}

.listing-card:hover {
  transform: translateY(-2px);
  border-color: rgba(217, 45, 32, 0.24);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.listing-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
}

.listing-thumb-placeholder {
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #0A0A0A;
}

.listing-card-body {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 6px;
}

.listing-topline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.listing-card-body strong {
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.platform-pill {
  font-size: 0.66rem;
  white-space: nowrap;
}

.platform-grailed {
  background: rgba(255, 100, 50, 0.15);
  color: #FF8C6B;
}

.platform-depop {
  background: rgba(255, 50, 50, 0.15);
  color: #FF6B6B;
}

.platform-ebay {
  background: rgba(68, 136, 255, 0.15);
  color: #6BA3FF;
}

.platform-poshmark {
  background: rgba(200, 50, 150, 0.15);
  color: #FF6BC8;
}

.platform-vinted {
  background: rgba(0, 180, 120, 0.15);
  color: #00D490;
}

.platform-stockx {
  background: rgba(17, 24, 39, 0.08);
  color: #111111;
}

.platform-goat {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.platform-default {
  background: rgba(217, 45, 32, 0.10);
  color: var(--accent);
}

.verdict-card {
  display: grid;
  gap: 16px;
}

.verdict-high,
.verdict-good {
  background: rgba(217, 45, 32, 0.08);
  border: 1px solid rgba(217, 45, 32, 0.2);
  color: var(--accent);
}

.verdict-medium {
  background: rgba(255, 184, 0, 0.08);
  border: 1px solid rgba(255, 184, 0, 0.2);
  color: var(--warning);
}

.verdict-warn,
.verdict-low {
  background: rgba(255, 68, 68, 0.08);
  border: 1px solid rgba(255, 68, 68, 0.2);
  color: var(--red);
}

.verdict-pill {
  width: fit-content;
  background: rgba(255, 255, 255, 0.06);
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.meter-wrap {
  display: grid;
  gap: 14px;
}

.meter-score {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.warning-banner {
  width: fit-content;
  background: rgba(255, 184, 0, 0.08);
  border: 1px solid rgba(255, 184, 0, 0.15);
  color: var(--warning);
  padding: 6px 12px;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
}

.verdict-medium .verdict-pill {
  background: rgba(255, 184, 0, 0.18);
  border: 1px solid rgba(255, 184, 0, 0.28);
  color: #8A5400;
}

.verdict-medium .warning-banner {
  background: rgba(255, 184, 0, 0.16);
  border-color: rgba(255, 184, 0, 0.28);
  color: #8A5400;
}

.verdict-medium .muted {
  color: rgba(138, 84, 0, 0.92);
  font-size: 0.98rem;
  line-height: 1.6;
}

.tone-good {
  border-color: rgba(217, 45, 32, 0.2);
}

.tone-bad {
  border-color: rgba(255, 68, 68, 0.15);
}

.tone-warn {
  border-color: rgba(255, 184, 0, 0.15);
}

.tone-info {
  border-color: rgba(68, 136, 255, 0.15);
}

.hero-preview {
  aspect-ratio: 1 / 1;
}

.bg-secondary-dropzone {
  min-height: 140px;
}

.bg-secondary-preview {
  aspect-ratio: 16 / 10;
}

.bg-secondary-preview img {
  object-fit: cover;
}

.bg-thumb-grid {
  max-height: 252px;
  overflow-y: auto;
  padding-right: 4px;
}

.bg-result-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bg-results-footer {
  flex-wrap: wrap;
}

.sell-bg-prep {
  display: grid;
  gap: 10px;
}

.swatch-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.swatch {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  color: #0A0A0A;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.swatch-dark {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.18);
}

.swatch-active {
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.20);
  transform: scale(1.15);
}

.image-stage {
  min-height: 360px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border-radius: 18px;
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}

.image-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.credits-page {
  gap: 20px;
}

.credits-support-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.credits-support-card p {
  margin: 8px 0 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.page-hero {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 20px;
  flex-wrap: wrap;
}

.notice-card {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.notice-card-warning {
  background: rgba(255, 184, 0, 0.08);
  border-color: rgba(255, 184, 0, 0.15);
  color: var(--warning);
}

.notice-card-error {
  background: rgba(255, 68, 68, 0.08);
  border-color: rgba(255, 68, 68, 0.15);
  color: #FF8080;
}

.notice-card-info {
  background: rgba(68, 136, 255, 0.08);
  border-color: rgba(68, 136, 255, 0.15);
  color: var(--info);
}

.usage-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.credit-pack-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.credit-pack-card {
  display: grid;
  gap: 14px;
}

.credit-pack-popular {
  border-color: rgba(217, 45, 32, 0.20);
  animation: glow 3s ease infinite;
}

.popular-badge {
  width: fit-content;
  background: rgba(217, 45, 32, 0.12);
  border: 1px solid rgba(217, 45, 32, 0.2);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 10px;
  animation: pulse 2s infinite;
}

.credit-pack-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.credit-pack-copy {
  min-width: 0;
}

.credit-pack-price {
  display: grid;
  gap: 10px;
  justify-items: end;
  min-width: 104px;
}

.credit-pack-price strong {
  font-size: 1.25rem;
  color: var(--accent);
}

.earn-page {
  display: grid;
  gap: 20px;
}

.earn-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.earn-task-card {
  display: grid;
  gap: 16px;
}

.earn-task-head {
  display: grid;
  gap: 12px;
}

.earn-task-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.earn-task-head p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.earn-task-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.earn-task-meta,
.earn-submission-meta {
  display: grid;
  gap: 6px;
}

.earn-submission-meta {
  justify-items: end;
}

.earn-submission-list {
  display: grid;
  gap: 12px;
}

.earn-submission-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--surface-2);
}

.earn-submission-item span {
  display: block;
  margin-top: 5px;
  color: var(--text-muted);
  word-break: break-word;
}

.compact-empty {
  min-height: 0;
  padding: 8px 0;
}

.credits-footer {
  display: flex;
  justify-content: flex-end;
}

.settings-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.danger-card {
  border-color: rgba(255, 68, 68, 0.15);
}

.document-shell {
  padding: 24px;
}

.page-route-notice {
  margin-bottom: 16px;
}

.document-back {
  display: inline-flex;
  margin-bottom: 18px;
}

.document-section + .document-section {
  margin-top: 24px;
}

.document-section h2 {
  margin-bottom: 12px;
}

.contact-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.cookie-banner {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 65;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.cookie-banner-copy {
  display: grid;
  gap: 6px;
}

.cookie-banner-copy span {
  color: var(--text-secondary);
  line-height: 1.5;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.84);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 40;
  animation: fadeIn 0.2s ease both;
}

.modal-backdrop.modal-closing {
  animation: fadeOutSimple 0.15s ease both;
}

.style-modal {
  width: min(100%, 860px);
  max-height: min(92vh, 820px);
  overflow: auto;
  animation: scaleIn 0.25s ease both;
}

.grouping-modal-card {
  width: min(100%, 760px);
  max-height: min(92vh, 820px);
  overflow: auto;
  animation: scaleIn 0.25s ease both;
}

.modal-backdrop.modal-closing .style-modal {
  animation: modalScaleOut 0.15s ease both;
}

.modal-backdrop.modal-closing .grouping-modal-card {
  animation: modalScaleOut 0.15s ease both;
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.style-card {
  position: relative;
  padding: 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.style-card span {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.style-card-check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent);
}

.modal-footer {
  margin-top: 20px;
  align-items: center;
}

.modal-footer-note {
  color: var(--text-secondary);
}

.grouping-modal-photo {
  margin: 4px 0 18px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.grouping-modal-photo img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
}

.grouping-modal-options {
  display: grid;
  gap: 10px;
}

.group-target-card {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #FFFFFF;
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 10px;
  cursor: pointer;
}

.group-target-card:hover {
  border-color: rgba(220, 38, 38, 0.2);
  background: rgba(220, 38, 38, 0.03);
}

.group-target-card-create {
  border-style: dashed;
}

.group-target-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.group-target-head span {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.group-target-strip {
  display: flex;
  gap: 8px;
}

.group-target-strip img {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
}

.grouping-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
}

.grouping-selection-tile {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  background: #FFFFFF;
}

.grouping-selection-tile.selected {
  border-color: rgba(220, 38, 38, 0.35);
  background: rgba(220, 38, 38, 0.04);
}

.grouping-selection-tile input {
  margin: 0;
}

.grouping-selection-tile img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  object-fit: cover;
}

.grouping-feedback-options {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.feedback-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #FFFFFF;
}

.feedback-choice input {
  margin: 0;
}

.toast-root {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: grid;
  gap: 10px;
  z-index: 60;
}

.toast {
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--surface);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  animation: slideInRight 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.toast-leaving {
  animation: fadeOut 0.2s ease forwards;
}

.toast-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
  transform-origin: left center;
  animation: toastProgress 4s linear forwards;
}

.toast-error {
  background: rgba(255, 68, 68, 0.08);
  border-color: rgba(255, 68, 68, 0.15);
  color: #FF8080;
}

.toast-success {
  background: rgba(217, 45, 32, 0.08);
  border-color: rgba(217, 45, 32, 0.15);
  color: var(--accent);
}

.bottom-nav {
  display: none;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

.scroll-animate {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.scroll-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

.find-filters {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(235, 0, 0, 0.12);
  background: linear-gradient(180deg, rgba(235, 0, 0, 0.03) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.filter-row,
.filter-row-wrap {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, 0.10);
  background: var(--surface);
  color: var(--button-neutral-text);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
  transition: border-color var(--transition), background var(--transition), color var(--transition), transform var(--transition);
}

.filter-tab:hover,
.filter-tab:focus-visible {
  border-color: rgba(235, 0, 0, 0.22);
  background: #fff7f7;
  color: var(--accent-dark);
  outline: none;
}

.filter-tab.active {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 20px rgba(235, 0, 0, 0.16);
}

.filter-tab .count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.06);
  color: inherit;
  font-size: 11px;
  font-weight: 800;
}

.filter-tab.active .count {
  background: rgba(255, 255, 255, 0.18);
}

.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px 13px;
  border-radius: 12px;
  border: 1px solid rgba(17, 24, 39, 0.10);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.filter-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.filter-platform,
.sort-select {
  min-height: 44px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(17, 24, 39, 0.10);
  background: var(--surface);
  color: var(--text);
}

.filter-platform {
  min-width: 220px;
}

.price-range {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.price-range input {
  width: 118px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(17, 24, 39, 0.10);
  background: var(--surface);
}

.price-range span {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sort-control label {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.find-results-stack {
  display: grid;
  gap: 12px;
}

.result-card {
  position: relative;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.04);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.result-card:hover {
  transform: translateY(-1px);
  border-color: rgba(17, 24, 39, 0.14);
  box-shadow: 0 14px 28px rgba(16, 24, 40, 0.08);
}

.result-card.premium {
  border-color: rgba(235, 0, 0, 0.22);
  background: linear-gradient(180deg, rgba(235, 0, 0, 0.03) 0%, #ffffff 100%);
}

.premium-badge {
  position: absolute;
  top: -10px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--gradient);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 16px rgba(235, 0, 0, 0.18);
}

.result-card-header {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.find-result-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: 14px;
  background: #f3f4f6;
  border: 1px solid rgba(17, 24, 39, 0.08);
}

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

.find-result-thumb-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}

.find-result-thumb.no-image .find-result-thumb-fallback {
  display: flex;
}

.result-info {
  min-width: 0;
}

.result-platform-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.result-platform {
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.result-match-badge,
.result-sold-badge,
.result-live-badge,
.result-auth-badge,
.result-auction-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.result-match-badge.exact {
  background: rgba(235, 0, 0, 0.10);
  color: var(--accent-dark);
}

.result-match-badge.same_brand {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

.result-match-badge.similar {
  background: rgba(17, 24, 39, 0.08);
  color: var(--text-secondary);
}

.result-match-badge.related {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.result-sold-badge {
  background: rgba(22, 163, 74, 0.12);
  color: var(--green);
}

.result-live-badge {
  background: rgba(17, 24, 39, 0.08);
  color: var(--text-secondary);
}

.result-auth-badge {
  background: rgba(34, 197, 94, 0.12);
  color: var(--green);
}

.result-title {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.result-grade {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.result-price-section {
  display: grid;
  gap: 6px;
  justify-items: end;
  text-align: right;
}

.result-price {
  color: var(--accent);
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
}

.result-price-unknown {
  color: var(--text-dim);
  font-size: 12px;
  font-style: italic;
  font-weight: 600;
}

.result-auction-tag {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.result-snippet {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
}

.result-meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.result-link-btn,
.result-save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  transition: transform var(--transition), border-color var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition);
}

.result-link-btn {
  flex: 1 1 180px;
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 10px 18px rgba(235, 0, 0, 0.14);
}

.result-link-btn:hover,
.result-link-btn:focus-visible {
  transform: translateY(-1px);
  outline: none;
  box-shadow: 0 14px 24px rgba(235, 0, 0, 0.18);
}

.result-save-btn {
  border: 1px solid var(--button-secondary-border);
  background: var(--button-secondary-bg);
  color: var(--button-secondary-text);
}

.result-save-btn:hover,
.result-save-btn:focus-visible {
  border-color: var(--button-secondary-border-hover);
  background: var(--button-secondary-bg-hover);
  outline: none;
}

.result-save-btn:disabled,
.result-save-btn-active {
  border-color: rgba(22, 163, 74, 0.16);
  background: rgba(22, 163, 74, 0.08);
  color: var(--green);
  cursor: default;
}

.price-insights {
  margin-bottom: 14px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(235, 0, 0, 0.16);
  background: linear-gradient(135deg, rgba(235, 0, 0, 0.05) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.price-insights h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.insight-card {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(17, 24, 39, 0.06);
  text-align: center;
}

.insight-card.highlight {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
}

.insight-label {
  color: inherit;
  opacity: 0.68;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.insight-value {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.find-manual-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.find-manual-links .btn {
  min-width: 124px;
}

@media (max-width: 1024px) {
  :root {
    --sidebar-width: 88px;
  }

  .sidebar {
    padding: 24px 14px 18px;
    background: #FFFFFF;
  }

  .sidebar-logo {
    width: 100%;
  }

  .nav-link {
    justify-content: center;
    padding-inline: 10px;
  }

  .nav-label,
  .sidebar-brand-copy,
  .sidebar-user span,
  .sidebar-balance span {
    display: none;
  }

  .main-shell {
    margin-left: var(--sidebar-width);
  }
}

@media (max-width: 767px) {
  .sidebar {
    display: none;
  }

  .main-shell {
    margin-left: 0;
    padding: 20px 16px 92px;
  }

  .bottom-nav {
    position: fixed;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(10px);
    z-index: 50;
  }

  .bottom-nav-link {
    display: grid;
    gap: 4px;
    justify-items: center;
    padding: 8px 4px;
    border-radius: 12px;
    color: rgba(17, 17, 17, 0.72);
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
  }

  .bottom-nav-link span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
  }

  .bottom-nav-link span svg {
    width: 18px;
    height: 18px;
    display: block;
  }

  .bottom-nav-link small {
    font-size: 11px;
    font-weight: 500;
  }

  .bottom-nav-link-active {
    background: var(--accent);
    color: #FFFFFF;
  }

  .cookie-banner {
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    align-items: stretch;
    flex-direction: column;
  }

  .cookie-banner-actions {
    width: 100%;
  }

  .cookie-banner-actions .btn {
    flex: 1 1 160px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

html[data-theme="dark"] {
  --bg: #0A0A0A;
  --surface: #111111;
  --surface-2: #1A1A1A;
  --surface-3: #202020;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.72);
  --text-muted: rgba(255, 255, 255, 0.58);
  --text-dim: rgba(255, 255, 255, 0.36);
  --accent: #7DC200;
  --accent-hover: #6BAD00;
  --accent-dark: #5C9200;
  --accent-glow: rgba(125, 194, 0, 0.14);
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--button-neutral-border);
  border-radius: 12px;
  background: var(--button-neutral-bg);
  color: var(--button-neutral-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.08);
}

.icon-button:hover {
  background: var(--button-neutral-bg-hover);
  border-color: var(--button-neutral-border-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(235, 0, 0, 0.12);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.toast-copy {
  display: grid;
  gap: 10px;
}

.toast-action {
  justify-self: start;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.page-hero {
  display: grid;
  gap: 16px;
}

.stats-page {
  display: grid;
  gap: 18px;
}

.stats-hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stats-layout-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.stats-metric-card,
.admin-chart,
.sold-history-list,
.recent-listing-list,
.feedback-card,
.onboarding-style-card,
.onboarding-mini-card {
  border-radius: 16px;
}

.stats-metric-value {
  font-size: 28px;
  line-height: 1.1;
}

.insight-pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.insight-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(125, 194, 0, 0.1);
  border: 1px solid rgba(125, 194, 0, 0.18);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.sold-history-list,
.recent-listing-list {
  display: grid;
  gap: 10px;
}

.sold-history-item,
.recent-listing-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  text-align: left;
  cursor: pointer;
}

.recent-listing-item strong,
.sold-history-item strong {
  display: block;
}

.recent-listing-item span,
.sold-history-item span {
  color: var(--text-muted);
  font-size: 12px;
}

.search-input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.card-actions-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-compact {
  min-height: 36px;
  padding: 0 12px;
}

.progress-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.progress-step {
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
}

.progress-step-mark {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-3);
  color: var(--text);
  font-weight: 700;
}

.progress-step-active {
  border-color: rgba(125, 194, 0, 0.22);
  color: var(--text);
}

.progress-step-active .progress-step-mark,
.progress-step-done .progress-step-mark {
  background: var(--accent);
  color: #fff;
}

.feedback-card {
  overflow: hidden;
}

.feedback-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  list-style: none;
}

.feedback-body {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.feedback-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.star-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.star-button {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-dim);
  cursor: pointer;
}

.star-button-active {
  color: #FFB800;
  border-color: rgba(255, 184, 0, 0.3);
  background: rgba(255, 184, 0, 0.12);
}

.feedback-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.feedback-pill-group {
  gap: 8px;
}

.sold-tracker-card {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.onboarding-backdrop,
.low-credit-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 10, 10, 0.44);
  backdrop-filter: blur(14px);
}

.onboarding-card,
.low-credit-card {
  width: min(100%, 760px);
}

.onboarding-stack {
  display: grid;
  gap: 18px;
}

.onboarding-bullet-grid,
.onboarding-style-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.onboarding-style-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.onboarding-mini-card {
  padding: 16px;
  display: grid;
  gap: 8px;
}

.onboarding-style-card {
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: grid;
  align-content: start;
  gap: 8px;
  text-align: left;
  cursor: pointer;
}

.onboarding-style-card-active {
  border-color: rgba(125, 194, 0, 0.3);
  background: rgba(125, 194, 0, 0.08);
}

.low-credit-packs {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.admin-chart {
  width: 100%;
  min-height: 220px;
  margin-top: 16px;
}

.compact-empty {
  padding: 20px;
  text-align: center;
}

@media (max-width: 1100px) {
  .stats-grid,
  .stats-layout-two,
  .feedback-grid,
  .onboarding-bullet-grid,
  .onboarding-style-grid {
    grid-template-columns: 1fr;
  }

  .progress-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .header-actions .pill {
    padding-inline: 10px;
  }

  .header-actions .pill::after {
    content: '';
  }

  .feedback-grid,
  .stats-grid,
  .stats-layout-two {
    grid-template-columns: 1fr;
  }

  .sell-overview-grid,
  .sell-secondary-grid,
  .household-overview-grid,
  .household-secondary-grid {
    grid-template-columns: 1fr !important;
  }

  .stats-hero-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-header {
    gap: 14px;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  button,
  .btn,
  input,
  select,
  textarea {
    min-height: 44px;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }
}

.marketplace-mobile-banner {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(235, 0, 0, 0.16);
  background: rgba(235, 0, 0, 0.06);
}

.marketplace-mobile-banner strong {
  font-size: 0.94rem;
  color: var(--accent);
}

.marketplace-mobile-banner span {
  color: var(--text-secondary);
  line-height: 1.55;
  font-size: 0.84rem;
}

/* Tablet and below */
@media (max-width: 1024px) {
  .page-header h1 {
    font-size: 24px;
  }

  .workspace-grid,
  .sell-workspace-grid,
  .sell-overview-grid,
  .sell-secondary-grid,
  .household-overview-grid,
  .household-secondary-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card,
  .modal-card,
  .section-card,
  .usage-card,
  .sell-workspace-grid .card {
    padding: 16px 18px;
  }

  .result-media-frame {
    min-height: 240px;
  }

  .result-media-frame img {
    max-height: 320px;
  }

  .marketplace-grid,
  .listing-grid,
  .history-grid,
  .credit-pack-grid,
  .usage-grid,
  .price-option-grid,
  .household-price-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 8px));
    justify-content: space-around;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(10px);
  }

  .bottom-nav-link {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 4px;
  }

  .bottom-nav-link small {
    font-size: 10px;
  }

  .main-shell {
    width: 100%;
    margin-left: 0;
    padding: 16px 12px 88px;
  }

  .app-shell,
  .app-shell-frame {
    min-height: 100vh;
  }

  .page-header {
    flex-direction: column;
    padding: 0;
    margin-bottom: 16px;
    gap: 14px;
  }

  .page-header h1 {
    font-size: 22px;
  }

  .page-header p,
  .paragraph,
  .marketplace-sync-copy,
  .marketplace-helper-copy {
    font-size: 13px;
  }

  .header-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
  }

  .header-actions .btn {
    min-height: 40px;
    padding: 8px 12px;
    font-size: 12px;
  }

  .header-actions .pill {
    font-size: 11px;
  }

  .page-content {
    gap: 12px;
    padding-bottom: 0;
  }

  .card,
  .modal-card,
  .section-card,
  .usage-card,
  .sell-workspace-grid .card,
  .document-card,
  .auth-card {
    padding: 14px;
    border-radius: 12px;
  }

  .card-header h3,
  .section-card h3,
  .modal-header h2,
  .document-section h2,
  .card h3 {
    font-size: 16px;
  }

  button,
  .btn,
  input,
  textarea,
  select {
    min-height: 44px;
  }

  input,
  textarea,
  select {
    font-size: 16px !important;
    padding: 12px;
    width: 100%;
  }

  .workspace-grid,
  .sell-workspace-grid,
  .sell-overview-grid,
  .sell-secondary-grid,
  .household-overview-grid,
  .household-secondary-grid,
  .marketplace-grid,
  .listing-grid,
  .history-grid,
  .credit-pack-grid,
  .usage-grid,
  .price-option-grid,
  .household-price-grid,
  .stats-grid,
  .stats-layout-two,
  .feedback-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .workspace-left,
  .workspace-right {
    width: 100%;
  }

  .dropzone {
    min-height: 160px;
    padding: 24px 16px;
  }

  .dropzone-copy strong {
    font-size: 0.96rem;
  }

  .dropzone-copy span {
    font-size: 13px;
  }

  .thumb-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .thumb-card,
  .hero-preview {
    min-height: auto;
    width: 100%;
    aspect-ratio: 1 / 1;
  }

  .segmented-control {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 4px;
  }

  .segmented-control button {
    flex: 1 0 auto;
    min-width: 120px;
    padding: 8px 14px;
    font-size: 12px;
  }

  .pill-toggle,
  .platform-pill,
  .sell-platform-pill {
    font-size: 11px;
  }

  .sell-platform-pill-row,
  .marketplace-score-row,
  .settings-links,
  .history-actions,
  .card-actions-inline {
    flex-wrap: wrap;
    gap: 8px;
  }

  .result-media-frame {
    min-height: 210px;
    padding: 10px;
  }

  .result-media-frame img {
    max-height: 280px;
  }

  .result-media-thumbs {
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 8px;
  }

  .batch-result-layout {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
  }

  .batch-result-thumb,
  .history-thumb {
    width: 72px;
    height: 72px;
    border-radius: 12px;
  }

  .listing-card {
    padding: 12px;
    align-items: flex-start;
  }

  .listing-thumb {
    width: 50px;
    height: 50px;
  }

  .listing-card-body strong {
    font-size: 13px;
  }

  .batch-price,
  .hero-price,
  .listing-price,
  .credit-pack-price strong,
  .household-price-grid strong,
  .stats-metric-value {
    font-size: 18px;
  }

  .trending-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .trending-brand-card {
    width: 100%;
  }

  .credit-pack-card {
    padding: 16px;
  }

  .marketplace-queue-bar,
  .credits-support-card,
  .stats-hero-card,
  .history-card-head,
  .feedback-actions,
  .marketplace-action-row,
  .marketplace-queue-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .marketplace-action-row .btn,
  .marketplace-queue-actions .btn,
  .settings-links .btn,
  .history-actions .btn,
  .feedback-actions .btn {
    width: 100%;
  }

  .marketplace-queue-button,
  .marketplace-launch-button {
    min-width: 0;
    width: 100%;
  }

  .marketplace-tile-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .history-card-top {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
  }

.document-shell {
    padding: 12px;
  }
}

.confidence-card,
.proactive-card,
.correction-card {
  overflow: visible;
}

.confidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.confidence-row {
  display: grid;
  grid-template-columns: minmax(64px, auto) minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 9px 10px;
  background: #fff;
}

.confidence-row span {
  color: rgba(0, 0, 0, 0.5);
  font-size: 12px;
  font-weight: 600;
}

.confidence-row strong {
  min-width: 0;
  overflow: hidden;
  color: #0a0a0a;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.confidence-row em {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 99px;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.confidence-high em {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}

.confidence-medium em {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.confidence-low em {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
}

.proactive-question-list {
  display: grid;
  gap: 8px;
}

.proactive-question {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(245, 158, 11, 0.06);
  color: #0a0a0a;
  text-align: left;
  cursor: pointer;
}

.proactive-question strong {
  font-size: 13px;
}

.proactive-question span {
  color: rgba(0, 0, 0, 0.56);
  font-size: 12px;
}

.correction-box {
  background: #f9fafb;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 14px;
}

.correction-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: rgba(0, 0, 0, 0.62);
  font-size: 13px;
  font-weight: 700;
}

.correction-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 24px;
  border-radius: 99px;
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
  font-size: 11px;
  font-weight: 800;
}

.correction-title {
  color: #0a0a0a;
}

.correction-history-note {
  margin-left: auto;
  color: rgba(0, 0, 0, 0.46);
  font-size: 11px;
  font-weight: 600;
}

.correction-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 9px;
  color: rgba(0, 0, 0, 0.48);
  font-size: 11px;
}

.suggestion-chip {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  padding: 5px 9px;
  background: #fff;
  color: rgba(0, 0, 0, 0.68);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.suggestion-chip:hover,
.proactive-question:hover {
  border-color: rgba(220, 38, 38, 0.25);
  background: rgba(220, 38, 38, 0.05);
}

.correction-input {
  width: 100%;
  min-height: 76px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: #0a0a0a;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.4;
  resize: vertical;
}

.correction-input:focus {
  border-color: #dc2626;
  outline: none;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.correction-actions,
.correction-side-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.correction-actions {
  justify-content: space-between;
  margin-top: 8px;
}

.correction-cost {
  color: rgba(0, 0, 0, 0.5);
  font-size: 11px;
  font-weight: 600;
}

.correction-history {
  margin-top: 10px;
  color: rgba(0, 0, 0, 0.58);
  font-size: 12px;
}

.correction-history summary {
  cursor: pointer;
  font-weight: 700;
}

.correction-history ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.sell-result-updated .correction-card,
.sell-result-updated .card:has(#sell-description-draft) {
  animation: listingUpdatePulse 0.45s ease;
}

@keyframes listingUpdatePulse {
  0% {
    background: rgba(220, 38, 38, 0.08);
  }
  100% {
    background: #fff;
  }
}

/* Native-feeling mobile polish */
.upload-buttons {
  display: none;
  gap: 8px;
  margin-top: 10px;
}

.mobile-share-button {
  display: none;
}

.pull-indicator {
  --pull-distance: 0px;
  position: fixed;
  top: calc(8px + env(safe-area-inset-top));
  left: 50%;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-62px + var(--pull-distance))) scale(0.92);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.pull-indicator-active,
.pull-indicator-ready {
  opacity: 1;
}

.pull-indicator-ready {
  border-color: rgba(220, 38, 38, 0.28);
}

.install-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(86px + env(safe-area-inset-bottom));
  z-index: 1200;
  animation: fadeInUp 0.24s ease both;
}

.install-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(220, 38, 38, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.install-banner-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  flex: 0 0 auto;
}

.install-banner-text {
  min-width: 0;
  flex: 1;
}

.install-banner-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.install-banner-subtitle {
  color: var(--text-secondary);
  font-size: 12px;
}

.install-banner-action,
.install-banner-close {
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
}

.install-banner-action {
  padding: 0 14px;
  background: var(--accent);
  color: #fff;
}

.install-banner-close {
  width: 44px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-secondary);
  font-size: 20px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
  }

  .app-shell {
    min-height: 100dvh;
    background: var(--bg);
  }

  .app-shell-frame {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
  }

  .sidebar {
    display: none !important;
  }

  .main-shell {
    width: 100%;
    max-width: 100%;
    margin-left: 0 !important;
    padding: 0 0 calc(84px + env(safe-area-inset-bottom)) !important;
    overflow-x: hidden;
  }

  .page-header {
    position: sticky;
    top: 0;
    z-index: 80;
    margin: 0 !important;
    padding: calc(12px + env(safe-area-inset-top)) 16px 12px !important;
    background: rgba(247, 247, 248, 0.94);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
  }

  .page-header h1 {
    font-size: 22px;
    line-height: 1.1;
    letter-spacing: 0;
  }

  .page-header p {
    max-width: 100%;
    font-size: 13px;
    line-height: 1.4;
  }

  .header-actions {
    display: flex;
    width: 100%;
    gap: 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .header-actions::-webkit-scrollbar {
    display: none;
  }

  .header-actions .btn,
  .header-actions .pill,
  .header-actions .icon-button {
    flex: 0 0 auto;
    min-height: 40px;
    white-space: nowrap;
  }

  .page-content {
    width: 100%;
    min-width: 0;
    padding: 12px 12px 0 !important;
  }

  .card,
  .modal-card,
  .section-card,
  .usage-card,
  .sell-workspace-grid .card,
  .document-card,
  .auth-card {
    max-width: 100%;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
  }

  button,
  .btn,
  .text-link,
  .nav-link,
  .bottom-nav-link,
  .selector-button,
  .option-card,
  .pill-toggle,
  .filter-tab,
  .tag,
  .thumb-remove {
    min-width: 44px;
    min-height: 44px;
    touch-action: manipulation;
  }

  .btn {
    border-radius: 13px;
    font-size: 15px;
  }

  .btn:active,
  .bottom-nav-link:active,
  .thumb-card:active,
  .marketplace-tile:active {
    transform: scale(0.98);
  }

  input,
  textarea,
  select {
    min-height: 44px;
    font-size: 16px !important;
    line-height: 1.4;
    border-radius: 12px;
  }

  textarea {
    min-height: 120px;
  }

  .workspace-grid,
  .sell-workspace-grid,
  .sell-overview-grid,
  .sell-secondary-grid,
  .household-overview-grid,
  .household-secondary-grid,
  .marketplace-grid,
  .listing-grid,
  .history-grid,
  .credit-pack-grid,
  .usage-grid,
  .price-option-grid,
  .household-price-grid,
  .stats-grid,
  .stats-layout-two,
  .feedback-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px;
    min-width: 0;
  }

  .workspace-left,
  .workspace-right,
  .sell-results-stack,
  .settings-stack,
  .credits-page {
    width: 100%;
    min-width: 0;
    gap: 12px;
  }

  .bottom-nav {
    display: flex !important;
    position: fixed;
    inset: auto 0 0 0;
    z-index: 1000;
    gap: 2px;
    align-items: stretch;
    justify-content: space-around;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.92);
    border-top: 0.5px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
  }

  .bottom-nav-link {
    flex: 1 1 0;
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 2px;
    border-radius: 14px;
    color: rgba(0, 0, 0, 0.54);
    font-size: 10px;
    font-weight: 700;
  }

  .bottom-nav-link span {
    width: 24px;
    height: 24px;
  }

  .bottom-nav-link span svg {
    width: 21px;
    height: 21px;
  }

  .bottom-nav-link small {
    max-width: 100%;
    overflow: hidden;
    font-size: 10px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .bottom-nav-link-active {
    background: rgba(220, 38, 38, 0.1);
    color: var(--accent);
  }

  .dropzone {
    min-height: 132px;
    border-radius: 16px;
    padding: 24px 16px;
  }

  .dropzone-copy {
    gap: 7px;
  }

  .upload-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .upload-buttons .btn {
    width: 100%;
    min-height: 46px;
    padding-inline: 10px;
  }

  .photo-count,
  .thumb-grid-hint {
    font-size: 12px;
  }

  .thumb-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .thumb-card {
    width: 100%;
    min-width: 0;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    transition: transform 0.18s ease, opacity 0.18s ease;
    will-change: transform;
  }

  .thumb-remove {
    top: 6px;
    right: 6px;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--text);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  }

  .thumb-move-controls {
    display: none;
  }

  .segmented-control {
    border-radius: 15px;
    padding: 4px;
  }

  .segmented-control button {
    min-height: 44px;
    border-radius: 12px;
    font-size: 15px;
  }

  .pill-group,
  .sell-platform-pill-row,
  .platform-pills {
    gap: 7px;
  }

  .pill-toggle,
  .platform-pill,
  .sell-platform-pill {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 12px;
  }

  .result-media-frame {
    min-height: 280px;
    border-radius: 16px;
    padding: 8px;
  }

  .result-media-frame img {
    max-height: 54vh;
    border-radius: 12px;
  }

  .result-media-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .result-media-thumbs::-webkit-scrollbar {
    display: none;
  }

  .result-thumb-button,
  .batch-thumb-mini {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
  }

  .mobile-share-button {
    display: inline-flex;
  }

  .card-actions-inline {
    width: 100%;
    gap: 8px;
    flex-wrap: wrap;
  }

  .card-actions-inline .btn {
    flex: 1 1 130px;
  }

  .price-option-grid {
    gap: 9px;
  }

  .price-option {
    min-height: 80px;
  }

  .marketplace-tile,
  .batch-result-card,
  .listing-card,
  .history-card,
  .credit-pack-card {
    border-radius: 16px;
  }

  .marketplace-action-row,
  .marketplace-queue-actions,
  .feedback-actions,
  .settings-links,
  .history-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .marketplace-action-row .btn,
  .marketplace-queue-actions .btn,
  .feedback-actions .btn,
  .settings-links .btn,
  .history-actions .btn {
    width: 100%;
  }

  .batch-result-layout {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
  }

  .batch-result-card {
    padding: 12px;
  }

  .batch-result-head {
    gap: 6px;
  }

  .batch-result-body strong,
  .listing-card-body strong {
    font-size: 14px;
    line-height: 1.25;
  }

  .batch-result-preview,
  .marketplace-helper-copy,
  .marketplace-sync-copy {
    font-size: 13px;
    line-height: 1.45;
  }

  .group-preview-card,
  .unassigned-group-card {
    border-radius: 16px;
    padding: 14px;
  }

  .group-photo-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .group-photo-strip::-webkit-scrollbar {
    display: none;
  }

  .group-photo-thumb {
    flex: 0 0 104px;
    width: 104px;
    height: auto;
    border-radius: 0;
  }

  .group-photo-image-frame {
    width: 88px;
    height: 88px;
    border-radius: 14px;
  }

  .group-photo-actions {
    width: 104px;
  }

  .grouping-alert {
    grid-template-columns: auto 1fr;
  }

  .grouping-alert-action {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 44px;
  }

  .photo-move-btn,
  .photo-remove-group-btn,
  .photo-new-group-btn {
    opacity: 1;
    min-height: 32px;
    font-size: 11px;
  }

  .group-fix-header,
  .group-fix-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .group-fix-submit {
    width: 100%;
    min-height: 44px;
  }

  .group-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .group-action-btn {
    width: 100%;
    min-height: 44px;
    font-size: 12px;
  }

  .group-fix-input {
    font-size: 16px;
    min-height: 76px;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal-card,
  .grouping-modal-card,
  .style-modal,
  .auth-card {
    width: 100%;
    max-width: 100%;
    max-height: 92dvh;
    overflow-y: auto;
    border-radius: 22px 22px 0 0;
    padding: 16px 16px calc(18px + env(safe-area-inset-bottom));
    animation: slideInUpMobile 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .modal-card::before,
  .grouping-modal-card::before,
  .style-modal::before {
    content: '';
    display: block;
    width: 38px;
    height: 4px;
    margin: 0 auto 14px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.16);
  }

  .toast-root {
    left: 12px;
    right: 12px;
    bottom: calc(86px + env(safe-area-inset-bottom));
    width: auto;
  }

  .toast {
    width: 100%;
    border-radius: 14px;
    padding: 13px 14px;
    font-size: 14px;
  }

  .cookie-banner {
    bottom: calc(86px + env(safe-area-inset-bottom));
    border-radius: 16px;
  }

  .correction-box {
    padding: 12px;
  }

  .correction-actions,
  .correction-side-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .correction-actions .btn,
  .correction-side-actions .btn,
  .correction-side-actions .text-link {
    width: 100%;
  }

  .find-filters {
    padding: 14px;
  }

  .filter-row,
  .filter-row-wrap,
  .filter-options,
  .sort-control,
  .price-range {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-tab,
  .filter-toggle,
  .filter-platform,
  .sort-select,
  .price-range input,
  .result-link-btn,
  .result-save-btn {
    width: 100%;
  }

  .result-card {
    padding: 14px;
  }

  .result-card-header {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .result-price-section {
    grid-column: 1 / -1;
    justify-items: start;
    text-align: left;
    padding-top: 6px;
  }

  .result-actions {
    flex-direction: column;
  }

  .insights-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes slideInUpMobile {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 430px) {
  .page-content {
    padding-inline: 10px !important;
  }

  .thumb-grid {
    gap: 7px;
  }

  .upload-buttons {
    grid-template-columns: 1fr;
  }

  .header-actions .btn {
    padding-inline: 10px;
  }

  .batch-result-layout {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .batch-result-thumb,
  .history-thumb {
    width: 64px;
    height: 64px;
  }
}

@media (min-width: 769px) {
  .bottom-nav {
    display: none !important;
  }
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .install-banner-content,
  html:not([data-theme="light"]) .pull-indicator {
    background: rgba(28, 28, 30, 0.94);
    border-color: rgba(255, 255, 255, 0.12);
  }
}

html[data-theme="dark"] .bottom-nav,
html[data-theme="dark"] .page-header,
html[data-theme="dark"] .install-banner-content,
html[data-theme="dark"] .pull-indicator {
  background: rgba(17, 17, 17, 0.92);
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .bottom-nav-link {
  color: rgba(255, 255, 255, 0.62);
}

html[data-theme="dark"] .bottom-nav-link-active {
  background: rgba(235, 0, 0, 0.18);
  color: #ff6b6b;
}

html[data-theme="dark"] .install-banner-title {
  color: #fff;
}

html[data-theme="dark"] .install-banner-subtitle,
html[data-theme="dark"] .install-banner-close {
  color: rgba(255, 255, 255, 0.68);
}

