/* desktop.css — Restore Old Photos web app (desktop/browser) */

:root {
  --sepia-ink:      #2A1F15;
  --sepia-1:        #6B4A2B;
  --sepia-2:        #A07650;
  --sepia-paper:    #F6EFE4;
  --sepia-paper-2:  #EFE4D1;
  --sepia-line:     #E6D8C2;
  --cream:          #FBF6EC;
  --sepia-shadow:   0 10px 30px -12px rgba(74, 45, 20, 0.28);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
.dt-body {
  background: var(--sepia-paper);
  color: var(--sepia-ink);
  font-family: var(--font-body);
  min-height: 100vh;
}

/* ─── Top bar ───────────────────────────────────────── */
.dt-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 247, 236, 0.92);
  backdrop-filter: saturate(1.2) blur(14px);
  border-bottom: 1px solid var(--sepia-line);
}
.dt-topbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.dt-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.dt-brand-mark {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #FF933A, #FF4A00);
  display: grid; place-items: center;
  box-shadow: 0 4px 10px -4px rgba(255,74,0,.5);
  flex-shrink: 0;
}
.dt-brand-wm {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.dt-brand-wm .l1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: var(--sepia-ink);
  letter-spacing: -0.01em;
}
.dt-brand-wm .l2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 10px;
  color: var(--brand-orange);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 3px;
}

.dt-nav {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0; padding: 0;
  flex: 1;
}
.dt-nav button {
  background: transparent;
  border: 0;
  padding: 8px 14px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--muted-1);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dt-nav button:hover { color: var(--sepia-ink); background: rgba(42,31,21,.04); }
.dt-nav button.active {
  color: var(--sepia-ink);
  background: rgba(42,31,21,.06);
}
.dt-nav button.active svg { color: var(--brand-orange); }

.dt-topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.dt-usage-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  background: #fff;
  border: 1px solid var(--sepia-line);
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--sepia-ink);
}
.dt-usage-chip .uc-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4BD762;
}
.dt-usage-chip.warn .uc-dot { background: #E7A832; }
.dt-usage-chip.out .uc-dot { background: var(--error); }
.dt-upgrade-btn {
  background: var(--brand-orange);
  color: #fff;
  border: 0;
  padding: 9px 16px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dt-upgrade-btn:hover { background: var(--brand-orange-hover); }
.dt-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #efd9b6, #d9b97a);
  color: var(--sepia-ink);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(42,31,21,.15);
}

/* ─── Shell ───────────────────────────────────────── */
.dt-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}

/* ─── Page headers ────────────────────────────────── */
.dt-page-head {
  margin-bottom: 32px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.dt-page-head .eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  color: var(--brand-orange);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.dt-page-head h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 42px;
  color: var(--sepia-ink);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 10px 0 6px;
}
.dt-page-head .dt-lede {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 17px;
  color: var(--ink-3);
  line-height: 1.5;
  max-width: 540px;
}

/* ─── Home grid (upload + sidebar) ────────────────── */
.dt-home-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 28px;
}

