:root {
  --bg: #0b0d12;
  --bg-soft: #141822;
  --panel: rgba(18, 20, 29, 0.88);
  --panel-2: rgba(25, 28, 39, 0.94);
  --border: rgba(255, 255, 255, 0.09);
  --text: #f4f0e7;
  --muted: #b4b0a8;
  --accent: #d7a64a;
  --accent-2: #6fb5ff;
  --shadow: 0 22px 65px rgba(0,0,0,0.35);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(111,181,255,0.16), transparent 25%),
    radial-gradient(circle at top right, rgba(215,166,74,0.14), transparent 22%),
    linear-gradient(180deg, #0a0c11 0%, #0d1119 40%, #111722 100%);
}

.page-shell {
  width: min(1260px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 54px;
}

.hero-panel,
.panel,
.mini-panel { backdrop-filter: blur(10px); }

.hero-panel {
  background: linear-gradient(135deg, rgba(22,26,37,0.94), rgba(12,14,20,0.9));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 22px;
}

.brand-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 20px;
  align-items: center;
}

.brand-mark {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--accent-2), #4884ff);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 18px 30px rgba(52,100,255,0.28);
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  color: #d4c7ab;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  font-weight: 700;
}

.hero-panel h1 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.2rem, 4vw, 4.3rem);
  line-height: 0.96;
}

.hero-copy {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 760px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.hero-points span {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: #e5e1d7;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
}

.app-grid {
  display: grid;
  grid-template-columns: 400px minmax(0, 1fr);
  gap: 22px;
}

.panel {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 24px;
}

.section-heading h2,
.result-topline h3,
.mini-panel h3 { margin: 0; }

.section-heading p,
.sub-note,
.field small,
.mini-panel p,
.status-box p,
.result-topline p { color: var(--muted); }

.section-heading { margin-bottom: 18px; }
.section-heading.left { text-align: left; }
.section-heading.compact { margin-bottom: 14px; }

.control-form { display: grid; gap: 18px; }

.upload-box {
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 30px 18px;
  border: 1.5px dashed rgba(215,166,74,0.45);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  cursor: pointer;
  min-height: 190px;
  gap: 10px;
}

.upload-box input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-box strong { font-size: 1.04rem; }
.upload-box span, .upload-box small { color: var(--muted); }

.upload-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  font-size: 1.5rem;
  background: rgba(111,181,255,0.13);
  border: 1px solid rgba(111,181,255,0.25);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field,
.slider-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field span,
.slider-header span {
  font-size: 0.95rem;
  font-weight: 700;
}

.field-full { grid-column: 1 / -1; }
select, input[type="range"] { width: 100%; }

select {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  color: var(--text);
  padding: 14px 16px;
  font-size: 0.98rem;
}

select option { color: #10131a; }

.slider-header,
.result-topline,
.status-topline,
.action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

input[type="range"] { accent-color: var(--accent); }

.slider-caption,
.compare-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.84rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  border-radius: 16px;
  border: 0;
  font-size: 0.98rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease, box-shadow .15s ease;
  padding: 0 20px;
}

.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.55; cursor: wait; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #f0c46d);
  color: #17120a;
  box-shadow: 0 16px 30px rgba(215,166,74,0.28);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), #f0c46d);
  color: #17120a;
  box-shadow: 0 16px 30px rgba(215,166,74,0.25);
}

.sub-note { margin: 0; font-size: 0.89rem; max-width: 220px; }