.dt-upload-card {
  background: #fff;
  border-radius: 22px;
  border: 1px solid var(--sepia-line);
  box-shadow: var(--sepia-shadow);
  overflow: hidden;
}
.dt-dropzone {
  padding: 64px 40px;
  text-align: center;
  border: 2.5px dashed var(--sepia-line);
  margin: 22px;
  border-radius: 18px;
  cursor: pointer;
  background:
    repeating-linear-gradient(45deg,
      rgba(255,147,58,.018) 0,
      rgba(255,147,58,.018) 10px,
      transparent 10px, transparent 20px),
    var(--sepia-paper);
  transition: border-color .15s, background .15s, transform .15s;
}
.dt-dropzone:hover,
.dt-dropzone.dragover {
  border-color: var(--brand-orange);
  background: rgba(255,147,58,.05);
}
.dt-dropzone.dragover { transform: scale(1.005); }
.dt-dropzone .dz-ic {
  width: 80px; height: 80px;
  margin: 0 auto 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, #FF933A, #FF4A00);
  display: grid; place-items: center;
  color: #fff;
  box-shadow: 0 14px 30px -10px rgba(255,74,0,.35);
}
.dt-dropzone h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  color: var(--sepia-ink);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.dt-dropzone .dz-sub {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 15px;
  color: var(--ink-3);
  max-width: 420px;
  margin: 0 auto 24px;
  line-height: 1.5;
}
.dt-dropzone .dz-btns {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.dt-dropzone .dz-fine {
  margin-top: 20px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--muted-1);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: 0;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.btn-primary { background: var(--brand-orange); color: #fff; }
.btn-primary:hover { background: var(--brand-orange-hover); }
.btn-ghost {
  background: #fff;
  color: var(--sepia-ink);
  border: 1.5px solid var(--sepia-line);
}
.btn-ghost:hover { background: var(--sepia-paper); }
.btn-lg { padding: 14px 24px; font-size: 15px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Quick tip strip below dropzone */
.dt-upload-tips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--sepia-line);
}
.dt-upload-tips .tip {
  padding: 18px 22px;
  border-right: 1px solid var(--sepia-line);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.dt-upload-tips .tip:last-child { border-right: 0; }
.dt-upload-tips .tip-ic {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: rgba(255,74,0,.1);
  color: var(--brand-orange);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.dt-upload-tips .tip-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--sepia-ink);
  margin-bottom: 2px;
}
.dt-upload-tips .tip-sub {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 12.5px;
  color: var(--muted-1);
  line-height: 1.4;
}

/* Sidebar */
.dt-side { display: flex; flex-direction: column; gap: 18px; }
.dt-side-card {
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--sepia-line);
  padding: 22px;
}
.dt-side-card.dark {
  background: linear-gradient(135deg, #3a2817 0%, #1c130b 100%);
  border: 0;
  color: #fff;
}
.dt-side-card h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  color: var(--sepia-ink);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.dt-side-card.dark h3 { color: #fff; }
.dt-side-card p {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.5;
  margin: 0;
}
.dt-side-card.dark p { color: rgba(255,255,255,.7); }
.dt-side-card .dt-side-eye {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brand-orange);
  margin-bottom: 8px;
  display: block;
}
.dt-side-card.dark .dt-side-eye { color: #FF933A; }

/* Referral card */
.dt-refcard .dt-ref-progress {
  display: flex;
  gap: 6px;
  margin-top: 16px;
  margin-bottom: 14px;
}
.dt-refcard .dt-ref-dot {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: rgba(255,255,255,.12);
}
.dt-refcard .dt-ref-dot.on {
  background: linear-gradient(90deg, #FF933A, #FF4A00);
}
.dt-refcard .dt-ref-stats {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  color: rgba(255,255,255,.55);
  margin-bottom: 16px;
}
.dt-refcard .dt-ref-link {
  display: flex;
  gap: 0;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,.05);
}
.dt-refcard .dt-ref-link input {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 12px 14px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
}
.dt-refcard .dt-ref-link button {
  background: #fff;
  color: var(--sepia-ink);
  border: 0;
  padding: 0 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dt-refcard .dt-ref-link button:hover { background: var(--sepia-paper); }

/* Get-app side card with QR */
.dt-getapp-card {
  display: flex;
  gap: 16px;
  align-items: center;
}
.dt-getapp-card .gac-qr {
  width: 92px; height: 92px;
  background: #fff;
  border-radius: 10px;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(21, 1fr);
  grid-template-rows: repeat(21, 1fr);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(42,31,21,.1);
}
.dt-getapp-card .gac-qr span { display: block; aspect-ratio: 1; }
.dt-getapp-card .gac-qr .qr-on { background: var(--sepia-ink); }
.dt-getapp-card h3 { margin-bottom: 4px; }
.dt-getapp-card .gac-stores {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  color: var(--muted-1);
}

/* Recent library preview */
.dt-recent-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 48px 0 20px;
}
.dt-recent-head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  color: var(--sepia-ink);
  letter-spacing: -0.01em;
}
.dt-recent-head a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--brand-orange);
  text-decoration: none;
}
.dt-recent-head a:hover { color: var(--brand-orange-hover); }
.dt-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.dt-gallery-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--sepia-line);
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.dt-gallery-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -14px rgba(42,31,21,.25);
}
.dt-gallery-card .gc-img {
  aspect-ratio: 4 / 5;
  background: var(--sepia-paper-2);
  overflow: hidden;
  position: relative;
}
.dt-gallery-card .gc-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.dt-gallery-card .gc-img .gc-badge {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(42,31,21,.75);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: 4px;
}
.dt-gallery-card .gc-meta { padding: 12px 14px; }
.dt-gallery-card .gc-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--sepia-ink);
}
.dt-gallery-card .gc-date {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 12px;
  color: var(--muted-1);
  margin-top: 2px;
}