.viewer-shell {
  background: linear-gradient(180deg, #0b0e14, #080a0f);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  padding: 16px;
  min-height: 740px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.viewer-shell.empty { justify-content: center; }

.viewer-empty {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 640px;
  padding: 28px;
}

.viewer-empty-icon {
  font-size: 2.2rem;
  width: 80px;
  height: 80px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.05);
  margin-bottom: 12px;
}

.viewer-empty h3 { margin: 0 0 8px; font-size: 1.35rem; }
.viewer-empty p { color: var(--muted); max-width: 420px; }

.compare-stage {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.compare-card {
  background: linear-gradient(180deg, #03060c, #090d14);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  padding: 10px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.compare-canvas {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: #05070d;
  border: 1px solid rgba(255,255,255,0.08);
  touch-action: none;
  cursor: ew-resize;
}

.compare-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  user-select: none;
  -webkit-user-drag: none;
  display: block;
}

.compare-original { z-index: 1; }

.compare-colorized {
  z-index: 2;
  clip-path: inset(0 calc(100% - var(--split, 50%)) 0 0);
  -webkit-clip-path: inset(0 calc(100% - var(--split, 50%)) 0 0);
  will-change: clip-path;
}

.compare-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: rgba(255,255,255,0.78);
  z-index: 3;
  transform: translateX(-50%);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.15);
}

.compare-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 76px;
  height: 76px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(22, 25, 34, 0.92);
  color: white;
  display: grid;
  place-items: center;
  z-index: 4;
  box-shadow: 0 12px 28px rgba(0,0,0,0.35);
  backdrop-filter: blur(8px);
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: ew-resize;
}

.compare-toolbar {
  padding: 0 2px;
}

.compare-slider {
  width: 100%;
}

.status-box {
  margin-top: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 18px;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 rgba(215,166,74,0.5);
  animation: pulse 1.35s infinite;
}

.progress-bar {
  margin-top: 12px;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.08);
}

#barFill {
  width: 34%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #f3cf81, var(--accent-2));
  transform: translateX(-120%);
}

#barFill.working { animation: loading 1.4s infinite ease-in-out; }

.result-panel {
  margin-top: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 18px;
}

.info-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.mini-panel {
  padding: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
}

.hidden { display: none !important; }