/* ─── Processing screen ───────────────────────────── */
.dt-processing {
  background: linear-gradient(135deg, #3a2817 0%, #1c130b 100%);
  border-radius: 24px;
  padding: 72px 40px;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.dt-processing::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,147,58,.15), transparent 60%);
  pointer-events: none;
}
.dt-proc-img {
  width: 280px;
  height: 280px;
  margin: 0 auto 28px;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 50px -15px rgba(0,0,0,.5);
}
.dt-proc-img img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.dt-proc-scan {
  position: absolute;
  left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #FF933A, transparent);
  box-shadow: 0 0 20px #FF933A, 0 0 40px rgba(255,147,58,.5);
  animation: dt-scan 2.5s ease-in-out infinite;
}
@keyframes dt-scan {
  0%, 100% { top: 0; }
  50% { top: calc(100% - 3px); }
}
.dt-proc-eye {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  color: #FF933A;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 10px;
  position: relative;
}
.dt-proc-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  color: #fff;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  position: relative;
}
.dt-proc-step {
  font-family: var(--font-body);
  font-size: 15px;
  color: rgba(255,255,255,.7);
  margin-bottom: 28px;
  position: relative;
  min-height: 22px;
}
.dt-proc-bar {
  max-width: 380px;
  height: 6px;
  background: rgba(255,255,255,.12);
  border-radius: 3px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
.dt-proc-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, #FF933A, #FF4A00);
  border-radius: 3px;
  transition: width 0.2s;
}

/* ─── Results screen ──────────────────────────────── */
.dt-results-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}
.dt-compare-stage {
  background: #fff;
  border-radius: 22px;
  border: 1px solid var(--sepia-line);
  box-shadow: var(--sepia-shadow);
  overflow: hidden;
}
.dt-compare-head {
  padding: 16px 22px;
  border-bottom: 1px solid var(--sepia-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.dt-compare-head h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  color: var(--sepia-ink);
  letter-spacing: -0.01em;
}
.dt-compare-head .dt-mode-tabs {
  display: inline-flex;
  background: var(--sepia-paper-2);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.dt-compare-head .dt-mode-tabs button {
  background: transparent;
  border: 0;
  padding: 7px 12px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  color: var(--muted-1);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}
.dt-compare-head .dt-mode-tabs button.active {
  background: #fff;
  color: var(--sepia-ink);
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.dt-compare-body {
  padding: 28px;
  min-height: 420px;
  display: grid;
  place-items: center;
  background: var(--sepia-paper);
}
.dt-compare-img {
  /* Needs an explicit width — children are position:absolute and don't
     contribute intrinsic size, so "max-width: 100%" alone collapsed the box. */
  width: 100%;
  max-width: 440px;
  aspect-ratio: 4 / 5;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #2a1f15;
  box-shadow: 0 20px 50px -20px rgba(42,31,21,.4);
}
.dt-compare-img img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.dt-compare-slider {
  cursor: ew-resize;
  user-select: none;
}
.dt-compare-slider .dt-before-wrap {
  position: absolute; inset: 0;
  overflow: hidden;
}
.dt-compare-slider .dt-before-wrap img {
  max-width: none;
}
.dt-compare-slider .dt-handle {
  position: absolute;
  top: 0; bottom: 0;
  width: 3px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.2), 0 4px 14px rgba(0,0,0,.4);
  pointer-events: none;
}
.dt-compare-slider .dt-handle::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(0,0,0,.4);
}
.dt-compare-slider .dt-handle::before {
  content: '◀ ▶';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: var(--sepia-ink);
  font-size: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 2px;
  z-index: 2;
}
.dt-compare-label {
  position: absolute;
  top: 14px;
  padding: 5px 10px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.15em;
  border-radius: 999px;
  z-index: 3;
}
.dt-compare-label.before { left: 14px; }
.dt-compare-label.after { right: 14px; }

/* Side-by-side mode */
.dt-compare-sbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 800px;
  width: 100%;
}
.dt-compare-sbs .sbs-cell {
  aspect-ratio: 4 / 5;
  border-radius: 10px;
  overflow: hidden;
  background: #2a1f15;
  position: relative;
  box-shadow: 0 10px 30px -12px rgba(42,31,21,.35);
}
.dt-compare-sbs .sbs-cell img { width: 100%; height: 100%; object-fit: cover; }
.dt-compare-sbs .sbs-cell .sbs-label {
  position: absolute;
  top: 12px; left: 12px;
  padding: 5px 10px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.15em;
  border-radius: 999px;
}

/* Results sidebar (adjustments + export) */
.dt-adjust {
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--sepia-line);
  padding: 22px;
}
.dt-adjust h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: var(--sepia-ink);
  letter-spacing: -0.005em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dt-adjust-row {
  margin-bottom: 18px;
}
.dt-adjust-row .ar-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.dt-adjust-row .ar-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--sepia-ink);
}
.dt-adjust-row .ar-val {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 12px;
  color: var(--muted-1);
}
.dt-adjust-row input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #FF933A 0%, #FF933A var(--val, 50%), var(--sepia-line) var(--val, 50%));
  outline: none;
  margin: 0;
}
.dt-adjust-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--brand-orange);
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  cursor: pointer;
}
.dt-adjust-row input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--brand-orange);
  cursor: pointer;
}
.dt-adjust-row.toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  margin: 0 -14px 0;
  border-radius: 10px;
  cursor: pointer;
}
.dt-adjust-row.toggle:hover { background: var(--sepia-paper); }
.dt-toggle-switch {
  width: 40px; height: 24px;
  border-radius: 12px;
  background: var(--sepia-line);
  position: relative;
  transition: background .15s;
}
.dt-toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
  transition: left .15s;
}
.dt-toggle-switch.on { background: var(--brand-orange); }
.dt-toggle-switch.on::after { left: 18px; }

.dt-actions {
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--sepia-line);
  padding: 20px;
  margin-top: 18px;
}
.dt-actions .dt-action-main {
  width: 100%;
  justify-content: center;
  margin-bottom: 10px;
}
.dt-actions .dt-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.dt-actions .dt-action-row:last-child { margin-bottom: 0; }
.dt-actions .dt-action-row .btn {
  justify-content: center;
  padding: 10px;
  font-size: 13px;
}

.dt-pro-tip {
  background: linear-gradient(135deg, rgba(255,147,58,.12), rgba(255,74,0,.06));
  border: 1px solid rgba(255,147,58,.25);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.dt-pro-tip .pt-ic {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #FF933A, #FF4A00);
  color: #fff;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.dt-pro-tip .pt-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--sepia-ink);
  margin-bottom: 2px;
}
.dt-pro-tip .pt-sub {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.45;
}
.dt-pro-tip .pt-cta {
  background: var(--brand-orange);
  color: #fff;
  border: 0;
  padding: 6px 12px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
  margin-top: 8px;
}

/* ─── Library page ───────────────────────────────── */
.dt-lib-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.dt-lib-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 20px;
}
.dt-lib-toolbar .dt-filters {
  display: flex;
  gap: 8px;
}
.dt-lib-toolbar .dt-filters button {
  background: transparent;
  border: 1px solid var(--sepia-line);
  padding: 8px 14px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--muted-1);
  cursor: pointer;
}
.dt-lib-toolbar .dt-filters button.active {
  background: var(--sepia-ink);
  color: #fff;
  border-color: var(--sepia-ink);
}

/* ─── Account page ───────────────────────────────── */
.dt-account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 1000px;
}
.dt-acc-card {
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--sepia-line);
  padding: 28px;
}
.dt-acc-card h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--sepia-ink);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}
.dt-acc-plan {
  display: flex;
  gap: 16px;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--sepia-line);
  margin-bottom: 20px;
}
.dt-acc-plan-ic {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #FF933A, #FF4A00);
  color: #fff;
  display: grid; place-items: center;
}
.dt-acc-plan-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--sepia-ink);
}
.dt-acc-plan-sub {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 13px;
  color: var(--muted-1);
}
.dt-acc-stat {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--sepia-line);
  font-family: var(--font-body);
  font-size: 14px;
}
.dt-acc-stat:last-child { border-bottom: 0; }
.dt-acc-stat .lbl { color: var(--muted-1); }
.dt-acc-stat .val {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--sepia-ink);
}