@keyframes loading {
  0% { transform: translateX(-120%); }
  60% { transform: translateX(180%); }
  100% { transform: translateX(180%); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(215,166,74,0.55); }
  70% { box-shadow: 0 0 0 10px rgba(215,166,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(215,166,74,0); }
}

@media (max-width: 1080px) {
  .app-grid { grid-template-columns: 1fr; }
  .viewer-shell { min-height: 620px; }
  .viewer-empty { min-height: 420px; }
}

@media (max-width: 740px) {
  .page-shell { width: min(100% - 18px, 100%); padding: 14px 0 28px; }
  .hero-panel, .panel, .mini-panel { border-radius: 22px; }
  .brand-row { grid-template-columns: 1fr; text-align: center; }
  .brand-mark { margin: 0 auto; }
  .hero-copy { text-align: center; }
  .hero-points { justify-content: center; }
  .form-grid, .info-grid { grid-template-columns: 1fr; }
  .action-row, .result-topline { flex-direction: column; align-items: stretch; }
  .sub-note { max-width: none; }
  .viewer-shell { min-height: 420px; }
  .viewer-empty { min-height: 320px; }
  .compare-handle { width: 66px; height: 66px; font-size: 0.82rem; }
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-trust {
  margin-top: 16px;
}

.trust-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(215,166,74,0.28);
  background: rgba(215,166,74,0.08);
  color: #efe5d0;
  font-size: 0.84rem;
  font-weight: 700;
}

.privacy-note {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(111,181,255,0.2);
  background: rgba(111,181,255,0.07);
  color: #dcecff;
  font-size: 0.9rem;
  line-height: 1.5;
}

.disclaimer-panel {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.035);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.disclaimer-panel strong {
  color: var(--text);
}


/* ============================================================
   v6.2 — Archive Lab visual system
   ============================================================ */

body {
  background:
    radial-gradient(circle at 14% 10%, rgba(63, 104, 185, .23), transparent 27rem),
    radial-gradient(circle at 86% 4%, rgba(220, 165, 76, .16), transparent 24rem),
    linear-gradient(180deg, #07090d 0%, #0b0f16 45%, #0b1119 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .17;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, #000, transparent 88%);
}

.page-shell { width: min(1380px, calc(100% - 32px)); }

.hero-lab {
  position: relative;
  overflow: hidden;
  padding: 34px 36px 26px;
  border-color: rgba(255,255,255,.13);
  background:
    linear-gradient(135deg, rgba(19,24,36,.96), rgba(8,11,17,.97) 62%),
    #0b0e14;
  box-shadow:
    0 30px 90px rgba(0,0,0,.46),
    inset 0 1px 0 rgba(255,255,255,.06);
}

.hero-lab::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -160px;
  top: -240px;
  border-radius: 50%;
  border: 1px solid rgba(215,166,74,.23);
  box-shadow:
    0 0 0 48px rgba(215,166,74,.025),
    0 0 0 96px rgba(111,181,255,.018);
  pointer-events: none;
}

.hero-gridlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background:
    repeating-linear-gradient(0deg, transparent 0 44px, rgba(255,255,255,.035) 45px),
    repeating-linear-gradient(90deg, transparent 0 44px, rgba(255,255,255,.025) 45px);
  mask-image: linear-gradient(90deg, transparent, #000 22%, #000 72%, transparent);
}

.hero-topline {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  color: #9da7b8;
  font-size: .72rem;
  letter-spacing: .13em;
  text-transform: uppercase;
}

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

.status-light,
.chrome-light {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #70e1a1;
  box-shadow: 0 0 14px rgba(112,225,161,.65);
}

.brand-row { position: relative; z-index: 1; grid-template-columns: 108px 1fr; gap: 28px; }

.brand-mark {
  width: 108px;
  height: 108px;
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  background:
    linear-gradient(145deg, #70b7ff, #5c75f0 52%, #3c4b9a);
  border: 1px solid rgba(255,255,255,.28);
  box-shadow:
    0 18px 46px rgba(56,91,221,.35),
    inset 0 1px 0 rgba(255,255,255,.38),
    inset 0 -12px 22px rgba(0,0,0,.14);
}

.brand-small { font-size: 1.2rem; font-weight: 900; letter-spacing: .12em; }
.brand-year { font-size: .48rem; letter-spacing: .18em; opacity: .78; }

.hero-content { min-width: 0; }

.hero-panel h1 {
  font-size: clamp(2.7rem, 5vw, 5.7rem);
  letter-spacing: -.035em;
  text-shadow: 0 2px 22px rgba(255,255,255,.05);
}

.hero-tagline {
  margin: 12px 0 0;
  font-size: clamp(1.05rem, 1.6vw, 1.42rem);
  color: #eef1f7;
  font-weight: 700;
  letter-spacing: -.015em;
}

.hero-tagline em {
  color: #dfb969;
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 700;
}

.hero-copy {
  max-width: 980px;
  line-height: 1.7;
  color: #aeb7c5;
}

.trust-strip span {
  border-color: rgba(255,255,255,.11);
  background: rgba(255,255,255,.045);
  color: #e7ebf2;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.trust-strip span b { color: #7be4aa; margin-right: 6px; }

.hero-process {
  position: relative;
  z-index: 1;
  margin-top: 26px;
  padding-top: 19px;
  border-top: 1px solid rgba(255,255,255,.075);
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  gap: 18px;
}

.hero-process > div {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #c9d0dc;
  font-size: .83rem;
  font-weight: 700;
}
.hero-process strong {
  color: #ddb46a;
  font-size: .71rem;
  letter-spacing: .12em;
}
.hero-process i {
  height: 1px;
  background: linear-gradient(90deg, rgba(215,166,74,.16), rgba(111,181,255,.5), rgba(215,166,74,.16));
}

.panel {
  border-color: rgba(255,255,255,.105);
  background:
    linear-gradient(180deg, rgba(24,29,42,.93), rgba(14,18,27,.95));
}

.controls-panel {
  position: relative;
  overflow: hidden;
}
.controls-panel::before {
  content: "RESTORATION CONTROLS";
  position: absolute;
  right: -34px;
  top: 58px;
  transform: rotate(90deg);
  font-size: .55rem;
  letter-spacing: .22em;
  color: rgba(255,255,255,.17);
}

.upload-box {
  border: 1px dashed rgba(221,180,106,.55);
  background:
    radial-gradient(circle at 50% 0%, rgba(215,166,74,.09), transparent 60%),
    rgba(255,255,255,.022);
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.upload-box:hover {
  border-color: rgba(240,196,109,.9);
  background:
    radial-gradient(circle at 50% 0%, rgba(215,166,74,.16), transparent 65%),
    rgba(255,255,255,.035);
  transform: translateY(-1px);
}

.upload-icon {
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(111,181,255,.22), rgba(76,101,208,.12));
  box-shadow: 0 0 28px rgba(82,122,255,.16);
}

.privacy-lab {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-left: 3px solid #66aaff;
}
.privacy-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  color: #78b8ff;
  font-size: .74rem;
}

.viewer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.viewer-heading > div:first-child { min-width: 0; }

.preserve-seal {
  flex: 0 0 116px;
  width: 116px;
  height: 64px;
  border: 1px solid rgba(111,181,255,.25);
  border-radius: 14px;
  display: grid;
  place-items: center;
  align-content: center;
  background: rgba(111,181,255,.06);
  transform: rotate(-2deg);
  box-shadow: inset 0 0 0 3px rgba(111,181,255,.025);
}
.preserve-seal span {
  font-size: .48rem;
  letter-spacing: .22em;
  color: #8ba1bc;
}
.preserve-seal strong {
  font-size: .75rem;
  letter-spacing: .09em;
  color: #bcd9ff;
}

.viewer-shell {
  position: relative;
  overflow: hidden;
  border-color: rgba(255,255,255,.1);
  background:
    radial-gradient(circle at 50% 12%, rgba(80,104,146,.15), transparent 38%),
    linear-gradient(180deg, #090c12, #05070b);
}

.compare-card {
  border-color: rgba(255,255,255,.13);
  background: #05070a;
  padding: 0;
  overflow: hidden;
  box-shadow:
    0 24px 60px rgba(0,0,0,.38),
    inset 0 0 0 1px rgba(255,255,255,.025);
}

.viewer-chrome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,.085);
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.018));
  color: #aeb6c5;
  font-size: .66rem;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.viewer-chrome > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.chrome-note { color: #727c8d; letter-spacing: .04em; text-transform: none; }

.compare-canvas {
  border: 0;
  border-radius: 0;
  background-color: #020305;
}

.viewer-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.08),
    inset 0 0 60px rgba(0,0,0,.18);
}