/* Referral panel (desktop account) */
.dt-acc-card.dark {
  background: linear-gradient(135deg, #3a2817 0%, #1c130b 100%);
  color: #fff;
  border: 0;
  position: relative;
  overflow: hidden;
}
.dt-acc-card.dark::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,147,58,.2), transparent 60%);
  pointer-events: none;
}
.dt-acc-card.dark h3 { color: #fff; position: relative; }
.dt-acc-card.dark .dt-ref-sub {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 14px;
  color: rgba(255,255,255,.7);
  margin-bottom: 18px;
  line-height: 1.5;
  position: relative;
}

/* ─── Modal (paywall) ─────────────────────────────── */
.dt-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 5, 0.7);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  padding: 40px;
  z-index: 100;
  animation: dt-fade .2s ease-out both;
}
@keyframes dt-fade { from { opacity: 0; } to { opacity: 1; } }
.dt-modal {
  background: var(--sepia-paper);
  border-radius: 22px;
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,.5);
  animation: dt-pop .25s ease-out both;
  position: relative;
}
@keyframes dt-pop { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.dt-modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(42,31,21,.08);
  border: 0;
  color: var(--sepia-ink);
  cursor: pointer;
  display: grid; place-items: center;
  z-index: 2;
}
.dt-modal-close:hover { background: rgba(42,31,21,.15); }
.dt-modal-head {
  padding: 48px 48px 24px;
  text-align: center;
}
.dt-modal-head .pw-eye {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  color: var(--brand-orange);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.dt-modal-head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  color: var(--sepia-ink);
  letter-spacing: -0.015em;
  margin: 10px 0 8px;
}
.dt-modal-head p {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  color: var(--ink-3);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.55;
}
.dt-modal-body { padding: 0 48px 48px; }
.dt-billing-toggle {
  display: inline-flex;
  background: rgba(42,31,21,.08);
  border-radius: 999px;
  padding: 5px;
  margin: 20px auto 28px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
}
.dt-billing-toggle button {
  background: transparent;
  border: 0;
  padding: 9px 18px;
  border-radius: 999px;
  color: var(--muted-1);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dt-billing-toggle button.active {
  background: #fff;
  color: var(--sepia-ink);
}
.dt-billing-toggle .save-pill {
  background: var(--brand-orange);
  color: #fff;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}
.dt-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.dt-tier {
  background: #fff;
  border: 2px solid var(--sepia-line);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.dt-tier.featured {
  background: linear-gradient(135deg, #3a2817 0%, #1c130b 100%);
  border-color: #FF933A;
  color: #fff;
  transform: translateY(-6px);
}
.dt-tier h4 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--sepia-ink);
}
.dt-tier.featured h4 { color: #fff; }
.dt-tier .t-desc {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 13px;
  color: var(--muted-1);
  margin-bottom: 16px;
  min-height: 18px;
}
.dt-tier.featured .t-desc { color: rgba(255,255,255,.6); }
.dt-tier-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 4px;
}
.dt-tier-price .amt {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 34px;
  color: var(--sepia-ink);
  letter-spacing: -0.02em;
}
.dt-tier.featured .dt-tier-price .amt { color: #fff; }
.dt-tier-price .per {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted-1);
}
.dt-tier.featured .dt-tier-price .per { color: rgba(255,255,255,.6); }
.dt-tier-eq {
  font-family: var(--font-body);
  font-size: 11.5px;
  color: var(--muted-1);
  min-height: 15px;
  margin-bottom: 18px;
}
.dt-tier.featured .dt-tier-eq { color: rgba(255,255,255,.55); }
.dt-tier ul {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.dt-tier li {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-3);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}
.dt-tier.featured li { color: rgba(255,255,255,.85); }
.dt-tier li svg {
  color: var(--brand-orange);
  flex-shrink: 0;
  margin-top: 2px;
}
.dt-tier.featured li svg { color: #FF933A; }
.dt-tier-badge {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  background: var(--brand-orange);
  color: #fff;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ─── Responsive ──────────────────────────────────── */
@media (max-width: 1120px) {
  .dt-home-grid { grid-template-columns: 1fr; }
  .dt-results-grid { grid-template-columns: 1fr; }
  .dt-gallery-grid,
  .dt-lib-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .dt-topbar-inner { padding: 12px 20px; gap: 16px; }
  .dt-nav { display: none; }
  .dt-usage-chip { display: none; }
  .dt-shell { padding: 24px 20px 60px; }
  .dt-page-head h1 { font-size: 32px; }
  .dt-dropzone { padding: 40px 20px; margin: 16px; }
  .dt-upload-tips { grid-template-columns: 1fr; }
  .dt-upload-tips .tip { border-right: 0; border-bottom: 1px solid var(--sepia-line); }
  .dt-gallery-grid,
  .dt-lib-grid { grid-template-columns: repeat(2, 1fr); }
  .dt-account-grid { grid-template-columns: 1fr; }
  .dt-tiers { grid-template-columns: 1fr; }
  .dt-tier.featured { transform: none; }
  .dt-modal-head { padding: 32px 24px 16px; }
  .dt-modal-body { padding: 0 24px 32px; }
  .dt-compare-sbs { grid-template-columns: 1fr; }
}