.image-corner-label {
  position: absolute;
  top: 14px;
  z-index: 5;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(4,7,12,.68);
  border: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.87);
  backdrop-filter: blur(10px);
  font-size: .61rem;
  font-weight: 800;
  letter-spacing: .12em;
  pointer-events: none;
}
.label-original { right: 14px; }
.label-color { left: 14px; color: #f0cf8c; border-color: rgba(215,166,74,.26); }

.film-edge {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 10px;
  z-index: 2;
  pointer-events: none;
  opacity: .12;
  background: repeating-linear-gradient(to bottom, transparent 0 11px, white 11px 15px, transparent 15px 26px);
}
.film-edge-left { left: 0; }
.film-edge-right { right: 0; }

.compare-divider {
  width: 2px;
  background: linear-gradient(180deg, rgba(255,255,255,.35), #fff 45%, rgba(255,255,255,.35));
  box-shadow: 0 0 16px rgba(255,255,255,.2);
}

.compare-handle {
  width: 84px;
  height: 54px;
  border-radius: 999px;
  grid-template-columns: 1fr auto 1fr;
  gap: 7px;
  background:
    linear-gradient(180deg, rgba(20,24,34,.98), rgba(8,11,17,.98));
  border-color: rgba(255,255,255,.28);
  box-shadow:
    0 12px 30px rgba(0,0,0,.55),
    0 0 0 4px rgba(255,255,255,.035);
}
.handle-core {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: linear-gradient(145deg, #dfb967, #a87428);
  color: #17120b;
  font-size: .5rem;
  font-weight: 900;
  letter-spacing: .05em;
}
.handle-arrow { color: white; font-size: 1.45rem; font-weight: 400; line-height: 1; }

.compare-toolbar {
  padding: 12px 4px 0;
}

.compare-slider {
  accent-color: #ddb46a;
  opacity: .75;
}

.btn-primary, .btn-accent {
  background: linear-gradient(135deg, #f0c46d, #d79b38 58%, #bc7b1e);
  box-shadow:
    0 16px 30px rgba(215,166,74,.26),
    inset 0 1px 0 rgba(255,255,255,.42);
}

.info-grid { gap: 14px; }
.mini-panel {
  position: relative;
  overflow: hidden;
  min-height: 158px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.048), rgba(255,255,255,.025));
}
.mini-icon {
  display: inline-grid;
  place-items: center;
  width: 31px;
  height: 31px;
  margin-bottom: 12px;
  border-radius: 9px;
  background: rgba(215,166,74,.09);
  border: 1px solid rgba(215,166,74,.22);
  color: #ddb46a;
  font-size: .64rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.disclaimer-panel {
  border-left: 3px solid rgba(215,166,74,.72);
  background:
    linear-gradient(90deg, rgba(215,166,74,.055), transparent 40%),
    rgba(255,255,255,.022);
}

@media (max-width: 740px) {
  .hero-lab { padding: 24px 20px 20px; }
  .hero-topline { align-items: flex-start; }
  .hero-edition { display: none; }
  .brand-row { grid-template-columns: 1fr; }
  .brand-mark { width: 92px; height: 92px; }
  .hero-process { grid-template-columns: 1fr; gap: 9px; }
  .hero-process i { display: none; }
  .hero-process > div { justify-content: center; }
  .viewer-heading { align-items: flex-start; }
  .preserve-seal { flex-basis: 96px; width: 96px; height: 58px; }
  .viewer-chrome { align-items: flex-start; flex-direction: column; }
  .chrome-note { display: none; }
  .compare-handle { width: 78px; height: 52px; }
}


/* ============================================================
   v6.3 — Mobile headline / hero polish
   Prevents GoReadingBerks from overflowing narrow iPhone screens.
   ============================================================ */

.hero-panel h1 {
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
}

@media (max-width: 740px) {
  .hero-content {
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .hero-panel h1 {
    width: 100%;
    max-width: 100%;
    font-size: clamp(2.05rem, 9.4vw, 3.05rem);
    line-height: .98;
    letter-spacing: -.045em;
    text-align: center;
    white-space: normal;
  }

  .hero-tagline {
    max-width: 100%;
    text-align: center;
    font-size: clamp(1rem, 5vw, 1.22rem);
    line-height: 1.35;
  }

  .hero-copy {
    max-width: 100%;
    font-size: .98rem;
    line-height: 1.6;
  }

  .eyebrow {
    max-width: 100%;
    font-size: .69rem;
    line-height: 1.45;
    letter-spacing: .13em;
    text-align: center;
  }

  .hero-trust {
    justify-content: center;
  }
}

@media (max-width: 390px) {
  .hero-lab {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-panel h1 {
    font-size: clamp(1.95rem, 9vw, 2.5rem);
    letter-spacing: -.05em;
  }

  .hero-copy {
    font-size: .94rem;
  }

  .trust-strip span {
    font-size: .76rem;
  }
}


/* ============================================================
   v6.4 — TrueColorize branding + logo refresh
   ============================================================ */
.brand-row {
  grid-template-columns: minmax(145px, 190px) 1fr;
  align-items: center;
}

.brand-mark.brand-mark-logo {
  width: clamp(145px, 18vw, 190px);
  height: auto;
  min-height: 145px;
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-mark.brand-mark-logo img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 35px rgba(0,0,0,0.28));
}

.brand-byline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #f5e7c4;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.09);
  width: fit-content;
}

.hero-panel h1 {
  font-size: clamp(2.45rem, 4.6vw, 5rem);
}

@media (max-width: 900px) {
  .brand-row {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .brand-mark.brand-mark-logo {
    width: min(220px, 72vw);
    min-height: 0;
    margin-bottom: 8px;
  }

  .brand-byline {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 740px) {
  .brand-mark.brand-mark-logo {
    width: min(190px, 68vw);
  }

  .hero-panel h1 {
    font-size: clamp(2.05rem, 10vw, 3.2rem);
    letter-spacing: -0.04em;
  }
}

@media (max-width: 390px) {
  .brand-mark.brand-mark-logo {
    width: min(172px, 66vw);
  }

  .brand-byline {
    font-size: 0.72rem;
    padding: 7px 10px;
  }

  .hero-panel h1 {
    font-size: clamp(1.9rem, 9.3vw, 2.6rem);
  }
}


/* ============================================================
   v6.5 — Standalone TrueColorize branding + post-colorization style gallery
   ============================================================ */
.hero-edition { color: #aeb7c5; }

.style-gallery {
  margin-top: 18px;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.10);
  background:
    radial-gradient(circle at 100% 0%, rgba(215,166,74,.08), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.022));
}

.style-gallery-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.style-gallery-heading h3 { margin: 0; font-size: 1.2rem; }
.style-gallery-heading p { margin: 6px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.55; max-width: 690px; }
.style-selected {
  flex: 0 0 auto;
  min-width: 120px;
  padding: 10px 12px;
  text-align: right;
  border-radius: 14px;
  border: 1px solid rgba(215,166,74,.24);
  background: rgba(215,166,74,.07);
}
.style-selected span { display: block; color: #8f98a8; text-transform: uppercase; letter-spacing: .12em; font-size: .55rem; }
.style-selected strong { display: block; margin-top: 3px; color: #f2d28d; font-size: .85rem; }

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

.style-card {
  position: relative;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  text-align: left;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: #0a0d13;
  color: var(--text);
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.style-card:hover { transform: translateY(-2px); border-color: rgba(215,166,74,.42); }
.style-card.selected {
  border-color: rgba(232,188,105,.92);
  box-shadow: 0 0 0 2px rgba(215,166,74,.15), 0 12px 28px rgba(0,0,0,.24);
}
.style-card:disabled { cursor: wait; opacity: .72; transform: none; }
.style-thumb-wrap {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #05070a;
}
.style-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.style-card-copy { display: block; padding: 10px 11px 11px; }
.style-card-copy strong { display: block; font-size: .82rem; }
.style-card-copy small { display: block; margin-top: 3px; color: #8993a3; font-size: .67rem; }
.style-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  opacity: 0;
  color: #142014;
  background: #77e0a4;
  border: 2px solid rgba(255,255,255,.55);
  font-size: .72rem;
  font-weight: 900;
  box-shadow: 0 5px 14px rgba(0,0,0,.28);
}
.style-card.selected .style-check { opacity: 1; }
.style-help { margin: 13px 0 0; color: #aab3c2; font-size: .82rem; }

.result-panel { border-color: rgba(215,166,74,.18); }
.result-panel .btn-accent { min-width: 210px; }

@media (max-width: 980px) {
  .style-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 740px) {
  .style-gallery-heading { flex-direction: column; }
  .style-selected { width: 100%; text-align: left; }
  .style-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 390px) {
  .style-gallery { padding: 14px; }
  .style-grid { gap: 9px; }
  .style-card-copy { padding: 9px; }
}


/* ============================================================
   v6.6 — Compact Studio
   Horizontal style rail + smaller centered photo preview.
   ============================================================ */

.preview-panel {
  min-width: 0;
}

.style-strip {
  margin: 0 0 16px;
  padding: 16px 16px 13px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.018)),
    #0b0d12;
}

.style-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 13px;
}

.style-strip-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.style-strip-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.45;
}

.style-strip-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.style-selected {
  min-width: 112px;
  padding: 8px 10px;
  text-align: left;
}

.style-nav {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.055);
  color: #f4f0e7;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.style-nav:hover {
  border-color: rgba(215,166,74,.5);
  background: rgba(215,166,74,.08);
}

.style-rail-wrap {
  position: relative;
  overflow: hidden;
}

.style-grid {
  display: flex;
  gap: 11px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 9px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(215,166,74,.55) rgba(255,255,255,.04);
}

.style-grid::-webkit-scrollbar { height: 7px; }
.style-grid::-webkit-scrollbar-track {
  background: rgba(255,255,255,.04);
  border-radius: 999px;
}
.style-grid::-webkit-scrollbar-thumb {
  background: rgba(215,166,74,.55);
  border-radius: 999px;
}

.style-card {
  flex: 0 0 164px;
  width: 164px;
  border-radius: 13px;
  scroll-snap-align: start;
  background: #080a0f;
}

.style-thumb-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #05070a;
}

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

.style-thumb-shade {
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(transparent, rgba(0,0,0,.78));
  pointer-events: none;
}

.style-card-title {
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 8px;
  color: white;
  font-size: .71rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: .02em;
  text-shadow: 0 1px 5px rgba(0,0,0,.9);
}

.style-card.selected {
  border-color: rgba(244,210,141,.96);
  box-shadow:
    0 0 0 2px rgba(215,166,74,.18),
    0 10px 22px rgba(0,0,0,.28);
}

.style-check {
  width: 24px;
  height: 24px;
  top: 7px;
  right: 7px;
}

.style-help {
  margin: 5px 0 0;
  font-size: .75rem;
}

/* Turn the large viewer into a dark studio with a smaller centered photo. */
.viewer-shell {
  min-height: 610px;
  padding: 24px;
  justify-content: center;
  align-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,.045), transparent 32rem),
    linear-gradient(180deg, #0a0b0e, #08090c);
}

.viewer-shell.empty {
  width: 100%;
}

.compare-stage {
  width: 100%;
  align-items: center;
  gap: 13px;
}

.compare-card {
  width: min(480px, 100%);
  margin: 0 auto;
  border-radius: 16px;
  box-shadow:
    0 22px 54px rgba(0,0,0,.46),
    0 0 0 1px rgba(255,255,255,.03);
}

.viewer-chrome {
  padding: 8px 11px;
  font-size: .58rem;
}

.compare-toolbar {
  width: min(480px, 100%);
  margin: 0 auto;
}

.compare-canvas {
  width: 100%;
}

.result-panel {
  margin-top: 14px;
}

@media (min-width: 1081px) {
  .app-grid {
    grid-template-columns: 360px minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .style-strip-head {
    align-items: flex-start;
  }
  .style-card {
    flex-basis: 154px;
    width: 154px;
  }
}

@media (max-width: 740px) {
  .style-strip {
    padding: 13px;
  }

  .style-strip-head {
    flex-direction: column;
    align-items: stretch;
  }

  .style-strip-actions {
    width: 100%;
  }

  .style-selected {
    flex: 1 1 auto;
  }

  .style-card {
    flex: 0 0 142px;
    width: 142px;
  }

  .viewer-shell {
    min-height: 420px;
    padding: 12px;
  }

  .compare-card,
  .compare-toolbar {
    width: min(430px, 100%);
  }
}

@media (max-width: 390px) {
  .style-card {
    flex-basis: 132px;
    width: 132px;
  }

  .style-nav {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }
}
